J
Josef Meile
Hi,
after installing the service pack 2 for Visio and the Windows XP Security
upgrades
from the 30th November, it broke my C# addon, which uses the Microsoft Visio
11.0 Type Library to catch the events of the visio main application and it
also
contains a form which uses the Microsoft Visio 11.0 Drawing Control.
Just if it matters, I'm using Visual Studio 2003 Version 7.1.3088 and .net
Version 1.1.4322 under Windows XP Service Pack 2. I don't have .net Version
2.0 on my
system.
Now retuning to the topic. At first The Visio Reference was broken, so, I
deleted it
and added it again through the "Add Reference" dialog. But then I got:
C:\[Project Path]\FBooleanExp.cs(9): Namespace '' already contains a
definition for 'Visio'
and the line causing this was:
using Visio = Microsoft.Office.Interop.Visio;
So, I drop it and the message went away. However, now I'm getting:
C:\...\Forms\FBooleanExp.cs(501): The type
'Microsoft.Office.Interop.Visio.Window'
is defined in an assembly that is not referenced. You must add a
reference to
assembly 'Microsoft.Office.Interop.Visio'.
The problem is here:
Visio.Window drawingWindow = (Visio.Window)this.dclVisioDrawing.Window;
---^
I added the Drawing Control by using the form designer. After doing this,
Visual
Studio adds automatically the refferences to AxVisOcx and VisOcx. This is the
declaration of the Drawing Control:
private AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl dclVisioDrawing;
I saw the properties window of each reference and noticed that the NameSpaces
are diferent:
* AxVisOcx
(Name): AxInterop.VisOcx
CopyLocal: True
Culture: 0
Description: Microsoft Visio 11.0 Drawing Control Type Library
Identity: {F1A8DFE4-BC61-48BA-AFDA-96DF10247AF0}\1.0\0\aximp
Path: C:\Documents and Settings\jmeile\My Documents\My Data\[Project
Path]\obj\AxInterop.VisOcx.dll
Runtime Version: [Empty]
Strong Name: False
Type: ActiveX
Version: 1.0
* VisOcx
(Name): Microsoft.Office.Interop.VisOcx
Copy Local: False
Culture: 0
Description: Microsoft Visio 11.0 Drawing Control Type Library
Identity: {F1A8DFE4-BC61-48BA-AFDA-96DF10247AF0}\1.0\0\primary
Path:
C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.VisOcx\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.VisOcx.dll
Runtime Version: [Empty]
Strong Name: True
Type: ActiveX
Version: 1.0
* Visio
(Name): Interop.Visio
Copy Local: True
Culture: 0
Description: Microsoft Visio 11.0 Type Library
Identity: {00021A98-0000-0000-C000-000000000046}\4.b\0\tlbimp
Path: C:\Documents and Settings\jmeile\My Documents\My Data\[Project
Path]\obj\Interop.Visio.dll
Runtime Version: [Empty]
Strong Name: False
Type: ActiveX
Version: 4.11
The name space of Visio used to be "Microsoft.Office.Interop". The versions
of the
drawing control is 1.0 and the one from the Type Library is 4.11, so, I
guess the
VisOcx is still looking for the old Visio Library. How can I solve the
problem? Is
there a new version of VisOcx that I can use with the Visio Service Pack 2?
Regards,
Josef
after installing the service pack 2 for Visio and the Windows XP Security
upgrades
from the 30th November, it broke my C# addon, which uses the Microsoft Visio
11.0 Type Library to catch the events of the visio main application and it
also
contains a form which uses the Microsoft Visio 11.0 Drawing Control.
Just if it matters, I'm using Visual Studio 2003 Version 7.1.3088 and .net
Version 1.1.4322 under Windows XP Service Pack 2. I don't have .net Version
2.0 on my
system.
Now retuning to the topic. At first The Visio Reference was broken, so, I
deleted it
and added it again through the "Add Reference" dialog. But then I got:
C:\[Project Path]\FBooleanExp.cs(9): Namespace '' already contains a
definition for 'Visio'
and the line causing this was:
using Visio = Microsoft.Office.Interop.Visio;
So, I drop it and the message went away. However, now I'm getting:
C:\...\Forms\FBooleanExp.cs(501): The type
'Microsoft.Office.Interop.Visio.Window'
is defined in an assembly that is not referenced. You must add a
reference to
assembly 'Microsoft.Office.Interop.Visio'.
The problem is here:
Visio.Window drawingWindow = (Visio.Window)this.dclVisioDrawing.Window;
---^
I added the Drawing Control by using the form designer. After doing this,
Visual
Studio adds automatically the refferences to AxVisOcx and VisOcx. This is the
declaration of the Drawing Control:
private AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl dclVisioDrawing;
I saw the properties window of each reference and noticed that the NameSpaces
are diferent:
* AxVisOcx
(Name): AxInterop.VisOcx
CopyLocal: True
Culture: 0
Description: Microsoft Visio 11.0 Drawing Control Type Library
Identity: {F1A8DFE4-BC61-48BA-AFDA-96DF10247AF0}\1.0\0\aximp
Path: C:\Documents and Settings\jmeile\My Documents\My Data\[Project
Path]\obj\AxInterop.VisOcx.dll
Runtime Version: [Empty]
Strong Name: False
Type: ActiveX
Version: 1.0
* VisOcx
(Name): Microsoft.Office.Interop.VisOcx
Copy Local: False
Culture: 0
Description: Microsoft Visio 11.0 Drawing Control Type Library
Identity: {F1A8DFE4-BC61-48BA-AFDA-96DF10247AF0}\1.0\0\primary
Path:
C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.VisOcx\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.VisOcx.dll
Runtime Version: [Empty]
Strong Name: True
Type: ActiveX
Version: 1.0
* Visio
(Name): Interop.Visio
Copy Local: True
Culture: 0
Description: Microsoft Visio 11.0 Type Library
Identity: {00021A98-0000-0000-C000-000000000046}\4.b\0\tlbimp
Path: C:\Documents and Settings\jmeile\My Documents\My Data\[Project
Path]\obj\Interop.Visio.dll
Runtime Version: [Empty]
Strong Name: False
Type: ActiveX
Version: 4.11
The name space of Visio used to be "Microsoft.Office.Interop". The versions
of the
drawing control is 1.0 and the one from the Type Library is 4.11, so, I
guess the
VisOcx is still looking for the old Visio Library. How can I solve the
problem? Is
there a new version of VisOcx that I can use with the Visio Service Pack 2?
Regards,
Josef