Description:
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled with dependencies to other assemblies.
Exception:
Could not load file or assembly 'DiagnosticTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Resolve:
- When dependencies assemblies are created in definied folder: ex. \plugins use:
<probing> Element - Specifies application base subdirectories for the common language runtime to search when loading assemblies.
- Find the dll file and copy it over to the bin directory.
- Add Reference on your root web projec. Make it bin deployable by setting Copy Local to true
Resources:
Assembly Load and loading the “sub-modules” dependencies - “cannot find the file specified”
Dynamically Load Assembly and manually force path to get referenced assemblies
Loading assemblies and its dependencies
Could not load file or assembly
http://www.britishdeveloper.co.uk/2011/05/mvc3-deploy-could-not-load-file-or.html
Could NOT LOad file or assembly - Part 1
How to load an assembly at runtime that is located in a folder that is not the bin folder of the application
C# Putting the required DLLs somewhere other than the root of the output
Brak komentarzy:
Prześlij komentarz