Error occurred in deployment step ‘Add Solution’: Access to the path ‘……’ is deniedr

I received this error while attempting to deploy a sharepoint site definition using Visual Studio 2010. I navigated to the folder where it was complaining that it got access denied. I tried to access the folder but I got access denied.

How I fixed it

Go to Start -> Run -> Type in IISRESET and hit enter

After that has happened, the folder that had access denied had disappeared and I was able to deploy again.



Cannot start service SPUserCodeV4 on computer

While I was attempting to retract my SharePoint 2010 site definition from the farm solutions store, I encountered the following error

Cannot start service SPUserCodeV4 on computer …

This is how I fixed it:

Go to Central Administration -> System Settings -> Under Servers, select Manage services on server

Locate Microsoft SharePoint Foundation Sandboxed Code Service -> Press Start

Go back to Visual Studio 2010 and try again.


Turn off Enhanced Security Configuration in Windows Server 2008

This is how I turned it off:

Open Server Manager, select the Server Manager node (yes, the root node of that navigation tree)

In the Server Summary window, go to the Security Information tab

On the right hand side of the screen, select Configure IE ESC

Select Off for both Administrators and Users (This is totally up to you to decide what is best in your situation)

Select Ok to proceed.

Close any existing Internet Explorer windows are open and open new Internet Explorer windows.


Where is Guidgen in Windows Server 2008?

In Windows Server 2008 with Visual Studio 2010 installed, Guidgen is located at:

c:\ Program Files (x86)\Microsoft SDKs\ Windows\ v7.0A \BIN

The assumption is c:\ is the main drive. Change this if this is not the case.

Visual Studio 2010 loses Microsoft.SharePoint.dll reference

I was creating a console application to do some querying on a SharePoint site using Visual Studio 2010. I added the Microsoft.SharePoint.dll assembly from the ISAPI folder from the 14 Hive and I proceeded to code. When I came to compiling the code, I got some errors in the Error List. From the description of the errors, they were telling me that the Microsoft.SharePoint.dll assembly is a missing reference. I am sure I added the assembly into the references folder because the assembly is still there !

Anyways, to solve this problem, I did the following:

In Visual Studio 2010, go to Solution Explorer -> Right (or left depending on mouse configuration) click on the project, select Properties. In the Application tab, change the Target Framework from either:

.NET Framework 3.5 Client Profile to .NET Framework 3.5


.NET Framework 4.0 Client Profile -> .NET Framework 4.0


FileNotFound exception opening SPSite in Visual Studio 2010 using SharePoint 2010

To my surprise, I received a FileNotFound exception while trying to do the following in a console application:

using(SPSite site = new SPSite(“http://computername:6789”))



I just installed Visual Studio 2010 and SharePoint 2010 and wanted to test out some code using a console application.

To address this issue, I did the following:

In Visual Studio, go to Solution Explorer -> Go to the Project (csproj file)  -> Right (or left depending on your mouse click setup) click and select Properties

Go to the Build tab -> on the Target Platform drop down list, select Any CPU.

Save and rebuild project

Run project.