Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX: Simple use cases are failing for testing in multi-targetting projects on VS2017 for win10-x64 #8386

Closed
ghost opened this issue Jun 13, 2017 · 7 comments

Comments

@ghost
Copy link

ghost commented Jun 13, 2017

Steps to reproduce

Please clone https://github.com/fir3pho3nixx/nunit-adapter-vs-xunit
Then run: build.bat

Expected behavior

It does NOT kick out: Make sure test project has a nuget reference of package "microsoft.testplatform.testhost". The real problem here would be handy.

This happens for both NUnit and XUnit. You can observe this by commenting out this line.

Actual behavior

It kicks out: Make sure test project has a nuget reference of package "microsoft.testplatform.testhost".

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.4)

Product Information:
Version: 1.0.4
Commit SHA-1 hash: af1e668

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.4

More info

We have an issue here: castleproject/Windsor#243

I am trying to help out here: nunit/nunit3-vs-adapter#324

But in an attempt to create a repro here: https://github.com/fir3pho3nixx/nunit-adapter-vs-xunit I keep getting this error.

This should be simple on windows(but does not work out of the box). My end game is to get this going on Linux. I can do this and have done it before, I am just thinking of people that discover this for the first time and are left googling the problem for hours on end. Can we make this better?

@ghost ghost changed the title UX: Simple use cases are failing for testing in multi-targetting projects on VS2017 UX: Simple use cases are failing for testing in multi-targetting projects on VS2017 for win10-x64 Jun 13, 2017
@dsplaisted
Copy link
Member

dsplaisted commented Jun 13, 2017

The real problem here would be handy.

What is the real problem? Or are you not sure?

@ghost
Copy link

ghost commented Jun 13, 2017

I keep running into this, I am grumpy and tired right now so going to bed but I am sure with more digging I will find the answer. Please look at the code sample ... it is incredibly simple. Night.

@dasMulli
Copy link
Contributor

None of these test projects have a package reference to Microsoft.NET.Test.Sdk so dotnet test isn't going to work.

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />

@ghost
Copy link

ghost commented Jun 14, 2017

@dasMulli - thanks. If this fixes it that is great.

I still believe the error message is absolutely farcical. It bum steers you to a NuGet that does not have this as a dependency. The reason I raised this was in hope that the error report could be made slightly more intelligable hence why I prefix the issue title with UX.

@dasMulli
Copy link
Contributor

I also do agree that the error message should be actionable here (sth like "Make sure your project references the Microsoft.NET.Test.Sdk NuGet package."), which would be an issue for the https://github.com/microsoft/vstest repo owning this code. (care to move?)

@ghost
Copy link

ghost commented Jun 14, 2017

I will move it, many thanks.

@ghost ghost closed this as completed Jun 14, 2017
@ghost
Copy link

ghost commented Jun 14, 2017

@dasMulli - Created issue as promised. Thanks again 👍

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants