The "IsTestByReference" task could not be loaded from the assembly

Hi could pls help me with this issue

I have recently undegraded windows 10 to windows 11 i have configured the sonarqube setup from then i’m getting below error
I’m using MsBuild tool i’m using is Visual Studio 2022 Licensed Version

SonarQube\SonarQubeProjects\RT_13\AppConfig\AppConfig.sln" (Rebuild target) (1) →
SonarQube\SonarQubeProjects\RT_13\AppConfig\AppConfig.csproj" (Rebuild target) (2) →
(SonarCategoriseProject target) →
SonarQubeProjects\RT_13\AppConfig.sonarqube\bin\targets\SonarQube.Integration.target
s(235,5): error MSB4062: The “IsTestByReference” task could not be loaded from the assembly
Qube\SonarQubeProjects\RT_13\AppConfig.sonarqube\bin\SonarScanner.MSBuild.Tasks.dll. Could not load file or assembly ’
Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its depen
dencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.F
ramework.ITask.

Hey there.

I suggest sharing the full logs from your build. It should start something like this (including MSBuild versions, which I think will be important)

C:\SmartBuild>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe   /t:Rebuild
Microsoft (R) Build Engine version 4.8.9032.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 01/04/2024 7:36:54 PM.
...

C:\Users\gant701rnp2>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe
Microsoft (R) Build Engine version 4.8.9032.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

I’m not asking you to run the command I shared in the example logs. I want to know what the build output looks like for your usual build, the one you shared a snippet of logs of in your first post.

This is what your telling about