"Could not load file or assembly 'System.Runtime, Version=4.2.0.0'"
See original GitHub issueSteps to reproduce
dotnet new -t web1.1
dotnet restore
dotnet run
Expected behavior
Application started. Press Ctrl+C to shut down.
Actual behavior
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)
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-rc3-004530)
Product Information:
Version: 1.0.0-rc3-004530
Commit SHA-1 hash: 10b642bc12
Runtime Environment:
OS Name: ubuntu
OS Version: 14.04
OS Platform: Linux
RID: ubuntu.14.04-x64
Base Path: /usr/share/dotnet/sdk/1.0.0-rc3-004530
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:21 (10 by maintainers)
Top Results From Across the Web
Could not load file or assembly 'System.Runtime, Version= ...
Go to your project folder. · Delete the bin file inside your project folder. · Remove all added references. · Load your project...
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 >NET Core: Could not load file or assembly 'System. ...
This seems very similar to Issue 150 and Issue 139 but I could not solve the problem by removing dependencies to my shared...
Read more >Could not load file or assembly 'System.Runtime, Version= ...
Hi, I read other post about this error but I m not sure that the other have this issue only when the project...
Read more >Could not load file or assembly System.Runtime in NET4x
I blamed visual studio IDE and NuGet package manager for not being able to bring a simple DLL into bin folder. In one...
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 FreeTop 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
Top GitHub Comments
I resolved this by navigating to
C:\Users\...\AppData\Roaming\.Nuget\packages
and deleting the existing microsoft.visualstudio.web.browserlink folder. Then rundotnet restore
on the project folder.The issue here is that the version included in the CLI’s offline package cache of
Microsoft.VisualStudio.Web.BrowserLink
version1.1.0
seems to be broken. If dorm -r ~/.nuget/packages/microsoft.visualstudio.web.browserlink
and then rundotnet restore
anddotnet run
again, no issues occur.I suppose a nightly dev-feed version of that package made it into the CLI? This repros in
1.0.0-rc3-004530
but the version included in1.0.0-rc4-004711
is fine. Is this fixed permanently? If so, it should probably be marked as an RC3 known issue. cc @piotrpMSFT @livarcocc