dotnet / deployment-tools

This repo contains the code to build the .NET deployment tools and installers for all supported platforms, as well as the sources to .NET deployment tools.
MIT License
169 stars 50 forks source link

Check for Microsoft.AspNetCore.App failing if dotnet core is not installed | NetCoreCheck #281

Open hc-codes opened 1 year ago

hc-codes commented 1 year ago

Check for Microsoft.AspNetCore.App failing if dotnet core is not installed | NetCoreCheck

Description

Please provide a solution to solve this issue.

NikolaMilosavljevic commented 7 months ago

[Triage] Please investigate.

hc-codes commented 6 months ago

Hi @MSLukeWest, could you give an update on this issue?

MSLukeWest commented 6 months ago

@hc-codes A few questions: 1) To be clear, are you saying you have the ASP.NET runtime installed and netcorecheck.exe is always failing? Note that if you have no .NET runtime installed (Core, Desktop, or ASP.NET) a failure is expected. 2) What error code is returned when the failure happens (in cmd prompt "echo %errorlevel%")? And what's in the log (found under %temp%, name starts with "ddNetCoreCheck")? 3) NetCoreCheck writes a temp file next to its current location, so make sure you either have admin privileges or it's running from a non-protected location. 4) Make sure you're running the correct platform version of NetCoreCheck. For example, if you run the x86 version on a machine that only has x64 runtimes installed it will always fail.

hc-codes commented 6 months ago

Hi @MSLukeWest, thanks for your time. I am adding all the necessary information you have asked. Please let me know if I can help with anything more. Answers:

  1. Yes ASP.NET is installed and check is failing.
  2. Error Code: 12289 [02/22/24,01:23:08] ============= NetCoreCheck Start =============== [02/22/24,01:23:08] get_hostfxr_path failed: '-2147450749' [02/22/24,01:23:08] ============= NetCoreCheck End ===============
  3. Yes both are satisfied
  4. Platforms are also correct

Command used: NETCorecheck.exe --runtimename Microsoft.AspNetCore.App --runtimeversion 6.0.4

MSLukeWest commented 6 months ago

@hc-codes Thanks for providing those details, I was able to reproduce the issue. It seems that NETCoreCheck requires either the .NET Core runtime or the .NET Windows Desktop runtime. We will leave this issue open for now while a fix is considered.

hc-codes commented 6 months ago

@MSLukeWest Yes its correct if dotnet core is not installed netcorechecker is failing to execute and it seems like its a prerequisite for netcorechecker which shouldn't be the case