Add-In stops working with .net 2.0 installed

D

David Thielen

Hi;

I have an Add-In that runs fine under .net 1.1 w/ Word 2000/2002/2003.

I just tried running it since installing VS 2005 & .net 2.0. It now tells me
"AutoTag2003.dll is not a valid Office Add-in." I have tried this with both
the version built under VS 2003/.net 1.1 and the version built under VS
2005/.net 2.0 - same problem with both.

Any suggestions?

thanks - dave

ps - I have the release version of VS 2005 installed.
 
P

Peter Huang [MSFT]

Hi

I think you may try to use the <supportedRuntime> Element in app.config to
make sure the winword.exe is using .NET 1.1. runtime to see if that works
for you.

Also you may try to recreate the addin in Whidbey and add your code one by
one to see what cause the problem.



Best regards,

Peter 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

I used the following:
<?xml version ="1.0"?>
<configuration>
<startup>
<requiredRuntime version="v1.1.4322"/>
<supportedRuntime version="v1.1.4322"/>
</startup>
</configuration>

The .net 1.1 version (built with VS 2003) still would not run - same
problem. Any other ideas?
 
D

David Thielen

More info - to recap:

I have an add-in that works fine on other machines and has run fine on my
machine for some time. It is a Word Add-In and on my machine I run it from
the VS 2003 debugger.

It now will not run. The only difference in my machine is I recently
upgraded VS 2005 from beta 2 to release. I don't think I have made any
changes to Office (can't be sure what the VS 2005 install and/or Windows
Update have done). And I don't think I installed VSTO (again, can't be
positive what VS 2005 install did).

This is a IDTExtensibility2 Add-In, not a VSTO Add-In.

When I start Word, it does not start. When I use COM Add-Ins to add it, I
get "AutoTag2003.dll is not a valid Office Add-In"

Help, About, Disabled Items has no entries.

I have tried it with and without the file C:\Program Files\Microsoft
Office\OFFICE11\WINWORD.EXE.config:
<?xml version ="1.0"?>
<configuration>
<startup>
<requiredRuntime version="v1.1.4322"/>
<supportedRuntime version="v1.1.4322"/>
</startup>
</configuration>

My registry settings are:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\Addins]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\Addins\AutoTag2003.Connect]
"LoadBehavior"=dword:00000002
"Description"="Template editor for Windward Reports"
"FriendlyName"="Windward AutoTag 2003"


[HKEY_CLASSES_ROOT\AutoTag2003.Connect]
@="AutoTag2003.Connect"

[HKEY_CLASSES_ROOT\AutoTag2003.Connect\CLSID]
@="{C40E71F6-B50C-45F8-ACC9-97C9A8CB3BB6}"


[HKEY_CLASSES_ROOT\CLSID\{C40E71F6-B50C-45F8-ACC9-97C9A8CB3BB6}]
@="AutoTag2003.Connect"

[HKEY_CLASSES_ROOT\CLSID\{C40E71F6-B50C-45F8-ACC9-97C9A8CB3BB6}\Implemented
Categories]

[HKEY_CLASSES_ROOT\CLSID\{C40E71F6-B50C-45F8-ACC9-97C9A8CB3BB6}\Implemented
Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}]

[HKEY_CLASSES_ROOT\CLSID\{C40E71F6-B50C-45F8-ACC9-97C9A8CB3BB6}\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="AutoTag2003.Connect"
"Assembly"="AutoTag2003, Version=4.0.10.0, Culture=neutral,
PublicKeyToken=267ad24bfdc007e1"
"RuntimeVersion"="v1.1.4322"
"CodeBase"="file:///C:/src/AutoTag/AutoTag2003/bin/Debug/AutoTag2003.dll"

[HKEY_CLASSES_ROOT\CLSID\{C40E71F6-B50C-45F8-ACC9-97C9A8CB3BB6}\InprocServer32\4.0.10.0]
"Class"="AutoTag2003.Connect"
"Assembly"="AutoTag2003, Version=4.0.10.0, Culture=neutral,
PublicKeyToken=267ad24bfdc007e1"
"RuntimeVersion"="v1.1.4322"
"CodeBase"="file:///C:/src/AutoTag/AutoTag2003/bin/Debug/AutoTag2003.dll"

[HKEY_CLASSES_ROOT\CLSID\{C40E71F6-B50C-45F8-ACC9-97C9A8CB3BB6}\ProgId]
@="AutoTag2003.Connect"
 
D

David Thielen

Hi;

Ok, here is some more info. I created a brand new Add-In in VS 2005 using
the VS wizard. I then ran the setup program it created (to get the registry
settings), and then started it in the debugger.

When I first ran it, I got the exact same error. I then realized I left
Outlook open so Word was running.

I then closed Outlook and my new Add-In ran fine.

So my system can run Add-Ins and VS 2005 can build them. But it doesn't like
my existing one for some reason.

??? - thanks - dave
 
P

Peter Huang [MSFT]

Hi

Based on my test so far, Addin compiled under VS.NET 2003 will run Ok after
I install VS.NET 2005.
I guess if there is anything in your vs.net 2003 project that will not work
under VS.NET 2005.
So far you may try to rebuild your addin under VS.NET 2005 to see if there
is any errors.

Also supportedRuntime is just OK.
<requiredRuntime> Element
Specifies that the application supports only version 1.0 of the common
language runtime.

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

Best regards,

Peter Huang
Microsoft Online Partner Support

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

Alex

Hello David,

David Thielen said:
More info - to recap:

I have an add-in that works fine on other machines and has run fine on my
machine for some time. It is a Word Add-In and on my machine I run it from
the VS 2003 debugger.

It now will not run. The only difference in my machine is I recently
upgraded VS 2005 from beta 2 to release. I don't think I have made any
changes to Office (can't be sure what the VS 2005 install and/or Windows
Update have done). And I don't think I installed VSTO (again, can't be
positive what VS 2005 install did).

Stupid question #1:

Did you check if a trivial .NET 1.1 add-in (e.g., one that displays a message box on connection and exits) will run OK?


Best wishes,
Alex.
 
D

David Thielen

Good question.

I created a new AddIn using VS 2003. If I have a winword.exe.config setting
the .net to 1.1, it runs fine. If I don't have the config, Word dies as it is
starting up - no message or warning, just dies. The next time I go to start
Word it tells me that my new Add-In caused Word to crash and asks if I want
to disable it.

But the .net 1.1 version of my add-in just silently is not called. No error
or message.

Also, the COM Add-Ins dialog shows no Add-Ins, even when my new test Add-In
is loaded.
 
D

David Thielen

Hello;

My problem is I have compiled and tried to run my Add-In under both VS 2003
and VS 2005 and it fails under both. How do I find out why it is failing? I
get no message of any kind from Word.
 
P

Peter Huang [MSFT]

Hi

Thanks for your quickly reply!
Based on my understanding, if you create a new Addin from VS.NET 2005 and
it will run fine.
So I think to isolate the problem, you may try to copy/paste your existing
Addin code to the new projects one by one to see if that works.

If you do want to find the root cause, I think you need to contact MSPSS
directly, because office's debug symbols is not public and this issue may
need further lowlevel troubleshooting to find the why Addin load failure.
http://support.microsoft.com

Best regards,

Peter 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

Hi;

I got it working. Based on a suggestion elsewhere I increased the version
number and changed LoadBehavior from 2 to 3.

There has GOT to be a better way to debug problems like this!
 
P

Peter Huang [MSFT]

Hi

Commonly debugging a problem we need its source code and symbols to trace
the root cause, but that is unavailable for WinWord.
So we have to isolate the problem based on a working program to see what
may cause the problem.
Also I am glad that you have gotten your program working!


Best regards,

Peter 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