M
Microsoft
The code generated by the C# version of the "Visio add-in or add-on" wizard
that comes with the new Visio 2003 SDK does not compile! (At least not when
generating a COM add-in).
I've seen this problem on 2 different machines. To reproduce, simply use
the C# version of the wizard (found in the "Visual C# Projects" Project
Types folder, not in the "Other Projects\Extensibility Projects" folder,
where the standard "Shared Add-in" wizard is found) to generate a Visio COM
add-in, and then try to build the result. (I also asked to have the add-in
run whenever Visio starts, but I doubt that has any bearing on this
problem).
The problem is caused by the fact that the Visio interop assembly's
namespace is now just "Visio" instead of "Microsoft.Office.Interop.Visio",
as it was in the past (why the change?). The generated code is still using
the old namespace.
Fixing this allows the generated code to compile. Probably the best way to
fix this is to remove the "using Microsoft.Office.Interop.Visio" directives,
and just use the Visio namespace directly wherever necessary (e.g.,
"Visio.Application" instead of just "Application"). That helps to avoid any
name clashes (e.g., if you happen to have another "Application" class, as
when your COM add-in needs to support multiple Office apps).
Will the wiazrd be patched to fix this problem?
that comes with the new Visio 2003 SDK does not compile! (At least not when
generating a COM add-in).
I've seen this problem on 2 different machines. To reproduce, simply use
the C# version of the wizard (found in the "Visual C# Projects" Project
Types folder, not in the "Other Projects\Extensibility Projects" folder,
where the standard "Shared Add-in" wizard is found) to generate a Visio COM
add-in, and then try to build the result. (I also asked to have the add-in
run whenever Visio starts, but I doubt that has any bearing on this
problem).
The problem is caused by the fact that the Visio interop assembly's
namespace is now just "Visio" instead of "Microsoft.Office.Interop.Visio",
as it was in the past (why the change?). The generated code is still using
the old namespace.
Fixing this allows the generated code to compile. Probably the best way to
fix this is to remove the "using Microsoft.Office.Interop.Visio" directives,
and just use the Visio namespace directly wherever necessary (e.g.,
"Visio.Application" instead of just "Application"). That helps to avoid any
name clashes (e.g., if you happen to have another "Application" class, as
when your COM add-in needs to support multiple Office apps).
Will the wiazrd be patched to fix this problem?