dotnet run should use the dotnet muxer and not corehost
Steps to reproduce
Build something with dependency to System.Security.Cryptography.OpenSsl/4.0.0-rc2-23914 on windows.
Run it.
Expected behavior
When having library like System.Security.Cryptography.OpenSsl which doesn't have runtime target for current platform corehost should skip it.
"System.Security.Cryptography.OpenSsl/4.0.0-rc2-23914": {
"dependencies": {
"System.Collections": "4.0.11-rc2-23914",
"System.IO": "4.1.0-rc2-23914",
"System.Resources.ResourceManager": "4.0.1-rc2-23914",
"System.Runtime": "4.1.0-rc2-23914",
"System.Runtime.Extensions": "4.1.0-rc2-23914",
"System.Runtime.Handles": "4.0.1-rc2-23914",
"System.Runtime.InteropServices": "4.1.0-rc2-23914",
"System.Runtime.Numerics": "4.0.1-rc2-23914",
"System.Security.Cryptography.Algorithms": "4.1.0-rc2-23914",
"System.Security.Cryptography.Encoding": "4.0.0-rc2-23914",
"System.Security.Cryptography.Primitives": "4.0.0-rc2-23914",
"System.Text.Encoding": "4.0.11-rc2-23914",
"runtime.native.System.Security.Cryptography": "4.0.0-rc2-23914"
},
"runtimeTargets": {
"runtimes/unix/lib/netstandard1.4/System.Security.Cryptography.OpenSsl.dll": {
"rid": "unix",
"assetType": "runtime"
}
},
"native": {}
},
Actual behavior
Fails with an error.
Did not find a matching fallback rid for package System.Security.Cryptography.OpenSsl/4.0.0-rc2-23914 for the host rid win10-x64
Invalid .deps file
Environment data
dotnet --version output:
.NET Command Line Tools (1.0.0-beta-001806)
Product Information:
Version: 1.0.0-beta-001806
Commit Sha: N/A
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
Runtime Id: win10-x64
/cc @schellap
Added blocking-partner because it blocks MVC.
Also blocking Microsoft.Data.Sqlite: https://github.com/aspnet/Microsoft.Data.Sqlite/issues/241 ... which in-turn blocks Entity Framework's SQLite provider
@pakrym this is fixed now, right? @natemcmaster did you see this error message in the latest CLI?
@schellap just reproed in this version:
.NET Command Line Tools (1.0.0-beta-001935)
Product Information:
Version: 1.0.0-beta-001935
Commit Sha: 0e92937850
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
Runtime Id: osx.10.11-x64
Can I ssh or can you gzip your app?
@schellap sqlite3.zip
Is this the exact error message, could you double check? Because this code got removed from deps_format.cpp.
https://github.com/dotnet/cli/blob/rel/1.0.0/src/corehost/cli/deps_format.cpp
@schellap maybe this change isn't in the build I'm using?
$ dotnet run
Project sqlite3 (.NETStandard,Version=v1.5) was previously compiled. Skipping compilation.
Did not find fallback rids for package Microsoft.Data.Sqlite/1.0.0-rc2-20270 for the host rid osx.10.10-x64
Invalid .deps file
$ dotnet --version
.NET Command Line Tools (1.0.0-beta-001935)
Product Information:
Version: 1.0.0-beta-001935
Commit Sha: 0e92937850
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
Runtime Id: osx.10.11-x64
Just saw a new build came out a few minutes ago. Still getting the exact same error.
.NET Command Line Tools (1.0.0-beta-001937)
Product Information:
Version: 1.0.0-beta-001937
Commit Sha: 3616378130
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
Runtime Id: osx.10.11-x64
Which dotnet is on your path? Can you invoke it directly with absolute path and see if this reproes?
If it still reproes, I need this file:
`which dotnet`/../shared/Microsoft.NETCore.App/1.0.0-rc2-23911/Microsoft.NETCore.App.deps.json
The error message in the linked bug is slightly different, this means the host is not able to find a rid fallback graph for its own starting rid.
I've been installing dotnet into $HOME/.dotnet
curl https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.sh | bash -s -- -i $HOME/.dotnet
And yes, with absolute path invocation, this still reproduces.
$ $HOME/.dotnet/dotnet run
Project sqlite3 (.NETStandard,Version=v1.5) was previously compiled. Skipping compilation.
Did not find fallback rids for package Microsoft.Data.Sqlite/1.0.0-rc2-20270 for the host rid osx.10.10-x64
Invalid .deps file
$ $HOME/.dotnet/dotnet --version
.NET Command Line Tools (1.0.0-beta-001941)
Product Information:
Version: 1.0.0-beta-001941
Commit Sha: 61a47dade4
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
Runtime Id: osx.10.11-x64
Here is the deps.json file: https://gist.github.com/natemcmaster/792c658fa25f00306923
Okay I have figured out the issue:
dotnet run is not using the dotnet muxer. It is using corehost and hence there is no rid fallback present and corehost failing to do a rid fallback.
--- Invoked host main = {
/Users/clrteam/Desktop/schellap/cli/temp/sdk/1.0.0-beta-001941/corehost
/Users/clrteam/Desktop/schellap/cli/temp/sqlite/sqlite3/bin/Debug/netstandard1.5/sqlite3.dll
}
I worked around by doing this:
dotnet /Users/clrteam/Desktop/schellap/cli/temp/sqlite/sqlite3/bin/Debug/netstandard1.5/sqlite3.dll
@pakrym could you PTAL or assign it to the right person.
@piotrpMSFT please redirect...
This PR makes the switch: failures were for some weird reasons, retesting now https://github.com/dotnet/cli/pull/1851
This was fixed last week