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?
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.
But then i have a .exe file for every corel version thats also a bad solution in my opinion!? Or i missunterstand you?
From the testing I did, the 18.1 dll will work for version 18, you just need the 18.1 dll inside of the solution (and bin output by result). When the program calls CorelDraw it will call the 18.1 dll which will find the compatible 18.0 COM dll on the PC and work fine. If there is an issue then just recompile your solution with the 18.0 dll in your solution and you should be good to go. How many version of Corel are you running? If you have 10 PCs running CorelDraw X8, you should not have an issue, they will all use the same deployment.
some of our customers still running x5 ... so x5 - 2018...
thanks
Yes you would need to do this in 2 versions then, one with 18 and one with X5. Hopefully they move off of X5 soon. X5 is not supported in Windows 10 and with Windows 7 expiring in just over 16 months they may be forced to upgrade. While X5 will run in Windows 10, it has issues like the file menu disappear except when you mouse over each individual item.