0

What is the NuGet package "Microsoft.NETCore.App.Host.win-x64" used for? I see that one of my projects downloads it from the feed, but I don't know why.

The package's description at nuget.org says:

Internal implementation package not meant for direct consumption. Please do not reference directly.

It must be a transitive dependency of one of the packages used in my project, but I have no idea which one.

Also, I noticed that the package is not copied to my Cache folder.

EDIT: Scratch that, I was wrong. It actually gets copied into the Cache as all the other NuGets do.

LA.27
  • 1,888
  • 19
  • 35
  • 1
    That's the .NET Core host, its job is to provide the apphost.exe you use to run your program. Copied and renamed from apphost.exe to project.exe when you build. It locates the proper runtime version, loads the CLR and gets the Main() entrypoint compiled. It is normally copied from disk, for example C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Host.win-x64\6.0.4\runtimes\win-x64\native on my machine. Why it reaches out to Nuget isn't obvious without a build trace, maybe you target a version that isn't installed. – Hans Passant Jun 13 '22 at 12:26
  • Thanks - things are a bit clearer now. I found the package on my SDD in the location you mentioned and indeed, it's missing version 5.0.15 even though the corresponding SDK is listed when I run `dotnet --list-sdks`. – LA.27 Jun 13 '22 at 13:44
  • How can I install the missing package? I tried .NET5 Runtime 5.0.15 from here: https://dotnet.microsoft.com/en-us/download/dotnet/5.0 but n good. – LA.27 Jun 13 '22 at 13:45
  • 1
    It is not obvious to me why you'd try to install an outdated version with a known security flaw. Current are 5.0.17 for the runtime and 5.0.408 for the sdk and VS2019. – Hans Passant Jun 13 '22 at 14:15
  • Long story :). But thanks for making it clearer, I found a solution. Would you mind posting your first comment as an answer so that I can accept it? – LA.27 Jun 13 '22 at 15:20

1 Answers1

-1

As name of package suggests, it hosts web application.