Can't build using documented steps; `init.cmd` throws a bunch of errors

Author: riverarCreated Aug 28, 2026Updated Sep 30, 2026
Labelsbugteam-Controlsteam-Core

Describe the bug

Following https://github.com/microsoft/microsoft-ui-xaml/blob/main/GettingStarted.md, after running init.cmd, the following errors are output:

...
Installed SDK (x86) from Version.props with channel 9.0.3xx to C:\Sources\microsoft-ui-xaml\.dotnet\x86.
Downloading .NET 8 runtimes
Downloading https://download.visualstudio.microsoft.com/download/pr/51bc18ac-0594-412d-bd63-18ece4c91ac4/90b47b97c3bfe40a833791b166697e67/windowsdesktop-runtime-8.0.3-win-x64.exe to C:\Sources\microsoft-ui-xaml\.tools\amd64\dotnet-windowsdesktop-runtime-installer.exe
Restoring Maestro and ensuring authentication...
C:\Sources\microsoft-ui-xaml\eng\Microsoft.MaestroRestore.csproj : error : Could not resolve SDK "Microsoft.NET.Sdk". E
xactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that messa
ge to correctly specify the SDK.
C:\Sources\microsoft-ui-xaml\eng\Microsoft.MaestroRestore.csproj : error :   The NuGetSdkResolver did not resolve this
SDK because there was no version specified in the project or global.json.
C:\Sources\microsoft-ui-xaml\eng\Microsoft.MaestroRestore.csproj : error :   MSB4276: The default SDK resolver failed t
o resolve SDK "Microsoft.NET.Sdk" because directory "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSB
uild\Sdks\Microsoft.NET.Sdk\Sdk" did not exist.
C:\Sources\microsoft-ui-xaml\eng\Microsoft.MaestroRestore.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified
 could not be found.
Restoring additional packages...
Restoring perf\packages.OSS.config
Restoring eng\BuildGenXbfForMSBuild\BuildGenXbfForMSBuild.csproj
C:\Sources\microsoft-ui-xaml\packages\microsoft.build.notargets\3.3.0\Sdk\Sdk.props(66,3): error : Could not resolve SDK "Microsoft.NET.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
C:\Sources\microsoft-ui-xaml\packages\microsoft.build.notargets\3.3.0\Sdk\Sdk.props(66,3): error :   The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json.
C:\Sources\microsoft-ui-xaml\packages\microsoft.build.notargets\3.3.0\Sdk\Sdk.props(66,3): error :   MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.Sdk" because directory "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Sdks\Microsoft.NET.Sdk\Sdk" did not exist.
C:\Sources\microsoft-ui-xaml\packages\microsoft.build.notargets\3.3.0\Sdk\Sdk.props(66,31): error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found. [C:\Sources\microsoft-ui-xaml\eng\BuildGenXbfForMSBuild\BuildGenXbfForMSBuild.csproj]

Restoring eng\Microsoft.MaestroRestore.csproj
C:\Sources\microsoft-ui-xaml\eng\Microsoft.MaestroRestore.csproj : error : Could not resolve SDK "Microsoft.NET.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
C:\Sources\microsoft-ui-xaml\eng\Microsoft.MaestroRestore.csproj : error :   The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json.
C:\Sources\microsoft-ui-xaml\eng\Microsoft.MaestroRestore.csproj : error :   MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.Sdk" because directory "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Sdks\Microsoft.NET.Sdk\Sdk" did not exist.
C:\Sources\microsoft-ui-xaml\eng\Microsoft.MaestroRestore.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.

Restoring controls\dev\dll\packages.config
Restoring XamlCompilerPrerequisites.sln
C:\Sources\microsoft-ui-xaml\src\XamlCompiler\Microsoft.UI.Xaml.Markup.Compiler.csproj : error : Could not resolve SDK "Microsoft.NET.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
C:\Sources\microsoft-ui-xaml\src\XamlCompiler\Microsoft.UI.Xaml.Markup.Compiler.csproj : error :   The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json.
C:\Sources\microsoft-ui-xaml\src\XamlCompiler\Microsoft.UI.Xaml.Markup.Compiler.csproj : error :   MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.Sdk" because directory "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Sdks\Microsoft.NET.Sdk\Sdk" did not exist.
C:\Sources\microsoft-ui-xaml\src\XamlCompiler\Microsoft.UI.Xaml.Markup.Compiler.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\src\XamlCompiler\Exe\Microsoft.UI.Xaml.Markup.Compiler.Executable.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\src\XamlCompiler\Exe\Microsoft.UI.Xaml.Markup.Compiler.IO\Microsoft.UI.Xaml.Markup.Compiler.IO.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\src\XamlCompiler\Exe\Microsoft.UI.Xaml.Markup.Compiler.MSBuildInterop\Microsoft.UI.Xaml.Markup.Compiler.MSBuildInterop.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\packages\microsoft.build.notargets\3.3.0\Sdk\Sdk.props(66,31): error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found. [C:\Sources\microsoft-ui-xaml\eng\BuildGenXbfForMSBuild\BuildGenXbfForMSBuild.csproj]

Restoring dxaml\Microsoft.UI.Xaml.sln
C:\Sources\microsoft-ui-xaml\dxaml\\\xcp\dxaml\dllsrv\winrt\native\Microsoft.ui.xaml.vcxproj(76,3): error MSB4019: The imported project "C:\Sources\microsoft-ui-xaml\packages\Microsoft.WindowsAppSDK.InteractiveExperiences\2.1.4-experimental\build\native\Microsoft.InteractiveExperiences.targets" was not found. Confirm that the expression in the Import declaration "$(LiftedIXPBuildPath)\Microsoft.InteractiveExperiences.targets", which evaluated to "C:\Sources\microsoft-ui-xaml\packages\Microsoft.WindowsAppSDK.InteractiveExperiences\2.1.4-experimental\build\native\Microsoft.InteractiveExperiences.targets", is correct, and that the file exists on disk.
C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\CustomTypesCompile.targets(43,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\adaptability\Microsoft.UI.Xaml.Tests.External.Adaptability.vcxproj]
C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\CustomTypesCompile.targets(43,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\Automation\Microsoft.UI.Xaml.Tests.External.Automation.vcxproj]
C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\CustomTypesCompile.targets(43,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\controls\Microsoft.UI.Xaml.Tests.External.Controls.vcxproj]
C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\CustomTypesCompile.targets(43,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\enterprise\Microsoft.UI.Xaml.Tests.External.Enterprise.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(2786,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the expression in the Import declaration "$(_CppCommonExtensionTargets)", which evaluated to "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets", is correct, and that the file exists on disk. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\controls\customtypes\CustomTypes.vcxproj]
C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\CustomTypesCompile.targets(43,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\foundation\Microsoft.UI.Xaml.Tests.External.Foundation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(2786,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the expression in the Import declaration "$(_CppCommonExtensionTargets)", which evaluated to "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets", is correct, and that the file exists on disk. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\foundation\customTypes\CustomTypes.vcxproj]
C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\CustomTypesCompile.targets(43,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\framework\Microsoft.UI.Xaml.Tests.External.Framework.vcxproj]
C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\CustomTypesCompile.targets(43,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\tools\Microsoft.UI.Xaml.Tests.External.Tools.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(2786,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the expression in the Import declaration "$(_CppCommonExtensionTargets)", which evaluated to "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets", is correct, and that the file exists on disk. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\tools\customTypes\customTypes.vcxproj]
C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\CustomTypesCompile.targets(43,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\Win32\Microsoft.UI.Xaml.Tests.External.Win32.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(2786,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the expression in the Import declaration "$(_CppCommonExtensionTargets)", which evaluated to "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.Cpp.targets", is correct, and that the file exists on disk. [C:\Sources\microsoft-ui-xaml\dxaml\test\native\external\adaptability\customtypes\CustomTypes.vcxproj]
C:\Sources\microsoft-ui-xaml\dxaml\test\infra\Win32Hosting\src\Microsoft.Toolkit.Win32.UI.XamlHost.csproj : error : Could not resolve SDK "Microsoft.NET.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
C:\Sources\microsoft-ui-xaml\dxaml\test\infra\Win32Hosting\src\Microsoft.Toolkit.Win32.UI.XamlHost.csproj : error :   The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json.
C:\Sources\microsoft-ui-xaml\dxaml\test\infra\Win32Hosting\src\Microsoft.Toolkit.Win32.UI.XamlHost.csproj : error :   MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.Sdk" because directory "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Sdks\Microsoft.NET.Sdk\Sdk" did not exist.
C:\Sources\microsoft-ui-xaml\dxaml\test\infra\Win32Hosting\src\Microsoft.Toolkit.Win32.UI.XamlHost.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\dxaml\test\managed\AccessKeys\Microsoft.UI.Xaml.Tests.Managed.AccessKeys.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\dxaml\test\managed\animation\Microsoft.UI.Xaml.Tests.Managed.Animation.EasingFunctionBaseTests.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\dxaml\test\managed\common\Microsoft.UI.Xaml.Tests.Managed.Common.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\dxaml\test\managed\enterprise\Microsoft.UI.Xaml.Tests.Managed.Enterprise.Moco.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\dxaml\test\managed\media\Microsoft.UI.Xaml.Tests.Managed.Media.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\dxaml\test\managed\Win32\WPF\Microsoft.UI.Xaml.Tests.Managed.Win32.Hosting.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\dxaml\test\managed\Win32\Common\Microsoft.UI.Xaml.Tests.Managed.Win32.Common.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\dxaml\\\xcp\dxaml\themes\autogen\GenAllXbf.csproj(137,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
C:\Sources\microsoft-ui-xaml\dxaml\\\xcp\tools\XbfParser\WidgetSpinner\WidgetSpinner.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\src\projection\Microsoft.WinUI.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Sources\microsoft-ui-xaml\dxaml\test\infra\taefhostappmanaged\TaefHostAppManaged.csproj(216,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v17.0\Microsoft.Windows.UI.Xaml.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in o

Source: microsoft/microsoft-ui-xaml