Unable to debug with the Loader

Add-in Express™ Support Service
That's what is more important than anything else

Unable to debug with the Loader
 
nfsadx




Posts: 56
Joined: 2006-07-21
My environment is as follows:
Win XP Pro SP2
OL 2003 SP2
VS 2003 (c#)
ADX Express .net 2.7.1762
ADX Extensions .NET for Microsoft Outlook 1.3.0900 Developer

In the previous version of the 2 above ADX components, I was able to set the add-in project to start OL for debugging.

In the new version with the ADX Loader, I can no longer debug in the same way.

Here is what I did:
Using a brand new ADX Outlook add-in project, I added a forms manager and outlook events to the module. I added NO other code.
- I built the project and started debugging
- The Addin didn't appear in COM AddIns
- I had a hunch it was to do with the ADX Loader so I closed OL and ran the install generated by the setup project
- The AddIn appeared and was ticked
- I uninstalled the AddIn and it disappeared from COM AddIns
- I tried to debug again and the AddIn did not appear

To summarise, it appears that you cannot debug with the ADX Loader. I have never had any troubles debugging with the shim.

Has anybody else had this trouble or am I doing something really dumb?
Posted 30 Aug, 2006 04:37:40 Top
David Ing




Posts: 56
Joined: 2006-06-27
I've never had a problem debugging with ADX Loader.

Here's stuff I would check:

- Are you sure you aren't trying to attach the .NET 1.1 debugger to a 2.0 addin? You may need an Outlook.exe.config file to pin the runtime version if you have 2.0 installed.

- Do you use the regular 'ADX Register' menu in Visual Studio to write the ADX registry keys? I don't tend to run the installer as it will probably make a new directory and register it from there, i.e. not where you are build/compiling.

- Does the addin work ok outside the debugger? You could try an 'attach to process' for the outlook.exe with a breakpoint set.

Hope this helps.
Posted 30 Aug, 2006 06:24:16 Top
nfsadx




Posts: 56
Joined: 2006-07-21
Hi David,

I am not sure whether to be glad it's just me!

- Are you sure you aren't trying to attach the .NET 1.1 debugger to a 2.0 addin? You may need an Outlook.exe.config file to pin the runtime version if you have 2.0 installed.

I doubt it as I am using VS2003. I do have VS2005 installed though so it may be worth a try. Can you put up a sample config file please?

- Do you use the regular 'ADX Register' menu in Visual Studio to write the ADX registry keys? I don't tend to run the installer as it will probably make a new directory and register it from there, i.e. not where you are build/compiling.

Yes I do but it did not alter the behaviour i described

- Does the addin work ok outside the debugger? You could try an 'attach to process' for the outlook.exe with a breakpoint set.

By using the install the addin works outside the debugger.
Posted 30 Aug, 2006 06:41:38 Top
David Ing




Posts: 56
Joined: 2006-06-27
If you have VS2005 installed then it will use .NET 2.0, as that IDE relies upon that version.

Create a file called 'Outlook.exe.config' and place it next to wherever Outlook.exe lives on your system i.e: X:\Program Files\Microsoft Office\OFFICE11

Here's the contents of the file:

<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
<supportedRuntime version="v1.0.3705"/>
</startup>
</configuration>

That will force your Outlook addin (and any others that Outlook uses, which is why it's ok for debugging but a bad idea on a customers machine) to use .NET 1.1 or .NET 1.0 - both of which are good for VS2003.

See http://msdn2.microsoft.com/en-us/library/9w519wzk.aspx for more info.
Posted 30 Aug, 2006 06:58:28 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Hi Harry.

There is no need to create the config file manually.
Just right click on the addinmodule at the design-time and choose the 'Host configuration' option of the context menu.
Posted 31 Aug, 2006 15:50:08 Top
Rudrashekhar X Das




Posts: 11
Joined: 2006-05-22
Sergey,
Thank you much - i had the same issue (with Excel), and going to the Host config, doubleclicking the cell next to Excel (which was the hardest part to figure out - i did not know anything could be changed in that dialog), and setting it to 1.1 fixed the debugging issues.

Thanks,
--Yuri
Posted 31 Aug, 2006 17:56:01 Top
nfsadx




Posts: 56
Joined: 2006-07-21
I would have to agree with Yuri in that it is not intuitive at all that you have to double click the cell next to Outlook to set the .Net runtime version to support.

Anyway I tried this and I have not been able to confirm that it works because my add-in refuses to be ticked in the COM Add-Ins dialog in Outlook. Even if i tick it manually, the tick disappears the next time i open the Com Add-In dialog and there is no error.

So i tried the following:
Create a new c# Adx for OL solution using the loader and with the setup project. I added nothing at all to the solution. I checked that the host configuration was still v1.1.4322 and built the solution. I registered the component. Nothing appeared in my COM Add-In dialog. Is there something wrong with my machine? Can somebody else please try this very quick problem recreation?
Posted 01 Sep, 2006 06:01:35 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Harry, do you have any other add-ins running in Outlook?
Posted 01 Sep, 2006 06:14:46 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Also please test our examples from the ADX installation package.
Do they work on your PC?
Posted 01 Sep, 2006 06:25:39 Top
nfsadx




Posts: 56
Joined: 2006-07-21
Hi Sergey,

I don't have any other add-ins running or installed. I have unregistered all of the solutions I have tried and have run a regclean type program.

C:\Program Files\Add-in Express\ADX Extensions .NET for Microsoft Outlook\Demo Projects\VS.NET.2003\HelloWorld is a SHIM project which I have therefore not tried.

C:\Program Files\Add-in Express\Add-in Express .NET\Demo Projects\VS.NET 2003\MyFirstOutlookAddin contains neither SHIM nor Loader but i tried it anyway and i get "COM Interop registration failed. Could not find a type library for assembly 'AddinExpress.MSO'.
"

All of my custom solutions work fine if they are shimmed.
Posted 01 Sep, 2006 06:40:27 Top