Cannot host ASP.NET Core Web Application (.NET Framework)
Environment: VS 2015 Community with Update 2 .NET Core RC2 SDK Preview 1 newest nuget
I create a brand new project (tested on .net 4.6 and 4.6.1) named "Test".
For: Cannot host ASP.NET Core Web Application (.NET Core) - application starts properly
For: Cannot host ASP.NET Core Web Application (.NET Framework) - application never starts. It just hangs with the message:
After I click cancel and even close VS the file bin\Debug\net46\win7-x64\Test.exe is stil used by some process. It blocks the next build. I can't delete it until I restart my machine.:
Error Failed to make the following project runnable: Test (.NETFramework,Version=v4.6.1) reason: The process cannot access the file 'Path\To\WebApplication2\src\Test\bin\Debug\net461\win7-x64\Test.exe' because it is being used by another process. Test C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241 Build
dotnet run supposedly starts the application, but it's not listening on ports from launchSettings.json
Is ASP.NET Core Web Application (.NET Framework) supposed to work, or is it some kind of bug? Is there a way around it?
dotnet run does not know about lauchsettings.json, that's a VS artifact. The console should show you the address it started on.
@Tratcher This is all I see after running dotnet run

@gisek what happens if you run the published exe directly?
@muratg For every Test.exe located in the following directories, the console just hangs with no output at all. Not sure how to check if it's listening on any port.
Path\To\Project\src\Test\bin\Debug\net461\Test.exe Path\To\Project\src\Test\bin\Debug\net461\win7-x64\Test.exe Path\To\Project\src\Test\bin\Debug\net461\win7-x64\publish\Test.exe
@gisek What's your OS version? I'm not able to reproduce on my machine.
@muratg It's Windows 10 with all the updates
I had the same thing happening after the upgrade. (Win10 - all up to date)
Was able to follow this article http://stackoverflow.com/questions/37494297/asp-net-core-starting-the-web-server-is-taking-longer-than-expected to fix the problem, specifically the solution to remove old data protection reference.
But now VS hangs on "Debug is starting." Even with a completely fresh new aspnetcore website (From new project template)
I realize this is probably a different issue, but if @gisek has the same thing happen after making the fix then there would be a common thread to understand and if not I hope the article helps him.
@eerhardt I'm not sure if it's the same case. When I follow the instructions form the Stackoverflow link, a new Chrome card opens up, but it's http, not https. Also there's no popup.

A little update. For my colleague, who has the same software configuration it works fine.
@gisek Were you ever able to get to the bottom of this?
@gisek (Also, could you try to upgrade to RTM bits?)
We have 5 developers here and 2 machines were having this issue. According to "Extensions and Updates" all updates had been applied however that was not true for the machines with issues.
Assuming you're running an x64 system, just install all these updates and everything should just work.
- Make sure you’re using the latest update for VS2015 (Update 3) http://go.microsoft.com/fwlink/?LinkId=691129
- Make sure you have the latest version of the SDK (DotNetCore.1.0.0-SDK.Preview2-x64) https://go.microsoft.com/fwlink/?LinkID=809122
- Make sure you have the latest version of the VS Tools (DotNetCore.1.0.0-VS2015Tools.Preview2) https://go.microsoft.com/fwlink/?LinkId=817245
@muratg Sorry, it took me so long to answear. I've just installed VS update 3 along with the latest DotNetCore tools. It didn't help though. :(
After that i tried to install everything @tpanthier listed, but it turned out it all had been already installed.
The error now looks like that:

This locked application file seems to be the problem to me.:
Error Failed to make the following project runnable: Test (.NETFramework,Version=v4.6.1) reason: The process cannot access the file 'Path\To\WebApplication2\src\Test\bin\Debug\net461\win7-x64\Test.exe' because it is being used by another process. Test C:\Program Files
Which process is supposed to use it? It's not VS (restart doesn't free the file). Killing dotnet process doesn't help either. So far only system restart frees it.
@gisek Did you uninstall everything else before installing the VS update, and Preview 2 tooling?
@muratg I did not. What exactly should I uninstall?
- VS
- DotNetCore.1.0.0-SDK.Preview2-x64
- DotNetCore.1.0.0-VS2015Tools.Preview2
Anything more?
@gisek Those should be OK, did you have Preview1 bits (or earlier) on your machine before installing Preview 2?
@muratg I had RC1 (which worked fine) RC2 preview1 (which didn't work), now I have RC2 preview2 (which doesn'r work)
I'll give the reinstallation a shot later this week and I'll let you know.
I'm having the same problem: VS hangs on "Debug is starting."
Visual Studio Community 2015 (Version 14.0.25421.03 Update 3) Project: ASP.NET Core Web Application (.NET Core)
PM> dotnet --info .NET Command Line Tools (1.0.0-preview2-003121)
Product Information: Version: 1.0.0-preview2-003121 Commit SHA-1 hash: 1e9d529bc5
Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64
What should I do?
@muratg Reinstalling things listed above (and uninstalling stuff from RC1) did the job. Thanks! @madskristensen good luck!
@gisek sounds great!