Aspnetcore: The "ResolveBlazorRuntimeDependencies" task failed unexpectedly

Created on 28 Feb 2020  路  8Comments  路  Source: dotnet/aspnetcore

Repro steps:

  1. Install .NET Core SDK 3.1.102
  2. Install the latest internal dogfood build of VS 16.6 P1
  3. Pin the SDK version to 3.1.102 using a global.json file
  4. Install the latest Blazor WebAssembly template build
  5. In VS, create a new Blazor WebAssembly app

Expected result: Template is created cleanly without warnings or errors

Actual result: The following error shows up in the Error List (even though the template builds and runs cleanly):

The "ResolveBlazorRuntimeDependencies" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'BlazorApp5.dll' or one of its dependencies. The system cannot find the file specified.
File name: 'BlazorApp5.dll' ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
   at System.Reflection.AssemblyName.nGetFileInformation(String s)
   at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
   at Microsoft.AspNetCore.Components.WebAssembly.Build.ResolveBlazorRuntimeDependencies.ResolveRuntimeDependenciesCore(String entryPoint, IEnumerable`1 applicationDependencies, IEnumerable`1 monoBclAssemblies)
   at Microsoft.AspNetCore.Components.WebAssembly.Build.ResolveBlazorRuntimeDependencies.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

Workaround: Close and reopen the solution.

area-blazor investigate

Most helpful comment

Got the same issue on March 27 and resolved it by updating my visual studio 2019 to the latest version.

All 8 comments

Closing as can't reproduce this any more.

This is still a thing.

I have had this happen on 2 machines now.

This has been a problem since the new template came out.

@spmoran-blazor @ImmutableVector Have you confirmed that you are using SDK version 3.1.102 or later? Are you possibly using an older preview build of 3.1.200 that shipped with a VS preview? If you are, could you try updating to the latest 16.5 preview and see if that helps?

@danroth27 My sdk is good, and I was running 16.4.6.

After installing the Preview build I have confirmed this is working! I apologies if that was part of the steps to get everything up and running initially. And seriously, thanks for the quick feed back!

Got the same issue on March 27 and resolved it by updating my visual studio 2019 to the latest version.

Updating VS fixed this error, but the Blazor Server project is now throwing a 500.0 Module "AspNetCoreModule" could not be found error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ipinak picture ipinak  路  3Comments

rbanks54 picture rbanks54  路  3Comments

UweKeim picture UweKeim  路  3Comments

aurokk picture aurokk  路  3Comments

Kevenvz picture Kevenvz  路  3Comments