Browse Source

Apply the .NET 11 SDK workarounds to the 11.0.1xx band

pull/26453/head
maliming 1 week ago
parent
commit
d1bdd754f6
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 6
      .github/workflows/build-and-test.yml
  2. 7
      Directory.Build.targets
  3. 25
      docs/en/release-info/migration-guides/abp-11-0.md
  4. 17
      framework/src/Volo.Abp.AspNetCore/buildTransitive/Volo.Abp.AspNetCore.targets
  5. 2
      global.json

6
.github/workflows/build-and-test.yml

@ -16,8 +16,11 @@ on:
- 'templates/**/*.cshtml'
- 'templates/**/*.csproj'
- 'templates/**/*.razor'
- 'framework/**/*.targets'
- 'Directory.Build.props'
- 'Directory.Build.targets'
- 'Directory.Packages.props'
- 'global.json'
- '.github/workflows/build-and-test.yml'
pull_request:
@ -37,8 +40,11 @@ on:
- 'templates/**/*.cshtml'
- 'templates/**/*.csproj'
- 'templates/**/*.razor'
- 'framework/**/*.targets'
- 'Directory.Build.props'
- 'Directory.Build.targets'
- 'Directory.Packages.props'
- 'global.json'
- '.github/workflows/build-and-test.yml'
types:
- opened

7
Directory.Build.targets

@ -1,8 +1,9 @@
<Project>
<!-- SDK 11.0.100 RC 2 and RC 3 add a build-only dotnet-watch JS initializer to every Web SDK project, and a Debug
build of a Web SDK project fails when it references a Web SDK project that contributes one.
<!-- Since 11.0.100 RC 2, a Debug build of a Web SDK project fails when it references a Web SDK project that
contributes the build-only hot reload JS initializer. The condition covers the 11.0.1xx SDKs; check
the regression again before moving to an 11.0.2xx SDK.
Remove this file once the repository targets an SDK that no longer has this regression. -->
<PropertyGroup Condition="$(NETCoreSdkVersion.StartsWith('11.0.100-rc.')) and '$(UsingMicrosoftNETSdkWeb)' == 'true' and ('$(OutputType)' == 'Library' or $(MSBuildProjectFullPath.Contains('test')))">
<PropertyGroup Condition="$(NETCoreSdkVersion.StartsWith('11.0.1')) and '$(UsingMicrosoftNETSdkWeb)' == 'true' and ('$(OutputType)' == 'Library' or $(MSBuildProjectFullPath.Contains('test')))">
<EnableHotReloadInRuntimeConfigDevFile>false</EnableHotReloadInRuntimeConfigDevFile>
</PropertyGroup>
</Project>

25
docs/en/release-info/migration-guides/abp-11-0.md

@ -63,6 +63,31 @@ No action is required unless a handler of yours relies on receiving an event for
Keep these applications on ABP v10.x until the provider ships an EF Core 11 version.
### Static Asset Compression Is Turned Off on .NET 11.0.1xx SDKs
**Who is affected**
- Applications whose Web SDK projects reference `Volo.Abp.AspNetCore` and are built with a .NET 11.0.1xx SDK.
**What changed**
- The .NET 11.0.1xx SDKs give the compressed copies of package static assets duplicate labels, so a Blazor application fails on startup when two packages have a static asset with the same path. `Volo.Abp.AspNetCore` sets `CompressionEnabled` to `false` in these projects, so build and publish no longer produce the `.gz` and `.br` copies of static assets.
- A Debug build of a Web SDK project also fails on these SDKs when it references a Web SDK class library. `Volo.Abp.AspNetCore` sets `EnableHotReloadInRuntimeConfigDevFile` to `false` in Web SDK class libraries in Debug builds.
**What to do**
No action is required. To keep static asset compression in a project that doesn't have the problem, set it explicitly:
```xml
<PropertyGroup>
<CompressionEnabled>true</CompressionEnabled>
</PropertyGroup>
```
ABP will remove these settings once the SDK fixes the problems.
> See [dotnet/sdk#56891](https://github.com/dotnet/sdk/issues/56891) and [dotnet/sdk#56656](https://github.com/dotnet/sdk/issues/56656) for details.
### Polly Is No Longer Referenced
**Who is affected**

17
framework/src/Volo.Abp.AspNetCore/buildTransitive/Volo.Abp.AspNetCore.targets

@ -1,14 +1,17 @@
<Project>
<!-- SDK 11.0.100 RC 2 and RC 3 add a build-only dotnet-watch JS initializer to every Web SDK project, and a Debug
build of a Web SDK project fails when it references a Web SDK library that contributes one.
Remove this file once ABP targets an SDK that no longer has this regression. -->
<PropertyGroup Condition="$(NETCoreSdkVersion.StartsWith('11.0.100-rc.')) and '$(Configuration)' == 'Debug' and '$(UsingMicrosoftNETSdkWeb)' == 'true' and '$(OutputType)' == 'Library' and '$(EnableHotReloadInRuntimeConfigDevFile)' == ''">
<!-- Since 11.0.100 RC 2, a Debug build of a Web SDK project fails when it references a Web SDK library that
contributes the build-only hot reload JS initializer. The condition covers the 11.0.1xx SDKs; check
the regression again before moving to an 11.0.2xx SDK.
Remove this PropertyGroup once ABP targets an SDK that no longer has this regression. -->
<PropertyGroup Condition="$(NETCoreSdkVersion.StartsWith('11.0.1')) and '$(Configuration)' == 'Debug' and '$(UsingMicrosoftNETSdkWeb)' == 'true' and '$(OutputType)' == 'Library' and '$(EnableHotReloadInRuntimeConfigDevFile)' == ''">
<EnableHotReloadInRuntimeConfigDevFile>false</EnableHotReloadInRuntimeConfigDevFile>
</PropertyGroup>
<!-- SDK 11.0.100 RC builds give the compressed copies of net11.0 package assets duplicate labels, so a Blazor host fails
on startup when two packages have a static asset with the same path. Remove this once the SDK fixes it. -->
<PropertyGroup Condition="$(NETCoreSdkVersion.StartsWith('11.0.100-rc.')) and '$(UsingMicrosoftNETSdkWeb)' == 'true' and '$(CompressionEnabled)' == ''">
<!-- The 11.0.1xx SDKs give the compressed copies of net11.0 package assets duplicate labels, so a Blazor host fails
on startup when two packages have a static asset with the same path. This also turns off build and publish
compression in the other Web SDK projects; set CompressionEnabled to true in a project to keep it. Check the
regression again before moving to an 11.0.2xx SDK, and remove this PropertyGroup once the SDK fixes it. -->
<PropertyGroup Condition="$(NETCoreSdkVersion.StartsWith('11.0.1')) and '$(UsingMicrosoftNETSdkWeb)' == 'true' and '$(CompressionEnabled)' == ''">
<CompressionEnabled>false</CompressionEnabled>
</PropertyGroup>
</Project>

2
global.json

@ -1,6 +1,6 @@
{
"sdk": {
"version": "11.0.100-rc.3.26522.148",
"version": "11.0.100",
"rollForward": "latestFeature"
}
}

Loading…
Cancel
Save