machine.specifications icon indicating copy to clipboard operation
machine.specifications copied to clipboard

VS2017 NuGet Package Manager

Open holtjonathan opened this issue 9 years ago • 6 comments

Hello, I have been using MSpec for several years now and to get it running I simply had to download the test adapter via the nuget package manager. We recently upgraded to VS2017 and our tests are not showing up and I am assuming that it is because there is no test adapter to download from the manager.

What do I need to do so 2017 sees all of our mspec tests?

holtjonathan avatar Aug 21 '17 13:08 holtjonathan

In previous version of NuGet and VS 2015 it was possible to install the adapter on solution level. With VS2017 and newere NuGet you need to install the adapter into each test project. Make sure you are also on the latest version - at the time of writing this is 2.2.3 ( https://www.nuget.org/packages/Machine.Specifications.Runner.VisualStudio/ ). Might need to re-open the solution once you do that.

Let me know if that works for you?

ivanz avatar Aug 21 '17 14:08 ivanz

Forgive my lack of understanding, but how would I go about installing the adapter into my project?

holtjonathan avatar Aug 21 '17 14:08 holtjonathan

Install the NuGet package in every test project - the same way you would install any other NuGet packages.

ivanz avatar Aug 21 '17 14:08 ivanz

Derp :-)

I try to install it but I am getting the error:

Could not install package 'Machine.Specifications.Runner.VisualStudio 2.2.3'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', 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.

holtjonathan avatar Aug 21 '17 14:08 holtjonathan

The NuGet package requires the test project to target .NET 4.6+

ivanz avatar Aug 21 '17 14:08 ivanz

You are the man. Thanks for the help.

holtjonathan avatar Aug 21 '17 14:08 holtjonathan