我如何在 xamarin.forms 上设置下一个版本

how i can set the next version on xamarin.forms

我推送了 android 移动应用程序(由 Xamarin.Forms 使用 PCL 开发),清单中包含以下信息:

我需要推送下一个版本,是否足以更新清单上的以下图像?

示例:

Version Number: 2 Version Name: 1.0.1

是的,基本上够了。但是 android 的 "Version number" 必须是整数。

versionCode — An integer used as an internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users...

所以每次你想发布你的应用程序时增加你的 "Version number" (+1) 并且 playstore 知道版本改变了。

对于"version name":

versionName — A string used as the version number shown to users. This setting can be specified as a raw string or as a reference to a string resource.

您可以在 android developer page 上找到详细信息。

对于 Xamarin.Forms,我建议您也更改 AssemblyInfo.cs 中的版本 - 您项目中的文件(您可以在属性部分找到这些文件):

[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]

此更改不是必需的,但通过此更改,程序集本身知道发生了某些更改(对构建、版本检查等很有用)