You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
This is due to microsoft.dotnet.xunitconsolerunner only supporting latest.
I also needed to set XunitConsoleNetCore21AppPath since this wasn't set by the official package.
After that I got much closer - stuff was running. I noticed that some assemblies weren't copied though. If the assembly was a framework assembly it would not be copied (even though the locally built project references were newer than the 8.0 framework bits).
Ideally we shouldn't be doing this, but instead flow the references through conflict resolution for it to do version comparisons. That's what will happen when users install the packages we produce. Conflict resolution doesn't work by default for project references dotnet/sdk#2674, so we might need to workaround that.
To unblock I just manually set Private="True" on the reference I cared about. After this I almost got things working, but RemoteExecutor seemed to be not using the application's deps file.
Description
We have some nuget packages where it would be nice to test against older versions of .NET. I tried doing this but hit a few problems.
Reproduction Steps
Add
$(NetCoreAppMinimum)
to a test project and build and run tests.Expected behavior
Tests should build and run against the older runtime - located from dotnet on the path.
Actual behavior
Tests fail to start
This due to test script using
%RUNTIME_PATH%\
but never setting it:runtime/eng/testing/tests.targets
Lines 33 to 34 in 4777beb
I can workaround this by setting
Then I see
This is due to microsoft.dotnet.xunitconsolerunner only supporting latest.
So I worked around that with changes to
runtime/eng/testing/xunit/xunit.console.targets
Lines 45 to 51 in a3bf53f
I also needed to set
XunitConsoleNetCore21AppPath
since this wasn't set by the official package.After that I got much closer - stuff was running. I noticed that some assemblies weren't copied though. If the assembly was a framework assembly it would not be copied (even though the locally built project references were newer than the 8.0 framework bits).
That's due to the hardcoding here;
runtime/eng/references.targets
Line 33 in a3bf53f
Ideally we shouldn't be doing this, but instead flow the references through conflict resolution for it to do version comparisons. That's what will happen when users install the packages we produce. Conflict resolution doesn't work by default for project references dotnet/sdk#2674, so we might need to workaround that.
To unblock I just manually set
Private="True"
on the reference I cared about. After this I almost got things working, but RemoteExecutor seemed to be not using the application's deps file.Here's some of the hacking: ericstj@7f0a1a8
Regression?
Nope, it's just runtime being 🌟 🌟 special🌟 🌟
Known Workarounds
See above
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: