Solved

Where can I locate Microsoft.SharePoint.Utilities namespace?

Posted on 2014-09-05
5
558 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
Comment Utility
The obvious question - Have you got MS Sharepoint installed on this PC ?
0
 
LVL 31

Expert Comment

by:Jamie McAllister MVP
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now