@@ -824,11 +824,11 @@ private void SendProjectBasedTelemetry(ProjectLaunchSettingsModel? launchSetting
824824 {
825825 Debug . Assert ( ProjectFileFullPath != null ) ;
826826 var projectIdentifier = RunTelemetry . GetProjectBasedIdentifier ( ProjectFileFullPath , GetRepositoryRoot ( ) , Sha256Hasher . Hash ) ;
827-
827+
828828 // Get package and project reference counts for project-based apps
829829 int packageReferenceCount = 0 ;
830830 int projectReferenceCount = 0 ;
831-
831+
832832 // Try to get project information for telemetry if we built the project
833833 if ( ShouldBuild )
834834 {
@@ -837,10 +837,10 @@ private void SendProjectBasedTelemetry(ProjectLaunchSettingsModel? launchSetting
837837 var globalProperties = MSBuildArgs . GlobalProperties ? . ToDictionary ( ) ?? new Dictionary < string , string > ( StringComparer . OrdinalIgnoreCase ) ;
838838 globalProperties [ Constants . EnableDefaultItems ] = "false" ;
839839 globalProperties [ Constants . MSBuildExtensionsPath ] = AppContext . BaseDirectory ;
840-
840+
841841 using var collection = new ProjectCollection ( globalProperties : globalProperties ) ;
842842 var project = collection . LoadProject ( ProjectFileFullPath ) . CreateProjectInstance ( ) ;
843-
843+
844844 packageReferenceCount = RunTelemetry . CountPackageReferences ( project ) ;
845845 projectReferenceCount = RunTelemetry . CountProjectReferences ( project ) ;
846846 }
@@ -869,10 +869,10 @@ private void SendProjectBasedTelemetry(ProjectLaunchSettingsModel? launchSetting
869869 {
870870 try
871871 {
872- var currentDir = ProjectFileFullPath != null
872+ var currentDir = ProjectFileFullPath != null
873873 ? Path . GetDirectoryName ( ProjectFileFullPath )
874874 : Directory . GetCurrentDirectory ( ) ;
875-
875+
876876 while ( currentDir != null )
877877 {
878878 if ( Directory . Exists ( Path . Combine ( currentDir , ".git" ) ) )
@@ -886,7 +886,7 @@ private void SendProjectBasedTelemetry(ProjectLaunchSettingsModel? launchSetting
886886 {
887887 // Ignore errors when trying to find repo root
888888 }
889-
889+
890890 return null ;
891891 }
892892}
0 commit comments