sdk icon indicating copy to clipboard operation
sdk copied to clipboard

RC2 Tooling bits + latest dotnet cli, unable to do Ctrl-F5 or F5 with ASP.NET Core Web Application

Open balachir opened this issue 10 years ago • 33 comments

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

image

Steps to reproduce

  1. New ASP.NET Core web app > Web Application
  2. Ctrl - F5 or F5

Expected behavior

Ctrl-F5 and F5 work

Actual behavior

F5, image

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

Environment data

dotnet --info output:

balachir avatar Apr 12 '16 19:04 balachir

@barrytang can you have someone take a first look?

TheRealPiotrP avatar Apr 12 '16 19:04 TheRealPiotrP

@balachir is working on a tool-less repro for CLI team to investigate.

TheRealPiotrP avatar Apr 12 '16 20:04 TheRealPiotrP

If I try to do 'dotnet run' on this empty web app from the command-line, I get

image

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

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"
    }
  },

image

image

balachir avatar Apr 12 '16 21:04 balachir

@schellap, this is a host/fxr issue

TheRealPiotrP avatar Apr 12 '16 21:04 TheRealPiotrP

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?

TheRealPiotrP avatar Apr 12 '16 21:04 TheRealPiotrP

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 avatar Apr 12 '16 21:04 schellap

@schellap, I tried copying over hostfxr.dll but I get the error in screenshot below now. image

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 ?

balachir avatar Apr 12 '16 21:04 balachir

Yes. Please use the latest installation from the link you have added. The latest bits should have the interface between hostfxr and hostpolicy stable.

schellap avatar Apr 12 '16 21:04 schellap

Hmm, I updated to the latest (1.0.0-rc2-002355) and I still see the same issue.

balachir avatar Apr 12 '16 21:04 balachir

did you delete previous installs?

TheRealPiotrP avatar Apr 12 '16 22:04 TheRealPiotrP

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.

balachir avatar Apr 12 '16 23:04 balachir

@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!

barrytang avatar Apr 13 '16 00:04 barrytang

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.

schellap avatar Apr 13 '16 00:04 schellap

ASP.NET is using CLI 1.0.0-rc2-002353 as of this afternoon.

Eilon avatar Apr 13 '16 01:04 Eilon

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 avatar Apr 13 '16 01:04 Eilon

@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 avatar Apr 13 '16 01:04 barrytang

@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.

Eilon avatar Apr 13 '16 01:04 Eilon

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.

barrytang avatar Apr 13 '16 02:04 barrytang

@piotrpMSFT How should we get a new build over to Barry's team?

gkhanna79 avatar Apr 13 '16 22:04 gkhanna79

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.

TheRealPiotrP avatar Apr 15 '16 00:04 TheRealPiotrP