Hello,
how can I use a Software programmed with c# and the corel draw type library on another pc with a different corel draw version installed?
Currently I added a reference to the 18.1 type library (my pc uses corel draw x8) and then I sent the software to my college (have corel draw 2018) but the programm stopped working.
Anything with CLSID...??
Get a copy of the Corel.Interop.VGCore.dll from CorelDraw on the library PC and put it into your solution folder. Reference it directly instead. It will allow you to build and it should work on your PC in spite of the minor version differences. Then when you deploy it should continue to work.
By the way: just saw, that in X8 the dll called Interop.CorelDraw.dll and on X7 it's called Corel.Interop.CorelDraw.dll
So you say that I should develop on my development pc with my version and when i deploy i have to put the dlls from the target version into the solutioion folder?
No you will need to do one more step after you put Corel.Interop.VGCore.dll in your folder.
You will need to put it in your folder and then reference it in place of your other dll from within Visual Studio. So go to remove the dll reference to your copy of CorelDraw. Then go to References and Click "Add Reference", click on browse and find the dll you placed in your solution. This should cause the dll in your solution to get added to the output bin folder and it will be referenced instead. Also, try running your program with the dll referenced from the library copy of Corel on your PC. It should still work.
ok yes I think this will work, but I can't install visual studio on every pc and reference another dll there must be a better solution for this.. i red about late-binding and so on and wanted to know if you guys found a "best practice" espacilly with corel draw
You would only need visual studio on the PC you compile on. I have deployed compiled code from my PC to dozens of PCs that do not have VS but have CorelDraw. One reason we do it this way is our repo gets compiled in the cloud and does not have access to CorelDraw directly but it will not throw errors because the CorelDraw dll is in the solution and that dll is referenced instead of the PCs COM dll. When you do it this way and the code calls the localized dll, it will push it up to the COM dll on the PC you deploy to.