Closed
Description
openedon Dec 22, 2021
Description
In package
Microsoft.NET.Test.Sdk
movebuild
folder content tobuildTransitive
. This feature can simplify working with tests hierarchy. For now we forced to referenceMicrosoft.NET.Test.Sdk
in each test project which is inconvenient.
Even when we use
PrivateAssets="contentfiles;analyzers"
it works only for one hierarchy layer (TestSDKNotTransitive_WithPrivateAssets
projectB
works correctly butC
does not )
Steps to reproduce
- call
dotnet test B.dll
in.\TestSDKNotTransitive\B\bin\Debug\net5.0\
fromTestSDKNotTransitive.zip
- call
dotnet test C.dll
in.\TestSDKNotTransitive_WithPrivateAssets\C\bin\Debug\net5.0\
fromTestSDKNotTransitive_WithPrivateAssets.zip
TestSDKNotTransitive.zip
TestSDKNotTransitive_WithPrivateAssets.zip
Expected behavior
Tests from
1
and2
should be executed
Actual behavior
Testhost process exited with error: A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
Failed to run as a self-contained app.
- The application was run as a self-contained app because 'C:\Users\nedav\source\repos\TestSDKNotTransitive\B\bin\Debug\net5.0\testhost.runtimeconfig.json' was not found.
- If this should be a framework-dependent app, add the 'C:\Users\nedav\source\repos\TestSDKNotTransitive\B\bin\Debug\net5.0\testhost.runtimeconfig.json' file and specify the appropriate framework.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment