Nuget binary packages do not respect conditional rules from paket.dependencies file
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
Nuget binaries do not respect conditional rules from the paket.dependencies file, in at least one scenario. This prevents us from using the Vsxmd package with Paket, which allows a windows dev machine to generate markdown from xml comments automatically on build. Our Linux build machine cannot run exe files, and because the conditional rules do not work, we cannot disable this in release mode, and therefore this package cannot be used with Paket.
See https://github.com/fsprojects/Paket/issues/197 and https://github.com/fsprojects/Paket/issues/1026 for related features.
Repro steps
In a new project, edit paket.dependencies, and include the following:
nuget Vsxmd condition:DEBUG
In paket.references, include: Vsxmd
Expected behavior
foo.fsproj file should contain:
<Import Project="..\..\packages\scripting\Vsxmd\build\Vsxmd.targets" Condition="'$(DEBUG)' == 'True' And Exists('..\..\packages\scripting\Vsxmd\build\Vsxmd.targets')" Label="Paket" />
Actual behavior
foo.fsproj file contains:
<Import Project="..\..\packages\scripting\Vsxmd\build\Vsxmd.targets" Condition="Exists('..\..\packages\scripting\Vsxmd\build\Vsxmd.targets')" Label="Paket" />
Known workarounds
None
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the repro using paket.dependencies with nuget Vsxmd condition:DEBUG and the Vsxmd entry in paket.references, then inspect how Paket generates the foo.fsproj import. Compare the actual import condition with the expected DEBUG and Exists conditions; done means the generated project preserves the conditional rule for NuGet binary packages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100