Unable to run Add-in in debug mode.

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

Unable to run Add-in in debug mode.
 
Allison Ono




Posts: 18
Joined: 2011-07-15
Just finished upgrading an existing add-in project from Add-in Express 2007 to Add-in Express 2010. The original program was written with Visual Studio 2005, but now using Visual Studio 2010. OS is Windows XP SP3.

Target Framework is set to 2.0 and the start external program is set to C:\Program Files\Microsoft Office\Office12\EXCEL.EXE. Enable unmanaged code debugging is also checked. Host application is set to v2.0.50727

I also modified the app.config and Excel config file (located in the Microsoft Office folder under program files) to contain the following:

<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0.30319"/>
</startup>

When I go to debug I get the following error message:

Debugging information for 'EXCEL.EXE' cannot be found or does not match. Cannot find or open the PDB file.

I was able to debug in the older version of Visual Studio, but cannot debug the add-in code with my current environment.

Any suggestions?
Posted 18 Jul, 2011 15:27:26 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Allison,

Please check http://www.add-in-express.com/docs/net-deploying-debugging-tips.php#breakpoints.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Jul, 2011 03:48:10 Top
Allison Ono




Posts: 18
Joined: 2011-07-15
Hi Andrei,

Thanks for the response. I have tried what is listed under your link and it is not working for me.

When I build, I get the following error AddinExpress.Projects.Common.Registrator error message:

Detailed technical information follows:
---
Date and Time: 7/19/2011 1:48:50 PM

Application Domain: DefaultDomain
Assembly Codebase: file:///C:/Program Files/Add-in Express/Add-in Express for .NET/Bin/Packages/VS2005/AddinExpress.Wizard.dll
Assembly Full Name: AddinExpress.Wizard, Version=6.4.3056.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.4.3056.2005

Exception Source:
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Project unavailable.
Exception Target Site: get_Properties

---- Stack Trace ----
EnvDTE.Project.get_Properties()
AddinExpress.Wizard.dll: N 00000 (0x0) JIT
AddinExpress.Projects.Common.Registrator.GetPrimaryOutput(project As Project)
AddinExpress.Wizard.dll: N 0229 (0xE5) IL
AddinExpress.Projects.Common.Registrator.DoBeforeBuild(scope As vsBuildScope, action As vsBuildAction)
AddinExpress.Wizard.dll: N 0052 (0x34) IL

I click ok and the project builds with the following output
(I don't understand why a prerequisite of Framework 2.0 is required or that the target version is 2.0 since I have it set to 4.0):

------ Starting pre-build validation for project 'SBC ContractSetup' ------
------ Pre-build validation for project 'SBC ContractSetup' completed ------
------ Rebuild All started: Project: SBC ContractSetup, Configuration: Debug ------
Building file 'C:\ESignature\SBC Contract\SBC ContractSetup\Debug\YPExcelPlug.msi'...
WARNING: Could not find prerequisite '.NET Framework 2.0' in path 'C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\' :?:
WARNING: Could not find prerequisite 'Shared Add-in Support Update for Microsoft .NET Framework 2.0 (KB908002)' in path 'C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\' :?:
WARNING: The target version of the .NET Framework in the project does not match the .NET Framework launch condition version '2.0.50727 '. Update the version of the .NET Framework launch condition to match the target version of the.NET Framework in the Advanced Compile Options Dialog Box (VB) or the Application Page (C#, F#). :?:
.
.
.
========== Rebuild All: 3 succeeded, 0 failed, 0 skipped ==========


Then when I go to run my output looks like this:

'EXCEL.EXE': Loaded 'C:\Program Files\Microsoft Office\Office12\EXCEL.EXE', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\advapi32.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\secur32.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\gdi32.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\user32.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\ole32.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\msvcr80.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\winspool.drv', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\Program Files\Microsoft Office\Office12\OART.DLL', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\oleaut32.dll', Cannot find or open the PDB file
'EXCEL.EXE': Loaded 'C:\WINDOWS\system32\shimeng.dll', Cannot find or open the PDB file
The program '[1100] EXCEL.EXE: Native' has exited with code 0 (0x0).
Posted 19 Jul, 2011 16:12:30 Top
Allison Ono




Posts: 18
Joined: 2011-07-15
I was able to get rid of the AddinExpress.Projects.Common.Registrator error by reinstalling AddinExpress.

WARNING: The target version of the .NET Framework in the project does not match the .NET Framework launch condition version '2.0.50727 '. Upd ate the version of the .NET Framework launch condition to match the target version of the.NET Framework in the Advanced Compile Options Dialog Box (VB) or the Application Page (C#, F#).

:!: This was resolved by right clicking on the setup project and selecting View/Launch Conditions. In the properties of the launch conditions, it defaulted to 2.0.50727. Changed the version in the dropdown to .NET Framework 2.0 since v2.0.50727 was not recognized anymore by my system.

WARNING: Could not find prerequisite '.NET Framework 2.0' in path 'C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\'
WARNING: Could not find prerequisite 'Shared Add-in Support Upd ate for Microsoft .NET Framework 2.0 (KB908002)' in path 'C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\'

:!: This was resolved by right clicking on the se tup project and selecting Properties. Click the prerequisites button and unchecked .NET Framework 2.0 and .NET Framework 2.0 (KB908002) since the system did not recognize either. Then checked .NET Framework 2.0 SP2 and Windows Installer 3.1.

I am still having the PDB issue though.

When I install the Add-in on my machine and run it outside of Visual Studio, everything works fine, but I am coding blindly and need to debug the changes I need to make.
Posted 19 Jul, 2011 18:01:46 Top
Eugene Astafiev


Guest


Hi Allison,

Could you please tell me the solution configuration you have set? Is it set to the Debug for the add-in project? Are you able to reproduce the issue with a newly created add-in project?
Posted 20 Jul, 2011 09:32:18 Top
Allison Ono




Posts: 18
Joined: 2011-07-15
Hi Eugene,

I am running in Debug mode with Admin rights and I am able to reproduce with a new project.
Posted 20 Jul, 2011 17:31:44 Top
Eugene Astafiev


Guest


Hi Allison,

Please make sure that you have the latest service packs for OS, Office, .net framework and Visual Studio installed on your PC. If it doesn't help, could you please organize a remote session? I will take a look at the issue online.
Posted 21 Jul, 2011 03:49:00 Top
Allison Ono




Posts: 18
Joined: 2011-07-15
Hi Eugene,

Got the debug to work!

It involved having the application installed on my system and setting the working directory to point to the pdb file created with my dll.
Posted 21 Jul, 2011 18:31:46 Top
Eugene Astafiev


Guest


Hi Allison,

Good news! Thank you for letting me know.
Posted 22 Jul, 2011 03:20:37 Top