-
Notifications
You must be signed in to change notification settings - Fork 99
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
Native library not copied to output directory #115
Comments
I think the way nuget works is you may have to publish to the specific RID. Can you try dotnet publish -c Release -r win-x64 and see if it gets placed here? |
Thanks for the hint. Using an explictit runtime identifier the native library gets placed. To make it work in Visual Studio I had to add
to the project file. |
I would recommend The above will use the given RID if one is specified (which allows cross-compiling, for example) and otherwise defaults to the RID of the .NET SDK that the build is actively being driven by (which should ensure you get something that works for the current machine). |
@tannergooding Would be great to automatically use the correct RuntimeIdentifier. Unfortunately your idea does not work on my machine. Seems that NETCoreSdkRuntimeIdentifier is not set here. Any idea what I am doing wrong? |
Are you building with |
It does not work no matter if I am using dotnet build or Visual Studio 2019. |
I am referencing the libLLVM 8.0 nuget package from a .NET standard 2.0 which is referenced by a .NET Core 2.0 as well as a .NET Framework 4.7.1 project. In both cases the libLLVM is not copied to the output folder.
Even if I reference the libLLVM.runtime.win-x64 Nuget package directly libLLVM.dll is not copied. Currently the only way to make it work is referencing libLLVM.dll from the nuget folder and set "Copy if newer".
Is there anything I am missing? Is the libLLVM 8.0 Nuget package supposed to copy the correct runtime library automatically?
The text was updated successfully, but these errors were encountered: