Hello,
I have a C# project where I have added 2 reference dlls Microsoft.Extensions.DependencyInjection.Abstractions and Microsoft.Extensions.DependencyInjection.
I also have a X++ project where I use this C# project. So I first build the C# project and then add it as a reference in my X++ project.
The issue I am facing is that there are already an older versions of Microsoft.Extensions.DependencyInjection.Abstractions and Microsoft.Extensions.DependencyInjection present in AosService//PackagesLocalDirectory//bin directory.
The library I have included is present in K://AosService//PackagesLocalDirectory//MyModel//bin after the build.
Now during runtime, when the X++ code calls the .Net classes, IIS service loads the version of the library from PackagesLocalDirectory instead of MyModel's directory. Which gives me an error in my code.
I tried to delete the dll from PackagesLocalDirectory, in which case it is loading the dll from MyModel's bin and my code runs fine in this case.
Now I don't want to delete dlls from PackagesLocalDirectory and it's also not possible in production. Is there any way so I can load my version of the dll at runtime ?
It is similar to issue mentioned in the post https://community.dynamics.com/forums/thread/details/?threadid=7d01d7ee-7945-42fd-a0f6-24a0b5524bd5, however the solution provided in the post is something that is not feasible in my case.
Also that is very old post hoping that something might have been changed since then.
Thanks in Advance
Amit