I have been using Visual Studio 2019 for my Azure Function App. I recently updated to version 2022, I then uninstalled 2019.
I am getting the following errors now:
1>CodeaApi -> G:\AVR_Project\Codea App\Codea Azure Function App\bin\Debug\netcoreapp3.1\bin\CodeaApi.dll
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : It was not possible to find any compatible framework version
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : The framework 'Microsoft.NETCore.App', version '3.0.0' (x64) was not found.
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : - The following frameworks were found:
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : 6.0.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error :
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : You can resolve the problem by installing the specified framework and/or SDK.
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error :
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : The specified framework can be found at:
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.0.0&arch=x64&rid=win10-x64
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error :
1>C:\Users\asf\.nuget\packages\microsoft.net.sdk.functions\3.0.6\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : Metadata generation failed.
1>Done building project "CodeaApi.csproj" -- FAILED.
Do I need to install version 3.0.1 to make it compatible with Azure Function Apps?
CodePudding user response:
Yes you can resolve this by installing .NET Core 3.1 SDK,
When targeting Azure Functions 3.0, by default, the .NET Core 3.1 SDK is required on the machine building the project.