In this post, we will discuss how we can resolve the issue which comes when we build a SharePoint solution or project. The error comes as:
New to Office 365 SharePoint Online? Get Office 365 Enterprise E3 Subscription & Try out all the features
The type or namespace name ‘SharePoint’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)
The type or namespace name ‘Server’ does not exist in the namespace ‘Microsoft. Office’ (are you missing an assembly reference?)
Also, you can read:
– Deploy Administration approved InfoPath forms in SharePoint 2013
From the error message, the first impression comes as we need to refer to Microsoft.SharePoint.dll and other dlls. But in our case, all the dlls have been referred to correctly. But still, we were getting the issues.
Just to let you know that here we were working with an InfoPath form (2007 version) which has the code and we were trying to modify in SharePoint 2013. Here we gave reference to all the dlls but still when I was building the project it was giving the above reference error.
The solution is simple. Right, click on the Project -> Click on Properties.
Then in the Application tab, click change the Target framework to.Net Framework 4.5 like below:
Now again try to build it should work fine.
Hope this will be helpful.
FREE SHAREPOINT 2019 PDF
(Installation & Features)