Problem with Visio interop assembly version (11 vs 12)

K

Kari Yli-Kuha

Hi all,

I've been banging my head to this problem for a couple of days now
and I can't seem to get anything out of it.
The problem started when I upgraded from VS 2003 to VS 2005.

We used to have a working COM Add-in built using C# and
..NET Framework 1.1, compiled with VS 2003, targeted at
Visio 2003 (visio11).

I then installed VS 2005 and replaced .NET Framework 1.1 with
..NET Framework 2.0, upgraded our VS project and thought that
everything is OK - I could install and run our app locally.

BUT, when I installed the application (.msi) to a machine which
doesn't have VS, our app failed to start. And, of course, Visio
gave no error messages, just dropped the LoadBehavior from
3 to 2 in HKLM Visio.Addins.

I then made a test program which did essentially the same as
Visio - launched the app.Connect using IDTExtensibily2 interface
to be able to catch the possible exception during launch.
The exception I caught said:

"Could not load file or assembly 'Microsoft.Office.Interop.Visio,
Version=12.0.0.0, ... etc

The interop assembly dll is installed with the application, but it's
of course version 11.0.0.0, because that's for Visio 2003, and
12.0.0.0 is supposed to be (?) for Visio 2007.

Does anyone have an idea?

regards,
/C
 
S

Senaj Lelic [DE MVP Visio]

Hello,

I have worked on this issue a lot:

This cannot work. If you insalled your VS 2005 on a machine that has Visio
12 (2007) installed, then the reference is ALWAYS set to Visio 12 PIA and
never updated. YOU WILL NEED A CLEAN VISio 2003 Dev machine where Visio 2007
was and is never installed. Even installing once "updates" the PIA reference
and itis never correct again for Visio 2003 - however this works fine if you
install the addin on a Visio 2007 machine.

You will have to include the Extensiblity.dll in your setup (through
Assemblies in the add file)
and: you will have to install the KB 908002 fix in your VS environment
 
K

Kari Yli-Kuha

Thanks Senaj,

I will set up a clean environment sometime next week and
try it according to your instructions.

Until then I will continue with the old VS 2003.

Thanks again, this helped a lot,
/C
 
K

Kari Yli-Kuha

[returning to a subject over a month old... Feb 1]

I've been busy for the past month and only today had time to test Senaj's suggestion.

Yes, including Extensibility.dll in the installation did the trick.
I still need to test it in various installations, though...

case closed - I think...
/C
 

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