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
3939 } ;
4040
4141 private static readonly object MSBuildRegistrationGate = new ( ) ;
42- private static bool isMSBuildRegistered ;
4342
4443 public NuGetMSBuildBinaryLogComponentDetector (
4544 IObservableDirectoryWalkerFactory walkerFactory ,
@@ -166,12 +165,11 @@ internal static void EnsureMSBuildIsRegistered()
166165 {
167166 lock ( MSBuildRegistrationGate )
168167 {
169- if ( ! isMSBuildRegistered )
168+ if ( ! MSBuildLocator . IsRegistered )
170169 {
171170 // this must happen once per process, and never again
172171 var defaultInstance = MSBuildLocator . QueryVisualStudioInstances ( ) . First ( ) ;
173172 MSBuildLocator . RegisterInstance ( defaultInstance ) ;
174- isMSBuildRegistered = true ;
175173 }
176174 }
177175 }
You can’t perform that action at this time.
0 commit comments