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

Be more clear about dependencies. #154

Open
faldor20 opened this issue Apr 26, 2022 · 2 comments
Open

Be more clear about dependencies. #154

faldor20 opened this issue Apr 26, 2022 · 2 comments
Labels
need documented We need to write documentation to clear up problems

Comments

@faldor20
Copy link

Describe the bug
At present just trying to use this project in a fresh console application will result in lots of cryptic errors and strange behaviour.
To fix this you must include some combination of microsoft.build.* packages.

Nowhere, that I can see is this explained.
The only way I was able to find this out was by being very confused for a number of hours and then combing through the other projects using this project for oddities.

Putting this in my paket.references seems to work, though I'm not sure if this actually covers all the packages I need, and I have no idea what the equivalent for normal fsproj package references would be..

Microsoft.Build.Framework copy_local: false
Microsoft.Build.Utilities.Core copy_local: false
Microsoft.Build.Tasks.Core copy_local: false

To Reproduce
Steps to reproduce the behaviour:

  1. Create a fresh project.
  2. Include this package.
  3. Try to load a project.
  4. Get errors on loading, or have the loading be incomplete.

Expected behaviour
I expect the package to work out of the box, or to tell me in an obvious place that there are additional steps required to make it work.

@jcmrva
Copy link

jcmrva commented Jun 13, 2022

Repro'd. I need this for a project as well so it would be great to know for certain.

@baronfel
Copy link
Collaborator

In addition to the ones listed above, Nuget.Frameworks must also be copy_local: false for SDKs 6.0.3xx and up. This is a bit awkward because the MSBuild.Locator library has the same constraints, and we don't currently have a way in nuget or paket dependency syntax to control how a consumer of a library has to reference the transitive dependencies of that library. In general, you want to use this library's dependencies as compile-time constraints only, which for paket means copy_local: false and for PackageReference means ExcludeAssets="runtime". This is because when you use these, you're loading the dependencies from the matching SDK.

@TheAngryByrd TheAngryByrd added the need documented We need to write documentation to clear up problems label Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need documented We need to write documentation to clear up problems
Projects
None yet
Development

No branches or pull requests

4 participants