How to get the MEF catalog directory in one directory for Servicelayer and DAL?

I use MEF to add plugins to our DAL, which is used by our WebApp. This works fine, but when our service level refers to DAL, it searches for plugins in \ ServiceLayer \ Plugins \ rather than \ WebSite \ Plugins \ (which makes sense if we use a relative path. {DirectoryCatalog (Path = "plugins /") }.

The problem is that we use an absolute path that it refuses to load plugins from SL and DAL, which, I believe, is due to the fact that the path is not within the same directory or subdirectory of the application, loading plugins (?). How can I get them to load plugins from the same folder?

thanks

+1
source share
1 answer

You cannot do this. The solution was to have a copy of the DLLs, one in the web application folder, the other in the service level folder

0
source

Source: https://habr.com/ru/post/1342354/


All Articles