Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Acceleration copies assemblies from wrong target framework in multi target setup #8908

Closed
johanneszab opened this issue Mar 9, 2023 · 9 comments
Assignees
Labels
Feature-Build-Acceleration Build Acceleration can skip calls to MSBuild within Visual Studio Triage-Investigate Reviewed and investigation needed by dev team
Milestone

Comments

@johanneszab
Copy link

johanneszab commented Mar 9, 2023

Visual Studio Version

Version 17.5.1

Summary

In a multi-target frameworks setup, Build Acceleration copies assemblies from one target framework (e.g. net7.0) to the output of a different target framework (net6.0). Is Build Acceleration suitable for multi-target frameworks setups? I haven't seen anything regarding this in the docs.

Steps to Reproduce

  1. I've created a Repro repo based on GitExtensions as I've seen that Drew enabled Build Acceleration there.
  2. I've changed the target framework from net6.0-windows to net7.0-windows;net6.0-windows.
  3. Open the solution in VS, build it.
  4. Change an implementation in GitExtUtils to trigger Build Acceleration.
  5. See in the output of visual studio:
  6. Assemblies from one target platform are copied to the other target platforms output directory (e.g. from net462 to net6.0-windows).

Expected Behavior

Assemblies from one target platform should only be copied to its appropriate output and not being mixed.

Actual Behavior

Assemblies from one target platform are copied to the other output directory (e.g. from net462 to net6.0-windows).

42>FastUpToDate: Project is up-to-date. (GitExtensions)
43>FastUpToDate: Checking configuration Debug|AnyCPU|net7.0-windows: (DeleteUnusedBranches.Tests)
43>FastUpToDate:     Comparing timestamps of inputs and outputs: (DeleteUnusedBranches.Tests)
43>FastUpToDate:         No inputs are newer than earliest output 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\DeleteUnusedBranches.Tests.xml' (2023-03-09 09:50:52.494). Newest input is 'D:\repos\gitextensions\artifacts\Debug\obj\GitExtensions.Plugins.DeleteUnusedBranches\net7.0-windows\ref\GitExtensions.Plugins.DeleteUnusedBranches.dll' (2023-03-09 09:50:51.353). (DeleteUnusedBranches.Tests)
43>FastUpToDate: Checking configuration Debug|AnyCPU|net6.0-windows: (DeleteUnusedBranches.Tests)
43>FastUpToDate:     Comparing timestamps of inputs and outputs: (DeleteUnusedBranches.Tests)
43>FastUpToDate:         No inputs are newer than earliest output 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\DeleteUnusedBranches.Tests.xml' (2023-03-09 09:50:52.493). Newest input is 'D:\repos\gitextensions\artifacts\Debug\obj\GitExtensions.Plugins.DeleteUnusedBranches\net6.0-windows\ref\GitExtensions.Plugins.DeleteUnusedBranches.dll' (2023-03-09 09:50:51.044). (DeleteUnusedBranches.Tests)
43>FastUpToDate: Copying 35 files to accelerate build (https://aka.ms/vs-build-acceleration): (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\GitExtUtils\net7.0-windows\GitExtUtils.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\GitExtUtils.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\GitExtUtils\net7.0-windows\GitExtUtils.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\GitExtUtils.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\Git.hub\Git.hub\bin\Debug\netstandard2.0\Git.hub.pdb' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\Git.hub.pdb'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\Git.hub\Git.hub\bin\Debug\netstandard2.0\Git.hub.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\Git.hub.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\BugReporter\net7.0-windows\BugReporter.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\BugReporter.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\BugReporter\net7.0-windows\BugReporter.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\BugReporter.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\NetSpell.SpellChecker\bin\Debug\net6.0-windows\SpellChecker.pdb' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\SpellChecker.pdb'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\NetSpell.SpellChecker\bin\Debug\net6.0-windows\SpellChecker.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\SpellChecker.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\ICSharpCode.TextEditor\Project\bin\Release\net6.0-windows\ICSharpCode.TextEditor.pdb' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\ICSharpCode.TextEditor.pdb'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\ICSharpCode.TextEditor\Project\bin\Release\net6.0-windows\ICSharpCode.TextEditor.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\ICSharpCode.TextEditor.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\conemu-inside\ConEmuWinForms\bin\net6.0-windows\ConEmuWinForms.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\ConEmuWinForms.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\conemu-inside\ConEmuWinForms\bin\net6.0-windows\ConEmuWinForms.pdb' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\ConEmuWinForms.pdb'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\conemu-inside\ConEmuWinForms\bin\net6.0-windows\ConEmuWinForms.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\ConEmuWinForms.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\ResourceManager\net7.0-windows\ResourceManager.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\ResourceManager.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\ResourceManager\net7.0-windows\ResourceManager.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net7.0-windows\ResourceManager.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\GitExtUtils\net6.0-windows\GitExtUtils.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\GitExtUtils.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\GitExtUtils\net6.0-windows\GitExtUtils.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\GitExtUtils.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\Git.hub\Git.hub\bin\Debug\netstandard2.0\Git.hub.pdb' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\Git.hub.pdb'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\Git.hub\Git.hub\bin\Debug\netstandard2.0\Git.hub.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\Git.hub.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\BugReporter\net7.0-windows\BugReporter.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\BugReporter.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\BugReporter\net7.0-windows\BugReporter.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\BugReporter.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\NetSpell.SpellChecker\bin\Debug\net6.0-windows\SpellChecker.pdb' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\SpellChecker.pdb'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\NetSpell.SpellChecker\bin\Debug\net6.0-windows\SpellChecker.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\SpellChecker.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\ICSharpCode.TextEditor\Project\bin\Release\net6.0-windows\ICSharpCode.TextEditor.pdb' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\ICSharpCode.TextEditor.pdb'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\ICSharpCode.TextEditor\Project\bin\Release\net6.0-windows\ICSharpCode.TextEditor.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\ICSharpCode.TextEditor.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\conemu-inside\ConEmuWinForms\bin\net6.0-windows\ConEmuWinForms.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\ConEmuWinForms.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\conemu-inside\ConEmuWinForms\bin\net6.0-windows\ConEmuWinForms.pdb' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\ConEmuWinForms.pdb'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\Externals\conemu-inside\ConEmuWinForms\bin\net6.0-windows\ConEmuWinForms.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\ConEmuWinForms.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\GitUIPluginInterfaces\net7.0-windows\GitUIPluginInterfaces.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\GitUIPluginInterfaces.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\GitUIPluginInterfaces\net7.0-windows\GitUIPluginInterfaces.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\GitUIPluginInterfaces.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\GitExtUtils\net7.0-windows\GitExtUtils.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\GitExtUtils.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\GitExtUtils\net7.0-windows\GitExtUtils.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\GitExtUtils.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\GitCommands\net7.0-windows\GitCommands.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\GitCommands.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\ResourceManager\net7.0-windows\ResourceManager.xml' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\ResourceManager.xml'. (DeleteUnusedBranches.Tests)
43>FastUpToDate:     From 'D:\repos\gitextensions\artifacts\Debug\bin\ResourceManager\net7.0-windows\ResourceManager.dll' to 'D:\repos\gitextensions\artifacts\Debug\bin\tests\UnitTests\DeleteUnusedBranches.Tests\net6.0-windows\ResourceManager.dll'. (DeleteUnusedBranches.Tests)
43>FastUpToDate: Build acceleration copied 35 files. (DeleteUnusedBranches.Tests)
43>FastUpToDate: Project is up-to-date. (DeleteUnusedBranches.Tests)
========== Build: 1 succeeded, 0 failed, 42 up-to-date, 0 skipped ==========
========== Build started at 9:52 AM and took 00,819 seconds ==========
Visual Studio accelerated 28 project(s), copying 156 file(s). See https://aka.ms/vs-build-acceleration.

User Impact

We are still in the migration phase of a huge (500+ projects, multi million LoCs) .net framework solution and are currently targeting .net462 and .net6.0-windows. We cannot use Build Acceleration as it breaks builds by copying .net462 assemblies to the .net6.0-windows output folder.

@MiYanni MiYanni added the Triage-Approved Reviewed and prioritized label Mar 9, 2023
@drewnoakes
Copy link
Member

Thanks for the detailed ticket

Is Build Acceleration suitable for multi-target frameworks setups?

Yes this is supposed to work. I'll dig into your scenario and report back. It might not be until next week.

@drewnoakes
Copy link
Member

Assemblies from one target platform are copied to the other output directory (e.g. from net462 to net6.0-windows).

I don't see any examples of copies from net462 listed in the FastUpToDate output above. Am I missing something?

@johanneszab
Copy link
Author

Assemblies from one target platform are copied to the other output directory (e.g. from net462 to net6.0-windows).

I don't see any examples of copies from net462 listed in the FastUpToDate output above. Am I missing something?

Nope. Sorry. It's written a bit confusing. I should have changed net462 to net7.0

At work we have net462 and net6.0-windows setup. Initially, I tried to recreate this in GitExtensions, but some dependencies didn't build for net462.

Then I briefly tried .net6.0 and net7.0 and saw that the same happens there. You'll only see 6.0 and 7.0 as those are the TargetFrameworks I've used in the test.

@drewnoakes
Copy link
Member

I'd like to create a minimal repro for this, ideally with two projects, A and B, where A references B and B is multi-targeted.

What would the targets of these projects need to be to recreate your scenario?

@drewnoakes
Copy link
Member

For example, if A targets net6.0 then B targets net472;net7.0 then the net472 output of B is copied to A.

@johanneszab
Copy link
Author

johanneszab commented Mar 12, 2023

Hi Drew!

Thanks for taking the time looking into this. I've only now noticed that my repro repo isn't even correct because those different platform assemblies that get copied are the only ones which are build as the corresponding projects have their own, stricter target platforms. They are essentially the only ones available.

I am really not interested in wasting your time. Its ok for me, if we close this issue until, if, I'll come up with a usable repo. I think it's way more likely that the issue is on our side.

I've quickly tested it with the example case you provided and everything works as expected. Then however, I've tried to re-create our build system, and I think the options we have set are similar to this:

Directory.Build.props

    <LangVersion>latest</LangVersion>
    <TargetFrameworks>net462;net6.0-windows</TargetFrameworks>
  
    <!-- Produce reference assemblies during compile for faster builds: https://learn.microsoft.com/en-us/dotnet/standard/assembly/reference-assemblies -->
    <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
    <!-- Opt in to build acceleration in VS (from 17.5 onwards): https://github.com/dotnet/project-system/blob/main/docs/build-acceleration.md -->
    <AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>

    <BaseOutputPath>..\Bin\</BaseOutputPath>
    <AppendRuntimeIdentifierToOutputPath>true</AppendRuntimeIdentifierToOutputPath>	
    <OutputPath>$(BaseOutputPath)</OutputPath>
    <UseCommonOutputDirectory>true</UseCommonOutputDirectory>

So we have for all projects net462;net6.0-windows as targetplatforms, and a common output directory. Here is a new minimal project based on this with 4 test projects. I'm not even sure if that makes sense with build acceleration, now that I looked deeper into this.

Now when I build it, and change something in ClassLibary2, TestMethod2, TestMethod2 (e.g. B), I see this output:

4>FastUpToDate:     From 'C:\Users\DIJMEYER\source\repos\acceleration\TestProject\bin\Debug\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll' to 'C:\Users\DIJMEYER\source\repos\acceleration\TestProject\..\Bin\net6.0-windows\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll'. (TestProject)

Something is copied from net462 to net6.0-windows (log). I think TestFramework.Extensions.dll isn't needed in this case for .net6.0. So the copy isn't bad. In our case however, our production assemblies get copied over. And I am guessing right now it might be because they are many times rebuild during the build because the fail the FUTD check all the time.

@drewnoakes
Copy link
Member

HI Johannes,

I cloned your repo down and did the following:

  1. Rebuild all.
  2. Make a white space change in Class2.cs.
  3. Build TestProject.csproj.

The output window shows me something different to you. I see ClassLibrary2 builds:

2>FastUpToDate: Input Compile item 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\Class2.cs' is newer (2023-03-14 13:13:25.492) than earliest output 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.dll' (2023-03-14 13:13:05.643), not up-to-date. (ClassLibrary2)
2>FastUpToDate: Up-to-date check completed in 1.4 ms (ClassLibrary2)
2>------ Build started: Project: ClassLibrary2, Configuration: Debug Any CPU ------
2>C:\Program Files\dotnet\sdk\7.0.300-preview.23122.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
2>C:\Program Files\dotnet\sdk\7.0.300-preview.23122.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
2>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2352,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
2>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2352,5): warning MSB3243: No way to resolve conflict between "System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http". Choosing "System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
2>ClassLibrary2 -> D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.dll
2>ClassLibrary2 -> D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary2.dll
2>Done building project "ClassLibrary2.csproj".

Then scrolling down to TestProject's build, I see it appear up-to-date. In particular:

4>FastUpToDate:             Checking PreserveNewest item (TestProject)
4>FastUpToDate:                 Source      2023-03-14 13:13:26.004: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary2.dll' (TestProject)
4>FastUpToDate:                 Destination 2023-03-14 13:13:26.004: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\..\Bin\net6.0-windows\ClassLibrary2.dll' (TestProject)

Here the source and destination paths are actually the same, due to the use of the common output directory. Note that I'm using verbose output. I think you're using info.

Interestingly, I see no mention at all of Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll in the output.

Full build output

Build started...
1>FastUpToDate: Checking configuration Debug|AnyCPU|net462: (ClassLibrary3)
1>FastUpToDate: Comparing timestamps of inputs and outputs: (ClassLibrary3)
1>FastUpToDate: Adding UpToDateCheckBuilt outputs: (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary3.dll (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\obj\Debug\net462\ClassLibrary3.dll (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\obj\Debug\net462\ClassLibrary3.pdb (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary3.pdb (ClassLibrary3)
1>FastUpToDate: Adding project file inputs: (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\ClassLibrary3.csproj (ClassLibrary3)
1>FastUpToDate: Adding newest import input: (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Directory.Build.props (ClassLibrary3)
1>FastUpToDate: Adding Compile inputs: (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\Class3.cs (ClassLibrary3)
1>FastUpToDate: No inputs are newer than earliest output 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary3.dll' (2023-03-14 13:13:04.485). Newest input is 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Directory.Build.props' (2023-03-14 13:12:52.496). (ClassLibrary3)
1>FastUpToDate: Checking items to copy to the output directory: (ClassLibrary3)
1>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\ClassLibrary3.csproj': (ClassLibrary3)
1>FastUpToDate: Checking PreserveNewest item (ClassLibrary3)
1>FastUpToDate: Source 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary3.pdb' (ClassLibrary3)
1>FastUpToDate: Destination 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3..\Bin\net462\ClassLibrary3.pdb' (ClassLibrary3)
1>FastUpToDate: Checking PreserveNewest item (ClassLibrary3)
1>FastUpToDate: Source 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary3.dll' (ClassLibrary3)
1>FastUpToDate: Destination 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3..\Bin\net462\ClassLibrary3.dll' (ClassLibrary3)
1>FastUpToDate: Checking configuration Debug|AnyCPU|net6.0-windows: (ClassLibrary3)
1>FastUpToDate: Comparing timestamps of inputs and outputs: (ClassLibrary3)
1>FastUpToDate: Adding UpToDateCheckBuilt outputs: (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary3.dll (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\obj\Debug\net6.0-windows\ClassLibrary3.dll (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\obj\Debug\net6.0-windows\ClassLibrary3.pdb (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary3.pdb (ClassLibrary3)
1>FastUpToDate: Adding project file inputs: (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\ClassLibrary3.csproj (ClassLibrary3)
1>FastUpToDate: Adding newest import input: (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Directory.Build.props (ClassLibrary3)
1>FastUpToDate: Adding Compile inputs: (ClassLibrary3)
1>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\Class3.cs (ClassLibrary3)
1>FastUpToDate: No inputs are newer than earliest output 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\obj\Debug\net6.0-windows\ClassLibrary3.pdb' (2023-03-14 13:13:05.040). Newest input is 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Directory.Build.props' (2023-03-14 13:12:52.496). (ClassLibrary3)
1>FastUpToDate: Checking items to copy to the output directory: (ClassLibrary3)
1>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\ClassLibrary3.csproj': (ClassLibrary3)
1>FastUpToDate: Checking PreserveNewest item (ClassLibrary3)
1>FastUpToDate: Source 2023-03-14 13:13:05.040: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary3.pdb' (ClassLibrary3)
1>FastUpToDate: Destination 2023-03-14 13:13:05.040: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3..\Bin\net6.0-windows\ClassLibrary3.pdb' (ClassLibrary3)
1>FastUpToDate: Checking PreserveNewest item (ClassLibrary3)
1>FastUpToDate: Source 2023-03-14 13:13:05.043: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary3.dll' (ClassLibrary3)
1>FastUpToDate: Destination 2023-03-14 13:13:05.043: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3..\Bin\net6.0-windows\ClassLibrary3.dll' (ClassLibrary3)
1>FastUpToDate: Project is up-to-date. (ClassLibrary3)
1>FastUpToDate: Up-to-date check completed in 3.5 ms (ClassLibrary3)
2>FastUpToDate: Checking configuration Debug|AnyCPU|net462: (ClassLibrary2)
2>FastUpToDate: Comparing timestamps of inputs and outputs: (ClassLibrary2)
2>FastUpToDate: Adding UpToDateCheckBuilt outputs: (ClassLibrary2)
2>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.dll (ClassLibrary2)
2>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\obj\Debug\net462\ClassLibrary2.dll (ClassLibrary2)
2>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\obj\Debug\net462\ClassLibrary2.pdb (ClassLibrary2)
2>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.pdb (ClassLibrary2)
2>FastUpToDate: Adding project file inputs: (ClassLibrary2)
2>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\ClassLibrary2.csproj (ClassLibrary2)
2>FastUpToDate: Adding newest import input: (ClassLibrary2)
2>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Directory.Build.props (ClassLibrary2)
2>FastUpToDate: Adding Compile inputs: (ClassLibrary2)
2>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\Class2.cs (ClassLibrary2)
2>FastUpToDate: Input Compile item 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\Class2.cs' is newer (2023-03-14 13:13:25.492) than earliest output 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.dll' (2023-03-14 13:13:05.643), not up-to-date. (ClassLibrary2)
2>FastUpToDate: Up-to-date check completed in 1.4 ms (ClassLibrary2)
2>------ Build started: Project: ClassLibrary2, Configuration: Debug Any CPU ------
2>C:\Program Files\dotnet\sdk\7.0.300-preview.23122.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
2>C:\Program Files\dotnet\sdk\7.0.300-preview.23122.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
2>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2352,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
2>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2352,5): warning MSB3243: No way to resolve conflict between "System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http". Choosing "System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
2>ClassLibrary2 -> D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.dll
2>ClassLibrary2 -> D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary2.dll
2>Done building project "ClassLibrary2.csproj".
3>FastUpToDate: Checking configuration Debug|AnyCPU|net462: (ClassLibrary1)
3>FastUpToDate: Comparing timestamps of inputs and outputs: (ClassLibrary1)
3>FastUpToDate: Adding UpToDateCheckBuilt outputs: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary1.dll (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\obj\Debug\net462\ClassLibrary1.dll (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\obj\Debug\net462\ClassLibrary1.pdb (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary1.pdb (ClassLibrary1)
3>FastUpToDate: Adding project file inputs: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\ClassLibrary1.csproj (ClassLibrary1)
3>FastUpToDate: Adding newest import input: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Directory.Build.props (ClassLibrary1)
3>FastUpToDate: Adding Compile inputs: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\Class1.cs (ClassLibrary1)
3>FastUpToDate: Adding ResolvedCompilationReference inputs: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\obj\Debug\net462\ref\ClassLibrary2.dll (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\obj\Debug\net462\ref\ClassLibrary3.dll (ClassLibrary1)
3>FastUpToDate: No inputs are newer than earliest output 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary1.dll' (2023-03-14 13:13:06.038). Newest input is 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\obj\Debug\net462\ref\ClassLibrary2.dll' (2023-03-14 13:13:05.643). (ClassLibrary1)
3>FastUpToDate: Checking items to copy to the output directory: (ClassLibrary1)
3>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\ClassLibrary1.csproj': (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:06.038: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary1.pdb' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:06.038: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net462\ClassLibrary1.pdb' (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:06.038: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary1.dll' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:06.038: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net462\ClassLibrary1.dll' (ClassLibrary1)
3>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\ClassLibrary3.csproj': (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary3.pdb' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net462\ClassLibrary3.pdb' (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary3.dll' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net462\ClassLibrary3.dll' (ClassLibrary1)
3>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\ClassLibrary2.csproj': (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:25.932: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.pdb' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:25.932: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net462\ClassLibrary2.pdb' (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:25.932: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.dll' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:25.932: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net462\ClassLibrary2.dll' (ClassLibrary1)
3>FastUpToDate: Checking configuration Debug|AnyCPU|net6.0-windows: (ClassLibrary1)
3>FastUpToDate: Comparing timestamps of inputs and outputs: (ClassLibrary1)
3>FastUpToDate: Adding UpToDateCheckBuilt outputs: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary1.dll (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\obj\Debug\net6.0-windows\ClassLibrary1.dll (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\obj\Debug\net6.0-windows\ClassLibrary1.pdb (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary1.pdb (ClassLibrary1)
3>FastUpToDate: Adding project file inputs: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\ClassLibrary1.csproj (ClassLibrary1)
3>FastUpToDate: Adding newest import input: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Directory.Build.props (ClassLibrary1)
3>FastUpToDate: Adding Compile inputs: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\Class1.cs (ClassLibrary1)
3>FastUpToDate: Adding ResolvedCompilationReference inputs: (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\obj\Debug\net6.0-windows\ref\ClassLibrary2.dll (ClassLibrary1)
3>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\obj\Debug\net6.0-windows\ref\ClassLibrary3.dll (ClassLibrary1)
3>FastUpToDate: No inputs are newer than earliest output 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\obj\Debug\net6.0-windows\ClassLibrary1.pdb' (2023-03-14 13:13:06.149). Newest input is 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\obj\Debug\net6.0-windows\ref\ClassLibrary2.dll' (2023-03-14 13:13:05.439). (ClassLibrary1)
3>FastUpToDate: Checking items to copy to the output directory: (ClassLibrary1)
3>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\ClassLibrary1.csproj': (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:06.149: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary1.pdb' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:06.149: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net6.0-windows\ClassLibrary1.pdb' (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:06.151: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary1.dll' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:06.151: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net6.0-windows\ClassLibrary1.dll' (ClassLibrary1)
3>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\ClassLibrary3.csproj': (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:05.040: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary3.pdb' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:05.040: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net6.0-windows\ClassLibrary3.pdb' (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:05.043: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary3.dll' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:05.043: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net6.0-windows\ClassLibrary3.dll' (ClassLibrary1)
3>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\ClassLibrary2.csproj': (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:26.002: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary2.pdb' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:26.002: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net6.0-windows\ClassLibrary2.pdb' (ClassLibrary1)
3>FastUpToDate: Checking PreserveNewest item (ClassLibrary1)
3>FastUpToDate: Source 2023-03-14 13:13:26.004: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary2.dll' (ClassLibrary1)
3>FastUpToDate: Destination 2023-03-14 13:13:26.004: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1..\Bin\net6.0-windows\ClassLibrary2.dll' (ClassLibrary1)
3>FastUpToDate: Project is up-to-date. (ClassLibrary1)
3>FastUpToDate: Up-to-date check completed in 5.5 ms (ClassLibrary1)
4>FastUpToDate: Checking configuration Debug|AnyCPU|net462: (TestProject)
4>FastUpToDate: Comparing timestamps of inputs and outputs: (TestProject)
4>FastUpToDate: Adding UpToDateCheckBuilt outputs: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\TestProject.dll (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\obj\Debug\net462\TestProject.dll (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\obj\Debug\net462\TestProject.pdb (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\TestProject.pdb (TestProject)
4>FastUpToDate: Adding project file inputs: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\TestProject.csproj (TestProject)
4>FastUpToDate: Adding newest import input: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\TestProject.csproj (TestProject)
4>FastUpToDate: Adding Compile inputs: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\UnitTest1.cs (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\Usings.cs (TestProject)
4>FastUpToDate: Adding ResolvedCompilationReference inputs: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\obj\Debug\net462\ref\ClassLibrary2.dll (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\obj\Debug\net462\ref\ClassLibrary1.dll (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\obj\Debug\net462\ref\ClassLibrary3.dll (TestProject)
4>FastUpToDate: No inputs are newer than earliest output 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\TestProject.dll' (2023-03-14 13:13:06.735). Newest input is 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\obj\Debug\net462\ref\ClassLibrary1.dll' (2023-03-14 13:13:06.038). (TestProject)
4>FastUpToDate: Checking items to copy to the output directory: (TestProject)
4>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\TestProject.csproj': (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:06.735: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\TestProject.pdb' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:06.735: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net462\TestProject.pdb' (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:06.735: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\TestProject.dll' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:06.735: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net462\TestProject.dll' (TestProject)
4>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\ClassLibrary3.csproj': (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary3.pdb' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net462\ClassLibrary3.pdb' (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary3.dll' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:04.485: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net462\ClassLibrary3.dll' (TestProject)
4>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\ClassLibrary1.csproj': (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:06.038: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary1.pdb' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:06.038: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net462\ClassLibrary1.pdb' (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:06.038: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary1.dll' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:06.038: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net462\ClassLibrary1.dll' (TestProject)
4>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\ClassLibrary2.csproj': (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:25.932: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.pdb' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:25.932: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net462\ClassLibrary2.pdb' (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:25.932: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net462\ClassLibrary2.dll' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:25.932: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net462\ClassLibrary2.dll' (TestProject)
4>FastUpToDate: Checking configuration Debug|AnyCPU|net6.0-windows: (TestProject)
4>FastUpToDate: Comparing timestamps of inputs and outputs: (TestProject)
4>FastUpToDate: Adding UpToDateCheckBuilt outputs: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\TestProject.dll (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\obj\Debug\net6.0-windows\TestProject.dll (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\obj\Debug\net6.0-windows\TestProject.pdb (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\TestProject.pdb (TestProject)
4>FastUpToDate: Adding project file inputs: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\TestProject.csproj (TestProject)
4>FastUpToDate: Adding newest import input: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\TestProject.csproj (TestProject)
4>FastUpToDate: Adding Compile inputs: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\UnitTest1.cs (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\Usings.cs (TestProject)
4>FastUpToDate: Adding ResolvedCompilationReference inputs: (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\obj\Debug\net6.0-windows\ref\ClassLibrary2.dll (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\obj\Debug\net6.0-windows\ref\ClassLibrary3.dll (TestProject)
4>FastUpToDate: D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\obj\Debug\net6.0-windows\ref\ClassLibrary1.dll (TestProject)
4>FastUpToDate: No inputs are newer than earliest output 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\obj\Debug\net6.0-windows\TestProject.pdb' (2023-03-14 13:13:06.780). Newest input is 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\obj\Debug\net6.0-windows\ref\ClassLibrary1.dll' (2023-03-14 13:13:06.151). (TestProject)
4>FastUpToDate: Checking items to copy to the output directory: (TestProject)
4>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject\TestProject.csproj': (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:06.780: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\TestProject.pdb' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:06.780: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net6.0-windows\TestProject.pdb' (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:06.782: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\TestProject.dll' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:06.782: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net6.0-windows\TestProject.dll' (TestProject)
4>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary1\ClassLibrary1.csproj': (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:06.149: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary1.pdb' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:06.149: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net6.0-windows\ClassLibrary1.pdb' (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:06.151: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary1.dll' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:06.151: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net6.0-windows\ClassLibrary1.dll' (TestProject)
4>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary3\ClassLibrary3.csproj': (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:05.040: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary3.pdb' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:05.040: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net6.0-windows\ClassLibrary3.pdb' (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:05.043: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary3.dll' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:05.043: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net6.0-windows\ClassLibrary3.dll' (TestProject)
4>FastUpToDate: Checking copy items from project 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\ClassLibrary2\ClassLibrary2.csproj': (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:26.002: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary2.pdb' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:26.002: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net6.0-windows\ClassLibrary2.pdb' (TestProject)
4>FastUpToDate: Checking PreserveNewest item (TestProject)
4>FastUpToDate: Source 2023-03-14 13:13:26.004: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\Bin\net6.0-windows\ClassLibrary2.dll' (TestProject)
4>FastUpToDate: Destination 2023-03-14 13:13:26.004: 'D:\repos\issues\Issue8908BuildAccelerationMultiTargeting\vs_buildacceleration\sample\TestProject..\Bin\net6.0-windows\ClassLibrary2.dll' (TestProject)
4>FastUpToDate: Project is up-to-date. (TestProject)
4>FastUpToDate: Up-to-date check completed in 5.8 ms (TestProject)
========== Build: 1 succeeded, 0 failed, 3 up-to-date, 0 skipped ==========
========== Build started at 1:13 PM and took 00.821 seconds ==========

Firstly, I wonder if we are using the same repro steps. If you follow the steps I gave above, do you see the same output as me? Do I need different steps to reproduce your output?

If the same steps produce different results on our two machines, we will need to gather some additional logs.

Another thing you could try is installing the 17.6 preview to see if that makes a difference. I'm using an internal build of 17.6p2. That said, I'm not aware of any change between 17.5 GA and 17.6 that could cause the difference between what we're seeing.

@drewnoakes drewnoakes added the Feature-Build-Acceleration Build Acceleration can skip calls to MSBuild within Visual Studio label Mar 14, 2023
@drewnoakes drewnoakes added this to the 17.6 milestone Mar 14, 2023
@drewnoakes drewnoakes added Triage-Investigate Reviewed and investigation needed by dev team and removed Triage-Approved Reviewed and prioritized labels Mar 14, 2023
@johanneszab
Copy link
Author

johanneszab commented Mar 19, 2023

Hi Drew,

I've figured out what our problem is in our solution. We have something like this:

graph TD;
A1["ConsoleApp1<br>(net462;net6.0-windows)"]-->L1["ClassLibrary1<br>(net462)"];
A1-->L2["ClassLibrary2<br>(net462;net6.0-windows)"];
L1-->L2;
L2-->L3["ClassLibrary3<br>(net462;net6.0-windows)"];
Loading

After changing the implementation in ClassLibrary2 and performing an incremental build, in the ConsoleApp1 net6.0-windows output folder there is a

  • ClassLibrary2 with net462 target platform when copied via build acceleration, or a
  • ClassLibrary2 with net6.0-windows target platform when copied via msbuild (no build acceleration/turned off).
Build Acceleration Output
6>FastUpToDate: Checking configuration Debug|AnyCPU|net462: (ConsoleApp1)
6>FastUpToDate:     Comparing timestamps of inputs and outputs: (ConsoleApp1)
6>FastUpToDate:         No inputs are newer than earliest output 'D:\acceleration\sample\ConsoleApp1\bin\Debug\net462\ConsoleApp1.exe' (2023-03-19 12:30:26.178). Newest input is 'D:\acceleration\sample\ClassLibrary1\obj\Debug\net462\ref\ClassLibrary1.dll' (2023-03-19 12:30:26.026). (ConsoleApp1)
6>FastUpToDate: Checking configuration Debug|AnyCPU|net6.0-windows: (ConsoleApp1)
6>FastUpToDate:     Comparing timestamps of inputs and outputs: (ConsoleApp1)
6>FastUpToDate:         No inputs are newer than earliest output 'D:\acceleration\sample\ConsoleApp1\obj\Debug\net6.0-windows\ConsoleApp1.pdb' (2023-03-19 12:30:26.211). Newest input is 'D:\acceleration\sample\ClassLibrary1\obj\Debug\net462\ref\ClassLibrary1.dll' (2023-03-19 12:30:26.026). (ConsoleApp1)
6>FastUpToDate: Copying 6 files to accelerate build (https://aka.ms/vs-build-acceleration): (ConsoleApp1)
6>FastUpToDate:     From 'D:\acceleration\sample\ClassLibrary2\bin\Debug\net462\ClassLibrary2.pdb' to 'D:\acceleration\sample\ConsoleApp1\bin\Debug\net462\ClassLibrary2.pdb'. (ConsoleApp1)
6>FastUpToDate:     From 'D:\acceleration\sample\ClassLibrary2\bin\Debug\net462\ClassLibrary2.dll' to 'D:\acceleration\sample\ConsoleApp1\bin\Debug\net462\ClassLibrary2.dll'. (ConsoleApp1)
6>FastUpToDate:     From 'D:\acceleration\sample\ClassLibrary2\bin\Debug\net6.0-windows\ClassLibrary2.pdb' to 'D:\acceleration\sample\ConsoleApp1\bin\Debug\net6.0-windows\ClassLibrary2.pdb'. (ConsoleApp1)
6>FastUpToDate:     From 'D:\acceleration\sample\ClassLibrary2\bin\Debug\net6.0-windows\ClassLibrary2.dll' to 'D:\acceleration\sample\ConsoleApp1\bin\Debug\net6.0-windows\ClassLibrary2.dll'. (ConsoleApp1)
6>FastUpToDate:     From 'D:\acceleration\sample\ClassLibrary2\bin\Debug\net462\ClassLibrary2.pdb' to 'D:\acceleration\sample\ConsoleApp1\bin\Debug\net6.0-windows\ClassLibrary2.pdb'. (ConsoleApp1)
6>FastUpToDate:     From 'D:\acceleration\sample\ClassLibrary2\bin\Debug\net462\ClassLibrary2.dll' to 'D:\acceleration\sample\ConsoleApp1\bin\Debug\net6.0-windows\ClassLibrary2.dll'. (ConsoleApp1)
6>FastUpToDate: Build acceleration copied 6 files. (ConsoleApp1)
6>FastUpToDate: Project is up-to-date. (ConsoleApp1)
MSBuild Output
6>------ Build started: Project: ConsoleApp1, Configuration: Debug Any CPU ------
6>Build started 19.03.2023 14:06:39.
6>Target DispatchToInnerBuilds:
6>  Target ProcessFrameworkReferences:
6>  Target _GetProjectReferenceTargetFrameworkProperties:
6>    Target _GetProjectReferenceTargetFrameworkProperties:
6>      Target GetTargetFrameworksWithPlatformFromInnerBuilds:
6>      C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1830,5): warning NU1702: ProjectReference 'D:\acceleration\sample\ClassLibrary1\ClassLibrary1.csproj' was resolved using '.NETFramework,Version=v4.6.2' instead of the project target framework '.NETCoreApp,Version=v6.0'. This project may not be fully compatible with your project.
6>    Done building target "_GetProjectReferenceTargetFrameworkProperties" in project "ConsoleApp1.csproj".
6>    Target ResolveProjectReferences:
6>    Target ResolveTargetingPackAssets:
6>    Target _WriteAppConfigWithSupportedRuntime:
6>      Skipping target "_WriteAppConfigWithSupportedRuntime" because all output files are up-to-date with respect to the input files.
6>    Target GenerateBindingRedirects:
6>      No suggested binding redirects from ResolveAssemblyReferences.
6>    Target GenerateTargetFrameworkMonikerAttribute:
6>      Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
6>    Target CoreGenerateAssemblyInfo:
6>      Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files.
6>    Target CoreCompile:
6>      Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
6>    Target _CopyFilesMarkedCopyLocal:
6>      Copying file from "D:\acceleration\sample\ClassLibrary2\bin\Debug\net462\ClassLibrary2.pdb" to "D:\acceleration\sample\ConsoleApp1\bin\Debug\net462\ClassLibrary2.pdb".
6>      Copying file from "D:\acceleration\sample\ClassLibrary2\bin\Debug\net462\ClassLibrary2.dll" to "D:\acceleration\sample\ConsoleApp1\bin\Debug\net462\ClassLibrary2.dll".
6>      Touching "D:\acceleration\sample\ConsoleApp1\obj\Debug\net462\ConsoleApp1.csproj.CopyComplete".
6>    Target GetCopyToOutputDirectoryItems:
6>      Target CopyAdditionalFiles:
6>      Target AssignTargetPaths:
6>    Target _CopyAppConfigFile:
6>      Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
6>    Target CopyFilesToOutputDirectory:
6>      ConsoleApp1 -> D:\acceleration\sample\ConsoleApp1\bin\Debug\net462\ConsoleApp1.exe
6>
6>    Done building project "ConsoleApp1.csproj".
6>  Target GenerateTargetFrameworkMonikerAttribute:
6>    Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
6>  Target CoreGenerateAssemblyInfo:
6>    Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files.
6>  Target CoreCompile:
6>    Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
6>  Target _CreateAppHost:
6>    Skipping target "_CreateAppHost" because all output files are up-to-date with respect to the input files.
6>  Target _CopyFilesMarkedCopyLocal:
6>    Copying file from "D:\acceleration\sample\ClassLibrary2\bin\Debug\net6.0-windows\ClassLibrary2.pdb" to "D:\acceleration\sample\ConsoleApp1\bin\Debug\net6.0-windows\ClassLibrary2.pdb".
6>    Copying file from "D:\acceleration\sample\ClassLibrary2\bin\Debug\net6.0-windows\ClassLibrary2.dll" to "D:\acceleration\sample\ConsoleApp1\bin\Debug\net6.0-windows\ClassLibrary2.dll".
6>    Touching "D:\acceleration\sample\ConsoleApp1\obj\Debug\net6.0-windows\ConsoleApp1.csproj.CopyComplete".
6>  Target GetCopyToOutputDirectoryItems:
6>    Target _GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences:
6>  Target _CopyOutOfDateSourceItemsToOutputDirectory:
6>    Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to the input files.
6>  Target GenerateBuildDependencyFile:
6>    Skipping target "GenerateBuildDependencyFile" because all output files are up-to-date with respect to the input files.
6>  Target GenerateBuildRuntimeConfigurationFiles:
6>    Skipping target "GenerateBuildRuntimeConfigurationFiles" because all output files are up-to-date with respect to the input files.
6>  Target CopyFilesToOutputDirectory:
6>    ConsoleApp1 -> D:\acceleration\sample\ConsoleApp1\bin\Debug\net6.0-windows\ConsoleApp1.dll
6>
6>Build succeeded.

The output from build acceleration is just "different" compared to MSBuild. But I think that the actual problem is of course our code as its somewhat ill specified as we have two ways we reference ClassLibrary2 via different target platforms.

I've updated my previous repo accordingly so that you can test it. I've also added msbuild and build acceleration logs in the logs folder of the repository.

Overall, I don't think this is an issue anymore. I just wanted to give you a short retrospective feedback of the issue. I'm sorry for opening this prematurely.

Thanks for your help.

Best,
Johannes

@drewnoakes drewnoakes modified the milestones: 17.6, 17.7 Apr 13, 2023
@drewnoakes drewnoakes modified the milestones: 17.7, 17.8 Jul 13, 2023
@drewnoakes
Copy link
Member

Revisiting this, I think these are the points raised in the above:

  1. UseCommonOutputDirectory can cause issues with Build Acceleration: Improve FUTDC handling of copy items under UseCommonOutputDirectory #9143
  2. When the same files would be copied to the output via mutliple paths, there can be a difference between BA and MSBuild: Inconsistent copying of duplicate output folder items under build acceleration #9001

So I believe this issue can be closed in favour of those two issues.

Thanks very much @johanneszab for trying out the feature and filing this feedback. It's very much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Build-Acceleration Build Acceleration can skip calls to MSBuild within Visual Studio Triage-Investigate Reviewed and investigation needed by dev team
Projects
None yet
Development

No branches or pull requests

3 participants