PIAs and Visio 2002

M

Michael Hall

Hi,

I have installed the Office XP PIAs and it all works fine for word, excel
and so on.

But for Visio, Visual Studio will just not link to
Microsoft.Office.Interop.Visio.dll assembly, it just keeps creating a local
file called Interop.Visio.dll and referencing that. Whats strange is that the
application uses this completly fine and runs well (C# commandline
application)

Here are the steps I have taken:

1) Downloaded, the Office XP PIAs.
2) Ran the register.bat from a visual studio command prompt
3) Created a C# project and referenced the COM Word type libary (named:
Microsoft Word 10.0 Object Library) and Visio Type Library (Microsoft Visio
2002 Type Library (Service Release 1))
4) Coded application

Now...the Word reference's path is set to the location of the word interop
dll, but as I said the visio one is set to a local file called
Interop.Visio.dll not the Visio interop dll. I know the PIAs are installed
because I can see them in windows/assembly

Is visual studio generating this itself?

Also, as my application works with this. Its it ok to distribute this file
with it?
 
A

Al Edlund

it sounds like the visio pia has not been installed in assembly GAC (that's
what gives you the local file).

"In the Properties window, notice that the Path property lists
Microsoft.Office.Interop.Visio in the c:\WINDOWS\assembly\GAC\ path. This
indicates that the Visio PIA is being used instead of forcing Visual Studio
..NET to create its own COM interop assembly in your project's location. The
Visio PIA is installed in the global assembly cache (GAC)."

Al
 
M

Michael Hall

No, it is installed.

To make sure I ran the following commands from the visual studio command
prompt:

(this is what the register.bat does)

gacutil -i Microsoft.Office.Interop.Visio.dll
regedit /s Microsoft.Office.Interop.Visio.dll.reg

I can see it inside the GAC, in the following structure:

C:\windows\assembly\gac\Microsoft.Office.Interop.Visio

But, Visual studio will no use that, like it does with Word\Excel and so on.

and it is still using this local file Interop.Visio.dll
 
A

Al Edlund

vs.net appears to get confused occasionally with the PIAs. It happens so
often on my system that I end up repairing office about once a week to get
the pointers back. You might consider removing the reference to the visio
library in the project and then re-referencing it to see if it cleans up.
Al
 

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