I use MSBuild and CruiseControl.NET for my automated build process. Just yesterday I was debugging a problem in one of my assemblies and came across this warning message:
Use command line option '/keyfile' or appropriate project settings instead of 'AssemblyKeyFile'
I had never noticed the warning before, but looked into some of the past builds and noticed that it had always been there. After doing some research, I found out that Visual Studio 2005 now considers the use of setting the AssemblyKeyFile in the AssemblyInfo.cs file a security issue. This is due to the AssemblyKeyFile attribute being embedded within your assembly and possibly containing sensitive path information. The warning also recommended setting this information via the project settings. I use an external strong name key file for all of my assemblies. It resides outside all of my projects/solutions. When I referenced this strong name key file, VS2005 copied it into the project. This wasn't a good thing at all.
After looking into what was going on, I noticed that in the project msbuild file, there is a property called AssemblyOriginatorKeyFile. VS2005 automatically set it to reference the copied strong name key that it placed in the project. I updated this path to reference my external strong name key, saved it, and deleted the local copy of the strong name key in the project. I tested the build and it worked!
I have no idea why Microsoft designed it this way, but thankfully this method works great.
b6e4a3ec-b71e-4c2c-ac07-d51de442a2bc|0|.0