File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
src/Microsoft.ComponentDetection.Detectors/nuget Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ public class NuGetMSBuildBinaryLogComponentDetector : FileComponentDetector
39
39
} ;
40
40
41
41
private static readonly object MSBuildRegistrationGate = new ( ) ;
42
- private static bool isMSBuildRegistered ;
43
42
44
43
public NuGetMSBuildBinaryLogComponentDetector (
45
44
IObservableDirectoryWalkerFactory walkerFactory ,
@@ -166,12 +165,11 @@ internal static void EnsureMSBuildIsRegistered()
166
165
{
167
166
lock ( MSBuildRegistrationGate )
168
167
{
169
- if ( ! isMSBuildRegistered )
168
+ if ( ! MSBuildLocator . IsRegistered )
170
169
{
171
170
// this must happen once per process, and never again
172
171
var defaultInstance = MSBuildLocator . QueryVisualStudioInstances ( ) . First ( ) ;
173
172
MSBuildLocator . RegisterInstance ( defaultInstance ) ;
174
- isMSBuildRegistered = true ;
175
173
}
176
174
}
177
175
}
You can’t perform that action at this time.
0 commit comments