Augment PackageReference with InstallPath metadata #4064
Labels
Resolution:Duplicate
This issue appears to be a Duplicate of another issue
Resolution:Question
This issues appears to be a question, not a product defect
Milestone
Some packages may need to consume tools provided by other packages. One concrete example: ilmerge (the nuget package). That package provides the ILMerge.exe tool, but no MSBuild target to expose its location for other nuget packages to consume (or the project itself).
To avoid hardcoding versions (i.e.
$(NuGetPackageRoot)ILMerge\2.14.1208\tools\ILMerge.exe
) when invoking the tool, it would be great if the NuGet targets automatically augmented thePackageReferece
with the determined version's install path, so that a consuming project could do, for example:This mechanism may be useful for referencing other package's assets too, like samples, docs, etc.
Granted, this isn't impossible to solve today, by just modifying the package providing the tools so that it exposes a property for its own current location (i.e. ILMergePath property in an ilmerge.props), but this mechanism would make all package assets available reliably for anyone regardless of how well authored the package is.
The text was updated successfully, but these errors were encountered: