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