简体   繁体   English

.Net Core MVC应用程序中的System.Runtime引用

[英]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.

相关问题 您必须在ASP.Net Core中添加对System.Runtime版本4.1.0.0的引用 - ASP.Net Core you must add reference to System.Runtime Version 4.1.0.0 ASP.NET Core 2.0控制台应用程序文件notfoundexception system.runtime 4.2.0.0 - asp.net core 2.0 console application filenotfoundexception system.runtime 4.2.0.0 ASP.NET Core 2.0站点-FileIOException System.Runtime - ASP.NET Core 2.0 Site - FileIOException System.Runtime 无法使用.Net Core dll加载文件或程序集&#39;System.Runtime&#39; - Could not load file or assembly 'System.Runtime' with .Net Core dll ASP.NET:由Nuget引起的.NET Framework /标准/核DLL冲突。 “你必须添加对程序集System.Runtime的引用......” - ASP.NET: .NET Framework/Standard/Core DLL collisions, caused by Nuget. “You must add a reference to assembly System.Runtime…” 无法引用system.runtime统一 - Unable to reference system.runtime unity Roslyn AdhocWorkspace要求参考System.Runtime - Roslyn AdhocWorkspace asking for reference to System.Runtime Roslyn 没有参考 System.Runtime - Roslyn has no reference to System.Runtime .NET Core 3.0 迁移错误 IAsyncEnumerable<t> System.Interactive.Async 和 System.Runtime 中都存在</t> - .NET Core 3.0 migration error IAsyncEnumerable<T> exists in both System.Interactive.Async and System.Runtime .NET 核心 - System.Private.CoreLib.dll 与 System.Runtime - .NET Core - System.Private.CoreLib.dll vs System.Runtime
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM