File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1313
1414 foreach($project in Get-ChildItem -Path . -Filter *.csproj -Recurse -Force) {
1515 dotnet add $project package SecurityCodeScan.VS2019
16+
17+ $xml = [xml](Get-Content -Path $project)
18+
19+ $errorLog = $xml.CreateElement("ErrorLog")
20+ $errorLog.set_InnerText("analysis.sarif")
21+ $propertyGroups = $xml.SelectNodes("//Project/PropertyGroup")
22+ $propertyGroups[0].AppendChild($errorLog)
23+
24+ $xml.Save($project)
25+ }
26+
27+ foreach($project in Get-ChildItem -Path . -Filter *.vbproj -Recurse -Force) {
28+ dotnet add $project package SecurityCodeScan.VS2019
29+
30+ $xml = [xml](Get-Content -Path $project)
31+
32+ $errorLog = $xml.CreateElement("ErrorLog")
33+ $errorLog.set_InnerText("analysis.sarif")
34+ $propertyGroups = $xml.SelectNodes("//Project/PropertyGroup")
35+ $propertyGroups[0].AppendChild($errorLog)
36+
37+ $xml.Save($project)
1638 }
You can’t perform that action at this time.
0 commit comments