diff --git a/src/csharp/Grpc.Core/Version.cs b/src/csharp/Grpc.Core/Version.cs index 8a26bd83623..f5c44fd0984 100644 --- a/src/csharp/Grpc.Core/Version.cs +++ b/src/csharp/Grpc.Core/Version.cs @@ -33,5 +33,6 @@ using System.Reflection; -// The current version of gRPC C#. [assembly: AssemblyVersion(Grpc.Core.VersionInfo.CurrentAssemblyVersion)] +[assembly: AssemblyFileVersion(Grpc.Core.VersionInfo.CurrentAssemblyFileVersion)] +[assembly: AssemblyInformationalVersion(Grpc.Core.VersionInfo.CurrentVersion)] diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 9014a13f400..f7a9cb9c1cb 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -35,13 +35,20 @@ namespace Grpc.Core { /// /// Provides info about current version of gRPC. + /// See https://codingforsmarties.wordpress.com/2016/01/21/how-to-version-assemblies-destined-for-nuget/ + /// for rationale about assembly versioning. /// public static class VersionInfo { /// - /// Current version of gRPC C# assemblies + /// Current AssemblyVersion attribute of gRPC C# assemblies /// - public const string CurrentAssemblyVersion = "0.14.0.0"; + public const string CurrentAssemblyVersion = "1.0.0.0"; + + /// + /// Current AssemblyFileVersion of gRPC C# assemblies + /// + public const string CurrentAssemblyFileVersion = "0.14.0.0"; /// /// Current version of gRPC C# diff --git a/templates/src/csharp/Grpc.Core/VersionInfo.cs.template b/templates/src/csharp/Grpc.Core/VersionInfo.cs.template index 3ca111e72b1..96cf2ee17f4 100644 --- a/templates/src/csharp/Grpc.Core/VersionInfo.cs.template +++ b/templates/src/csharp/Grpc.Core/VersionInfo.cs.template @@ -37,13 +37,20 @@ { /// /// Provides info about current version of gRPC. + /// See https://codingforsmarties.wordpress.com/2016/01/21/how-to-version-assemblies-destined-for-nuget/ + /// for rationale about assembly versioning. /// public static class VersionInfo { /// - /// Current version of gRPC C# assemblies + /// Current AssemblyVersion attribute of gRPC C# assemblies /// - public const string CurrentAssemblyVersion = "${settings.version.major}.${settings.version.minor}.${settings.version.patch}.0"; + public const string CurrentAssemblyVersion = "1.0.0.0"; + + /// + /// Current AssemblyFileVersion of gRPC C# assemblies + /// + public const string CurrentAssemblyFileVersion = "${settings.version.major}.${settings.version.minor}.${settings.version.patch}.0"; /// /// Current version of gRPC C#