简体   繁体   中英

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. After several attempts, using multiple project.json versions and .Net Core package versions, I finally got the application working again in the new environment. Ofcourse, except for 1 error still poping up when using some objects in my Razor views: 错误

As you can see, the error says that I am missing a reference to 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

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).

Also you might take a look at upgrade guide here: Announcing the Fastest ASP.NET Yet, ASP.NET Core 1.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM