I have a AzureFunctions project that I needed to upgrade to .NET standard 2.1 (from 2.0) All of my other projects in the solution load and compile correctly but this AzureFunctions project is throwing this error:
Error System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. File name: 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
I've verified all the nuget packages are updated, what else could it be?
Thanks!
NET standard 2.0 types and members are all packet in a single assemblies netstandard. dll v2. 0 that can be found under C:\Program Files\dotnet\sdk\NuGetFallbackFolder\netstandard.
Net Standard is a specification which dictates what the Base Class Libraries of different . Net platforms should implement to unify the Base Class Libraries of different . Net Platforms. Here, Platform means full .
Some times you receive this error because you have referenced a library/nuget package that target the incompatible .Net standard. example: If you create project that target to .Net Core 2.2 and you try to add the library which target .net standard 2.1 then you will get the same error because .Net Core 2.2 is compatible with .net standard 2.0 or lower so you can add package/library that target to .Net Standard 2.0 or lower version. Please see the links for more details :
.Net Core and .Net Standard
.Net Standard Compatiblity Table
I had the same problem. I eventually discovered that changing the Azure functions project properties to target .NET Core 3.1 still left the Azure function version on V2. The solution was to edit the CSPROJ and set the AzureFunctionsVersion from v2 to v3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With