Runtime error (System.Runtime 4.2.0.0 not found) using nightlies
See original GitHub issueAs per https://github.com/dotnet/cli/issues/5242 - have narrowed down my issue to the EF Core preview1 packages.
Exception when using dotnet run
is as follows:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
If there’s some guidance, notes or announcement I missed would you mind pointing me to it? Have been happily running nightlies until I pushed a new build of my app to Azure a few days ago, whereupon some new version caused this issue for me.
Further technical details
EF Core version: Remind me how to do this for VS2017 please? There is no packages.config or project.json. is there a lock file?
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Win 10
IDE: Commandline … but also VS2017
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Runtime error (System.Runtime 4.2.0.0 not found) using ...
My main issue is that I was happily running 1.1 on an Azure App Service, until I ran into more EF bugs -...
Read more >Could not load file or assembly 'System.Runtime, Version= ...
I resolved the error by using NuGet to install the previous version of System. Runtime then used NuGet to update to the current...
Read more >Cannot load file or assembly 'System.Runtime'
When I try to run the application, I get this error: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, ...
Read more >Cannot load 'System.Runtime, Version=4.2.0.0, Culture= ...
Build a simple .Net Core 2.0 dll. Load the same from another project, using Assembly.LoadFromFile. Ty to get tye Types inside the assembly,...
Read more >Could Not Load File Or Assembly 'System.Runtime, ...
When I am trying to add reference of System.Runtime (v6.0.0) in ClassLibrary1, I am getting compile time errors as below. ASP.NET (C#)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kierenj, in case you’re interested in “standalone” (AKA self-contained apps):
I would phrase it differently: nightly builds of the SDK and the runtime are not deployed to Azure App Service. Azure App Service is updated only when there’s a public release.
If you’d like to still deploy with nightlies, you can build your app as a “standalone” app, i.e. packing and deploying the runtime itself with your app. Just a reminder though, only public RTM releases are considered “officially supported”.