I have a C# utility which talks to MicroStation using the COM Interop layer. It has a reference to the primary interop assembly (bentley.interop.microstationdgn.dll) which resides in MicrosStation installation directory.
Now I wonder what should I do when I want to send it ver my users, which have different versions of MicroStation or PowerDraft?
Should I include my copy of the interop dll in the distribution, or it must use the version that is installed on the target computer?
Can I hope a program compiled with the dll from V8 XM would also work with V8i?
And finally does anyone know what if it legal to redistribute the interop dll? Microsoft's PIA packs have a special license attached, but I could not find anything similar for Bentley's ones.
Have I missed something?
/Elias
Unknown said: But Microsoft tells us that .NET was designed to avoid DLL hell!
But Microsoft tells us that .NET was designed to avoid DLL hell!
And they are right ... now I have to deploy an EXE file for the VC++ 8.0 CRT
It has to be true if MicroSoft tells that... By the way... How do you like Ribbon? I can't wait for first Ribbon in MicroStation...
Just kidding...
Unknown said: argh, this would be very confusing at a machine such as mine with at least 5 different versions of MicroStation/Powerdraft/View installed !!! In worst case it might lead MicroStation to no longer work or the application crashing when trying to access the assembly registered in the GAC from a version that has another build. This is just like deploying the assemblies (just without thinking about the copyright thing). Michael Edit: If you ever tried to provide a Addon for MS Office you will know what late binding means. The application has different function calls between for example 2000 and 2003 you have to 'if' them out. Maybe that is a proper way to access the correct MicroStation object.
argh, this would be very confusing at a machine such as mine with at least 5 different versions of MicroStation/Powerdraft/View installed !!!
In worst case it might lead MicroStation to no longer work or the application crashing when trying to access the assembly registered in the GAC from a version that has another build. This is just like deploying the assemblies (just without thinking about the copyright thing).
Michael
Edit: If you ever tried to provide a Addon for MS Office you will know what late binding means. The application has different function calls between for example 2000 and 2003 you have to 'if' them out. Maybe that is a proper way to access the correct MicroStation object.
You are right, but this is versioning good for. MicroStation knows well what assemblies it needs and loads them when it needs them. Late binding and Reflection are needed in MicroStation Addins as well if you need to handle for example .NET Dockable system by one assembly in both major versions of MicroStation that support it.
Regards, Jon Summers LA Solutions
If you access assemblies inside MicroStation / PowerDraft from internal application such as .Net Addin, then you don't have to think about it since MicroStation registers search paths for those on load. Problems comes out, if you want use MicroStation from outside, because its assemblies are not in GAC by default, but at installtime of your application you can add them into it by placing MicroStation's Assemblies directory to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders registry key...
HTH
Elias,
I think you have to provide different versions for V8i and XM. You could expect that the same main version (8.9/8.11) is upward compatible between the minor version, but there are a number of known differences between V8i and XM.
I even don't know if the name of the all of the Interop is still the same as there where some changes to get a more consistent naming convention (as far as I remember).
But maybe there is someone here, who can tell you in more detail.
There are a number of programmers who still prefer working inside Ustn. I currently know that I need to recompile my mdl apps for each main version, but I also know that I might change my .Net-dll and can use it in both of the versions (XM/V8i), as long as the interface wouldn't change (the other direction using a .Net dll from a Ustn one)
I think it would be a bad idea to attempt to redistribute any assembly delivered with MicroStation. Apart from versioning and licensing issues, there may be other issues. In V8i, for example, that file lives in the \MicroStation\assemblies folder.