You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a group of related projects that make up a component and I want to define a traversal project for it.
When building the traversal project, I don't want to build any projects that are not listed in the traversal project (project refs to projects outside of the traversal project/component). But I also want to build the projects listed in the traversal project in topological order.
To achieve this, I used the /graphBuild (to make it build in the correct order) and /p:BuildProjectReferences=false (to ensure it doesn't build any projects not listed in the traversal project).
This works perfectly when running Build.
But when trying to run Clean, it doesn't show the above behavior. It cleans up all the projects in the graph. I don't want that to happen since I'm fetching the dependencies using a separate tool (so the build assumes all the artifacts of the referenced projects are available). But since Clean now cleans up those as well, the build fails.
So instead of running a single MSBuild command with /t:Clean;Build, I have to run two separate commands, one for Clean and one for Build.
What I wanted to know is, is this behavior the expected behavior or a bug in how Clean works? If it's the expected behavior, why is that? Shouldn't it work the same for any target?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following scenario:
/graphBuild(to make it build in the correct order) and/p:BuildProjectReferences=false(to ensure it doesn't build any projects not listed in the traversal project).Build.Clean, it doesn't show the above behavior. It cleans up all the projects in the graph. I don't want that to happen since I'm fetching the dependencies using a separate tool (so the build assumes all the artifacts of the referenced projects are available). But sinceCleannow cleans up those as well, the build fails./t:Clean;Build, I have to run two separate commands, one forCleanand one forBuild.What I wanted to know is, is this behavior the expected behavior or a bug in how
Cleanworks? If it's the expected behavior, why is that? Shouldn't it work the same for any target?Beta Was this translation helpful? Give feedback.
All reactions