File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
csharp/autobuilder/Semmle.Autobuild.CSharp Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,12 @@ protected override void AutobuildFailureDiagnostic()
125125 AddDiagnostic ( message ) ;
126126 }
127127
128+ // project files which don't exist get marked as not .NET core projects, but we don't want
129+ // to show an error for this if the files don't exist
130+ var foundNotDotNetProjects = autoBuildRule . DotNetRule . NotDotNetProjects . Where (
131+ proj => this . Actions . FileExists ( proj . FullPath )
132+ ) ;
133+
128134 // both dotnet and msbuild builds require project or solution files; if we haven't found any
129135 // then neither of those rules would've worked
130136 if ( this . ProjectsOrSolutionsToBuild . Count == 0 )
@@ -137,7 +143,8 @@ protected override void AutobuildFailureDiagnostic()
137143
138144 AddDiagnostic ( message ) ;
139145 }
140- else if ( autoBuildRule . DotNetRule . NotDotNetProjects . Any ( ) )
146+ // show a warning if there are projects which are not compatible with .NET Core, in case that is unintentional
147+ else if ( foundNotDotNetProjects . Any ( ) )
141148 {
142149 var message = MakeDiagnostic ( "dotnet-incompatible-projects" , "Some projects are incompatible with .NET Core" ) ;
143150 message . MarkdownMessage =
You can’t perform that action at this time.
0 commit comments