Description
This issue has been moved from a ticket on Developer Community.
[severity:I'm unable to use this version] [regression] [worked-in:17.14.0]
After update, my projects has the below error:
The "DefineStaticWebAssetEndpoints" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Last write time for 'C:\Users\Superman.nuget\packages\ntoastnotify\8.0.0\staticwebassets\noty.js' 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__DisplayClass17_01. <ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0. <ExecuteSelfReplicating>b__0(Object <p0>) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action
1 body, Action2 bodyWithState, Func
4 bodyWithLocal, Func1 localInit, Action
1 localFinally)
at System.Threading.Tasks.Parallel.For[TLocal](Int32 fromInclusive, Int32 toExclusive, Func1 localInit, Func
4 body, Action1 localFinally) at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder. <ExecuteInstantiatedTask>d__26.MoveNext() ---> (Inner Exception #0) System.InvalidOperationException: Last write time for 'C:\Users\Superman\.nuget\packages\ntoastnotify\8.0.0\staticwebassets\noty.js' 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__DisplayClass17_0
1. <ForWorker>b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0. <ExecuteSelfReplicating>b__0(Object <p0>)<---
---> (Inner Exception #1) System.InvalidOperationException: Last write time for 'C:\Users\Superman.nuget\packages\ntoastnotify\8.0.0\staticwebassets\toastr.js' 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__DisplayClass17_0`1. <ForWorker>b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0. <ExecuteSelfReplicating>b__0(Object <p0>)<---
Original Comments
Feedback Bot on 5/15/2025, 08:11 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Javier Calvarro Nelson [MSFT] on 5/19/2025, 03:39 PM:
Thanks for contacting us.
Can you try removing the bin and obj folders from your project and triggering a new build? Does that solve the problem?
If that doesn’t work, can you build from the command line using the /bl
flag and attach the appropriate binary log?
Alternatively, you can configure visual studio to capture the binary logs following the intructions here and attach them to this issue.
Why do we ask for more info?
We try to reproduce all issues reported with the information provided in the description and comments. When we can’t reproduce the issue, we ask you for more information so we can resolve the issue as quickly and efficiently as possible.
In our guidelines, you can get tips on how to provide clear and simple reproducible steps.
Tiago Bernardo on 5/20/2025, 05:18 PM:
Hello,
I have a guide to reproduce the error:
- Create a new aspnet core mvc project with .NET 9
- Install de nuget package https://www.nuget.org/packages/NToastNotify
- Build the project.
I dont know why, but all of projects with this nuget package can’t build after update visual studio to 17.14.0.
Thansk for you help, i continue to search a solution for this.