derstauner
derstauner

Reputation: 1806

Custom path for dlls is not considered in app.config

I recently started a new .NET 8 project in VS 2022 CE. This project uses a bunch of external assemblies. I know, if I don't want these assemblies copied to the root output folder, then I can do this:

<runtime>
       <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
           <probing privatePath="lib"/>
       </assemblyBinding>
   </runtime>

The lib folder (and also the compiled exe file) is here:

C:\Users\...\source\repos\...\bin\Debug\net8.0-windows

I copied all the dll files to the lib folder and referenced this files in the project with the property Copy Local=No. And deleted the initial copies in the root folder.

But if I start the app, the dlls are there in the root folder. For me, it seems, that the lib path isn't considered. Maybe under .NET 8 there is something different. I don't know.

So, what else can I try?

Upvotes: 0

Views: 19

Answers (0)

Related Questions