Skip to content

Unable to build project using VS 17.12.3: “DiscoverPrecompressedAssets” task failed unexpectedly #59625

Open
@fltrierweiler

Description

@fltrierweiler

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I've found a similar issue, but the exception there isn't the same (System.ArgumentException there and System.InvalidOperationException here) and that issue was closed without an answer, so I've decided to create a new one.

Basically, I'm unable to build an existing project that uses Blazor.BrowserExtension.Template. It used to work fine with version 17.11.35219.272.

Expected Behavior

Simply put, the project build should work without errors, as it used to do.

Steps To Reproduce

I've created a minimalistic project to showcase the issue. To reproduce the error, all that has to be done is to build the project.

Exceptions (if any)

Here's the error I get whenever I try to build the project using VS 17.12.3:

The "DiscoverPrecompressedAssets" task failed unexpectedly.
System.InvalidOperationException: Fingerprint for '...\ExtensionTest\ExtensionTest\obj\Debug\net8.0\browserextension\build\BackgroundWorker.js' is not defined.
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.Validate()
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.FromTaskItem(ITaskItem item)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.DiscoverPrecompressedAssets.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

.NET Version

9.0.101

Anything else?

UPDATE: If I use SDK 8.0.404 and specify the version by adding a global.json to the solution folder, it actually works. Still no way to work with 9.0.101, though.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions