December, 2009 - Anything's Possible - Site Home - MSDN Blogs

Anything's Possible

Ever heard a developer say "it can't be done?" It is one of my biggest pet peeves. The truth is, it can be done. If you approach a problem pragmatically and put enough effort into it, understanding the root issues, and not settling for sub-pa

December, 2009

  • Anything's Possible

    Building VS 2008 Unit Test Projects in MSBuild 4.0 Beta 2

    • 4 Comments
    MSBuild 4.0 has all sorts of features for targeting different .NET Framework versions. The idea is that you can use MSBuild 4.0 to build all your legacy (pre-4.0) project types, as well as new projects that just target a downlevel version of the .NET Framework. In addition, you can mix and match the target framework versions for different projects under a single invocation of MSBuild.exe. Unfortunately, in Beta 2, we've had reports of a problem with building unit test projects that contain the special generated accessor assemblies, otherwise known as "test references". If you have a VS 2008 unit test project with test references, you may find that MSBuild 4.0 gives you an error like: Caught a BadImageFormatException saying "Could not load file or assembly 'C:\Build\Project\Sources\ProjectName\ProjectName.UnitTests\obj\Debug\ProjectName_Accessor.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.". ...
Page 1 of 1 (1 items)