RC2 Tooling bits + latest dotnet cli, unable to do Ctrl-F5 or F5 with ASP.NET Core Web Application
Install Steps
Dev14 U2 RTW Install AspNetCoreTools RC2: \aspnetci\drops\Setup-Bundle\release\54\x86\dvdQA\AspNetCoreTools.1.0.RC2.exe Install latest .NET CLI: https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-dev-win-x64.latest.exe

Steps to reproduce
- New ASP.NET Core web app > Web Application
- Ctrl - F5 or F5
Expected behavior
Ctrl-F5 and F5 work
Actual behavior
F5,

If I try to self-host, then I see the following error

Environment data
dotnet --info output:
@barrytang can you have someone take a first look?
@balachir is working on a tool-less repro for CLI team to investigate.
If I try to do 'dotnet run' on this empty web app from the command-line, I get

I can also repro the above message on the command-line with "dotnet new"

Change the dependencies section in project.json to look like below. Version "1.0.0-rc2-23931" is what we get with the default template in our current tooling bits.
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-23931"
}
},


@schellap, this is a host/fxr issue
Can you confirm this has to do with churn in the muxer and is something we should manually workaround by deleting old zip-installed CLI and start fresh?
Could you please try:
copy "C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.0-rc2-23931\hostfxr.dll" "C:\Program Files\dotnet\hostfxr.dll"
or better to Uninstall and start with a fresh installlation?
@schellap, I tried copying over hostfxr.dll but I get the error in screenshot below now.

When you say "Uninstall and start with a fresh installation", do you mean I should try uninstalling the dotnet cli and installing latest from https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-dev-win-x64.latest.exe ?
Yes. Please use the latest installation from the link you have added. The latest bits should have the interface between hostfxr and hostpolicy stable.
Hmm, I updated to the latest (1.0.0-rc2-002355) and I still see the same issue.
did you delete previous installs?
I tried deleting the 1.0.0-beta-002275 folder from C:\Program Files\dotnet\sdk but that does not seem to help much either.
I talked offline with Senthil a little while ago. Apparently, there was a breaking change in hostfxr and the Microsoft.NETCore.App 1.0.0-rc2-23931 package which the default templates depend on currently is not compatible with the latest CLI version. So sounds like tooling needs to move to a newer set of compatible runtime packages to get this working again for VS tooling + latest CLI.
@Petermarcu, @Eilon, can you confirm tooling does need new packages to pick up a new CLI due to this breaking change? If yes, when can I expect the next Coherence-Signed? Thanks!
1.0.0-rc2-23931 is quite an old CLI. We've made several changes (servicing related and bug fixes) to the host. These introduced new properties like patch roll forward and prerelease roll forward.
What is happening here is the newer host is used to load an older policy dll. The interface is now stabilized to be backwards compatible. So it is best to use the newer CLI, specifically, hostfxr.dll can load and execute all earlier hostpolicy.dll starting from 1.0.0-rc2-002349.
ASP.NET is using CLI 1.0.0-rc2-002353 as of this afternoon.
However, there's some issues with ASP.NET full builds going through, so it might not be until tomorrow to get an ASP.NET build that is ready for Barry's team.
@Eilon, so you are saying I shouldn't pick up a new CLI until the next Coherence-Signed? And once I have done that, this issue will go away?
@barrytang I'm not sure what will happen if you take a CLI on your own. I think it depends on which CLI you have right now, but honestly I don't know all the intricacies.
With Bala's earlier comment, it seems to be the case.
I talked offline with Senthil a little while ago. Apparently, there was a breaking change in hostfxr and the Microsoft.NETCore.App 1.0.0-rc2-23931 package which the default templates depend on currently is not compatible with the latest CLI version. So sounds like tooling needs to move to a newer set of compatible runtime packages to get this working again for VS tooling + latest CLI.
I am going to assume my team is blocked picking up the next CLI until the next Coherence-Signed build unless someone tells me otherwise.
@piotrpMSFT How should we get a new build over to Barry's team?
My understanding of @barrytang's comment is that he's waiting for a new Coherence-Signed build from ASP.NET and is not blocked on CLI. If I'm missunderstanding help me grasp the gap.