Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Commit f7ccdb3

Browse files
committed
AssemblyVersion is now a simple major.minor string, to make referencing easier.
1 parent 02a1a7a commit f7ccdb3

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

lib/DotNetOpenAuth.BuildTasks.dll

512 Bytes
Binary file not shown.

lib/DotNetOpenAuth.BuildTasks.pdb

0 Bytes
Binary file not shown.

src/DotNetOpenAuth.AspNet.Test/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,3 @@
2121

2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
2323
[assembly: Guid("6c32d8f7-1394-40ef-9ec0-b8953adc0a4f")]
24-
25-
// Version information for an assembly consists of the following four values:
26-
//
27-
// Major Version
28-
// Minor Version
29-
// Build Number
30-
// Revision
31-
//
32-
// You can specify all the values or you can default the Build and Revision Numbers
33-
// by using the '*' as shown below:
34-
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyFileVersion("1.0.0.0")]

src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ public GetBuildVersion() {
2828
[Output]
2929
public string SimpleVersion { get; private set; }
3030

31+
/// <summary>
32+
/// Gets or sets the major.minor version string.
33+
/// </summary>
34+
/// <value>
35+
/// The x.y string (no build number or revision number).
36+
/// </value>
37+
[Output]
38+
public string MajorMinorVersion { get; set; }
39+
3140
/// <summary>
3241
/// Gets or sets the prerelease version, or empty if this is a final release.
3342
/// </summary>
@@ -74,6 +83,7 @@ public override bool Execute() {
7483
this.PrereleaseVersion = prerelease;
7584
this.OAuth2PackagesVersion = oauth2PackagesVersion;
7685
this.SimpleVersion = typedVersion.ToString();
86+
this.MajorMinorVersion = new Version(typedVersion.Major, typedVersion.Minor).ToString();
7787
this.BuildNumber = this.CalculateJDate(DateTime.Now);
7888

7989
var fullVersion = new Version(typedVersion.Major, typedVersion.Minor, typedVersion.Build, this.BuildNumber);

tools/DotNetOpenAuth.Versioning.targets

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<Output TaskParameter="Version" PropertyName="BuildVersion" />
1818
<Output TaskParameter="SimpleVersion" PropertyName="BuildVersionSimple" />
1919
<Output TaskParameter="PrereleaseVersion" PropertyName="PrereleaseVersion" />
20+
<Output TaskParameter="MajorMinorVersion" PropertyName="MajorMinorVersion" />
2021
<Output TaskParameter="OAuth2PackagesVersion" PropertyName="OAuth2PackagesVersion" />
2122
<Output TaskParameter="GitCommitId" PropertyName="GitCommitId" />
2223
<Output TaskParameter="BuildNumber" PropertyName="BuildNumber" />
@@ -45,8 +46,10 @@
4546
</PropertyGroup>
4647
<MakeDir Directories="$(IntermediatePath)"/>
4748
<AssemblyInfo OutputFile="$(NewVersionCsFile)" CodeLanguage="C#"
48-
AssemblyVersion="$(BuildVersion)"
49-
AssemblyInformationalVersion="$(AssemblyInformationalVersion)" />
49+
AssemblyVersion="$(MajorMinorVersion)"
50+
AssemblyFileVersion="$(BuildVersion)"
51+
AssemblyInformationalVersion="$(AssemblyInformationalVersion)"
52+
GenerateClass="true" />
5053
<!-- Avoid applying the newly generated AssemblyInfo.cs file to the build
5154
unless it has changed in order to allow for incremental building. -->
5255
<CompareFiles OriginalItems="$(VersionCsFile)" NewItems="$(NewVersionCsFile)">

0 commit comments

Comments
 (0)