Building the Sample Provider

Office 2010

Last modified: June 30, 2010

Applies to: Office 2007 | Outlook 2010 | SharePoint Server 2010

The TestProvider project helps you understand when and how the Microsoft Outlook Social Connector (OSC) calls OSC provider extensibility interfaces that your OSC provider implements. The TestProvider project does not connect to an actual social network. The data provided by TestProvider is static and is for demonstration purposes only.

This section explains how to build and run the TestProvider project depending on the bitness of Windows and Outlook, and the version of Visual Studio installed on your computer.

32-Bit Windows, 32-Bit Outlook, and Visual Studio 2008 or Visual Studio 2010

Follow these steps to build and run the TestProvider project on a computer with 32-bit Windows, Outlook 2003, Outlook 2007, or 32-bit Outlook 2010, and Visual Studio 2008 or Visual Studio 2010:

  1. On the Start menu, right-click Microsoft Visual Studio 2008 or Microsoft Visual Studio 2010 and click the Run as administrator command. When prompted, click Yes to run Visual Studio as an administrator.

  2. In Visual Studio, click File, click Open, and then click Project/Solution. Open TestProvider.sln in the TestProvider folder. Because the TestProvider solution is a Visual Studio 2008 project, you might have to convert the solution to Visual Studio 2010. If required, click Finish in the Visual Studio Conversion Wizard dialog box, and then click Close when the solution has been converted to Visual Studio 2010.

  3. On the Build menu, click Build TestProvider.

  4. Open RegisterProvider.reg in the TestProvider folder to add the correct registry entries for TestProvider.

    RegisterProvider.reg also turns on provider debugging. When prompted, click Yes to add the registry entries. This file also sets the DebugProviders and ShowDebugButtons values in the Windows registry so that debug buttons appear on the Add-ins group in the Microsoft Office Fluent ribbon for Outlook 2010, or the standard explorer command bar in Outlook 2007 or Outlook 2003.

  5. Click TestProvider Properties on the Project menu, and then click the Debug tab.

  6. Under Start Action, select the Start External Program option, and specify the full path of the version of Outlook that is installed on your computer. For Outlook 2010, the default installation path is C:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE. For Outlook 2007, the default is C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE. For Outlook 2003, the default is C:\Program Files\Microsoft Office\Office11\OUTLOOK.EXE.

  7. In Visual Studio, set a breakpoint in the Load method of SocialProvider.cs.

  8. On the Debug menu, click Start Debugging. Outlook then starts. You should then hit the TestProvider project breakpoint that you created in the previous step. Set any additional breakpoints as required and press F5 to continue.

  9. Click the + button in the OSC People Pane, and then click on another social network to add TestProvider. You can supply a fictitious user name and password, but these are not required for TestProvider.

  10. After TestProvider is loaded, you can use breakpoints in the OSC provider code to learn about the calling sequences of the OSC and the OSC provider.

  11. When contact synchronization starts, the OSC creates a TestProvider contacts folder. If you open the contact items in the TestProvider folder, you will see sample activities for the contact in the People Pane displayed in the Outlook contact inspector window.

64-Bit Windows, 64-bit Outlook, and Visual Studio 2010

Follow these steps to build and run the TestProvider project on a computer with 64-bit Windows, 64-bit Outlook 2010, and Visual Studio 2010:

  1. On the Start menu, right-click Microsoft Visual Studio 2010 and click the Run as administrator command. When prompted, click Yes to run Visual Studio as an administrator.

  2. In Visual Studio, click File, click Open, and then click Project/Solution. Open TestProvider.sln in the TestProvider folder. Because the TestProvider solution is a Visual Studio 2008 project, you might have to convert the solution to Visual Studio 2010. If required, click Finish in the Visual Studio Conversion Wizard dialog box, and then click Close when the solution has been converted to Visual Studio 2010.

  3. On the Build menu, click Build TestProvider.

  4. Open RegisterProvider.reg in the TestProvider folder to add the correct registry entries for TestProvider.

    RegisterProvider.reg also turns on provider debugging. When prompted, click Yes to add the registry entries. This file also sets the DebugProviders and ShowDebugButtons values in the Windows registry so that debug buttons appear on the Add-ins group in the ribbon for Outlook 2010.

  5. Click TestProvider Properties on the Project menu, and then click the Debug tab.

  6. Under Start Action, select the Start External Program option, and specify the full path of the version of Outlook that is installed on your computer. For Outlook 2010, the default installation path is C:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE.

  7. Click the Windows Start menu, and then click All Programs, Microsoft Visual Studio 2010, and Visual Studio Tools. Then right-click Visual Studio x64 Win 64 Command Prompt (2010) and select Run as administrator. When prompted, click Yes to open the command window.

  8. In the command window, type regasm /codebase <path> where <path> represents the path to the TestProvider.dll that you built in step 3. Typically, the path is c:\users\<user>\documents\visual studio 2010\projects\testprovider\bin\debug\testprovider.dll.

  9. Press Enter to execute the command. The command window should report Types registered successfully.

  10. In Solution Explorer, right click the TestProvider solution, click Add, and then click Existing Project and specify the full path of the version of Outlook that is installed on your computer. For Outlook 2010, the default installation path is C:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE.

  11. Right-click Outlook in Solution Explorer, and select Set as Startup Project.

  12. Right-click Outlook again, and select Properties.

  13. Set the Debugger Type to Managed (v2.0, v1.1, v1.0).

  14. In Visual Studio, set a breakpoint in the Load method of SocialProvider.cs.

  15. On the Debug menu, click Start Debugging. Outlook then starts. You should then hit the TestProvider project breakpoint that you created in the previous step. Set any additional breakpoints as required and press F5 to continue.

  16. Click the + button in the OSC People Pane, and then click on another social network to add TestProvider. You can supply a fictitious user name and password, but these are not required for TestProvider.

  17. After TestProvider is loaded, you can use breakpoints in the OSC provider code to learn about the calling sequences of the OSC and the OSC provider.

  18. When contact synchronization starts, the OSC creates a TestProvider contacts folder. If you open the contact items in the TestProvider folder, you will see sample activities for the contact in the People Pane displayed in the Outlook contact inspector window.

64-bit Windows, 64-bit Outlook, Visual Studio 2008

The steps for building and running the TestProvider project on a computer with 64-bit Windows, 64-bit Outlook, and Visual Studio 2008 are similar to the last section for Visual Studio 2010, except for registering the TestProvider.dll with Visual Studio 2008.

Steps 7 through 9 in the last section for Visual Studio 2010 specify running regasm.exe in the Visual Studio 2010 command prompt. For Visual Studio 2008, open a Windows command prompt as an administrator. Navigate to the TestProvider\bin\Debug folder, and type: %windir%\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase TestProvider.dll.

For more information about having Visual Studio 2008 register a 64-bit component like TestProvider.dll, see Issues with building a project with "Register for COM interop" for a 64-bit assembly.

After Visual Studio 2008 registers the 64-bit TestProvider.dll, you can continue with setting a breakpoint in the Load method of SocialProvider.cs and then debugging as described in steps 14 to 18 in the previous section.

Show:
© 2014 Microsoft