Sunday, June 15, 2008

VS2005 -> VS2008 Conversion Wizard Runs Every Time

I'm working through a few minor nits with a moderately sized solution (23 projects) that I've just converted from VS2005 to VS2008.  One nit is the conversion wizard runs every time I open the solution.  Irritating.

Answer found after trolling through some MSDN posts: Test projects appear to have a few hitches during the conversion process, one of which is the FileUpgradeFlags element in the .csproj file failing to properly update.  This causes the wizard to re-run every time you open the solution containing the project.

To fix, find the element <FileUpgradeFlags>.  It will probably look like

<FileUpgradeFlags>0</FileUpgradeFlags>

Remove the zero in the element content, leaving an empty element:

<FileUpgradeFlags></FileUpgradeFlags>

Do this for every test project in your solution.  Save 'em all, re-open the solution and you should see no conversion wizard.  Yay!

(Original MSDN post here.)

Now if I could just get MS Test to play nicely with my hibernate.cfg.xml files in the MS Test deployed location.  I continue to search for a rational explanation of why MS Test insists on copying all binaries to a location separate from the build location in order to run its tests, forcing you to deal with "DeploymentItem" attributes and test configuration shenanigans.  I've run in to a number of PITA issues with this separate-but-equal concept, and I'm having a hard time understanding the reasoning for creating a second environment that's not treated the same as the solutions' build environment.  Brittle, complex, and more moving parts than necessary.

Yet another reason for preferring MBUnit for a test framework that helps, not hinders, all the testing I like to do.

No comments:

Subscribe (RSS)

The Leadership Journey