c# - Monotouch 自动增量内部版本号及版本号

标签 c# ios xamarin.ios version auto-increment

关于使用 C# 进行 Monotouch IOS 开发:

我正在尝试在我的 Monotouch IOS 项目中实现自动递增的版本号。像 [Major].[Minor].[Build] 这样的东西就可以在每次构建时自动递增 [Build] 部分。

我在下面找到了这篇文章,但它似乎使用的是 Objective C,而且我不知道如何使用 Monotouch C# 来实现它。

http://monotouch.2284126.n4.nabble.com/How-to-increment-the-iPhone-Application-Version-number-on-every-build-td4425363.html

在Monotouch中,我可以访问“System.Reflection.AssemblyVersionAttribute”,但我不知道如何使用它。我尝试了简单的事情,例如:

System.Reflection.AssemblyVersionAttribute tempvar = new System.Reflection.AssemblyVersionAttribute ("1.2.*");

Console.WriteLine("tempvar = " + tempvar.Version);

但是打印输出字面意思是:“1.2.*”并且不会自动递增。

有人有这方面的经验吗?提前致谢

最佳答案

System.Reflection.AssemblyVersionAttribute 旨在用作属性。编译器会将 * 替换为数字。例如

[assembly: System.Reflection.AssemblyVersionAttribute ("1.2.*")]

您可能还想看看这个 email了解如何使用您的应用程序捆绑版本。

关于c# - Monotouch 自动增量内部版本号及版本号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11884859/

相关文章:

ios - 我如何使用 AVCaptureSession 和 swift (IOS 8)在 mpeg4 容器中录制 mp4 视频

ios - 如何使用当前设置将 uitableview 自定义为不同的部分?

ios - 在 UITableViewCells 上使用动态高度时的 UITableView ContentSize

xamarin.ios - Xamarin.Forms.DatePicker 文本颜色

c# - MongoDB c# driver - 如何在不修改对象类的情况下通过引用保存类?

c# - 更新 Storyboard 中旋转的速度/持续时间

c# - ASP.NET MVC2 生成的 Javascript 包含逗号,该逗号会破坏 Internet Explorer 中的脚本、内部代码

c# - 将 Wpf 的数据网格绑定(bind)到数据库

ios - 如何将 FBProfilePictureView 转换为 UIImage?

xamarin - Xamarin.iOS 中的 NSDictionary 到 Json