Skip to content
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

[dotnet-sdk-9.0.100-preview.5.24277.8] Fail to publish react project with error message "The ResolvedCompressedAssessts" task failed unexpectedly. #56288

Closed
1 task done
Junjun-zhao opened this issue Jun 18, 2024 · 1 comment
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-static-web-assets
Milestone

Comments

@Junjun-zhao
Copy link
Member

Junjun-zhao commented Jun 18, 2024

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

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Jun 18, 2024
@javiercn javiercn added area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. and removed needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Jun 18, 2024
@javiercn javiercn self-assigned this Jun 18, 2024
@javiercn javiercn added this to the 9.0-preview6 milestone Jun 18, 2024
@Junjun-zhao
Copy link
Member Author

@javiercn There are 2 apps (QuickApp, WorldExplorer) affected by this issue. We verified with the latest build 9.0.100-preview.6.24328.19,
It has been fixed on the QuickApp App , but the WorldExplorer App still failed with the same error. Could you please help to check it? Thanks

Repro Steps with WorldExplorer App: (Please refer to https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2088415#4090622 to get more details)

  1. Install 9.0.100-preview.6.24328.19
  2. Copy WorldExplorer App Source to your machine
  3. cd to WorldExplorer\src\WebApp folder
  4. run "dotnet build" command

Expected Result:
build successfully.
Actual Result:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-static-web-assets
Projects
None yet
Development

No branches or pull requests

3 participants