Could not find System.Runtime 4.1.0.0 when running ASP.NET web application

前端 未结 3 1277
既然无缘
既然无缘 2021-01-05 01:00

I\'ve created a Portable Class Library with the following projects.json

{
  \"supports\": {},
  \"dependencies\": {
    \"Microsoft.CSharp\": \"4.0.1\",
             


        
3条回答
  •  無奈伤痛
    2021-01-05 01:47

    I was experiencing this issue after upgrade the .NET framework from 4.6.2 to 4.7, after digging around on several forums and the internet for a while and trying a lot, I found a solution and consits in two steps:

    1. I deleted all Dependent Assambly and update all nugets UPDATE-PACKAGE -projectName -reinstall.

    2. After the first step, I checked every missing assambly that throw me an exception in runtime and realize that in some cases the framework has a dll in our local machine that has nothing to do with the nuget then I deleted all local's dll references and install it from the nuget. After cleaning from the missing dll taking them from the Nuget my project run without any issue.

    Hope that help you.

提交回复
热议问题