Skip to content

Dll not found if RID is not specified #129

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

Closed
xoofx opened this issue May 2, 2020 · 2 comments
Closed

Dll not found if RID is not specified #129

xoofx opened this issue May 2, 2020 · 2 comments

Comments

@xoofx
Copy link
Member

xoofx commented May 2, 2020

Hello!
For CppAst I was previously using my own libclang package mainly because ClangSharp was not providing an updated NuGet package.

Now I have switched CppAst to use the beta ClangSharp 10.0 package, but my tests failed to work as I had to run them explicitly with a RID, e.g dotnet tests -c Release -platform win-x64 while with my package I didn't have to specify anything.
But It is a bit annoying for a end-user experience to have to specify this RID...

Do you know why this is not working with the libclang package that you ship?

@tannergooding
Copy link
Member

This is essentially a dup of #118.

There is a limitation on the size of NuGet packages that nuget.org allows (250MB iirc) and it is undesirable for users to download hundreds of megabytes when they only need the binaries for their host box. So, the root package currently contains a runtime.json that lists the RID specific packages which should be downloaded instead.

There seems to be an issue preventing native assets from being resolved using this mechanism and that is pending a resolution. The simplest workaround today is to add <RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == '' AND '$(PackAsTool)' != 'true'">$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier> which will use the RID of the .NET SDK and should allow things to work in a dev environment.

xoofx added a commit to xoofx/CppAst.NET that referenced this issue May 2, 2020
@xoofx
Copy link
Member Author

xoofx commented May 2, 2020

Han, right, it's unfortunate, but the workaround is working fine, I will use that, thanks!

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

2 participants