SignalR核心預先釋放與VS.net中的ASP.net Core 2.0 15.3 at運行時異常..無法加載文件或程序集「System.Diagnostics.DiagnosticSource,版本= 4.0.2.1SignalR核心與VS.net中的ASP.net核心2.0 15.3無法加載文件或程序集'System.Diagnostics.DiagnosticSource,Version = 4.0.2.1
即時得到在運行時的異常,而不是建造時間 拋出異常:‘在微軟System.IO.FileLoadException’。 AspNetCore.Hosting.dll 在Microsoft.AspNetCore.Hosting.dll中發生未處理的類型爲'System.IO.FileLoadException'的異常。 無法加載文件或程序集「System.Diagnostics.DiagnosticSource,Version = 4.0.2.1,Culture = neutral ,PublicKeyToken = cc7b13ffcd2ddd51'。定位的程序集清單定義與程序集引用不匹配。 (異常來自HRESULT:0x80131040)
被示數是代碼行...
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
這裏是生成的日誌文件摘錄運行 後dotnet build -vd> build.log
Dependency "System.Diagnostics.DiagnosticSource, Version=4.0.2.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51".
Could not resolve this reference. Could not locate the assembly "System.Diagnostics.DiagnosticSource, Version=4.0.2.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
D:\ org \ projects> dotnet --version 2.0.0-preview2-006497
PackageReference Include =「Microsoft.AspNetCore.SignalR」Version =「1.0.0-preview2-24707」 PackageReference Include =「Microsoft.AspNetCore.All」版本=「2.0.0-preview2-final」