1 Get the application version number
System.reflection.Assembly.GetexecutingAssembly (). Getname (). Version.tostring ()
2
Set the environment variable, execute the .NET command directly in the DOS prompt
When developing a Microsoft.Net application, we need to perform commands such as CSC, ASPNET_REGIIS, and the general method is to execute using the "Visual Studio .Net Command Tips" comes with VS.NET, but it is more troublesome, need to go Start in the menu. You can set the environment variable and then execute directly in the DOS command prompt, the setting steps are as follows:
(Similar to Windows Server 2003 as an example, Windows 2000 and Windows XP) Right-click "My Computer" -> Properties ", select" Advanced ", select Environment Variables, in the pop-up window, in" system variable " In the list, select "PATH", then "Edit" The "Vical Value", add ";% systemroot% / microsoft.net / framework / v1.1.4322" (for the semicolon; used to partition with the original value Open) and save all settings.
Now you "run" command CMD (Command), you can enter CSC, ASPNET_REGIIS, etc.
August 25, 2004 16:17
Transfer from: http://dotnet.mblogger.cn/qiuji/posts/2096.aspx