This article details how to use PowerShell scripts and batch files to automate version updates and one-click publishing in .NET Avalonia UI projects. First, it explains the setup and modification of PowerShell execution policies to ensure scripts can run properly. Then, it introduces methods for adding scripts in Visual Studio pre-build events to automatically update version numbers, as well as using batch files to publish applications on multiple platforms. Finally, a PowerShell script example is provided that can automatically update program version information based on Git tags. These methods can improve the development efficiency and convenience of the publish process for .NET projects.
2/21/2025
沙漠尽头的狼
Avalonia UI