Skip to content

Unexpected error in the task "DefineStaticWebAssetEndpoints" #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.13.6]
After the last upgrade from 17.13.6 to 17.14.0, my project didn’t compile. This is the error. I rolled back, and it worked again. The problem is with all .css files.

Error inesperado en la tarea "DefineStaticWebAssetEndpoints".
System.AggregateException: Se han producido uno o varios errores. ---> System.InvalidOperationException: Last write time for 'D:\VS\Codigo\WebCore\wwwroot\css\bpmProcesos.css' is not defined.
en Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.Validate()
en Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.FromTaskItem(ITaskItem item)
en Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.ParallelWorker.Process(Int32 i, ParallelLoopState _)
en Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.<>c.<Execute>b__16_2(Int32 i, ParallelLoopState loop, ParallelWorker state)
en System.Threading.Tasks.Parallel.<>c__DisplayClass17_01.&lt;ForWorker&gt;b__1() en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) en System.Threading.Tasks.Task.&lt;&gt;c__DisplayClass176_0.&lt;ExecuteSelfReplicating&gt;b__0(Object &lt;p0&gt;) --- Fin del seguimiento de la pila de la excepción interna --- en System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) en System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) en System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally)
en System.Threading.Tasks.Parallel.For[TLocal](Int32 fromInclusive, Int32 toExclusive, Func1 localInit, Func4 body, Action1 localFinally) en Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.Execute() en Microsoft.Build.BackEnd.TaskExecutionHost.Execute() en Microsoft.Build.BackEnd.TaskBuilder.&lt;ExecuteInstantiatedTask&gt;d__26.MoveNext() ---&gt; (Nº de excepción interna 0) System.InvalidOperationException: Last write time for 'D:\VS\Codigo\WebCore\wwwroot\css\bpmProcesos.css' is not defined. en Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.Validate() en Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.FromTaskItem(ITaskItem item) en Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.ParallelWorker.Process(Int32 i, ParallelLoopState _) en Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.&lt;&gt;c.&lt;Execute&gt;b__16_2(Int32 i, ParallelLoopState loop, ParallelWorker state) en System.Threading.Tasks.Parallel.&lt;&gt;c__DisplayClass17_01.<ForWorker>b__1()
en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
en System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)<---


Original Comments

Alison Jin [MSFT] on 5/20/2025, 00:05 AM:

Thank you for your feedback! Does this reproduce for the specific project? If iso, what kind of project it is (C#/C++ Console App, WinForms, WPF, AspNet, etc…)? Could you please provide a sample solution that has this problem so that we can conduct further research? It would be very helpful if you could provide some screenshots that has this problem or record a video for this scenario by using ScreenToGif.Thanks for your help!

We look forward to hearing from you!

Jorge Garces on 5/20/2025, 08:16 AM:

(private comment, text removed)

Feedback Bot on 5/26/2025, 02:09 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.

Activity

added
needs-area-labelUsed by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically
on May 27, 2025
added
area-blazorIncludes: Blazor, Razor Components
and removed
needs-area-labelUsed by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically
on May 28, 2025
ilonatommy

ilonatommy commented on May 28, 2025

@ilonatommy
Member

The fixing PR should be in sdk: dotnet/sdk#49056.

added this to the 9.0.x milestone on May 28, 2025
javiercn

javiercn commented on Aug 3, 2025

@javiercn
Member

This was addressed in 9.0.302

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

    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

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @martincostello@javiercn@ilonatommy@vsfeedback

        Issue actions

          Unexpected error in the task "DefineStaticWebAssetEndpoints" · Issue #62116 · dotnet/aspnetcore