sdk: "Could not load file or assembly 'System.Runtime, Version=4.2.0.0'"
Steps to reproduce
dotnet new -t web1.1dotnet restoredotnet 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
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 6
- Comments: 21 (10 by maintainers)
I resolved this by navigating to
C:\Users\...\AppData\Roaming\.Nuget\packagesand deleting the existing microsoft.visualstudio.web.browserlink folder. Then rundotnet restoreon the project folder.The issue here is that the version included in the CLI’s offline package cache of
Microsoft.VisualStudio.Web.BrowserLinkversion1.1.0seems to be broken. If dorm -r ~/.nuget/packages/microsoft.visualstudio.web.browserlinkand then rundotnet restoreanddotnet runagain, 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-004530but the version included in1.0.0-rc4-004711is fine. Is this fixed permanently? If so, it should probably be marked as an RC3 known issue. cc @piotrpMSFT @livarcoccAny update on this, @mlorbetske and @sayedihashimi? My project didn’t compile because
Streamwas defined in two different assemblies. Googling that brought me nowhere.Microsoft.VisualStudio.Web.BrowserLinkbeing the culprit didn’t occur to me at all…Is there any reason not to release a patch version, as @dasMulli suggests?
@mlorbetske let’s try and chat today if possible
@mlorbetske since some more people are hitting this for various reasons, would it be possible to release a patch version (
1.1.1) on nuget and future template updates to address the issue? (Latest user hitting this was @pauldotknopf via Slack)