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

Support msbuild /t:restore;build gesture #4329

Closed
srivatsn opened this issue Jan 19, 2017 · 6 comments
Closed

Support msbuild /t:restore;build gesture #4329

srivatsn opened this issue Jan 19, 2017 · 6 comments

Comments

@srivatsn
Copy link

From @onovotny on December 21, 2016 2:12

Splitting from dotnet/sdk#531

Today you have to explicitly do two commands for a proper build:

  • msbuild /t:restore
  • msbuild /t:build

It would be easier and more intuitive if the SDK could combine those to enable:
msbuild /t:restore;build, msbuild /t:restore;pack or even simply implicitly call restore (unless opted out with a variable?).

It's true that the build may have to re-evaluate itself after the restore since additional props/targets may be imported, but somehow this should be made to work.

Copied from original issue: dotnet/sdk#541

@srivatsn
Copy link
Author

From @davidfowl on December 21, 2016 3:19

We've been discussing what it would take to treat restore like a build dependency so that it's fully incremental and does everything at the required times. That would eliminate the need for running more than a single command.

@emgarten
Copy link
Member

emgarten commented Jan 19, 2017

This requires a change to MSBuild as @davidfowl mentioned.

An example of the issue today:

  1. MSBuild evaluates all imports and properties
  2. Restore downloads packages and adds .targets and .props files from the packages
  3. MSBuild does not load these new targets/props
  4. Build runs without package targets/props

It is unclear what work NuGet would actually need to do here, if any.

@rrelyea rrelyea added this to the Future-1 milestone Feb 8, 2017
@zhili1208 zhili1208 modified the milestones: Future-1, 4.6 Nov 9, 2017
@zhili1208
Copy link
Contributor

"msbuild /restore" work for this scenario

@clairernovotny
Copy link

Huh? This is not closed... the goal was that msbuild /t:restore was not an explicit step. It needs to be chainable with build, so msbuild /t:restore;build works at the same time. More importantly, Build should have Restore as a dependency.

@emgarten
Copy link
Member

emgarten commented Nov 9, 2017

@onovotny I think you may have better luck filing this on msbuild with that explanation.

@clairernovotny
Copy link

I didn't file it here :) Can one of you move this to the right repo then using that tool you have?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants