Skip to content

Error with package NToastNotify #62141

Closed as duplicate of#62116
Closed as duplicate of#62116
@vsfeedback

Description

@vsfeedback

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. &lt;ForWorker&gt;b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.&lt;&gt;c__DisplayClass176_0. &lt;ExecuteSelfReplicating&gt;b__0(Object &lt;p0&gt;) --- 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, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally)
at System.Threading.Tasks.Parallel.For[TLocal](Int32 fromInclusive, Int32 toExclusive, Func1 localInit, Func4 body, Action1 localFinally) at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder. &lt;ExecuteInstantiatedTask&gt;d__26.MoveNext() ---&gt; (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.&lt;&gt;c.&lt;Execute&gt;b__16_2(Int32 i, ParallelLoopState loop, ParallelWorker state) at System.Threading.Tasks.Parallel.&lt;&gt;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>)<---

---> (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:

  1. Create a new aspnet core mvc project with .NET 9
  2. Install de nuget package https://www.nuget.org/packages/NToastNotify
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Author: Migration Bot 🤖The issue was created by a issue mover bot. The author may not be the actual author.area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions