-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When retarget the 3rd party application to net9.0 with the latest .NET 9 build, it failed to build with error MSB4018: The "ResolveCompressedAssets" task failed unexpectedly.
Application Name: QuickApp,WorldExplorer
OS: Windows10 21h2
CPU: X64
.NET Build Number: dotnet-sdk-9.0.100-preview.5.24277.8
App Source or App Installer checking at:
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2088415
Github Link:
https://github.com/VladislavAntonyuk/WorldExplorer
https://github.com/emonney/QuickApp
Verify Scenarios:
1.Windows 10 21H2 AMD64 + dotnet-sdk-8.0.301: Pass
2.Windows10 21h2 x64 + dotnet-sdk-9.0.100-preview.5.24277.8: Fail
Expected Behavior
publish successfully.
Steps To Reproduce
Minimal Repro steps (Demo attached):
ReactAppDemo.zip
1.Create a .net8.0 React and ASP.NET Core project.
2.Retarget the app to .net9.0.
<TargetFramework>net9.0</TargetFramework>
3.Publish the app with dotnet-sdk-9.0.100-preview.5.24277.8.
Exceptions (if any)
Show error MSB4018 :
ReactAppDemo.Server failed with 1 error(s) (6.1s) → ReactAppDemo.Server\bin\Release\net9.0\ReactAppDemo.Server.dll
C:\Program Files\dotnet\sdk\9.0.100-preview.5.24277.8\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.Compression.targets(368,5): error MSB4018:
The "ResolveCompressedAssets" task failed unexpectedly.
System.InvalidOperationException: Fingerprint for 'D:\ReactAppDemo\ReactAppDemo\reactappdemo.client\dist\assets\in
dex-C5tBAdQX.css' is not defined.
at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.Validate()
at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.FromTaskItem(ITaskItem item)
at System.Linq.Enumerable.ArraySelectIterator`2.ToArray()
at Microsoft.AspNetCore.StaticWebAssets.Tasks.ResolveCompressedAssets.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLogging
Context taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
.NET Version
dotnet-sdk-9.0.100-preview.5.24277.8
Anything else?
Dotnet Info:
.NET SDK:
Version: 9.0.100-preview.5.24277.8
Commit: e449c9281e
Workload version: 9.0.100-manifests.b2a38daf
MSBuild version: 17.11.0-preview-24277-02+2d924ca8c
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.100-preview.5.24277.8\
Host:
Version: 9.0.0-preview.5.24272.2
Architecture: x64
Commit: 5c06e5d01f
.NET SDKs installed:
9.0.100-preview.5.24277.8 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.0-preview.5.24271.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.0-preview.5.24272.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 9.0.0-preview.5.24271.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
@dotnet-actwx-bot @dotnet/compat