Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Google Chrome Extension Using C# Blazor: Error "ApplyCompressionNegotiation task failed unexpectedly"

$
0
0

Google Chrome Extension Using C# Blazor: Error "ApplyCompressionNegotiation task failed unexpectedly" While Building Blazor BrowserExtension Project in .NET 8.0

Can anyone help me identify what I might be doing wrong or point me to an alternative guide or resource where .NET Core 8.0 or 9.0 is being used?

The "ApplyCompressionNegotiation" task failed unexpectedly.System.InvalidOperationException: Fingerprint for 't8.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.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)   at Microsoft.AspNetCore.StaticWebAssets.Tasks.ApplyCompressionNegotiation.Execute()   at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

My setup:

Framework: .NET 8.0NuGet Package: Blazor.BrowserExtension v2.0.0

BackgroundWorker.js: Included in thewwwroot folder

Steps I've tried:Followed the Quick Start guide.(https://mingyaulee.github.io/Blazor.BrowserExtension/quick-start)

Cleaned and rebuilt the project using dotnet clean and dotnet build.

Verified that BackgroundWorker.js exists in the wwwroot directory and added the following configuration in the .csproj file:

<ItemGroup><Content Update="wwwroot\BackgroundWorker.js"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content></ItemGroup>

Disabled static web assets compression by adding this to the .csproj:

<PropertyGroup><BlazorWebAssemblyEnableCompression>false</BlazorWebAssemblyEnableCompression></PropertyGroup>

enter image description here


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>