0
我目前有一个VersionInfo.cs
文件,其中包含以下内容。c#通过环境变量赋值版本号
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
//Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Version
// Revision
//
//You can specify all the values or you can defaul the Revision and Build Numbers
//by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
此文件添加为我的解决方案的链接,所有的项目,所以在更新一个版本号,更新它的全部。这工作正常。
但我想知道是否可以从环境变量中检索版本号,然后在VersionInfo.cs
文件中使用它?这可以在VersionInfo.cs
文件本身完成吗?
我搜索了这样的东西,迄今一无所获。
还有另一个话题。这可能会有所帮助。 http://stackoverflow.com/questions/650/automatically-update-version-number –