6

I am working with VS2013, .NET4.5

I was looking to use Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute on my tests to disable them in build server. I was unable to find it in Add reference -> Assemblies so I figured to use nuget package. Originally I installed it via 'Package Manager Console'.

Now I am experiencing weird issue with Microsoft.VisualStudio.QualityTools.UnitTestFramework nuget package. When I install it via Manage nuget packages at project level I can't see it in references. If I try to install it again it shows install button, but when I click it nothing happens.

If search at Solution level when it finds package it shows green 'installed' checkbox but I am unable to find it in installed packages so have no way of enabling it for projects.

I have checked packages folder and files are there.

I can manually add reference by browsing to .dll in packages folder but this does seem like a hack and I am pretty sure it will fail on build server.

And can remove it only manually by going to \packages deleting .nupkg and then removing reference from packages.config.

Have you experienced something similar (maybe with one of other nuget packages)? What was the cause? How did you solve it?

leppie
  • 115,091
  • 17
  • 196
  • 297
Matas Vaitkevicius
  • 58,075
  • 31
  • 238
  • 265
  • I'm seeing similar ... sorry, not got an answer :-( – SteveC Mar 24 '15 at 15:06
  • I'm having a similar problem. On my development PC's that item exists and seems to have been installed as part of VS 2012. On my CI server, where VS is not installed and I don't intend to install it, that dll isn't anywhere to be found. If the NuGet.exe is installed, you can do `nuget install Microsoft.VisualStudio.QualityTools.UnitTestFramework` and it says success, but my build (running through Ant and MSBuild) can't find the file. – Robert Bratton Jun 17 '15 at 18:48

3 Answers3

4

I also got this issue recently and installing Microsoft.VisualStudio.UnitTesting instead solved the issue. Make sure you reference the library in the package folder by deleting the VisualStudio.QualityTools.UnitTestFramework reference first and install Microsoft.VisualStudio.UnitTesting through nuget package manager to unit testing project.

madufit1
  • 206
  • 3
  • 10
0

We have had this problem too, If you look at the package manager output:

Could not install package 'Microsoft.VisualStudio.QualityTools.UnitTestFramework 11.0.50727.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

This has to do with a different .NET framework, only 4.5.2 is supported for this package.

Steve Czetty
  • 6,147
  • 9
  • 39
  • 48
0

My system had three version of visual studio i.e. visual studio 2012. visual studio 2017 and visual studio 2019. i uninstall version 2012 and 2017. clear the temp file. update the visual studio 2017 to latest from visual studio installer. rebuild the project but issue of Microsoft.VisualStudio.QualityTools.UnitTestFramework still exist.my project is still taking referencing from my previous version visual studio 2012 and 2017. note my project build on Nunit framework on top that specflow is used. so to resolve the problem what i did

  1. moved the older version Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll which is located inside /c/user/.nuget path to some x folder in same path.

  2. from nuget pacakage manager installed unofficial.microsoft.visualstudio.qualitytools.UTF as it has created/updated in 2019.

  3. close the vs2019, reopen vs2019 and rebuild my project

  4. ahuh issue resolved