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:
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.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.