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

Enable clean + build of crosstargeting projects #1665

Merged

Conversation

rainersigwald
Copy link
Member

Fixes #1065 by duplicating DispatchToInnerBuilds to the crosstargeting
version of Clean. This enables Clean to run before Build (or the
arbitrary user target set via the InnerTargets property), reducing the
surprise of command line builds that use /t:Clean;Build rather than
/t:Rebuild.

This change also changes the cross-targeting definition of Rebuild to
match the standard Clean;Build rather than invoking Rebuild on each
inner build. That makes it easier to author outer-build extension logic,
fixing NuGet/Home#4475.

@rainersigwald
Copy link
Member Author

cc @rohit21agrawal @rrelyea

This is a better long-term fix than NuGet/NuGet.Client#1167, but it affects all multi-targeting SDK-using projects, rather than just consumers of GeneratePackageOnBuild so it's a bit riskier. Let's discuss options in tooling standup today.

@rainersigwald
Copy link
Member Author

rainersigwald commented Feb 2, 2017

@nguerrera Thoughts on risk for this fix (which also does clean;build) vs the targeted mitigation on the NuGet side?

Copy link
Contributor

@nguerrera nguerrera left a comment

Choose a reason for hiding this comment

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

This doesn't seem very risky and it's the right fix. I'd rather go with this.

@rainersigwald rainersigwald changed the base branch from vs15-rtw to xplat February 3, 2017 02:07
@rainersigwald
Copy link
Member Author

Retargeted to xplat based on the decision today to not take this for RTW.

@dotnet-bot test this please

@rohit21agrawal
Copy link

Are we taking the nuget workaround for rtm ?

@rainersigwald
Copy link
Member Author

rainersigwald commented Feb 3, 2017 via email

@rrelyea
Copy link

rrelyea commented Feb 3, 2017

for rtm, we've decided we will live without either. happy to discuss tomorrow.

Fixes dotnet#1065 by duplicating `DispatchToInnerBuilds` to the crosstargeting
version of `Clean`. This enables Clean to run before Build (or the
arbitrary user target set via the `InnerTargets` property), reducing the
surprise of command line builds that use `/t:Clean;Build` rather than
`/t:Rebuild`.

This change also changes the cross-targeting definition of `Rebuild` to
match the standard `Clean;Build` rather than invoking `Rebuild` on each
inner build. That makes it easier to author outer-build extension logic,
fixing NuGet/Home#4475.
@rainersigwald rainersigwald merged commit 252f0ba into dotnet:xplat Feb 3, 2017
@rainersigwald rainersigwald deleted the crosstargeting-clean-and-build branch February 3, 2017 23:23
@rainersigwald rainersigwald added this to the MSBuild 15.3 milestone Mar 22, 2017
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.

7 participants