Skip to main content

Posts

.NET Code Documentation

Although good naming and a set of well written tests  can bring us so far, good documentation is sometimes indispensible. Before releasing a component I was documenting a public API using the Visual Studio XML documentation. The exposed API was using generics, but I didn’t know what the correct documentation structure was. MSDN brought the answer:

Today it’s AzureCon 2015

Don’t forget! Today it’s AzureCon 2015 , a free, virtual event about Microsoft Azure. Hear from the experts about the latest Azure innovation and easy-to-adopt solutions. Listen as customers take the stage to share their stories. Join live Q&As and interact with the architects and engineers who are building the latest features. Choose from more than 60 technical sessions—and accelerate your journey to the cloud.

Microsoft Unity - 'Microsoft.Practices.Unity.InjectedMembers' is obsolete: 'Use the IUnityContainer.RegisterType method instead of this interface'

While preparing a release I was cleaning up some build warnings that sneaked into the code. One of the warnings I got was the following regarding Unity, Microsoft’s IoC container: Warning              11           'Microsoft.Practices.Unity.InjectedMembers' is obsolete: 'Use the IUnityContainer.RegisterType method instead of this interface'                C:\Projects\Services\ServicesConfiguration.cs           136         38                Services The warning was coming from the following code: Using this code I’m configuring the constructor parameters when a ServiceAgentConfiguration class is resolved from the IoC container...

Mozilla Developer Network–THE resource for JavaScript

Thanks to contributions from the community MDN.io (Mozilla Developer Network) is THE place to be for anything regarding JavaScript and web development in general. It’s a great learning resource and reference for all the ins and outs of the web platform, its tools and technologies. Web developers, add this to your favorites!!!

Could not add Fakes assembly–Fakes assembly already referenced

While debugging the issue with the Microsoft Fakes framework I had yesterday, one thing I tried was to regenerate the Fakes assemblies. First thing I did was remove all generated fake assemblies from the references: Afterwards I right clicked on the original assembly and choose ‘Add Fakes Assembly’: But this failed with the following error message: What I forgot to do was to remove the generated Fakes folder as well. After doing that I was able to regenerate the Fakes assemblies.

Microsoft Fakes issue after upgrading to TFS 2015

After upgrading to Team Foundation Server 2015, some of our builds started to fail. Inside the build log, I found a long list of errors. All similar to the following: f.cs (17985, 0) The type or namespace name 'EventIgnoreAttribute' does not exist in the namespace 'System.Diagnostics.Tracing' (are you missing an assembly reference?) [c:\b\1\App\Daily Release\Sources\App\Test\Test.Mailing\obj\Release\Fakes\m\f.csproj] This test project is using the Microsoft Fakes framework to mock the usage of the SmtpClient. But for an unknown reason the fakes framework cannot generate code for some of the namespaces inside the System DLL. I found some forum posts where people had similar issues. I couldn’t find a real solution, but I was able to fix the issue by applying the following workaround: Inside Visual Studio open the project where you are using the Fakes framework Go to the Fakes folder inside this project For each fakes file, clear the existin...

Visual Studio 2013–Reinstall a NuGet package

Last week I had a situation where I wanted to replace a NuGet package. The problem was that the NuGet Package version was not updated but the content was changed (I know, not a good idea). So what I wanted is that the system remove the existing package and reinstall it from the NuGet repository.  First thing I tried was the following command: Update-Package –reinstall <package name> The command succeeded but when I checked the content of the NuGet Package it contained still the old content. Afterwards I tried a different approach: I deleted the reference from my project Edited the packages.config to remove the reference to the NuGet package Removed the NuGet package from the file system After removing everything manually, I did a new install: Install-Package <package name> But again, no luck. When I checked the content of the NuGet Package the old content was still there… In the end I was able to solve the issue by clearing the pack...