首页 > 解决方案 > 为什么我的 winforms 应用程序中的自动版本控制没有增加?

问题描述

我有一个简单的 winforms 应用程序,用于测试我在属性下的 AssemlyInfo.cs 文件中指定的自动版本控制。我如何使它增加?

// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

赢形式:

private void Form1_Load(object sender, EventArgs e)
{
    lblMessage.Text = Class1.HelloTest();


    string version = System.Windows.Forms.Application.ProductVersion;
    this.Text = String.Format("My Application Version {0}", version);
}

标签: c#winforms

解决方案


注释掉 //[assembly: AssemblyFileVersion("1.0.0.0")]


推荐阅读