Hello,
I have a C# project where I have added 2 Nuget packages for Microsoft.Azure.Storage.Common and Microsoft.Azure.Storage.Blobs.
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 is already an older version of Microsoft.Azure.Storage.Common.dll 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 ?
Also one similar question I have is how to make these additional dlls I am adding for libraries available in the deployable package for production deployment ?