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”