SharePoint solutions can't be build with buildtool v18 because of an SDK version error.

Michael Kriese 106 Reputation points
2025-11-28T11:41:24.91+00:00

SharePoint solutions can't be build because of an SDK version error.

C:\Program Files\Microsoft Visual Studio\18\Professional\MSBuild\Microsoft\VisualStudio\v18.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(235,5): error : Could not load file or assembly 'Microsoft.VisualStudio.Modeling.Sdk, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

The file C:\Program Files\Microsoft Visual Studio\18\Professional\MSBuild\Microsoft\VisualStudio\v18.0\SharePointTools\Microsoft.VisualStudio.SharePoint.Tasks.dll links to Microsoft.VisualStudio.Modeling.Sdk, Version=17.0.0.0 instead of Microsoft.VisualStudio.Modeling.Sdk, Version=18.0.0.0.

To reproduce:

  • open VS 2026 Developer Shell
  • run msbuild solution.csproj /t:package /m /v:m /nodeReuse:false
  • See the error
Developer technologies | Visual Studio | Debugging
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 1,115 Reputation points Microsoft External Staff
    2025-12-01T12:50:13.3+00:00

    Thanks for reaching out! The SDK when trying to build SharePoint solutions in Visual Studio. The error indicates that the project is trying to load a specific version of the Microsoft.VisualStudio.Modeling.Sdk assembly (Version 17.0.0.0) which may not be compatible with your current setup in Visual Studio 2026.
    Check the below steps which are helpful
    Check SDK Compatibility: Confirm that you have the correct version of the SharePoint SDK installed. For Visual Studio 2026, ensure that all components are up-to-date and compatible.

    Modify Project Configuration: Open your project file (.csproj) and see if you can manually change the references to use Version 18.0.0.0 instead of 17.0.0.0. This might resolve the referencing issue.

    Repair Visual Studio: Sometimes, repairing the Visual Studio installation can fix underlying issues with assemblies not being recognized or loading properly. You can do this through the Visual Studio Installer.

    Check Dependencies: Make sure all dependencies and components your project relies on are installed and properly configured in your environment.

    Update NuGet Packages: If your project utilizes NuGet packages, check to ensure they are also updated to be compatible with your current SDK version.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.