简体   繁体   中英

VS2010 upgrade with UnitTestFramework

I am having an issue with upgrading from VS2008 to VS2010 and staying with .Net 3.5.

All my unit test projects as soon as I open them in VS2010 have their assembly references replaced from v9 to v10. This causes the build to fail because my projects are built in .Net 3.5.

<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

Replaced with:

<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

In order to fix this, I have to manually edit the assembly reference to point to V9 every time I open the solution.

Has anyone had this issue ? Any solutions ?

This is an issue with VS2010. If you go into your unit test project properties, the target framework dropdown will only have one choice: .Net 4

This was fixed with SP1. If you install SP1 and go into project properties you should be able to target .Net 3.5 with your unit test project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM