过去版本的UINT16屏障的集信息屏障、过去、版本、信息

2023-09-03 22:37:30 作者:风雨里长大

在过去的香港专业教育学院,通常使用的变更或者svn数版的二进制如1.1.123.3 其中大量的是从源头上控制系统的变更或转。 然而,随着即时通讯系统现在使用我们早已过的东西像70000+变更的UINT屏障,这样导致溢出和编译器错误的asssembly版本属性或部件文件的版本属性使用时。 看到: 的http://msdn.microsoft.com/en-us/library/system.reflection.assemblyversionattribute.aspx

任何替代策略仍然链接二进制变更集?

伊夫适合我的任务使用给出的解决方案:

 <目标名称=版本>
    <! - 变更集超过u16int所以不能在VERSIONINFO使用 - >
    < ATTRIB只读=假文件=$(VersionFile)/>
    <! - 集版本必须由UINT16这意味着该版本号必须小于65536  - >
    <! - 当前changest是这样过去,这让我会让一些changset-50000,并添加了许多 - >
    <! - 让70000成为20000.1和100001为1.2  - >
    <的PropertyGroup>
        <Version>$(Branch).$([MSBuild]::Subtract($(ChangeSet),$(Offset))).$(OffsetCount)</Version>
    &LT; /的PropertyGroup&GT;
    &LT;集信息codeLanguage =CS
         OUTPUTFILE =$(VersionFile)
         AssemblyCompany =$(公司)
         AssemblyProduct =$(产品)
         AssemblyCopyright =$(版权)
         的AssemblyVersion =$(版)/&GT;

    &LT; ATTRIB只读=真正的文件=$(VersionFile)/&GT;
&LT; /目标&GT;
 

解决方案 极光 JG.US UMS重磅上线,7大通道统一消息发送,成本降低超3成

您可以滚动鼠标,从0重新开始,所以你修改的样子修订= 70000%,50000

你也可以使用建立作为源代码控制修订的一部分,如打造=五万分之七万

因此​​,作为结果,这将是 xx1.20000 在这个例子中。

In the past ive usually used the changeset or svn number to version the binary e.g. 1.1.123.3 where the large number is the changeset or rev from the source control system. However, with the system im now using we are well past the uint barrier at something like 70000+ changesets so that causes an overflow and a compiler error when used as the asssembly version attribute or assembly file version attribute. See: http://msdn.microsoft.com/en-us/library/system.reflection.assemblyversionattribute.aspx

Any alternative strategies that still link binary to changeset?

Ive adapted my task to use the solution given:

<Target Name="Version">
    <!-- Changeset exceeds u16int so cannot be used in Versioninfo-->
    <Attrib   ReadOnly="false" Files="$(VersionFile)"/>
    <!--Assembly version must be made of uint16 this means that the version number must less than 65536-->
    <!-- current changest is way past this so i will make the number changset-50000 and add a number -->
    <!-- so 70000 becomes 20000.1 and 100001 becomes 1.2-->
    <PropertyGroup>
        <Version>$(Branch).$([MSBuild]::Subtract($(ChangeSet),$(Offset))).$(OffsetCount)</Version>
    </PropertyGroup>
    <AssemblyInfo CodeLanguage="CS"
         OutputFile="$(VersionFile)"
         AssemblyCompany="$(Company)"
         AssemblyProduct="$(Product)"
         AssemblyCopyright="$(Copyright)"
         AssemblyVersion="$(Version)"/>

    <Attrib   ReadOnly="true" Files="$(VersionFile)"/>
</Target>

解决方案

You can rollover and restart from 0, so you revision will look like revision = 70000 % 50000.

Also you could use build as part of source control revision like build = 70000 / 50000.

So as result it would be x.x.1.20000 in this example.