I created a console app in VS2012 and tried to add the MS unit test dll. But there are 5 of them. Which one should I use for .NET 4.0 with VS2012 and what are the other ones anyways?
Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
Version: 9.0.0.0 File Version: 9.0.30729.1
Version: 10.0.0.0 File Version: 11.0.30319.1
Version: 10.0.0.0 File Version: 11.0.50727.1
Version: 10.1.0.0 File Version: 11.0.40219.1
Version: 10.1.0.0 File Version: 11.0.50727.1
Each version of Visual Studio ships with a Test Runner. 9, 10, 11 refer to Visual Studio 2008, 2010 and 2012 respectfully.
Up until Visual Studio 2008, each version of Visual Studio targeted a single .net runtime and had a specific test runner. Visual Studio 2008 changed that by supporting multi-targetting which allowed you to use a single IDE to compile applications that targetted different versions of the framework. At that time, a single test runner worked for all of the .net versions because .net 2-3.5 all were based on version 2 of the CLR.
When Visual Studio 2010 was shipped, you could target and compile .net 2 thru 4.0 but because 4.0 was based on a different version of the CLR, the Visual Studio 2010 team shipped with only the ability to run tests that were compiled under 4.0.
This obviously didn't sit well with teams that wanted to use VS 2010 to target earlier versions of the runtime and compile their tests with the same runtime, so Visual Studio 2010 SP1 shipped a patched test runner that could target 3.5 -- hence, 10.1.0.0 was introduced. (You only need to reference 10.1.0.0 if you want to run 3.5 tests in VS 2010.)
I've only used VS2012 casually but my guess is the same logic applies.
11.0.3xxx = .net 2-3.5 11.0.4xxx = .net 4.0 11.0.5xxx = .net 4.5
I may be wrong on this, and there's a chance one of these may be geared towards WinRT.
you have to use older versions if you are running an older version of visual studio (EDIT: or want your project to be compatible with older versions of VS), this should clarify: http://juristr.com/blog/2011/04/trouble-with-vs-qualitytoolsunittestfra/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With