msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

[Bug]: Dependencies not handled correctly when using Rebuild vs. Clean + Build (in VS and MSBuild)

Open siegfriedpammer opened this issue 1 year ago • 0 comments

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

  1. git clone https://github.com/icsharpcode/ILSpy.git
  2. msbuild /t:Restore ILSpy.sln
  3. msbuild /t:Build ILSpy.sln
  4. msbuild /t:Rebuild ILSpy.sln fails, while msbuild /t:Clean;Build ILSpy.sln succeeds

binlogs.zip

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

siegfriedpammer avatar Aug 17 '24 14:08 siegfriedpammer