Solved

Where can I locate Microsoft.SharePoint.Utilities namespace?

Posted on 2014-09-05
5
675 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
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
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

740 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