Description
In .Net 4, probing during assembly loading could be influenced by use of the 'probing' element in the app.exe.config
file. The privatePath
attribute contained list of subfolders that would be searched during probing. An example from one of my apps is:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="TradeWright.TradeBuild.ComInterop" />
</assemblyBinding>
</runtime>
</configuration>
In this example, the TradeWright.TradeBuild.ComInterop
subfolder contains a number (69 to be precise) of COM interop libraries produced by use of tlbimp.exe and AxImp.exe. The corresponding ActiveX .dlls and .ocxs are in parallel subfolders with appropriate manifests to enable registration-free COM, and the .exes have corresponding embedded application manifests. This all works perfectly, and it means my top-level bin folder contains only the .exes and .exe.configs, and all the interop dll's are neatly tucked away.
However this does not work with .Net 5. Including an app.config file in the project results in an app.dll.config
file being generated, but the 'probing' element is not actioned. The interop files are not located and the apps get nowhere.
If I move the interop dllls into the same folder as the .exe, all works fine, but I really don't want the top-level bin folder polluted with all these interop dlls.
Is there any current workaround for this? And is there any plan to provide the same probing behaviour as in .Net 4?
Metadata
Metadata
Assignees
Type
Projects
Status