msbuild
msbuild copied to clipboard
[Bug]: Dependencies not handled correctly when using Rebuild vs. Clean + Build (in VS and MSBuild)
Issue Description
msbuild ILSpy.sln /t:Rebuild fails while msbuild ILSpy.sln /t:Clean;Build succeeds.
Steps to Reproduce
For the needed workloads/SDKs see for more info: https://github.com/icsharpcode/ILSpy#how-to-build
git clone https://github.com/icsharpcode/ILSpy.gitmsbuild /t:Restore ILSpy.slnmsbuild /t:Build ILSpy.slnmsbuild /t:Rebuild ILSpy.slnfails, whilemsbuild /t:Clean;Build ILSpy.slnsucceeds
Expected Behavior
Rebuild succeeds iff Clean and Build succeed.
Actual Behavior
Build FAILED.
"ILSpy\ILspy.sln" (Rebuild target) (1) ->
"ILSpy\ILSpy.BamlDecompiler.Tests\ILSpy.BamlDecompiler.Tests.csproj" (Rebuild target) (10)
->
(_CopyOutOfDateSourceItemsToOutputDirectory target) ->
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5270,5): error MSB3030: Could not copy the file "ILSpy\ILSpy\bin\Debug\net8.0-windows\ILSpy.deps.json" because it was not found. [ILSpy\ILSpy.BamlDecompiler.Tests\ILSpy.BamlDecompiler.Tests.csproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5270,5): error MSB3030: Could not copy the file "ILSpy\ILSpy\bin\Debug\net8.0-windows\ILSpy.runtimeconfig.json" because it was not found. [ILSpy\ILSpy.BamlDecompiler.Tests\ILSpy
.BamlDecompiler.Tests.csproj]
"ILSpy\ILspy.sln" (Rebuild target) (1) ->
"ILSpy\ILSpy.Tests\ILSpy.Tests.csproj" (Rebuild target) (12) ->
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5270,5): error MSB3030: Could not copy the file "ILSpy\ILSpy\bin\Debug\net8.0-windows\ILSpy.deps.json" because it was not found. [ILSpy\ILSpy.Tests\ILSpy.Tests.csproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5270,5): error MSB3030: Could not copy the file "ILSpy\ILSpy\bin\Debug\net8.0-windows\ILSpy.runtimeconfig.json" because it was not found. [ILSpy\ILSpy.Tests\ILSpy.Tests.csproj]
0 Warning(s)
4 Error(s)
Analysis
No response
Versions & Configurations
❯ msbuild --version MSBuild version 17.10.4+10fbfbf2e for .NET Framework 17.10.4.21802