VS2010 内部版本号 - 生成它并在应用程序中显示它的简单方法

发布于 2024-10-11 15:57:05 字数 210 浏览 5 评论 0原文

C# / VS2010

获取内部版本号的最简单方法是什么?我注意到当我发布一个项目时,有这个发布版本。在构建而不是发布时是否有等效的方法可以做类似的事情。

目标:我想在应用程序中显示自动更新的版本/内部版本号,因此我需要能够在运行时获取它 - 当然还要以某种方式生成它。

当然,我可以编写一个小批处理文件来处理事情(预构建)。但不是已经有东西可以用了吗...

C# / VS2010

What is the easiest way to obtain a build number? I have noticed that when I PUBLISH a project, there is this publish version. Is there an equivalent to do something similar when just building - and not publishing.

Goal: I want to display an automatically updated version / build number in the application, so I need be able to fetch it at runtime - and of course somehow generate it.

Of course, I could write a little batch file doing things (pre-build). But isn't there something already available...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风蛊 2024-10-18 15:57:05

如何在 VS 2010 中创建内部版本号 http://msdn.microsoft.com/en -us/library/aa395241.aspx

还为 Visual Studio 构建版本加载项 http://autobuildversion.codeplex .com/

How to make Build Number in VS 2010 http://msdn.microsoft.com/en-us/library/aa395241.aspx

Also Build Version Add-In for Visual Studio http://autobuildversion.codeplex.com/

南冥有猫 2024-10-18 15:57:05

使用源代码控制系统中的版本号。您可以使用构建任务从源代码管理中获取该编号并将其插入到适当的文件中。

use the version-number from your source-control-system. you can use a build task to get that number from the source-control and insert into the appropriate files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文