Skip to content

[dotnet-sdk-10.0.100-preview.1.25103.13] When retargeting some apps to .NET 10, fail to build them with error: The "ApplyCompressionNegotiation" task failed unexpectedly. System.InvalidOperationException: Endpoints not found for related asset. #60306

@Junjun-zhao

Description

@Junjun-zhao

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When retargeting app to .NET 10, it is built failed with below errors:

The "ApplyCompressionNegotiation" task failed unexpectedly.
System.InvalidOperationException: Endpoints not found for related asset: C:\Users\Appcompat\.nuget\packages\microsoft.aspnetcore.components.webassembly.authentication\8.0.8\staticwebassets\AuthenticationService.js
at Microsoft.AspNetCore.StaticWebAssets.Tasks.ApplyCompressionNegotiation.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

Application Name: OqtaneFramework, SPOTClient, OpenBullet2, Blazor.Polyfill
OS: Windows 10 22H2
CPU: X64
.NET Build Number: dotnet-sdk-10.0.100-preview.1.25103.13
App & Source Location checking at: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2379301

Github Link:
https://github.com/Daddoon/Blazor.Polyfill
https://github.com/openbullet/OpenBullet2
https://github.com/oqtane/oqtane.framework

Verify Scenarios:
1). Windows10 21h2 x64 + dotnet-sdk-8.0.405 + default target 8.0: Pass
2). Windows10 21h2 x64 + dotnet-sdk-9.0.102 + retarget 9.0: Pass
3). Windows10 21h2 x64 + dotnet-sdk-10.0.100-preview.1.25103.13 + default 8.0: Pass
4). Windows10 21h2 x64 + dotnet-sdk-10.0.100-preview.1.25103.13-win-x64 + retarget9.0: Fail
5). Windows10 21h2 x64 + dotnet-sdk-10.0.100-preview.1.25103.13-win-x64 + retarget10.0: Fail

Expected Behavior

The project is built successfully.

Steps To Reproduce

Minimal Repro Steps:(Demo attached:BlazorAppDemo.zip)

  1. Create a .NET 9 or .NET 10 blazor web project.
  2. Install Nuget package Microsoft.Aspnetcore.Components.Webassembly.Authentication 8.0.8.
  3. Build the project with dotnet-sdk-10.0.100-preview.1.25103.13.

Exceptions (if any)

Build failed with error: The "ApplyCompressionNegotiation" task failed unexpectedly.

System.InvalidOperationException: Endpoints not found for related asset: C:\Users\Appcompat\.nuget\packages\microsoft.aspnetcore.components.webassembly.authentication\8.0.8\staticwebassets\AuthenticationService.js
at Microsoft.AspNetCore.StaticWebAssets.Tasks.ApplyCompressionNegotiation.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

.NET Version

10.0.100-preview.1.25103.13

Anything else?

Dotnet info:

.NET SDK:
 Version:           10.0.100-preview.1.25103.13
 Commit:            9035d02b05
 Workload version:  10.0.100-manifests.a9184ce6
 MSBuild version:   17.14.0-preview-25073-02+291a81087

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\10.0.100-preview.1.25103.13\

Host:
  Version:      10.0.0-preview.1.25080.5
  Architecture: x64
  Commit:       b98cabca12

.NET SDKs installed:
  10.0.100-preview.1.25103.13 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 10.0.0-preview.1.25103.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 10.0.0-preview.1.25080.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 10.0.0-preview.1.25080.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Findings:
If we update the package "Microsoft.Aspnetcore.Components.Webassembly.Authentication" to latest version 9.0.1(https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.Authentication/9.0.1), the build error will go.

@dotnet-actwx-bot @dotnet/compat

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions