0

I am trying to change where my DLLs or EXE's have been referenced, and instead of a copylocal, which would place it in the same folder as my application, I need it to be in a subfolder. For example: Let's say the path is "C:\Program Files(x86)\Test\Test.exe" and the DLL it needs to use is "testDll.dll" instead of Visual Studio placing it in the "\Test" folder, i need it to be in "\Test\bin"

I have previously tried the <Probing> element in my vbackup.exe.config file, but it didn't end up working, with one of my settings giving me a "System.Configuration.dll" error, I can't remember the error exactly, and i got a warning saying about the <configuration> element is not declared. Another solution i tried was to put "AppDomain.CurrentDomain.SetupInformation.PrivateBinPath = "bin"" in my main.vb but that didn't do anything, and i wasn't sure which sub to put it in.

Any help will be greatly appreciated, Mike

ItsMike
  • 11
  • 8

1 Answers1

0

It isn't <Probing>. It is <probing>. XML is case-sensitive.

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

should do it, in the Test.exe.config file.

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
  • Okay, So I've tried that code but I get an exception:A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll Additional information: Configuration system failed to initialize If there is a handler for this exception, the program may be safely continued and highlights "Return CType(Me("lang"),String)" in settings.designer.vb – ItsMike Nov 23 '14 at 20:57