-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add package id and version to Reference and ReferenceCopyLocalPaths Items #603
Conversation
{ | ||
throw new BuildErrorException(Strings.ContentFileDoesNotContainExpectedParentPackageInformation, contentFile.ItemSpec); | ||
} | ||
string packageName = parts[0], packageVersion = parts[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) I think it is uncommon to make assignments like this in our current code base. Can these be split into 2 lines?
@@ -296,6 +298,8 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
<Private>false</Private> | |||
<NuGetIsFrameworkReference>true</NuGetIsFrameworkReference> | |||
<NuGetSourceType>Package</NuGetSourceType> | |||
<NuGetPackageId>%(_FrameworkAssemblies.PackageName)</NuGetPackageId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question for my understanding (no change necessary): Why the difference in metadata names here? NuGetPackageXXX
vs. just PackageXXX
? Why is one prefixed with NuGet
and the other isn't?
It is my understanding that this change is needed for .NET Core 2.0 scenarios. |
@@ -280,6 +280,8 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
<Private>false</Private> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
existing: why use batching here instead of a transform? If you use @(_CompileFileDefinitions->'%(ResolvedPath)') it will preserve all the meta-data and you don't need to do things like
+ <NuGetPackageId>%(_CompileFileDefinitions.PackageName)</NuGetPackageId>
+ <NuGetPackageVersion>%(_CompileFileDefinitions.PackageVersion)</NuGetPackageVersion>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know when this goes in. We have a dependency on it.
Tagging @MattGertz for RTM approval. |
Needs template -- I'm not clear on this v.v. the Escrow bar. |
… in metadata for compile files and framework assemblies
Retarget to master after #917 goes in |
/cc @nguerrera @dsplaisted for one more review before I merge |
…ableProject Set WarnOnPackingNonPackableProject to true when IsPackable is false
Fixes #567
This adds
NuGetPackageId
andNuGetPackageVersion
metadata toReference
andReferenceCopyLocalPaths
Items. These are used downstream by a few tasks.This leads to additional metadata on a few definitions from the ResolvePackageDependencies and ProduceContentAssets tasks, which matches the old ResolveNuGetPackageAssets task, but I'm not sure if there are significant MSBuild performance implications.
Also not sure if we would take this for escrow as these are not .NET Core scenarios, but making this solution available to unblock downstream work.
/cc @ericstj @srivatsn @nguerrera @dsplaisted