0

I want to build my project in a docker desktop windows container. The OS is Windows Server 2019 Core (no interface, just a console).

If I want to build my solution with MSBuild like that:

msbuild MySolution.sln

I get this error message:

MyProject.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.

Which means for me that I need to install Microsoft.NET.Sdk, for which I need to install the 'App Installer' (to get the 'winget' commands). And for that I need the Microsoft Store which is not supported in Windows Server 2019 Core.

Does anyone know how to solve this problem?

Edit:

  • projects in the solution are mixed of .NET Framework and .NET Core/.NET
  • msbuild is installed via 'Build Tools for Visual Studio' installation
  • How can I install the framework with command line?
Florian
  • 1,019
  • 6
  • 22
  • Are the projects in the solution .NET Framework or .NET Core/.NET or a mix of both? How is MSBuild installed? Is MSBuild installed via a '[Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/?q=build+tools#build-tools-for-visual-studio-2022)' installation? SDK projects are usually .NET Core/.NET. Has [.NET](https://dotnet.microsoft.com/en-us/download) been installed? – Jonathan Dodds Dec 14 '22 at 15:23

1 Answers1

0

In the Microsoft documentation "Install .NET on Windows" there are sections for installations methods that don't use winget:

Jonathan Dodds
  • 2,654
  • 1
  • 10
  • 14