-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I have a .dll file from a company that I need to call to process some work. The dll is created in powerbuilder.
The .dll required the application to be x86, required Winforms and a bunch of powerbuilder dlls.
I created an API as a wrapper around this .dll, I simply referenced the .dll file
and called it's methods:
var generators = new Abs_Pdf();
if (model.PageSize.HasValue && model.Orientation.HasValue)
{
generators.set_pdf_size(model.PageSize.Value, model.Orientation.Value);
}
_logger.LogInformation("Start Converting Template To Pdf - {table}:{id}", model.TablePrefix, model.PrimaryKey);
var result = generators.get_template_pdf_file(model.TablePrefix, model.PrimaryKey, ref outputPath);
This all worked until I wanted to upgrade my API to .NET 8. Now calling the dll gives an exception (the exception is caught in the dll I assume, because it's simply returning a string saying "Failed!".
Are there any changes to calling a referenced library?
I also contacted the company and asked them, but seeing as it worked in .NET 7, I thought maybe it should/could work in .NET 8 as well.
Expected Behavior
Calling the .dll library would not result in an error.
Steps To Reproduce
I cannot share the .dll as it is intellectual property.
- Create new .NET 7 API project
- Add external library (dll)
- Call external library --> Success
- Upgrade to .NET 8
- Call external library --> Fail
Exceptions (if any)
No response
.NET Version
8.0.100
Anything else?
No response