Package tried to add reference to System.Runtime which was not found in the GAC

后端 未结 4 1505
抹茶落季
抹茶落季 2020-12-16 02:50

ASP.NET 4.5.1 or 4.5.2

Updating Nuget package MicrosoftAspNet.Identity.EntityFramework from version 2.2.1 to version 3.0.0-rc1-final

I get the following erro

相关标签:
4条回答
  • 2020-12-16 03:08

    I had a similar issue with another package.

    I "solved" it adding a manually reference to missed library, updating the package and then removing the reference added manually:

    • On your project go to References -> Add Reference... and then click on Browse...

    • On my installation (Windows 10), your file is located on: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll

    Add, update and then remove.

    I know, it is not a solution, but it will allow you continue working until get a real solution.

    0 讨论(0)
  • 2020-12-16 03:11

    I had the same issue, but adding the MySQL package to my project.

    The way that i solved was just very closely to the answer given by Sebastián Guerrero.

    So i will be adding a manually reference to that missed library (system.runtime) and than installed the MySQL package and it works perfectly.

    ATTENTION: I only unnistall the system.runtime package after installing the MySQL.

    References -> Add Reference... and then click on Browse...

    On my installation (Windows 10), your file is located on: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll

    0 讨论(0)
  • 2020-12-16 03:17

    I had this problem when I opened the project after a while.

    The problem was it was originally built with Microsoft.Net.Compilers.2.4.0 and I was on 3.3.1.

    The project strangely added two required Imports to the .csproj file, one for the 2.4.0 compiler,and a duplicate for the 3.3.1 version. I just needed to:

    • Right click on the project file
    • Unload the project
    • Edit the csproj file
    • Remove the 2.4.0 references (was also a reference in an Error element)
    • Close file
    • Right click on project, reload file.
    • Rebuild All
    0 讨论(0)
  • 2020-12-16 03:19

    I had the same issue when running Install-Package Microsoft.Azure.Management.Fluent on .NET framework 4.5.2

    Solved the issue with the following steps:

    1. Installed Microsoft.Rest.ClientRuntime latest version from Nuget.
    2. After that, installed latest version of Microsoft.Azure.Management.Fluent from Nuget.
    0 讨论(0)
提交回复
热议问题