I'm in a need of creating a custom SharePoint CSOM library that makes use of OfficeDevPnP.Core.dll among others.

Installed via NuGet, OfficeDevPnP.Core.dll happens to depend on many libraries that aren't used explicitly.

I've manage to do everything right in the Visual Studio and my code works alright.

When I try to use it outside of Visual Studio (in this case it's Blue Prism - RPA tool that has it's own environment for running .NET scripts) I'm having random troubles with missing dependencies.

When I'm on my computer, where I have downloaded the NuGet package, adding the dependencies to Blue Prism seems sufficient, but only in a case where I explicitly use that library in Blue Prism. If I use the library I created in Visual Studio that depends on OfficeDevPnP.Core.dll, then its dependencies are not detected.

If the same procedure is repeated on a different computer that doesn't have Visual Studio nor that NuGet package installed on it and I'm only linking plain DLLs, none of the above works and I only receive that OfficeDevPnP.Core.dll or its dependency is missing.

IN EITHER CASE I MADE SURE THAT ALL DLLS THAT WERE DOWNLOADED VIA NUGET ARE PRESENT IN THE SAME DIRECTORY MAIN LIBRARY IS.

I'm not experienced in this topic. I tried to use Dependency Walker, but with no success. I tried also to merge the output libraries using ILMerge, but one of the dlls happens to cause error (probably due to unmanaged code in it or a different unresolved dependency).

How to approach this to make sure that all dependencies that are not explicitly used by the main script, but are used by its dependencies, are resolved properly?

If anything is missing here, please don't hesitate to ask for a more thorough description. I already made it quite long.

Thanks in advance.

EDIT:

I haven't tried Procmon yet, but I have gone through the publishing thing. Unfortunately without success. I can't publish a sole class library, only a helper console app, which uses that class library. Publishing creates a manifest for that console app, but not for my library of interest (at least I assume so). Using published library (which gets copied to AppData/Local) gives the same results in Blue Prism (Could not load file or assembly 'myMainLibraryWhichCallsOtherLibraries', Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

0

There are 0 answers