-
Notifications
You must be signed in to change notification settings - Fork 151
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
Runtime packages not restoring properly? #118
Comments
I think it's what you said, but just to be clear: I see the error loading <PackageReference Include="libClangSharp" Version="9.0.0-beta1" /> However, the error goes away with: <PackageReference Include="libClangSharp.runtime.win-x64" Version="9.0.0-beta1" /> |
Yeah that's what i'm referring to. The native dependencies need to be manually added for it to load. |
It is meant to automatically resolve them based on the host runtime identifier. I'll see if I can reproduce in a bit. |
I actually assumed the root of my issue was that my code in in a class library, but this reproduces in a very simple console app. |
I can repro. The simple fix for now is to add The issue is essentially that I had thought this was working for dev scenarios where the RID wasn't specified, but it apparently isn't. I'll log an issue on NuGet to see if this is something that can be improved. |
I am getting following error when downloading libclangsharp from nuget. |
|
Not sure if it's the SDK's responsibility or if this is something that could be fixed in ClangSharp, but in my case the issue was doubly confusing because the runtime picked up a random Is there something we can do to make something complain when the RID is invalid/incompatible with the package? (I'm not particularly up to speed on how RIDs work in NuGet in the first place.) |
I suppose this fixes the issue for regular If so, if I don't mind the size increase of the package (in my case, I'm only using LLVM, not Clang, so it's not quite as bad), is there a way to explicitly include the RID-specific packages in my tool package for the RIDs I care about? |
@tannergooding Was an issue ever created? |
No, there are a few existing issues that largely cover this, such as NuGet/Home#6083 |
ClangSharp and libClangSharp now provide a It's worth noting, however, this is a "best attempt" and LLVM/Clang themselves often need "per distro" and even "per distro version" builds for things to work end to end as expected. As indicated above, the broader restore issue is an issue with NuGet and something that issues have been logged around. |
I'm trying to use ClangSharp v9.0.0 beta from NuGet and i had a lot of trouble getting the libClang and libClangSharp native dependencies to load. I had to manually add the win-x64 runtime packages in order to have them deployed to the runtimes directory to be loaded.
Are we supposed to do this manually, or is NuGet supposed to automatically add the dependencies based on the main dependency specified in the libClang and libClangSharp packages? I'm not knowledgeable enough on NuGet to know what it can do so i'm at a loss here.
The text was updated successfully, but these errors were encountered: