I have upgraded some of my Azure Functions to .netstandard 2.0, that is still in beta. Whenever I publish my Functions directly from Visual Studio, I get the following message:
The csproj
file containing my Functions is already is targeting .netstandard 2.0.
Here is the setting in the Function App:
How can I "upgrade" the version of my local Functions?
I have done some tests on my side and reproduce the message you got. Just like @Connor has said, for function in beta version, the csproj file should include AzureFunctionsVersion
as the illustration shows.
Once the AzureFunctionsVersion
parameter is lost, the function will be recognized as using runtime ~1 despite the TargetFramework
. So when the project is published to a beta function app in portal, it will remind us of the version change.
I ran into the same problem today during the creation of an Azure Function project in Visual Studio 2019. It needed a lot of sorting out but below turned out to be the solution for me:
In Azure:
In Visual Studio:
Clean + Rebuild the project. Now you should be able to Publish directly from Visual Studio to the Cloud. Right-click on the project and choose 'Publish'. Then you should see an option to Publish to an Function in Azure cloud.
If not then the most likely reason is because you have a problem with your references / nuget packages / Microsoft SDK. Or the versions of those.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.