From 1450d5da9ab762a956bfdaf47f538abc2ef4ca5d Mon Sep 17 00:00:00 2001 From: Niels Henrik Hagen Date: Wed, 23 Oct 2013 11:28:14 +0200 Subject: [PATCH] Setting AssemblyFileVersion to NugetVersion Setting the AssemblyFileVersion to the NugetVersion string allows for using the AssemblyFileVersion to check against Nuget to verify that you are runnig the latest version of the assembly. The use case for this is self-updating applications like nuget.exe. If Microsoft where to provide custom assembly attribute (key, values) we could have used that. --- GitFlowVersionTask/AssemblyInfoBuilder.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/GitFlowVersionTask/AssemblyInfoBuilder.cs b/GitFlowVersionTask/AssemblyInfoBuilder.cs index 0d7af8911f..b8ba33358d 100644 --- a/GitFlowVersionTask/AssemblyInfoBuilder.cs +++ b/GitFlowVersionTask/AssemblyInfoBuilder.cs @@ -4,20 +4,18 @@ public class AssemblyInfoBuilder { - public VersionAndBranch VersionAndBranch; public bool SignAssembly; public string GetAssemblyInfoText() { var assemblyVersion = GetAssemblyVersion(); - var assemblyFileVersion = GetAssemblyFileVersion(); var assemblyInfo = string.Format(@" using System.Reflection; [assembly: AssemblyVersion(""{0}"")] [assembly: AssemblyFileVersion(""{1}"")] [assembly: AssemblyInformationalVersion(""{2}"")] -", assemblyVersion, assemblyFileVersion, VersionAndBranch.ToLongString()); +", assemblyVersion, NugetVersionBuilder.GenerateNugetVersion(VersionAndBranch), VersionAndBranch.ToLongString()); return assemblyInfo; }