Repository navigation
Automatic calculate the assembly and package version in servicing #57158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
aa0364d
5591125
6e22cbb
3822907
1730e60
1c062ca
4d6d652
2933bfc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,15 @@ | |
| <UseIntellisenseDocumentationFile Condition="'$(UseIntellisenseDocumentationFile)' == '' and Exists('$(LibIntellisenseDocumentationFilePath)')">true</UseIntellisenseDocumentationFile> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(ServicingVersion)' != ''"> | ||
| <!-- Always update the package version in servicing. --> | ||
| <PackageVersion>$(MajorVersion).$(MinorVersion).$(ServicingVersion)</PackageVersion> | ||
| <IsWindowsDesktop Condition="$(WindowsDesktopCoreAppLibrary.Contains('$(AssemblyName);'))">true</IsWindowsDesktop> | ||
|
Anipik marked this conversation as resolved.
Resolved
|
||
| <_AssemblyInTargetingPack Condition="'$(IsNETCoreAppSrc)' == 'true' or '$(IsAspNetCoreApp)' == 'true' or '$(IsWindowsDesktop)' == 'true'">true</_AssemblyInTargetingPack> | ||
| <!-- Assembly version do not get updated in non-netfx ref pack assemblies. --> | ||
| <AssemblyVersion Condition="'$(_AssemblyInTargetingPack)' != 'true' or '$(TargetFrameworkIdentifier)' == '.NETFramework'">$(MajorVersion).$(MinorVersion).0.$(ServicingVersion)</AssemblyVersion> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't AssemblyVersion be set outside of this file so that it also applies to reference assemblies and source generators assemblies (the latter doesn't import this file as they aren't packable)?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
we don`t need to update the reference assemblies as we never change them in servicing and anyway we are not shipping them in 6.0.
Instead i will suggest to add the packaging.targets file to analyzers as well. (using IsNETCoreAppAnalyzer property) are any of the analyzers part of the shared framework ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, the System.Text.Json one is part of the shared framework.
Analyzers aren't packable themselves so it doesn't make sense for them to import packaging.targets. The code in that file is specific to projects which pack. I would keep the PackageVersion property in packaging.props and move the AssemblyVersion sectionout and make sure that it applies to both source projects and analyzers.
My gut feeling says that we should keep the AssemblyVersion of source assemblies in sync with their source generators. For that we might need two more properties in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Putting more thought into this, I don't think that introducing properties for analyzers in NetCoreAppLibrary.props is necessary. It is probably easier to apply the same assembly version to both the source assembly and the analyzer assembly. If the project is a generator project you would need to check if the "corresponding" source assembly is part of any shared framework.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For now all existing source generators are shipping as part of a shared framework (either netcoreapp or aspnetcoreapp) so if this becomes to complicated to implement you might just ignore them for 6.0 and never increment their assembly version. If you want to go down that path then your PR in its current state is probably sufficient. |
||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup Condition="'$(EnablePackageValidation)' == 'true'"> | ||
| <PackageReference Include="Microsoft.DotNet.PackageValidation" Version="$(MicrosoftDotNetPackageValidationVersion)" PrivateAssets="all" IsImplicitlyDefined="true" /> | ||
| <!-- TODO: Remove when the SDK is upgraded to RC1. --> | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| <Project> | ||
| <Import Project="..\Directory.Build.props" /> | ||
| <PropertyGroup> | ||
| <IsAspNetCoreApp>true</IsAspNetCoreApp> | ||
| <IncludePlatformAttributes>true</IncludePlatformAttributes> | ||
| </PropertyGroup> | ||
| </Project> |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| <Project> | ||
| <Import Project="..\Directory.Build.props" /> | ||
| <PropertyGroup> | ||
| <IsAspNetCoreApp>true</IsAspNetCoreApp> | ||
| <IncludePlatformAttributes>true</IncludePlatformAttributes> | ||
| </PropertyGroup> | ||
| </Project> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| <Project> | ||
| <Import Project="..\Directory.Build.props" /> | ||
| <PropertyGroup> | ||
| <IsAspNetCoreApp>true</IsAspNetCoreApp> | ||
| <SupportedOSPlatforms>windows</SupportedOSPlatforms> | ||
| </PropertyGroup> | ||
| </Project> |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.