I'm building a COM Visible Object that needs to get called from a software written in Sybase Powerbuilder 11.5. I'm using C# and .Net Framework 4.7.2. I ususally build this kind of objects with no problem and register them using regasm /codebase because that's the way Powerbuilder likes them.
Now I'm trying to build an object that references the latest version of these nuget packages:
Microsoft.Graph
Microsoft.Graph.Auth
Microsoft.IdentityModel.Clients.ActiveDirectory
Graph.Community
I have my class library project with a com visible class. I built a console application that references that library (it does not use COM server) to test the code and everything works fine on my development machine from the command line. I can also run the console application from my target machin with no issues.
When I try to run the Powerbuilder application that uses the COM object, it throws an error:
Could not load file or assembly 'Microsoft.Graph.Core, Version=1.23.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
I have that dll in assembly's folder, but it is version 1.24.0.0. I have two questions:
- Why does the console application work while the COM object doesn't, given that they are using the same assemblies?
- How I solve this versioning problem in the COM version of the object?