Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.InvalidOperationException: Startup assembly Microsoft.AspNetCore.SpaProxy failed to execute

---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.SpaProxy, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.SpaProxy, Culture=neutral, PublicKeyToken=null'
   at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.ExecuteHostingStartups()

I am somehow unable to start my app anymore and always get this error and results in a 404 on localhost.I dont know how i will be able to fix this and get my app running again. Hope somebody can help me thx.

like image 216
Gregor Hutterer Avatar asked Jul 14 '26 00:07

Gregor Hutterer


1 Answers

I have this same problem in my AspNet React App. The problem occurred due to me having updated the version of Microsoft.AspNetCore.SpaProxy to 7.0.0 while my project is using .NET 6

So, I downgrade the version of Microsoft.AspNetCore.SpaProxy to 6.0.11 and it works.

like image 119
vitor_gaudencio_oliveira Avatar answered Jul 16 '26 12:07

vitor_gaudencio_oliveira



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!