You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forgive me if this is not the appropriate channel for a question. I'm trying to figure out how to version (and retrieve) assembly versions in dotnet core (both build and publish). I've been searching for documentation on this, but I've come up empty. Below are some things I've tried.
dotnet publish /p:Version=3.0.1 (where [Version]3.0.0[/Version] is defined in csproj) dotnet publish --version-suffix 1 (where [VersionPrefix]3.0[/VersionPrefix] is defined in csproj)
I'm retrieving the version using the following code: typeof(ReflectionUtils).GetTypeInfo().Assembly.GetName().Version.ToString();
ReflectionUtils is an arbitrary type in my assembly. No matter what I try, the version retrieved from the above line shows 3.0.0.0.
Can anyone point out what I'm doing wrong, or point me in the direction of a page that explains some of this stuff more fully?
The text was updated successfully, but these errors were encountered:
I don't know what the dotnet publish command sets in csproj -- @davkean any idea where to direct the question? Does it belong into your area or CLI area?
.NET Core tooling is a little different because we have enabled folks to set the value in msbuild properties directly. @golfguy0082 have a look at dotnet/sdk#2 which is I think the closest set of documentation that I can find on the matter.
Forgive me if this is not the appropriate channel for a question. I'm trying to figure out how to version (and retrieve) assembly versions in dotnet core (both build and publish). I've been searching for documentation on this, but I've come up empty. Below are some things I've tried.
dotnet publish /p:Version=3.0.1
(where [Version]3.0.0[/Version] is defined in csproj)dotnet publish --version-suffix 1
(where [VersionPrefix]3.0[/VersionPrefix] is defined in csproj)I'm retrieving the version using the following code:
typeof(ReflectionUtils).GetTypeInfo().Assembly.GetName().Version.ToString();
ReflectionUtils is an arbitrary type in my assembly. No matter what I try, the version retrieved from the above line shows 3.0.0.0.
Can anyone point out what I'm doing wrong, or point me in the direction of a page that explains some of this stuff more fully?
The text was updated successfully, but these errors were encountered: