Hi,
We are trying to build our CSPROJ using dotnet sdk 6.0.407 version also tried with 7.0.306 version but getting below error. This is running from jenkins and dotnet is installed on Windows Server. Please guide as we are stuck here. This is the output.
set MSBuildSDKsPath=C:\Program Files\dotnet\sdk\7.0.306\Sdks set MSBuildEnableWorkloadResolver = false "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe" WPF_Client.csproj /t:Restore;Build /p:TargetFramework=net6.0-windows10.0.20348.0 /p:Platform="Any CPU" > C:\Program Files\Git\cmd\git checkout # timeout=10MSBuild version 17.4.1+9a89d02ff for .NET FrameworkBuild started 2/5/2024 10:13:56 AM.Project "D:\Workdir\jenkins\workspace\WPF_Client.csproj" on node 1 (Restore;Build target(s)).C:\Program Files\dotnet\sdk\7.0.306\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props(142,3): error MSB4024: The imported project file "C:\Program Files\dotnet\sdk\7.0.306\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.props" could not be loaded. Root element is missing. [D:\Workdir\jenkins\workspace\WPF_Client.csproj]Done Building Project "D:\Workdir\jenkins\workspace\WPF_Client.csproj" (Restore;Build target(s)) -- FAILED.Build FAILED.