Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2022 and .net update issues for Azure Function App

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?

like image 687
user8400863 Avatar asked Dec 16 '25 21:12

user8400863


1 Answers

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.

like image 99
Sajeetharan Avatar answered Dec 19 '25 12:12

Sajeetharan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!