Closed v-doyang closed 1 month ago
Unloading and reloading resolved the warnings for me.
I also see this.
Severity Code Description Project File Line Suppression State Details
Error (active) MSB4018 The "DefineStaticWebAssetEndpoints" task failed unexpectedly.
System.InvalidOperationException: Fingerprint for 'C:\Users\jamesnk\.nuget\packages\microsoft.fluentui.aspnetcore.components\4.9.3\staticwebassets\Components\Anchor\FluentAnchor.razor.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.DefineStaticWebAssetEndpoints.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() Aspire.Dashboard, Aspire.Dashboard.Components.Tests C:\Program Files\dotnet\sdk\9.0.100-rc.2.24468.2\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.targets 675
Cc @javiercn for investigation
@javiercn I see this change went into 9.0 recently: https://github.com/dotnet/sdk/pull/43099
Could it have caused this issue?
I think this issue is pretty serious. I'm getting this error from a file in the Microsoft.FluentUI.AspNetCore.Components
package. When I have RC2 installed, all references to that package in VS at design time are broken. There are many errors from C# and razor files about types not found. I assume the two problems are linked.
I can compile and run the app ok, but design time is busted. It's really annoying.
Downgrading to RC1 fixes both issues.
Code: https://github.com/dotnet/aspire. See the Aspire.Dashboard project.
Should be fixed in: https://github.com/dotnet/sdk/pull/43496.
Verify this bug on the latest .NET 9.0 RC2[9.0.100-rc.2.24470.13], it works well, so close this issue as Fixed
.
REGRESSION INFO: Worked in 17.11.2 and 17.12 Preview 2(which includes 9.0 RC1). Azure DevOps work item: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2248967
TESTCASES AFFECTED AspNetCore80_WebApp_RazorPages_IndAuth_RegisterAndLoginAsync AspNetCore80_WebApp_MVC_IndAuth_CreateRunPublishAsync AspNetCore80_WebApp_RazorPages_IndAuth_CreateRunPublishAsync AspNetCore80_WebApp_MVC_IndAuth_RegisterAndLoginAsync AspNetCore60_WebApp_RazorPages_IndAuth_ScaffoldingAsync AspNetCore60_WebApp_MVC_IndAuth_CreateRunPublishAsync
INSTALL STEPS
REPRO STEPS
Note:
Error info: MSB4018: The "DefineStaticWebAssetEndpoints" task failed unexpectedly. System.InvalidOperationException: Fingerprint for 'C:\Users\TestUser.nuget\packages\microsoft.aspnetcore.identity.ui\8.0.7\staticwebassets\V5\css\site.css' is not defined. at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.Validate() at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.FromTaskItem(ITaskItem item) at System.Linq.Enumerable.WhereSelectArrayIteratord__26.MoveNext() WebApplication2 C:\Program Files\dotnet\sdk\9.0.100-rc.2.24460.10\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.targets 675
2.MoveNext() at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer`1 comparer) at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.File: Microsoft.NET.Sdk.StaticWebAssets.targets
ACTUAL: There is an error in the Error List window.
EXPECTED: There is no error in the Error List window.
Error message: Assert.Fail failed. (10:12.427) [Visual Studio Host (14764):ErrorListVerifier] Verification failed: Error list was expected to contain no errors. Actually Error List contains '1' items: error 'The "DefineStaticWebAssetEndpoints" task failed unexpectedly. System.InvalidOperationException: Fingerprint for 'C:\Users\TestUser.nuget\packages\microsoft.aspnetcore.identity.ui\8.0.7\staticwebassets\V5\css\site.css' is not defined. at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.Validate() at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.FromTaskItem(ITaskItem item) at System.Linq.Enumerable.WhereSelectArrayIteratord__26.MoveNext()' at Microsoft.NET.Sdk.StaticWebAssets.targets(675, 5), project 'WebApplication1'
2.MoveNext() at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer`1 comparer) at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.Stack trace: at Microsoft.Test.Apex.DelayedAssertionVerifierSink.RerouteAssertion(String message) in D:\dbs\el\ddvsm\src\Omni\Apex\Framework\Verifier\DelayedAssertionVerifierSink.cs:line 431 at Microsoft.Test.Apex.DelayedAssertionVerifierSink.DoFinalAssertion() in D:\dbs\el\ddvsm\src\Omni\Apex\Framework\Verifier\DelayedAssertionVerifierSink.cs:line 240 at Microsoft.Test.Apex.ApexTest.TestCleanup() in D:\dbs\el\ddvsm\src\Omni\Apex\MsTestIntegration\ApexTest.cs:line 561 at Microsoft.Test.Apex.ExternalProcessHostTest`2.TestCleanup() in D:\dbs\el\ddvsm\src\Omni\Apex\MsTestIntegration\ExternalProcessHostTest.cs:line 136 at Microsoft.Test.Apex.VisualStudio.VisualStudioHostTest.TestCleanup() in D:\dbs\el\ddvsm\src\Omni\Apex\MsTestIntegration\VisualStudioHostTest.cs:line 236 at Microsoft.VisualStudio.Tests.WebTools.NetCore.IntegrationTests.WebAppMvcIndAuthTestBase.TestCleanup() in D:\dbs\el\ddvsm\src\Tests\WebTools\IntegrationTests\NetCore\BaseClasses\AspNetCore\WebAppMvcIndAuthTestBase.cs:line 220