Skip to content

Some compilation errors since some updates from package: blazored.toast and blazorise.bootstrap5 #426

Closed

Description

@EliasMasche

I am having some compilation errors on my local machine while using some specific NuGet packages

This error shows up when I am using blazored.toast 4.2.1 If I downgrade to 4.2.0 accepts it fine, but another error appear

2>Microsoft.NET.Sdk.StaticWebAssets.targets(727,5): Error MSB4018 : The "DefineStaticWebAssetEndpoints" task failed unexpectedly.
System.AggregateException: One or more errors occurred. (Last write time for 'C:\Users\User\.nuget\packages\blazored.toast\4.2.1\staticwebassets\Blazored.Toast.bundle.scp.css' is not defined.)
 ---> System.InvalidOperationException: Last write time for 'C:\Users\User\.nuget\packages\blazored.toast\4.2.1\staticwebassets\Blazored.Toast.bundle.scp.css' is not defined.
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.Validate()
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.FromTaskItem(ITaskItem item)
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.ParallelWorker.Process(Int32 i, ParallelLoopState _)
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.<>c.<Execute>b__16_2(Int32 i, ParallelLoopState loop, ParallelWorker state)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.For[TLocal](Int32 fromInclusive, Int32 toExclusive, Func`1 localInit, Func`4 body, Action`1 localFinally)
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
2>------- Finished building project: LinkDotNet.Blog.Web. Succeeded: False. Errors: 1. Warnings: 0

This error shows up when I downgrade blazored.toast to 4.2.0 with blazorise.bootstrap5 to 1.7.7 and 1.7.6, but I can compile and run the project with 1.7.5

1>Microsoft.NET.Sdk.StaticWebAssets.Compression.targets(290,5): Error MSB4018 : The "DiscoverPrecompressedAssets" task failed unexpectedly.
System.InvalidOperationException: Last write time for 'C:\Users\User\.nuget\packages\blazorise\1.7.7\staticwebassets\io.js' 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.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.ArraySelectIterator`2.ToArray()
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.DiscoverPrecompressedAssets.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
1>------- Finished building project: LinkDotNet.Blog.Web. Succeeded: False. Errors: 1. Warnings: 0

I already tried some recommended steps of:
Clearing the nuget cache with:
dotnet nuget locals all --clear
dotnet restore that restored fine, but compiling/building to run shows the error

Checking if the files exist in my folders of NuGet packages, they exist
C:\Users\User\.nuget\packages\blazored.toast\4.2.1\staticwebassets\Blazored.Toast.bundle.scp.css

But running with codespaces of GitHub allows it to compile fine with the expected packages from Directory.packages.props, which is where it differs from my PC. For the time being, I am running with downgrade packages.

Activity

  1. linkdotnet commented on Jun 17, 2025

    @linkdotnet
    Owner

    That was an issue that happens if you use a <=net10.0-preview.4 - using the latest preview should fix the issue.
    Given that our CI pipeline is green, that points towards a local issue.

    Can you give me the output of dotnet --info?

    PS: I will convert this into a discussion because I don't think it is a issue at the moment.

  2. Repository owner locked and limited conversation to collaborators on Jun 17, 2025
  3. converted this issue into a discussion #427 on Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions