小编div*_*rge的帖子

MVC 6:System.IO.FileNotFoundException:无法加载文件或程序集'System.Diagnostics.DiagnosticSource

我在暂存环境中遇到此错误,但在本地环境中无法获取此错误.登台服务器是Windows Server 2008 R2.

System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Run Code Online (Sandbox Code Playgroud)

暂存环境一度正在运行,此错误是最近发生的.我从错误日志中收到此错误.该网站只是旋转,不显示任何内容.

两种环境都具有相同的dnx版本

C:\Users\Me>dnx --version
Microsoft .NET Execution environment
Version:      1.0.0-rc1-16609
Type:         Clr
Architecture: x86
OS Name:      Windows
OS Version:   6.1
Runtime Id:   win7-x86
Run Code Online (Sandbox Code Playgroud)

解决方案是使用dnx-clr-win-x86.1.0.0-rc1-update2.

我将包"System.Diagnostics.DiagnosticSource"添加到解决方案中的所有项目并进行部署.那什么都没做.

我从packages目录中获取System.Diagnostics.DiagnosticSource.dll并将其放入'runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin'目录.然后我得到一个错误这个错误

Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.1.0
Run Code Online (Sandbox Code Playgroud)

我将System.Numerics.Vectors.dll放入bin目录,就像我使用DiagnosticSource.dll一样,但我仍然得到了丢失的Vectors.dll错误.我不相信我应该将DLL放入运行时bin目录.我该如何解决这个问题?

更新

Active Version           Runtime Architecture OperatingSystem Alias
------ -------           ------- ------------ --------------- -----
   1.0.0-beta8       clr     x86          win
   1.0.0-beta8 …
Run Code Online (Sandbox Code Playgroud)

asp.net-core-mvc visual-studio-2015 asp.net-core

5
推荐指数
1
解决办法
1755
查看次数