Solved

Where can I locate Microsoft.SharePoint.Utilities namespace?

Posted on 2014-09-05
5
654 Views
Last Modified: 2014-09-08
Dear experts.
I am trying to build some code for checking if the current sharepoint user is inside of the specific AD group. The code should be for Sharepoint2010. I've found this article http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27844527.html.
The solution in the article uses SPUtility class which should be inside the Microsoft.SharePoint.Utilities namespace.
I tried to add reference in the Visual Studio 2013 but I couldn't find this namespace in the Framework Assemblies. How can I locate it or what am I missing? Should I install something?
Help would be appreciated.
Michal
0
Comment
Question by:scientiasro
  • 2
  • 2
5 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 40305862
The obvious question - Have you got MS Sharepoint installed on this PC ?
0
 
LVL 31

Expert Comment

by:Jamie McAllister MVP
ID: 40305869
As a rule, this sort of SharePoint development is usually done within a virtual machine that has SharePoint installed. You should follow this approach.

A single server install covers almost all the bases.

I tend to use VMWare Workstation as the virtual host, but HyperV would be fine.

Do you have an MSDN subscription that allows you to download the Server OS and SharePoint ISOs?
0
 

Author Comment

by:scientiasro
ID: 40308744
Thank you for your suggestion. The sharepoint is installed on the same machine as the Visual studio 2013. There is the Microsoft.Sharepoint namespace available but not Microsoft.Sharepoint.Utilities in the Visual Studio references. If I try to add Microsoft.Sharepoint.dll I got notification that it is already added. There is something else what I am missing.
Yes, all software inside this develpment virtual machine is from MSDN. The sharepoint is deployed in full mode (sharepoint 2010 standard + SQL server 2008 R2 standard).
Michal.
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 40309227
Then you should already have the necessary requirements.

In C# you could use
using Microsoft.Sharepoint;
using Microsoft.Sharepoint.Utilities;   //to access the classes directly

or
using Microsoft.Sharepoint;
....
in code
Utilities.xxxx  //to explicitly call the class in the Utilities sub namespace
0
 

Author Closing Comment

by:scientiasro
ID: 40309380
My mistake was, that I was searching for the namespace in the VS 2013 References Manager in Assemblies Framework. I don't know the reason why it isn't listed there if the other sub-namespaces are there (e.g. Microsoft.Sharepoint.WorkflowActions). Nevertheless manually adding sub-namespace Microsoft.SharePoint.Utilities in the solution (.cs file) solved my problem.
Thank you Andy.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question