Create a ASP.NET Core 2.0 (final) project or any project with:
dotnet restore
dotnet run
Run without errors or warnings
Dotnet run results in the error below:
dotnet run:
/usr/local/share/dotnet/sdk/2.0.0-preview2-006497/Microsoft.Common.CurrentVersion.targets(1984,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [/Users/guilherme/Desktop/CatalogWeb/CatalogWeb.csproj]
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.2.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at CatalogWeb.Program.BuildWebHost(String[] args) in /Users/guilherme/Desktop/CatalogWeb/Program.cs:line 21
at CatalogWeb.Program.Main(String[] args) in /Users/guilherme/Desktop/CatalogWeb/Program.cs:line 17
dotnet --info output:
.NET Command Line Tools (2.0.0-preview2-006497)
Product Information:
Version: 2.0.0-preview2-006497
Commit SHA-1 hash: 06a2093335
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.0.0-preview2-006497/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview2-25407-01
Build : 40c565230930ead58a50719c0ec799df77bddee9
The issue was solved using the latest .NET Core 2.0 release (final - https://download.microsoft.com/download/0/F/D/0FD852A4-7EA1-4E2A-983A-0484AC19B92C/dotnet-sdk-2.0.0-osx-x64.pkg).
Glad to hear the issue was solved with newer bits. :)
I am running into the same error after updated .net core final release. I cannot install pkg on window, do you have fix for window 64?
@dianewanghalsey I'm guessing the steps to reproduce the problem for you are not the same as listed in this bug's description, are they?
Updating to Visual Studio 2017, 15.4, Preview 1 and installing the dotnet core 2.0 final release enabled me to get rid of this error and i am able to run the app now. Thanks 馃憤
Updating to Visual Studio 2017, 15.4, Preview 1 and installing the dotnet core 2.0 final release enabled resolved my odd problem also
Mine got resolved by upgrading the IOS version to 10.13.1 . MAC OS High Sierra
Most helpful comment
The issue was solved using the latest .NET Core 2.0 release (final - https://download.microsoft.com/download/0/F/D/0FD852A4-7EA1-4E2A-983A-0484AC19B92C/dotnet-sdk-2.0.0-osx-x64.pkg).