I usually dev on a windows 7 desktop, using visual studio 2015 update 3. I have the same vs2015.3 on my windows 10 laptop. I copied an asp mvc 5 app I am working on to the laptop but it wont run when I try to launch it from VS. I get the "aspnetcore.dll failed to load" error. I looked around and most solutions are to repair the asp net core install, but my laptop does not have asp net core installed on it, because I don't use core yet. My project is targeting .Net 4.6.
My desktop does have Core on it. So do I have to install .net core just because? Or is there some other solution? I am using the default IIS 10.
Found the solution - the applicationhost.config file had references to ASP.NET Core and was trying to load the non-existent module. I deleted the applicationhost.config file and reopened the solution, which forced VS to rebuild it without the ASP.NET Core references. Works fine now.
In my case with Visual Studio 2015, this file was located in .vs\config\applicationhost.config
For earlier versions of Visual Studio using IIS Express, see this question for more information about where applicationhost.config is located: Where is the IIS Express configuration / metabase file found?
Using VS 2015 (Windows 10). Working on a downloaded sample MVC app (from Intuit) targeting .net 4.6.1.
I was getting the exact same behaivior/error:
"The Module DLL C:\Program Files (x86)\IIS Express\aspnetcore.dll failed to load"
Locating the Applicationhost.config file (part of download package) and deleting it, did not solve the problem because IISExpress re-generated the Applicationhost.config file with the same references.
To solve the problem I had to comment out all the (aspnetcore.dll) references:
(configSections) < section name="aspNetCore" overrideModeDefault="Allow" />
(globalModules) < add name="AspNetCoreModule" image="%IIS_BIN%\aspnetcore.dll" />
(modules) < add name="AspNetCoreModule" lockItem="true" />
You can do a search and comment out accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With