You must add a reference to assembly 'netstandard, Version=2.0.0.0

后端 未结 17 2433
遇见更好的自我
遇见更好的自我 2020-12-02 08:23

The project is an ASP.NET MVC Web App targeting the .NET Framework 4.6.1.

All of a sudden (some NuGet packages were upgraded) I started to get the following error du

相关标签:
17条回答
  • 2020-12-02 08:53

    I had to do a combination of other people's answers on this thread.

    1. Install the NetStandard.Library via NuGet
    2. Manually editing the .csproj file and adding the reference. <Reference Include="netstandard" />
    3. Expanding project-->References in the VS Solution Explorer, right clicking on 'netstandard' and showing the properties page and setting "Copy Local" to true.
    0 讨论(0)
  • 2020-12-02 08:53

    This issue is based on your installed version of visual studio and Windows, you can follow the following steps:-

    1. Go to Command Window
    2. downgraded your PCL by the following command

      Install-Package Xamarin.Forms -Version 2.5.1.527436
      
    3. Rebuild Your Project.
    4. Now You will able to see the required output
    0 讨论(0)
  • 2020-12-02 08:54

    I am facing Same Problem i do following Setup Now Application Work fine

    1-

    <compilation debug="true" targetFramework="4.7.1">
          <assemblies>
            <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, 
          PublicKeyToken=cc7b13ffcd2ffffd51"/>
          </assemblies>
        </compilation>
    

    2- Add Reference

     **C:\Program Files (x86)\Microsoft Visual
    Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\ADL
     Tools\2.4.0000.0\ASALocalRun\netstandard.dll**
    

    3-

    Copy Above Path Dll to Application Bin Folder on web server

    0 讨论(0)
  • 2020-12-02 08:58

    Might have todo with one of these:

    1. Install a newer SDK.
    2. In .csproj check for Reference Include="netstandard"
    3. Check the assembly versions in the compilation tags in the Views\Web.config and Web.config.
    0 讨论(0)
  • 2020-12-02 08:59

    We started getting this error on the production server after deploying the application migrated from 4.6.1 to 4.7.2.

    We noticed that the .NET framework 4.7.2 was not installed there. In order to solve this issue we did the following steps:

    1. Installed the .NET Framework 4.7.2 from:

      https://support.microsoft.com/en-us/help/4054530/microsoft-net-framework-4-7-2-offline-installer-for-windows

    2. Restarted the machine

    3. Confirmed the .NET Framework version with the help of How do I find the .NET version?

    Running the application again with the .Net Framework 4.7.2 version installed on the machine fixed the issue.

    0 讨论(0)
提交回复
热议问题