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()
125
125
AddDiagnostic ( message ) ;
126
126
}
127
127
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
+
128
134
// both dotnet and msbuild builds require project or solution files; if we haven't found any
129
135
// then neither of those rules would've worked
130
136
if ( this . ProjectsOrSolutionsToBuild . Count == 0 )
@@ -137,7 +143,8 @@ protected override void AutobuildFailureDiagnostic()
137
143
138
144
AddDiagnostic ( message ) ;
139
145
}
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 ( ) )
141
148
{
142
149
var message = MakeDiagnostic ( "dotnet-incompatible-projects" , "Some projects are incompatible with .NET Core" ) ;
143
150
message . MarkdownMessage =
You can’t perform that action at this time.
0 commit comments