[英]System.Runtime reference in .Net Core MVC application
I recently updated my .Net Core (i believe 10 RTM, 1.0.0-preview2-003121?) MVC solution to a VS2017 solution. 我最近将我的.Net Core(我相信10 RTM,1.0.0-preview2-003121?)MVC解决方案更新到VS2017解决方案。 After several attempts, using multiple project.json versions and .Net Core package versions, I finally got the application working again in the new environment.
经过几次尝试,使用多个project.json版本和.Net Core软件包版本,我终于让应用程序在新环境中再次运行。 Ofcourse, except for 1 error still poping up when using some objects in my Razor views:
当然,除了在我的Razor视图中使用某些对象时仍然弹出1个错误:
As you can see, the error says that I am missing a reference to System.Runtime. 如您所见,错误表明我缺少对System.Runtime的引用。 I tried adding this reference to my project in multiple ways, but none worked so far :(. I tried: - Using the System.Runtime NuGet package - Adding the assembly reference in my csproj file - Adding the assembly reference by browsing to the dll itself on my PC - Copying the DLL to every bin folder I could find in my solution
我尝试以多种方式将此引用添加到我的项目中,但到目前为止都没有工作:(。我尝试过: - 使用System.Runtime NuGet包 - 在我的csproj文件中添加程序集引用 - 通过浏览到dll添加程序集引用它本身在我的电脑上 - 将DLL复制到我可以在我的解决方案中找到的每个bin文件夹
Has anyone had this same problem and/or knows a way to fix this? 有没有人有同样的问题和/或知道解决这个问题的方法?
I got exactly the same problem when upgrading from .NET Core 1.0 to 1.1 and I solved this by adding dependency to NETStandard.Library 1.6.1 and updating all other dependencies versions to 1.1.0 instead of 1.0.0 (or some preview versions). 从.NET Core 1.0升级到1.1时,我遇到了完全相同的问题,我通过向.NETStandard.Library 1.6.1添加依赖项并将所有其他依赖项版本更新为1.1.0而不是1.0.0(或某些预览版本)来解决此问题。
Also you might take a look at upgrade guide here: Announcing the Fastest ASP.NET Yet, ASP.NET Core 1.1 您也可以在这里查看升级指南: 宣布最快的ASP.NET,ASP.NET Core 1.1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.