Error compiling C# example under .NET Framework 4.0
Posted: Thu Dec 10, 2015 9:12 am
Hello,
I'm currently evaluating your Driver API SDK V5 for creating PDF output from our ECAD application.
I have some problems compiling and running your C# example "PDFdriverAPI" in following environment:
- Windows 7 Pro
- Microsoft Visual Studio 2015 Express 2015 for Windows Desktop
- .NET Framework 4.0
Problem 1: Compiler error with framework 4.0:
At line 52: PDFPrinter = (PXCComLib5.CPXCPrinter)prnFactory.get_Printer("", "Simple PDF-XChange 2012", "<REG CODE>", "<DEV CODE>");
error CS0656: Missing compiler required member "Microsoft.CSharp.RuntimeBinder.Binder.Convert"
This compiler error is not raised under .NET 3.5 or below. But our application requires .NET 4.0.
Is this a known problem and if so can an update be expected in the near future?
Problem 2: "System.BadImageFormatException" with "Interop.PXCComLib5" when starting the app
When using a COM reference to "PDF-XChange Printer 2012 Type Library" in the project (as your example does) the generated Interop assembly "Interop.PXCComLib5.dll" has a size of 18 KB in contrast to 28 KB of your version of the same file which is delivered with your installed example. If I replace the COM reference with a direct assembly reference to your delivered version of "Interop.PXCComLib5.dll" the demo application runs fine under .NET 3.5 or below. (I yust copied "Interop.PXCComLib5.dll" into my bin\Debug folder with no additional files).
Do you have any idea why the COM reference creates this strange behaviour?
Thank you in advance,
Siegfried Eineder
COMSA GmbH
I'm currently evaluating your Driver API SDK V5 for creating PDF output from our ECAD application.
I have some problems compiling and running your C# example "PDFdriverAPI" in following environment:
- Windows 7 Pro
- Microsoft Visual Studio 2015 Express 2015 for Windows Desktop
- .NET Framework 4.0
Problem 1: Compiler error with framework 4.0:
At line 52: PDFPrinter = (PXCComLib5.CPXCPrinter)prnFactory.get_Printer("", "Simple PDF-XChange 2012", "<REG CODE>", "<DEV CODE>");
error CS0656: Missing compiler required member "Microsoft.CSharp.RuntimeBinder.Binder.Convert"
This compiler error is not raised under .NET 3.5 or below. But our application requires .NET 4.0.
Is this a known problem and if so can an update be expected in the near future?
Problem 2: "System.BadImageFormatException" with "Interop.PXCComLib5" when starting the app
When using a COM reference to "PDF-XChange Printer 2012 Type Library" in the project (as your example does) the generated Interop assembly "Interop.PXCComLib5.dll" has a size of 18 KB in contrast to 28 KB of your version of the same file which is delivered with your installed example. If I replace the COM reference with a direct assembly reference to your delivered version of "Interop.PXCComLib5.dll" the demo application runs fine under .NET 3.5 or below. (I yust copied "Interop.PXCComLib5.dll" into my bin\Debug folder with no additional files).
Do you have any idea why the COM reference creates this strange behaviour?
Thank you in advance,
Siegfried Eineder
COMSA GmbH