I added these lines into app.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas?microsoft?com:asm.v1">
<dependentAssembly>
<codeBase version="1.0.0.0"
href= ".\libs\CrashReporter.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
But my console application crashes and exception says that:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly
'CrashReporter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The system cannot find the file specified.
at TestConsoleApplication.Program.Main(String[] args)
CrashReporter.dll is a managed code in c# that I have referenced in my consol application. But in properties tab of dll reference I have set Copy Local
to false. Because in installer I want to copy it in .\libs\CrashReporter.dll folder and that would not be in the same folder as .exe file.
How can I tell the .net that i places the dll file in ../libs/ folder relative to the .exe file?