VisualStudio cannot debug Add-In if .NET 2.0 runtime installed

D

David Thielen

Hi;

I cannot run my Add-In under Visual Studio if .NET 2.0 is installed.

I have a Word Add-In written mostly in C# with a little bit in J# - using
..NET 1.1. If I do not have .NET 2.0 runtime installed, then I can run the
Add-In fine
both by starting Word or by launching Word via Visual Studio (so I can debug
it).

If .NET 2.0 is installed, I can still start Word and the Add-In will run
although it throws an exception when trying to call the VJ# redist. But it
runs.

If I try to run by debugging under Visual Studio, it just dies. No exception
of any kind (I have all 4 exceptions set to drop in to the debugger if thrown
even if caught). It just exits. (I do get the Word prompt asking if I want to
not load my Add-In but after I click No - it drops me back in Visual Studio
with Word not running.)

What is going on here?
 
P

Peter Huang [MSFT]

Hi

Based on my test, the winword.exe will load the clr 2.0 as the runtime by
default, it seems that we need to use the winword.exe.config to set the
startup runtime to 1.1 so that the debugger will work or we can use the
vs.net 2005 ide to do the debugger.

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

If we specifed the appconfig, the code line below will give us 1.1 or we
will get 2.0 if 2.0 is installed.

public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)
{
applicationObject = application;
addInInstance = addInInst;
System.Diagnostics.Debug.WriteLine(System.Environment.Version.ToString());
}


Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

That solved it. However, it seems to me that this is a bug. I'll list why in
my other posting.

thanks - dave
 
P

Peter Huang [MSFT]

Hi

Since the .NET 2.0 is in beta test period, the product may still be changed
after the release.
So far I think for beta issue, I think you may try to post the issue in the
link below which is dedicated for beta product.
http://beta.microsoft.com


Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top