Cannot build solution VS2017

I created new DEV machine with SP2016 and VS2017, downloaded the FBA source code but when compiling I get the error:
VisualStudio.SharePoint.targets(450,5): error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

My guess is that you are on the default branch, which is the SharePoint 2010 branch, which is .net 2.0/3.5 and you’re missing some installed .net libraries for that. Try checking out the 2016 branch and building that and see if you have issues.

Oh - or it could be you don’t have SharePoint installed on your development machine?

I downloaded, and have SharePoint running as well. Maybe I need higher version of VS?

It should work fine on VS 2017. Are you sure you’ve switched the branch of the code to 2016? The default/master branch of the code is 2010 and won’t work with sharepoint 2016.

I figured it out finally… had to change MinimumOfficeToolsVersion from 14.6 to 14.0 in the CSPROJ file. Now it works, strange!

1 Like

What changes would be needed for SharePoint 2019. Any help/input would be appreciated.

No changes needed. The build for SharePoint 2016 works great on SharePoint 2019.