Skip to content

Commit ba74c35

Browse files
Build 3.1 site extension (#18568)
1 parent d05c9f4 commit ba74c35

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
2222
<PackageBrandingVersion Condition=" '$(VersionSuffix)' != '' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>
2323

24-
<SiteExtensionSuffix>$(VersionPrefix)</SiteExtensionSuffix>
24+
<SiteExtensionPackageVersion>$(VersionPrefix)</SiteExtensionPackageVersion>
2525
<SiteExtensionPackageVersion Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix.Replace('.','-'))</SiteExtensionPackageVersion>
2626

2727
<PackageVersion Condition=" '$(PackageVersion)' == '' ">$(Version)</PackageVersion>

eng/Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
$(RepoRoot)src\Servers\**\*.csproj;
141141
$(RepoRoot)src\Security\**\*.*proj;
142142
$(RepoRoot)src\SiteExtensions\Microsoft.Web.Xdt.Extensions\**\*.csproj;
143+
$(RepoRoot)src\SiteExtensions\LoggingAggregate\test\**\*.csproj;
143144
$(RepoRoot)src\Shared\**\*.*proj;
144145
$(RepoRoot)src\Tools\**\*.*proj;
145146
$(RepoRoot)src\Middleware\**\*.csproj;

src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
<ItemGroup>
2727
<Reference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.2.1" Version="$(MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion)" PrivateAssets="All" />
2828
<Reference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.2.2" Version="$(MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion)" PrivateAssets="All" />
29+
<!-- When updating this add the previous SiteExtension(s) to the list above -->
30+
<PackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.1.x64" Version="$(PackageVersion)-$(_PreReleaseLabel)" PrivateAssets="All" />
31+
<PackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.1.x86" Version="$(PackageVersion)-$(_PreReleaseLabel)" PrivateAssets="All" />
2932
</ItemGroup>
3033

3134
<ItemGroup>

src/SiteExtensions/LoggingAggregate/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/TransformTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void Transform_EmptyConfig_Added(string configFile)
3131
var depsElement = envNode.FirstChild;
3232
Assert.Equal("add", depsElement.Name);
3333
Assert.Equal("DOTNET_ADDITIONAL_DEPS", depsElement.Attributes["name"].Value);
34-
Assert.Equal($@"{XdtExtensionPath}\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\;" +
34+
Assert.Equal($@"{XdtExtensionPath}\additionalDeps\;{XdtExtensionPath}\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\;" +
3535
@"%ProgramFiles%\dotnet\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\",
3636
depsElement.Attributes["value"].Value);
3737

@@ -62,7 +62,7 @@ public void Transform_ExistingValue_AppendsValue()
6262
Assert.Equal("add", depsElement.Name);
6363
Assert.Equal("DOTNET_ADDITIONAL_DEPS", depsElement.Attributes["name"].Value);
6464
Assert.Equal(@"ExistingValue1;"+
65-
$@"{XdtExtensionPath}\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\;" +
65+
$@"{XdtExtensionPath}\additionalDeps\;{XdtExtensionPath}\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\;" +
6666
@"%ProgramFiles%\dotnet\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\",
6767
depsElement.Attributes["value"].Value);
6868

src/SiteExtensions/Sdk/SiteExtension.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242

4343
<ItemGroup>
4444
<_TemplateFiles Include="$(MSBuildThisFileDirectory)\HostingStartup\*.cs*" />
45+
<!--
46+
Always use Major.Minor.0 so that if we have to produce a new SiteExtension during a patch build it will still work for non-patch runtimes.
47+
i.e. 3.0.0 dotnet will search for 3.0.0 and below and wouldn't find a 3.0.1 folder path
48+
Side effect, also removes the -ci or -servicing label.
49+
-->
4550
<_HostingStartupPackageReference
4651
Include="%(HostingStartupPackageReference.Identity)"
4752
Source="%(HostingStartupPackageReference.Source)"
@@ -50,7 +55,7 @@
5055
Project="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)\HostingStartup.csproj"
5156
DepsFile="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)\p\HostingStartup.deps.json"
5257
TrimmedDepsFile="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)\%(HostingStartupPackageReference.Identity).deps.json"
53-
PackagePath="$(_BasePackagePath)\shared\Microsoft.AspNetCore.App\$(MicrosoftAspNetCoreAppPackageVersion)\"
58+
PackagePath="$(_BasePackagePath)\shared\Microsoft.AspNetCore.App\$(AspNetCoreMajorMinorVersion).0\"
5459
/>
5560
</ItemGroup>
5661
<MakeDir Directories="$(_DepsOutputDirectory)" />

0 commit comments

Comments
 (0)