Some time ago I wanted to create a console application that communicates with SharePoint 2010 and will also run directly on the server. So no reason to use the SharePoint Client Object Model. Therefore, I wanted to make a reference to the Microsoft.SharePoint.dll but was unable to find it in the list. I tried to browse and this way I could add the reference but the Microsoft.SharePoint namespace was not recognized.
After some minutes I realized that the problem was the Target framework setting in the project's properties. Apparently, by default this is set to '.NET Framework 4 Client Profile'. Changing it to '.NET Framework 4' will allow you to add the reference and continue your work.
Thanks Frank! I had the same problem and changing it to .NET Framework 4 was the solution!
BeantwoordenVerwijderenThank you, yr article helps me :)
BeantwoordenVerwijderenThank you. You saved my day. :)
BeantwoordenVerwijderen