-
Notifications
You must be signed in to change notification settings - Fork 28
Conversation
I've added two tests for the previous commit. |
@@ -34,6 +34,15 @@ public static string GetNullableMetadata(this ITaskItem taskItem, string metadat | |||
return value; | |||
} | |||
|
|||
public static string GetContentFileInclude(this ITaskItem taskItem) |
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.
this is mixed in in this PR, it belongs to a different one that likely won't get merged soon. It would be best to separate it.
{ MetadataName.Version, "8.0.0" }, | ||
// NOTE: AssignPackagePath takes care of converting TFM > short name | ||
{ MetadataName.TargetFramework, "net45" }, | ||
{ MetadataName.IncludeAssets, "all" } |
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.
This should be quite useful indeed. I'd add support for ExcludeAssets
too, to complete the feature.
Indeed - I'll rebase the branch. |
…endencies to allow transitive contentFiles flow (https://github.com/NuGet/Home/wiki/%5BSpec%5D-Managing-dependency-package-assets#nuspec)
…udeAssets specified on dependency.
464d29e
to
101e293
Compare
@@ -286,6 +289,16 @@ static VersionRange AggregateVersions(VersionRange aggregate, VersionRange next) | |||
return versionSpec.ToVersionRange(); | |||
} | |||
|
|||
static List<string> AggregateIncludes(List<string> aggregate, string next) |
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.
Maybe rename to AggregateAssetsFlow
? Since it now does Includes and Excludes?
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.
Will do
thanks a lot for your contribution @azeno! |
This PR enables the control of the
Include
attribute for adependency
with theIncludeAssets
metadata. See https://github.com/NuGet/Home/wiki/%5BSpec%5D-Managing-dependency-package-assets#nuspec for details.Consider ProjectA with
<ProjectReference Include="ProjectB" IncludeAssets="all" />
will result in a ProjectA.nuspec with
<dependency id="ProjectB" include="all" />
which when ProjectA.nuspec gets referenced will also pull in the content of ProjectB into the root project.