It would be great if it was possible to debug msbuild script. Step in, step out, see properties and values… Seems like there is a way to do it via VS2010 although unsupported. What needs to be done is:

Ensure you debug “Just my code”:

Enable undocumented "/debug" switch on MSBuild.exe by adding registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\4.0 key to have debuggerenabled=true. Execute this in command prompt:

I received the error message "attempted re-targeting of the project has been canceled. You cannot change the specified .NET framework version or profile for a test project" when trying to target the .NET 3.5 framework after upgrading to Visual Studio 2010.

And this was tricky – we want to move to VS 2010 but still compile against .NET .3.5. Although having tests target .NET 4 is not critical is not very nice. We don’t want to have bugs slipped out because production code and test code are compiled against different .NET versions.

Luckily there is a solution – manually editing .csproj file and trick VS2010 to think it is not a test class library but simply class library:

I just started taking advantage of TFS 2010 Basic (or TFS 2010 for SourceSafe users as Brian Harry named it ) and found something interesting to share. The project I was testing with is Windows Phone 7 one and it was building perfectly form VS 2010. But when triggered a server build the agent fails with following error:

This almost slipped out of my sight. Visual Studio 2010 adds an option to execute unit tests in parallel. Probably it would be obvious but let me emphasis that all multithreading issues could arise and let tests fails in such case. So all tests must be thread safeand tested code as well…

The option to enable this is very hidden It is not exposed via VS GUI but in .testsettings file instead. It has to be edited in XML editor and add to <Execution> parallelTestCount attribute greater than 1(e.g. parallelTestCount=”4”)

Extract the contents of the setup package by running vm_web.exe /x and choosing a path to extract to

Go to the folder you extracted to in step 2 and open the file baseline.dat in notepad

Look for the section named [gencomp7788]Note - you have to change this exact section - this is the one that controls the OS version blocking behavior in Windows Phone Developer Tools setup.

Change the value InstallOnLHS from 1 to 0

Change the value InstallOnWin7Server from 1 to 0

Save and close baseline.dat

Run setup.exe /web from the folder you extracted to in step 2 Note - please make sure that you include the /web command line parameter in step 8. If you don't, setup will not attempt to download the packages it needs to install, and it will fail to install correctly as a result.

About the author

Galin Iliev - Galcho - is a software design engineer working at Microsoft and specializing in Microsoft technology stack and lately focusing on highly scallabe web services build with WCF and working . He holds MCT, MCPD and MCAD certificates.