SharePoint 2010 Project create on Visual Studio 2010 x86 and Debug

I have Windows 7 x86 and Visual Studio x86 and want to create SharePoint 2010 project and
make development but Sharepoint 2010 is only install on X64 so i search and find a solution.

Origional Thread :

Here are the steps to remotely build sharepoint components and remotely debug:

Create, build, and deploy your code

1.  Build a SP2010 virtual machine
2.  Install VS2010 on the host machine
3.  Export the hive  [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0] from the virtual machine and install on the local machine
4.  Create a webpart project in VS2010, build, and package.
5.  Copy the wsp to the virtual machine and the pdb.
6.  Deploy the wsp via Add-SPSolution.
7.  Go to Run … enter c:\windows\assembly\gac_msil, find your assembly, copy the pdb to the same folder as the assembly.

Get the debugger running on the virtual machine

1.  Copy Remote Debugger to SP2010 virtual machine .. found on host at:  C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger
2.  Create identical debug user accounts on both the host and guest machines and add to local administrator group on both machines (not sure if admin group is necessary).
3.  On the virtual machine, start the msvsmon.exe, in the x64 folder using this command:
C:\Windows\System32\runas.exe /user:<your debug user account> /netonly “C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe”
4.  On the virtual machine msvsmon, enter the password of the debug user account.
5.  On the virtual machine msvsmon, go to Tools->Permissions, and grant the debug user account permission to debug.

Attach to the process on the virtual machine from VS2010

1.  Refresh the page your webpart resides on to get the w3wp process going.
3.  On the virtual machine determine the process id of the w3wp instance your code is executing.  Not sure if IISApp.vbs is on Server 2008 R2, but this link provides a PS script to get the process id.
4.  On the virtual machine, make a note of the name of the msvsmon instance … mine is CORP\administrator@<server name>.
5.  In VS2010, Attach to Process, and enter the name of the msvsmon instance in the Qualifier field of the window.
6.  Look for the instances of w3wp, and attach to the process id your code is executing in.
7.  Now the obvious step … set a breakpoint in your code, then refresh your page.

Note:  5 & 6 are where most of the issues, if you have any, will take place.  If you are unable to see a list of processes running, or even attach to the remote debugger, something is wrong with your debug accounts.  Note the id and pwd must be identical on both the host and guest.  I have them both in the admin group.  Also, be sure your running the x64 debugger.

Happy remote debugging.


About Asif
Hello Friends… I have done my Bachelor of Engineering in Information Technology from Gujarat University. I have 1.7 years experience of web and windows based application development.. My basic idea to start a blog is to store all important link which help me in my application and access to every where. Also this information is help others who want to makes their application powerful. I am interested in .net framework (1.0,2.0,3.0,3.5 and more). This blog contain also many information related to SQL, Custom Controls in Please share your ideas and any query if you have...

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: