简体   繁体   中英

how to change dll directory in C# project

I used a dll in my C# project that its Directory is exactly in same location of exe file. so when I install my project, the dll file will be locate in exe Directory.

is there any way that I change dll Directory? for example the dll file locate in this: bin\\DLLs. I dont want that user know about my dll easily.

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

Thanks.

You can install your dll's in GAC to "hide them". But it won't hide them from a skilled user.

I wanted to change dll directory that users cant see them. So I try to load DLL from Embedded Resource. its a good idea that workes for me.

by this way, you can change your exe file with out any related dll.

see here for more detailes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM