This project has moved. For the latest updates, please go here.
1

Closed

Create Outlook TaskPane

description

I have created an automation Addin project with the NetOffice Developer Toolbox. I want to create a TaskPane. When I start the project it throws the following exception:
A project with an Output Type of Class Library cannot be started directly.

In order to debug this project, add an executable project to this solution which references the library project. >Set the executable project as the startup project.
May someone can tell me what is necessary to start the TaskPane.
I didn't change anything in the solution. (see in attachments)

It may relates to this Error:
Severity Code Description Project File Line Suppression State
Error Cannot register assembly "C:\Users\felix.fritschi\Documents\MailImport\MailImport\bin\Debug\MailImport.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\MailImport.Addin' is denied. MailImport
I appreciate any help.

file attachments

Closed Jul 13 at 8:12 AM by izsak

comments

izsak wrote Jul 11 at 10:14 AM

Hi felix_fri,
the project generated by NetOffice Developer Toolbox generates DLL assembly.

If you wish to run the project as console application, you must add Program.cs files with Main() method implementation and change the output type of the project to Console application.

izsak wrote Jul 11 at 10:21 AM

PS: If you want to extend MS Outlook with a TaskPane, your project type is correctly set to DLL library.

You must register the Add-in using regasm.exe so MS Outlook will load it. This may require administrative priviledges and that's why the Visual Studio is complaining about insufficient admin rights.

To debug the TaskPane, you must change the project Debug properties - set the Start external program to point to your installed MS Outlook EXE file. If the Add-in is correctly registered, you can debug the Task Pane.

felix_fri wrote Jul 11 at 11:14 AM

Hi izsak,

thanks, I wanted to extend MS Outlook. And I can start it now, but my TaskPane is not shown.

The error didn't occur when I ran it as an admin. Do I have to register it or is Visual Studio doing that for me?

felix_fri wrote Jul 12 at 11:19 AM

Okay I solved it.
I wrote the regiser and unregister methods.
Thanks anyways!