-
Notifications
You must be signed in to change notification settings - Fork 252
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
'GeneratePathProperty' does not work on 'PackageDownload' #8476
Comments
I'd be open to adding this eventually. Note that because of the exactness of PackageDownload (specifically, only exact versions allowed), you can create the path fairly accurately as it will be: |
GeneratePathProperty does not work as seen in NuGet/Home#8476. Use workaround.
GeneratePathProperty does not work as seen in NuGet/Home#8476. Use workaround.
GeneratePathProperty does not work as seen in NuGet/Home#8476. Use workaround.
@sandyarmstrong @KirillOsenkov PackageDownload allows multiple versions, so we'd need a conflict resolution for that.
We'd also need to be different from PackageReference, so we'd need something to make them slightly different. |
How about The resultant property names could just include the version. Am I missing anything that would make this problematic? |
One downside is when the version is changed you'd need to rename all properties. We could have a heuristic that if only a single version is specified (the 90% case), the behavior should be identical to PackageReference (or maybe use a different prefix such as Package if it has to be separate from PackageReference convention). I'd like to not have to mention the version in the common case. |
Prior art in CoreXT is that it defines multiple levels of the property: <PkgSystem_Memory_4_5_4_0>S:\NugetCache\System.Memory.4.5.4</PkgSystem_Memory_4_5_4_0>
<PkgSystem_Memory_4_5_4>S:\NugetCache\System.Memory.4.5.4</PkgSystem_Memory_4_5_4>
<PkgSystem_Memory_4_5>S:\NugetCache\System.Memory.4.5.4</PkgSystem_Memory_4_5>
<PkgSystem_Memory_4>S:\NugetCache\System.Memory.4.5.4</PkgSystem_Memory_4>
<PkgSystem_Memory>S:\NugetCache\System.Memory.4.5.4</PkgSystem_Memory> Where I believe the highest version wins for each level. I don't know what it does for multiple prereleases in the same Another option would be to punt to the user by taking metadata on the <PackageDownload Include="PackageName" Version="1.2.3" PathProperty="PackageName_Current" />
<PackageDownload Include="PackageName" Version="1.4.0-beta" PathProperty="PackageName_Experimental" /> |
Yeah this is also a fine option. |
Unfortunately the multiple includes with the same name version does not work quite like that. Due to a CPS limitation, PackageDownload is only 1 item with You'd need to specify the property with I think there's also value to keeping the functionality similar, keeping GeneratePathProperty. |
@nkolev92 If multiple versions are specified in |
This is still painful. My expectation is that the simplest case works as I expect it:
|
While we're doing this, it would pair nicely with making PackageDownload work with Central Package Management. That would alleviate the need for the project using this to manager the version or path at all. |
The new
<PackageDownload>
elements do not support theGeneratePathProperty
attribute, making it difficult to download a package whose contents will be used by an unrelated build task.The text was updated successfully, but these errors were encountered: