Running a task after clean only if it's not a rebuild #7508
Unanswered
lawrence-laz
asked this question in
General
Replies: 1 comment
-
Rebuild depends on these targets msbuild/src/Tasks/Microsoft.Common.CurrentVersion.targets Lines 956 to 961 in ce75232 What you can do is hook into |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a solution with common output directory. Inside this solution I have the following task in the main startup
.csproj
file:This allows to fully clean the output directory when running "Clean" via Visual Studio.
However, this breaks the "Rebuild" option in Visual Studio, as the directory gets cleaned in the middle of a rebuild.
What I want is to be able to run the
<RemoveDir>
task only when "Clean" is invoked, but not when "Rebuild".I was looking for something like
Condition="'$(IsRebuild)' != 'true'"
, but couldn't find anything.Is this possible, and if so, how?
Beta Was this translation helpful? Give feedback.
All reactions