Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install "Microsoft.NETCore.DotNetAppHost" #1881

Closed
guidra-rev opened this issue Jan 4, 2020 · 2 comments
Closed

Can't install "Microsoft.NETCore.DotNetAppHost" #1881

guidra-rev opened this issue Jan 4, 2020 · 2 comments

Comments

@guidra-rev
Copy link

guidra-rev commented Jan 4, 2020

I'm trying to host .Net Core in native process (C++), as described in this sample https://github.com/dotnet/samples/tree/master/core/hosting/HostWithHostFxr.

When installing the "Microsoft.NETCore.DotNetAppHost" nuget package, I get this error : "Could not install package 'Microsoft.NETCore.DotNetAppHost 3.1.0'. You are trying to install this package into a project that targets 'native,Version=v0.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."

The host application is a C++ console project.
I am using Windows.
I have the .NET Core 3.1 SDK installed.

I tried both making a new project or building the one in the sample, but "nethost.h" is unresolved in both cases, and I cannot installed the nuget package.

I think i understand why it can't be done, it's a managed package, and the c++ project is native. So I guess I need to install the package in a managed project first, then somehow make "nethost.h" available to the c++ project.

@gertkommer
Copy link

Can you elaborate a bit on how you made progress with this? Im running into the same issue. are you using a dummy net5 project just to get the Microsoft.NETCore.DotNetAppHost nuget? or something else?

@Scavanger
Copy link

Yes the issue is ancient, but is displayed by Google relatively high:
The native NuGet package does not exist anymore, use vcpkg instead:
vcpgk install nethost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants