Skip to content

Conversation

sin-ack
Copy link

@sin-ack sin-ack commented Mar 4, 2025

This replicates the behavior of <PackageReference GeneratePathProperty="true" /> in Paket. This is required in certain edge cases, such as when creating a source generator project that needs to reference third-party assemblies.

Tests have been added for verifying the option in the lockfile, paket.dependencies/paket.references files and to verify the output in the generated paket.props files.

sin-ack added 2 commits March 4, 2025 17:11
This replicates the behavior of <PackageReference GeneratePathProperty="true" />
in Paket. This is required in certain edge cases, such as when creating
a source generator project that needs to reference third-party
assemblies.
With this, the "generate_path_property" option takes effect and we are
able to render the XML file with the GeneratePathProperty attribute on
the PackageReference.
@sin-ack
Copy link
Author

sin-ack commented Mar 5, 2025

Hmm, I learned after opening this that apparently it is possible to enable this without Paket integration using ItemDefinitionGroup:

<ItemDefinitionGroup>
  <PackageReference>
    <GeneratePathProperty>true</GeneratePathProperty>
  </PackageReference>
</ItemDefinitionGroup>

If this PR is unnecessary after this, feel free to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant