VarianAPIs / Varian-Code-Samples

Code samples for ESAPI and other Varian APIs and web services.
MIT License
112 stars 105 forks source link

Could not load file or assembly '3rd party.dll' or one of its dependencies. The system cannot find the file specified. #162

Open TruePluto opened 1 year ago

TruePluto commented 1 year ago

I have been writing a binary plug-in script with 3rd party package such as Autofac, MVVMlight,WpfExtended. An annoying issue occurred frequently. and I don't know how to fix it. Could not load file or assembly 'DotNetProjects.Wpf.Extended.Toolkit, PublicKeyToken=3e4669d2f30244f4' or one of its dependencies. The system cannot find the file specified.

Autofac, and MVVMlight pass while selected another old version. but WpfExtended could not. three packages passed while I build a standalong script.

joecastelo commented 1 year ago

Hey Pluto! I've faced that issue once. Two things I would check, the framework version, if you're at Eclipse 15.6 or lower it should be 4.5.1, so all External packages should be compatible. For 16+ it would be 4.7.2 I think. As you described it should not be the case, but just check if the esapi.dll binary is selected and ran from the same folder as the dependencies are located. When you create with the plugin wizard they drop the dll file in the plugins folder, you can redirect it to the bin/x64 or Debug.

TruePluto commented 1 year ago

thank you. the 3rd part.dll is designed by myself. with same environment. all code in the same project is ok but could not used as a reference project.