New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent accidentally updating v3 app to use v4 SDK #533
Comments
I just experienced this so it would have been helpful |
@ChristopherL-STCU This version only targets net6.0. How did you update the package? Were you able to compile the app after upgrade? |
Dependabot suggested the upgrade. I went back to Visual Studio and pulled up the UI for the NuGet package manager. It also showed the upgrade and so I upgraded. It did not compile afterwards, hence how I ended up here. After upgrading VS showed |
I too experienced the same issue as @ChristopherL-STCU and I had the following errors |
@vijayrkn Do you know how we can prevent the VS NuGet UI from upgrading v3 apps to an incompatible SDK version? |
@anthonychu - All these packages are targeting netstandard2.0 - https://github.com/Azure/azure-functions-dotnet-worker/blob/648473e4c770ec7b2f3703bd18e883b4650a91c6/build/Extensions.props#L4 That is why NuGet is suggesting them as applicable for all TFMs. If specific package versions would only work against a specific TFM, the right thing would be to target the package for that TFM. |
https://www.nuget.org/packages/Microsoft.NET.Sdk.Functions/4.0.1 is only mentioning net6.0 dependencies. However VS (both 2019 and 2022) will allow you to update anyway, it just removes all the older dependencies. This is for a netcoreapp3.1 project. So it looks like VS treats it a dependencies, instead of requirements. |
We should consider this before we take teh v4 SDK out of preview.
/cc @soninaren
The text was updated successfully, but these errors were encountered: