Archive

Archive for the ‘Visual Studio’ Category

How to find which w3wp.exe to attach when debugging your SharePiont2010 project

March 22, 2012 3 comments

When debugging SharePoint2010 project, you need to attach w3wp.exe process, however there are often quite a few of them and it is very hard to figure out which one to attach. Today, I will show you how to find out which process to attach using a tool called process explorer.

1. Download the process explorer and run it after you download it.

2. Find the w3wp.exe processes under wininit.exe right-click the columns header and click Select Columns.

3. Include Command Line under Process Image.

4. Now you can see your IIS site name next to w3wp.exe, in my case I’d like to attach the “SharePoint – BenDev80”.You can see the PID of the process is 2920.

5. From the above process you know the process ID you’d like to attach is 2920, you can then go ahead to attach the process from Visual Studio.

Gets Strong Name of your project using PowerShell

July 9, 2011 Leave a comment

When you deploy your assembly to GAC, you need to sign your Assembly. To get the Strong assembly name, you can add external tools as follow.

Title: GetStrongName

Command: Powershell.exe

Argument: -command “[System.Reflection.AssemblyName]::GetAssemblyName(\”$(TargetPath)\”).FullName”

The final settings will look like this:

To use it , you need to go to Toolsà GetStrongName

You will get the assembly name in the output window.

ReSharper for Visual Studio 2010 Preview

July 29, 2009 Leave a comment

You can find ReSharper for Visual Studio 2010 Preview at the address below
http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+for+Visual+Studio+2010+%28Preview%29

kick it on DotNetKicks.com

Categories: Visual Studio

The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine.

July 22, 2009 87 comments

*************Update on 29 OCT 2011*****************

*********Read at the bottom of this article**************

I recently got an error when trying to use Microsoft.ACE.OLEDB.12.0 to connect excel file.I am sure Microsoft.ACE.OLEDB.12.0 is registered on the local machine,but I keep getting on run time error like this.

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

After quite long time goolgling,I found out that it is because I am running 64-bit windows and there are no MS Access drivers that run 64 bit.So to resolve it you need to change the build configuration to x86 found in the programs properties.

To do so,right click on the project and click Propertiesprojectperperties

Then click on Build and change the Platform target from Any CPU to x86.Recompile your  program , it works like charm.

config

*************Update on 5 March 2011*****************

If for some reasons (e.g. migrate import or export function using excel in SharePoint2010,SharePoint2010 only comes with 64 bit), you have to compile your project in 64 bit , you can use the open-XML to do so , but keep in mind only office2007 or above saving the office file in openxml format.Here are the references to get you started.You can download a working example here.

http://www.sadev.co.za/content/reading-and-writing-excel-2007-or-excel-2010-c-series-index

http://msdn.microsoft.com/en-us/library/gg575571.aspx

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&displaylang=en

http://openxmldeveloper.org/attachment/1970.ashx

*************Update on 5 March 2011*****************

*************Update on 29 OCT 2011*****************

Another Solution is to install the 64 bit driver for Access Database Engine.

64 bit requires Microsoft Access Database Engine 2010 Redistributable (AccessDatabaseEngine_x64.exe)

kick it on DotNetKicks.com

Changing the default browser used in VS 2005 and Visual Web Developer

February 5, 2008 Leave a comment

To-do this:

1) Right click on a .aspx page in your solution explorer

2) Select the “browse with” context menu option

3) In the dialog you can select or add a browser.  If you want Firefox in the list, click “add” and point to the firefox.exe filename

4) Click the “Set as Default” button to make this the default browser when you run any page on the site.

Note that there is also an optional drop-down at the bottom of the dialog that lets you select the default browser window size when loading.  You can choose 800×600 or 1024×768 if you want to visualize what the site will look like for people using those screen resolutions.  This works for both IE and FireFox (and probably other browsers too — those just happened to be the two I checked).

Hope this helps,

Categories: Visual Studio