File tree Expand file tree Collapse file tree 2 files changed +15
-11
lines changed
Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1- using Microsoft . Build . Locator ;
21using Microsoft . CodeAnalysis ;
32using Microsoft . CodeAnalysis . MSBuild ;
43using Microsoft . CodeAnalysis . Text ;
@@ -19,17 +18,23 @@ class Solution : IDisposable
1918
2019 public Code Code => new Code ( projects ) ;
2120
22- static Solution ( )
23- => MSBuildLocator . RegisterDefaults ( ) ;
24-
2521 public Solution ( string slnFile )
2622 {
2723 this . slnFile = slnFile ;
2824
2925 workspace . WorkspaceFailed += ( sender , e ) =>
3026 {
3127 if ( e . Diagnostic . Kind == WorkspaceDiagnosticKind . Failure || MainScript . Verbose )
28+ {
29+ // For code-generation purposes, we don't care about the new-enabled-by-default Nuget warnings
30+ // regarding security vulnerabilities in dependencies.
31+ // Unfortunately, Diagnostic doesn't expose a code, just Kind and Message :(
32+ // These errors can be disabled in csproj, but then they wouldn't show up during normal compilation either.
33+ if ( e . Diagnostic . Message . Contains ( "has a known critical severity vulnerability" ) )
34+ return ;
35+
3236 ConsoleEx . Error ( "Workspace failure: " + e . Diagnostic . Message ) ;
37+ }
3338 } ;
3439 }
3540
Original file line number Diff line number Diff line change 33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
55 <TargetFramework >net8.0</TargetFramework >
6- <Version >3.4 .0</Version >
6+ <Version >3.5 .0</Version >
77 <PackageLicenseExpression >MIT</PackageLicenseExpression >
88 <Nullable >enable</Nullable >
99 <WarningsAsErrors >nullable</WarningsAsErrors >
1919 </PropertyGroup >
2020
2121 <ItemGroup >
22- <PackageReference Include =" Microsoft.Build.Locator" Version =" 1.7.8" />
23- <PackageReference Include =" Microsoft.CodeAnalysis.CSharp.Workspaces" Version =" 4.12.0" />
24- <PackageReference Include =" Microsoft.CodeAnalysis.Workspaces.MSBuild" Version =" 4.12.0" />
25- <PackageReference Include =" Microsoft.Extensions.FileSystemGlobbing" Version =" 8.0.0" />
26- <PackageReference Include =" Polly" Version =" 7.2.3" />
27- <PackageReference Include =" Scriban" Version =" 5.9.0" />
22+ <PackageReference Include =" Microsoft.CodeAnalysis.CSharp.Workspaces" Version =" 4.13.0" />
23+ <PackageReference Include =" Microsoft.CodeAnalysis.Workspaces.MSBuild" Version =" 4.13.0" />
24+ <PackageReference Include =" Microsoft.Extensions.FileSystemGlobbing" Version =" 9.0.4" />
25+ <PackageReference Include =" Polly" Version =" 8.5.2" />
26+ <PackageReference Include =" Scriban" Version =" 6.2.1" />
2827 <PackageReference Include =" System.CommandLine" Version =" 2.0.0-beta4.22272.1" />
2928 </ItemGroup >
3029
You can’t perform that action at this time.
0 commit comments