Conditional Library References in Visual Studio


I recently ran into a situation where I needed to have a single project in Visual Studio build the application two different ways with each way using different DLL references. The normal Project Properties provide all sorts of mechanisms for build-specific options but Microsoft seems to have left the ability to specify conditional library references out of it for some reason.

It turns out that while they did leave it out of Visual Studio, it is available in MSBuild which Visual Studio uses to actually compile the code.

Here is how it works: Click to read the full post

Automatically Set the AssemblyFileVersion for Visual Studio Projects


One of the more annoying quirks with dealing with SharePoint is that once you develop a solution that requires custom code, all dependencies are then tied to the Strong Name of the compiled DLL.  That strong name also includes the version number, usually 1.0.0.0, and cannot be changed without breaking all existing references.  This is a good thing from a compatibility perspective but it does make it rather complicated to figure out exactly which version of a DLL is in use.

You can open up the WSP and then use the timestamps and take a guess at the version but it is not always reliable.  Click to read the full post

Vital Hotfix for Sluggish Design View in Visual Studio 2008


Microsoft has released a Hotfix for the incredibly annoying performance issues when working in the Design view of an Asp.Net form that contained custom user controls.

The installation info is on the MSDN Blog and is pretty self explanatory.  It takes a few minutes to install but it is worth the wait.  Before the patch, simply switching to Design view for one of my Asp.Net forms could take upwards of 30 seconds.  After the patch, it takes around 3 seconds and half of that is the pulling together the nested master pages behind the form. 

I've also noticed that the properties window now switches almost immediately when I click on a control.  Before, it would take 5-10 seconds to change and sometimes never did.