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

dotnet vstest throws an exception when running Full CLR assemblies #532

Closed
AbhitejJohn opened this issue Feb 22, 2017 · 1 comment
Closed
Assignees

Comments

@AbhitejJohn
Copy link
Contributor

Description

On a test project targeting net46, if dotnet vstest is performed on the test assembly using the same arguments as one would use for netcoreapp targeted assembly it throws an exception. The workaround is to provide a /Framework:Framework45 switch to it.

Steps to reproduce

  1. Create a vanilla .Net Core unit test project targeting net46 and build.
  2. Perform dotnet vstest on the unit test assembly.

Expected behavior

The default test should run.

Actual behavior

The following exception is thrown out:

Error: Could not find testhost.dll for source 'C:\SomeRandomPath\UnitTestProject4\UnitTestProject4\bin\Debug\net46\UnitTestProject4.dll'. Make sure test project has a nuget reference of package "microsoft.testplatform.testhost".

Environment

dotnet --version 1.0.0-rc4-004812

@AbhitejJohn
Copy link
Contributor Author

There seems to be two issues here:

  1. The exception message doesn't help me identify the actual cause of the problem: This assembly cannot be loaded unless its target framework is specified.
  2. It would be great to not mandate the specification of the Framework. The test platform could smartly figure this information out.

@Faizan2304 Faizan2304 self-assigned this Apr 5, 2017
Faizan2304 pushed a commit to Faizan2304/vstest that referenced this issue Apr 5, 2017
Faizan2304 added a commit that referenced this issue Apr 7, 2017
* Fix for issue:
1) #341
2) #532

* Update message text and fix tests

* Fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants