Skip to content

Commit bbcabe0

Browse files
committed
Do not reset Logger during call to Execute()
If the MSBuild Task object is reused, calls after the first call to the Execute method fail because of the Reset.
1 parent 7686beb commit bbcabe0

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

src/GitVersionTask/GenerateGitVersionInformation.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ public override bool Execute()
5050
logger.LogError("Error occurred: " + exception);
5151
return false;
5252
}
53-
finally
54-
{
55-
Logger.Reset();
56-
}
5753
}
5854

5955
void InnerExecute()

src/GitVersionTask/GetVersion.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ public override bool Execute()
136136
logger.LogError("Error occurred: " + exception);
137137
return false;
138138
}
139-
finally
140-
{
141-
Logger.Reset();
142-
}
143139
}
144140
}
145141
}

src/GitVersionTask/UpdateAssemblyInfo.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ public override bool Execute()
5454
logger.LogError("Error occurred: " + exception);
5555
return false;
5656
}
57-
finally
58-
{
59-
Logger.Reset();
60-
}
6157
}
6258

6359
void InnerExecute()

src/GitVersionTask/WriteVersionInfoToBuildLog.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ public override bool Execute()
3737
logger.LogError("Error occurred: " + exception);
3838
return false;
3939
}
40-
finally
41-
{
42-
Logger.Reset();
43-
}
4440
}
4541

4642
void InnerExecute()

0 commit comments

Comments
 (0)