File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8787 # TFMs. The LintCommandLine tests invoke the CLI which runs MSBuild internally, regenerating
8888 # the NuGet Core targets for net8.0 only. Without this restore, subsequent steps that build
8989 # net472 projects (e.g. Analyzers.Tests) fail with CS0518 (missing reference assemblies).
90+ #
91+ # We must delete the *.nuget.g.props / *.nuget.g.targets files first: NuGet skips rewriting
92+ # them when project.assets.json has not changed, so a plain restore would silently leave the
93+ # corrupted single-TFM files in place.
94+ - run : Get-ChildItem src -Recurse -Include "*.nuget.g.props","*.nuget.g.targets" | Remove-Item -Force
95+ shell : pwsh
96+ if : ${{ inputs.target-framework == 'net8.0' && runner.os == 'Windows' }}
97+ - run : find src -name "*.nuget.g.props" -o -name "*.nuget.g.targets" | xargs rm -f
98+ shell : bash
99+ if : ${{ inputs.target-framework == 'net8.0' && runner.os != 'Windows' }}
90100 - run : msbuild ${{ inputs.sln }} -t:Restore
91101 shell : pwsh
92102 if : ${{ inputs.target-framework == 'net8.0' && runner.os == 'Windows' }}
You can’t perform that action at this time.
0 commit comments