I intend to keep few dll's in a folder other than the bin folder for my .NET 3.5 Windows application. I am unsure of how would I use the codebase element or the probing element to specify the right path. This is what I have in the app.config file now,
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="CommonLib" publicKeyToken="f0b5026b59d5645e"
culture="neutral" />
<codeBase version="1.0.0.0" href="SharedFolder\CommonLib.dll" />
</dependentAssembly>
</assemblyBinding>
</runtime>
I get, Could not load assembly error at runtime. It seems I am doing something wrong in the config file. The SharedFolder is a folder added to the project.
It seems the codeBase element is for getting files with a URL, have you tried using the probing element?
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="CommonLib" publicKeyToken="f0b5026b59d5645e"
culture="neutral" />
</dependentAssembly>
<probing privatePath="SharedFolder"/>
</assemblyBinding>
</runtime>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With