Visio Addin with .Net Framework 2.0

T

Thomas Klaus

I've created a Visio Addin with Visual Studio 2005 using the wizard (as
described on
http://blogs.msdn.com/wmorein/archive/2005/11/18/494538.aspx). On my
developer machine, the Addin is working, but when i try to install this
Addin on a test machine using the created Setup, the Addin isn't
working. The test machine has Windows XP, .NET Framework 2.0 and Visio
2002. An Addin created with Visual Studio 2003 and .NET Framework 1.1
is working on the test machine.

Are there any known issues concerning Office Addins using .NET
Framework 2.0?

Thanks in advance,
Tom
 
C

Chris [Visio MVP]

I've been running into problems with machines that have both .NET 1.1 and
2.0 installed. The quick and dirty fix is to put a file called:

"visio.exe.config"

in the same directory as VISIO.EXE.

Inside the file are these lines:


<configuration>
<startup>
<requiredRuntime version="v1.1.4322" safemode="false" />
</startup>
</configuration>


I don't know of a better way to do this yet, but this works for the
short-term. Unelegant, yes...

--
Hope this helps,

Chris Roth
Visio MVP
http://www.wanderkind.com/visio

Go Team USA!
http://www.wanderkind.com/usa
 
A

Al Edlund

The two .net platforms (2.0 and 1.1) are different, not to mention the visio
libraries (v10 for 2002 and v11 for 2003).
al
 
J

JuneTheSecond

"visio.exe.config" really helped me, too, in Visual Studio 2003 with Visio2003.
Additionally, there is no problem in Visual Studio2005 with Visio2003 in a
new PC, when I test examples, "Managed Code Interop Tutorial" at,
C:\Program Files\Microsoft Office\Visio11\SDK\Samples\Tutorial\VBNet
 
T

Thomas Klaus

But the only version of .NET Framework that is installed on the test
machine is Version 2.0 and the Addin is created in Visual Studio 2005.
Therefore the problem is not, that Visio can't decide which Framework
to use, it simply doesn't start the Addin.
 
T

Thomas Klaus

Isn't there a possibility to set the required runtime for one specific
Addin only? Because there may be other Addins running with .NET
Framework 2.0 only.
 
T

Thomas Klaus

Hi Al,

On the development machine, both Visio 2002 AND 2003 are installed.
I've tried to run the Addin with both Versions of Visio on the test
machine without success.

I'm working already longer time on an Addin. Now i would like to
'upgrade' from .NET Framework 1.1 to 2.0, but neither my Addin nor a
simple test Addin is working with .Net Framework 2.0 on a clean test
machine with only .NET Framework 2.0 installed.

Tom
 
U

unerklarlich

Hi,

I resolved this problem "partially" yesterday :).

You will need to install a package called "Microsoft Visual Studio 2005
Tools for the Microsoft Office System (VSTO 2005)" on the new machine. This
comes as a part of the Visual Studio 2005 installation. This will make things
work.

It is also available as a redistributable package at
"http://www.microsoft.com/downloads/...4de62ff1e81&displaylang=en#QuickInfoContainer".
But there is a problem in using this package.

Although I would have expected it to work correclty, I noticed that when I
install the VSTO 2005 from the Visual Studio CD, it occupies around 9.x MB
and when I install the redistrubutable package, it occupies only 6.x MB.
Further, my COM Addin seems to work only when the VSTO 2005 from the Visual
Studio CD is installed on the target machine.

I am not sure where I am going wrong, but can anyone help me with this?

Thanks,
unerklarlich
 
A

Al Edlund

My experience with vsto is that it only supports word and excel, visio
wasn't in it the last time I looked. Maybe it isn't a visio issue.

al
 
B

Bill Morein [MSFT]

Al is correct that older versions of VSTO do not support Visio (I'm not sure
why that would have helped). I do want to note that the latest CTP of VSTO
*does* support Visio 2007 Beta 2. Both are now available for free download,
so make sure to check them out.

As for Thomas's problem, the key issue is most likely that the 2002 and 2003
Primary Interop Assemblies (PIAs) are not the same, so you need to recompile
the application for each then use an installer to install the right add-in
version depending on what is installed on the client. I don't think that
there are any easier workarounds for this but I'll check and get back to
you. This is something that should not be an issue for 2003 and 2007 (you
should just be able to build once and have it work across both versions).

--
Bill Morein
Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
U

unerklarlich

Ok, I think I got my answer in that case. When I used VSTO from the link i
mentioned below, it did not work. However, when I used the VSTO which is
bundled with Visual Studio 2005, it worked like a charm.
 
U

unerklarlich

I think I didn't read that carefully, the support in the CTP of VSTO is for
Visio 2007. Then I seem to be going down the wrong path.

Bill, I did not install the PIA package on the target machine. Are PIAs
included with Visual Studio 2005? But as you mentioned, the application would
have to be recompiled.

I compiled my Addin on the development machine and created a setup file
using the Visual Studio Setup project. When I setup the Addin on the target
(with a vanilla Window XP Pro + .Net 2.0 setup), the addin did not work.
After looking at the difference in setup on the development machine and the
target machine, I ran the Visual Studio 2005 setup on the target machine and
customized the installation to install only VSTO. My addin started working on
the target machine after that. I wonder what would have happened :-?
 
B

Bill Morein [MSFT]

I think that the act of installing VSTO added the needed components from
Visual Studio to make this work.

After doing a little more research on this problem for installations in VS
2005, it turns out that there is a known bug in Visual Studio that causes
this problem. You can see this KB (and associated downloads) to get this
working: http://support.microsoft.com/default.aspx?scid=kb;en-us;908002
 
U

unerklarlich

Thanks a lot :)...that worked

Bill Morein said:
I think that the act of installing VSTO added the needed components from
Visual Studio to make this work.

After doing a little more research on this problem for installations in VS
2005, it turns out that there is a known bug in Visual Studio that causes
this problem. You can see this KB (and associated downloads) to get this
working: http://support.microsoft.com/default.aspx?scid=kb;en-us;908002
 
T

Thomas Klaus

Hi Bill,

Thank you very much for your reply, i didn't try it so far, but i'm
really looking forward that this would help...

Regards,
Tom
 

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