"FileLoadException: Assembly is still being loaded." when running ASP.NET Core in script

edited January 11
I have a script for running a minimal ASP.NET Core site in LINQPad, which used to work perfectly a few months ago (on a different machine, and probably an older version of LINQPad).

I now get:

Assembly is still being loaded. (Exception from HRESULT: 0x80131016)
  at Microsoft.AspNetCore.Hosting.WebHostBuilderIISExtensions.UseIIS(IWebHostBuilder hostBuilder)
   at Microsoft.AspNetCore.WebHost.CreateDefaultBuilder(String[] args)
   at Microsoft.AspNetCore.WebHost.CreateDefaultBuilder()
   at UserQuery.Main()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
The script is here: http://share.linqpad.net/s84g2a.linq

It happens in the line: `void Main() => WebHost.CreateDefaultBuilder().UseStartup().Build().Run();`. Any ideas? Thanks!

Comments

  • +1, I have the same issue and have no idea.
  • Do we have any fix/help for this? Very eager to use LINQPad to build a ASP.NET Core application.
  • edited January 21
    I performed a number of installations today and was able to witness this on one of our machines, but not two others. The only difference I observed is that a machine that had the .NET Core 2.2 preview installed ran into issues. Continuing to test.
  • @sdflysha @mcintyre321 downloading the latest beta resolved this for me. I hope it works for you, too: https://www.linqpad.net/download.aspx#beta
  • I'm having this issue and I *had* 2.2 preview installed at one point -- but uninstalled it -- but the issue won't go away. Rather frustration as I'm stuck on this one.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!