proj-info icon indicating copy to clipboard operation
proj-info copied to clipboard

Be more clear about dependencies.

Open faldor20 opened this issue 3 years ago • 2 comments

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.

faldor20 avatar Apr 26 '22 07:04 faldor20

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

jcmrva avatar Jun 13 '22 01:06 jcmrva

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.

baronfel avatar Sep 25 '22 02:09 baronfel