Skip to content

pack pri file for inner builds in multi-targeting scenarios#1185

Merged
rohit21agrawal merged 1 commit intodevfrom
dev-ragrawal-prifix
Mar 2, 2017
Merged

pack pri file for inner builds in multi-targeting scenarios#1185
rohit21agrawal merged 1 commit intodevfrom
dev-ragrawal-prifix

Conversation

@rohit21agrawal
Copy link
Contributor

Fixes : NuGet/Home#4136

The last fix for adding pri files to get packed in UWP apps worked for single framework scenarios only because the pri file was being added in the outer build.

This fix makes sure that multi-targeting scenarios work too - pri files get added if you have TargetFramework or TargetFrameworks defined in your project.

CC: @rrelyea @emgarten @alpaix @mishra14 @jainaashish @zhili1208 @nkolev92

</MSBuild>
</Target>

<!--Projects with target framework like UWP, Win8, wpa81 produce a Pri file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: frameworks

<!--Projects with target framework like UWP, Win8, wpa81 produce a Pri file
in their bin dir. This Pri file is not included in the BuiltProjectGroupOutput, and
has to be added manually here.-->
<Target Name="_AddPriFileToPackBuildOutput"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you could condition this target on IncludeProjectPriFile and checking if ProjectPriFullPath is non-empty. Not sure it would actually save much for perf however.

clairernovotny pushed a commit to novotnyllc/MSBuildSdkExtras that referenced this pull request Feb 18, 2017
@rohit21agrawal rohit21agrawal merged commit 133898e into dev Mar 2, 2017
@rohit21agrawal rohit21agrawal deleted the dev-ragrawal-prifix branch June 21, 2017 17:30
@shubhaprasad
Copy link

nuget pack command does not generate .pri file for UWP platform when muvtitargetting is used .Looks like the changes that are merged here have not been published in latest nuget .
Need help in generating .pri for uwp platform as part of nuget pack with muvtitargetting .I am using the latest nuget .

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.

Pack target misses .pri files for Windows targets when multitargeting

4 participants