Skip to content

Commit 7cd9441

Browse files
authored
LoggingBranch package should not be shipping (#13981)
* Correct site extensions build failure - mark LoggingBranch project as non-shipping * Improve site extension versioning - ensure `$(SiteExtensionPackageVersion)` doesn't end with a dash - remove assumption LoggingBranch and Microsoft.AspNetCore.AzureAppServices.HostingStartup have same version
1 parent 5ca3f70 commit 7cd9441

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

Directory.Build.targets

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@
2424

2525
<PropertyGroup Label="Versioning settings">
2626
<!-- The 'human friendly' version to display in installers. In pre-release builds, this might be "2.0.7 Preview 2 Build 12356". In final builds, it should be "2.0.7" -->
27-
<BrandingVersionSuffix />
28-
<BrandingVersionSuffix Condition="$(IncludePreReleaseLabelInPackageVersion)">$(PreReleaseBrandingLabel) Build $(VersionSuffix)</BrandingVersionSuffix>
27+
<BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(VersionSuffix)</BrandingVersionSuffix>
2928
<PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
3029
<PackageBrandingVersion Condition=" '$(VersionSuffix)' != '' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>
3130

32-
<SiteExtensionSuffix>$(VersionSuffix.Replace('.','-'))</SiteExtensionSuffix>
33-
<SiteExtensionPackageVersion>$(VersionPrefix)-$(SiteExtensionSuffix)</SiteExtensionPackageVersion>
31+
<SiteExtensionSuffix>$(VersionPrefix)</SiteExtensionSuffix>
32+
<SiteExtensionPackageVersion Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix.Replace('.','-'))</SiteExtensionPackageVersion>
3433

35-
<OriginalPackageVersion>$(Version)</OriginalPackageVersion>
3634
<PackageVersion Condition=" '$(PackageVersion)' == '' ">$(Version)</PackageVersion>
3735
<PackageVersion Condition=" '$(NoSemVer20)' == 'true' ">$(SiteExtensionPackageVersion)</PackageVersion>
3836
<SharedFxVersion>$(PackageVersion)</SharedFxVersion>

src/SiteExtensions/LoggingBranch/LB.csproj

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<IncludeBuildOutput>false</IncludeBuildOutput>
1616
<IncludeSymbols>false</IncludeSymbols>
1717
<NoSemVer20>true</NoSemVer20>
18+
<IsShippingPackage>false</IsShippingPackage>
1819
</PropertyGroup>
1920

2021
<ItemGroup>
2122
<HostingStartupRuntimeStoreTargets Include="netcoreapp3.0" Runtime="$(TargetRuntimeIdentifier)" />
22-
<HostingStartupPackageReference Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="$(OriginalPackageVersion)" />
2323

2424
<ProjectReference Include="..\..\Framework\ref\Microsoft.AspNetCore.App.Ref.csproj">
2525
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
@@ -31,4 +31,17 @@
3131
</ProjectReference>
3232
</ItemGroup>
3333

34+
<!-- Cannot assume this project and Microsoft.AspNetCore.AzureAppServices.HostingStartup have the same package version. -->
35+
<Target Name="_GetHostingStartupPackageReference" BeforeTargets="GenerateHostingStartupDeps">
36+
<!-- This target is defined in eng/targets/Packaging.targets and included in every C# and F# project. -->
37+
<MSBuild Projects="$(RepoRoot)src\Azure\AzureAppServices.HostingStartup\src\Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj"
38+
Targets="_GetPackageVersionInfo"
39+
SkipNonexistentProjects="false">
40+
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageVersionInfo" />
41+
</MSBuild>
42+
43+
<ItemGroup>
44+
<HostingStartupPackageReference Include="%(_ResolvedPackageVersionInfo.PackageId)" Version="%(_ResolvedPackageVersionInfo.PackageVersion)" />
45+
</ItemGroup>
46+
</Target>
3447
</Project>

src/SiteExtensions/Sdk/SiteExtension.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<Project>
77

8-
<Target Name="GenerateHostingStartupDeps" Condition="'@(HostingStartupPackageReference->Count())' != '0'" BeforeTargets="_GetPackageFiles" >
8+
<Target Name="GenerateHostingStartupDeps" BeforeTargets="_GetPackageFiles" >
99

1010
<PropertyGroup>
1111
<_TemplatesDirectory>$(MSBuildThisFileDirectory)..\content\</_TemplatesDirectory>

0 commit comments

Comments
 (0)