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 –