5

I wanted to run the XM Cloud Introduction Repo in local docker containers.

Reproduction steps:

  1. I cloned the main branch to my local
  2. I ran the init script
  3. I adjusted the .env file as I'm running on windows 10
  4. I stopped IIS
  5. I made sure docker is running for windows and not for Linux
  6. I installed dotnet 8 to meet the head application requirements
  7. I ran the up script

The following error occurs on step 15/20:

enter image description here

C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Project\MvpSite\rendering\Mvp.Project.MvpSite.Rendering.csproj]
C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Feature\Navigation\rendering\Mvp.Feature.Navigation.Rendering.csproj]
C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Feature\BasicContent\rendering\MVP.Feature.BasicContent.Rendering.csproj]
C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Feature\Social\rendering\Mvp.Feature.Social.Rendering.csproj]
C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Foundation\Configuration\rendering\Mvp.Foundation.Configuration.Rendering.csproj]
C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Feature\People\rendering\Mvp.Feature.People.Rendering.csproj]
C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Feature\User\rendering\Mvp.Feature.User.Rendering.csproj]
C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Foundation\DataFetching\rendering\Mvp.Foundation.DataFetching.Rendering.csproj]
C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Feature\Selections\rendering\Mvp.Feature.Selections.Rendering.csproj]

1 Answer 1

4

I first thought this might be related to an old windows version I was running on. So I updated it. But that did not help. So,inspecting the docker image using

docker image inspect mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019

revealed that my docker image was from 2022 and not the one from 12th december 2023

Seems this package cannot handle the .net 8 but only .net 6

So I manually pulled latest

docker image pull mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019

after inspecting that version it looked like I have the new version.

enter image description here

I ran the up.ps1 script again and the problem was solved.

1
  • This also helped me with a similar error for dotnet 7: C:\Program Files\dotnet\sdk\7.0.306\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(151,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [C:\build\src\Project\MvpSite\rendering\Mvp.Project.MvpSite.Rendering.csproj] Jan 8 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.