Skip to content
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

When using PackageReference metadata infer Pack=true #45

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

kzu
Copy link
Member

@kzu kzu commented Dec 8, 2020

This makes it behave just like PackagePath/PackFolder, and avoids having to explicitly add Pack=true after you specified PackageReference.

For example:

<None Include='lib\netstandard2.0\Newtonsoft.Json.dll' PackageReference='Newtonsoft.Json' />

Will now automatically be packed. The existing inference rules about target path/package path still apply, and in this case it will mean the file is packed to the same relative path as the referenced file in the source package reference.

Fixes #44

This makes it behave just like PackagePath/PackFolder, and avoids having to explicitly add `Pack=true` after you specified `PackageReference`.

For example:

    <None Include='lib\netstandard2.0\Newtonsoft.Json.dll' PackageReference='Newtonsoft.Json' />

Will now automatically be packed. The existing inference rules about target path/package path still apply, and in this case it will mean the file is packed to the same relative path as the referenced file in the source package reference.

Fixes #44
@kzu kzu merged commit 7b1558c into main Dec 8, 2020
@kzu kzu deleted the packagereference-inference branch December 8, 2020 01:15
kzu added a commit that referenced this pull request Dec 18, 2020
Run our property inits whenever the InitializeSourceControlInformation target runs, which will typically be before assembly info/version generation is run, which is early enough for most usages.

Fixes #45
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.

When using PackageReference item metadata, automatically infer Pack=true
1 participant