dotnet/msbuild

Consider blocking TaskLoggingHelper use after its task ends

Open

#4828 aperta il 17 ott 2019

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)C# (1364 fork)batch import
Area: Debuggabilityhelp wantedtriaged

Metriche repository

Star
 (5062 star)
Metriche merge PR
 (Merge medio 11g 7h) (125 PR mergiate in 30 g)

Descrizione

see https://github.com/microsoft/msbuild/issues/4792#issuecomment-543336926 and the rest of that thread

If you hold onto a TaskLoggingHelper object (perhaps in a static field) past the lifetime of the Task that created it, it will throw when it is used.

We could instead dispose of it and provide a nicer error at time of use.

Guida contributor