I've just installed Visual Studio 2015
and have just created new ASP.NET Core Web Application
project. When I run the ASP.NET Core Web application
project I've met the following exception(I am just hitting Ctrl+F5
to run the project in Visual Studio 2015):
The ASPNETCoreModule which is required to host .NET Core projects in IIS does not appear to be installed. Try repairing Visual Studio to correct the problem.
If I run other types of projects such as ASP.NET MVC
or ASP.NET Web API
, then they run perfectly.
The following SDK is already installed:
My project.json
file:
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
},
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Routing": "1.0.1",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0"
},
"tools": {
"BundlerMinifier.Core": "2.0.238",
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
What I've tried to do:
I have varied version
attribute to 1.0.0-preview2-final
, 1.0.1
, 1.0.3
:
"Microsoft.NETCore.App": {
"version": "1.0.3",//1.
"type": "platform"
},
I have installed DotNetCore.1.0.4_1.1.1-WindowsHosting
:
Does anybody know what I should do to fix the problem? Any help would be greatly apreciated
In general, to deploy an ASP.NET Core app to a hosting environment: Deploy the published app to a folder on the hosting server. Set up a process manager that starts the app when requests arrive and restarts the app after it crashes or the server reboots.
The most important thing to understand about hosting ASP.NET Core is that it runs as a standalone, out of process Console application. It's not hosted inside of IIS and it doesn't need IIS to run.
I got this error in Visual Studio 2019 and my solution was to run the VS installer and verify that the ASP.NET workload was installed. In my case it was not, simply installing it resolved the issue.
Exact steps to take if you want to follow my solution:
This happened for me with an update to VS 2019. What I did was:
This fixed the issue for me.
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