Microsoft has released a new version of .NET Upgrade Assistant in Visual Studio, which provides a set of new enhancements and support for different platforms and frameworks. The tool now supports .NET 8, enabling developers to utilize the latest features and improvements of .NET. Also, the new version brings the enhancements like an upgrade for Azure Functions, alongside .NET MAUI, WinUI and support for ARM64.
The latest release of the .NET Upgrade Assistant comes with a new feature - Azure Functions upgrade. The tool will now automatically upgrade the version of Azure Functions to v4 isolated when upgrading an Azure Functions project to the latest .NET version. This upgrade is recommended by Microsoft as it is considered to be the best version currently available. Developers can easily upgrade their Azure Functions project, similar to upgrading any other project, by right-clicking on the project in the Solution Explorer and selecting the Upgrade option.
By following the reported upgrade steps in the tool, developers can ensure that both the project file and the Azure Functions version are updated to the latest available versions. However, this upgrade process goes beyond just updating the project file to target the latest .NET version and Azure Functions version. The tool also updates the body of the functions to utilize new APIs, ensuring that the upgraded project is optimized for the latest technology and functionality.
Furthermore, regarding the upgrade from .NET Core or later to .NET 6, 7 or 8. The tool now upgrades all packages referenced by the application to a cohesive set of packages that correspond to the target .NET version, in addition to upgrading the target framework.
Regarding the package upgrades, Olia Gavrysh, senior product manager, .NET, author of the blog post, states the following:
Here is how the package upgrades work:
For standard .NET runtime or ASP.NET Core packages the version will be set to the latest matching target framework 6, 7, or 8. For example, if you are upgrading your app to .NET 6, you’ll get the corresponding .NET 6 release package version, and if you are upgrading to .NET 8, your packages will be updated to the latest pre-release versions.
For all other packages the tool checks if this package already supports target framework, in that case the package remains unchaged. If not, the tool will check if the latest version of the package support the target framework to which the app is upgraded. In case even the latest package version does not support the target framework, this package will be removed.
In addition to this enhancement, the latest version of the .NET Upgrade Assistant also includes a new feature that allows developers to upgrade from older preview versions to the most recent ones.
Worth mentioning is that the original announcement blog post provides tutorial-based steps on how to do upgrades from Xamarin.Forms to .NET MAUI and upgrades for Azure Functions.
Also, in the official announcement blog post, the team behind the .NET Upgrade Assistant shared their plans for future development and the focus for the next phase will be on improving the quality of upgrades, stabilizing the tool, and addressing bugs based on user feedback. Another stated priority is updating the existing Command Line Interface (CLI) tool to communicate with the same engine as the Visual Studio extension. This enhancement will ensure that the CLI tool includes all the new features available in the Visual Studio Extension. This update will offer developers a choice between Visual Studio and CLI experiences.
Lastly, a survey is also available, to gather feedback on the newly available feature for upgrading .NET projects from within Visual Studio. Users are encouraged to share their experiences and suggest improvements by participating in the survey. More info and details about .NET Upgrade Assistant can be found on the official Microsoft dotnet website.