-
Notifications
You must be signed in to change notification settings - Fork 255
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
Should assemblies in /runtimes/{rid}/lib/{tfm} be added as references to target project? #7316
Comments
Please refer https://docs.microsoft.com/en-us/nuget/create-packages/supporting-multiple-target-frameworks to understand how to create NuGet packages for multi TFMs as well as multiple architectures or runtimes. |
I've already seen that article and all it says is that architecture specific assemblies should be placed in the "/runtimes/" folder, which is what I've done and they're not being added to the target project. It's not obvious from that article if there also needs to be assemblies in the regular '/lib/' folder nor any mention of the '/refs/' folder (for which I haven't been able to find any documentation). If there's something else required to make it work then that article doesn't mention it. It doesn't even mention the rid graph, nor provide any link to it. Whatever is need to make this work doesn't seem to be documented properly anywhere. So the question remains: should assemblies in the /runtimes/ folder be automatically added to the target project and if not what else is required to make it work? |
So it turns out the the documentation for this is woeful. Is there not one piece of official documentation on the /ref folder and the fact that .NET Framework projects don't seem to use the /ref and /runtime folders at all? See my answer to the original stackoverflow question for how I'm guessing it works: https://stackoverflow.com/a/52471739/77002 |
@toptensoftware I didn't realize that those documents are not up to date for defining runtime assemblies and don't mention anything about /ref to define compile time dependencies. I also saw couple of doc issues for the similar scenario. So I'll keep this issue as tracking issue to update the docs on priority to explain Related docs issues: Relevant source of information for anyone to pick this item to work in future: |
Doc updates in master branch, It will be live in few days. |
Pretty sure this is more a misunderstanding/lack of documentation than an issue with NuGet itself...
I'm trying to build a nuget package that provides different assemblies for different target runtimes and frameworks. In particular I need to target win/net461 and osx/netcoreapp2.0.
My understanding is that assemblies can be included in the package in the following folders for per-runtime installation:
So I'm including files like so:
When the resulting nuget package is added to a project however the reference to myassembly.dll isn't added to the target project.
Tested with VS UI, NuGet version 4.6.0, dotnet.exe --version = 2.1.402, VS version: 15.8.4, OS version: Win 10
There's a sample project here.
Associated Stack Overflow question here.
The text was updated successfully, but these errors were encountered: