nattylife

i have a legacy C application that will communicate with a C++ dll that is compiled with the /clr flag. This C++ dll then calls a method in a C# assembly. I would like to place the C++ and C# assemblies into a different folder than the C app. So would I need to create a config file that uses the C application's name and place the public keys and full paths to the corresponding assemblies in it say my C app is called myapp.exe. then should i make a config file called myapp.exe.config or is this only needed when a managed assembly will need to reference another managed assembly in a different path

Re: Visual C# General application config file for interop between legacy C and C# dll

nattylife

to add to this, i would like to place all the DLL's into the system32 folder. currently i receive System.IO.FileNotFoundException when i place the DLL's in that folder. would i need a config file to find these assemblies or is there another way to approach this



Re: Visual C# General application config file for interop between legacy C and C# dll

nattylife

found the solution. for those who might care, creating a configuration file for my C application with the following tags for each assembly referenced did the trick

<dependentAssembly>
<assemblyIdentity name="MyAssembly_1"
publicKeyToken="8XXXXXXXXXXXXXX5"
culture="neutral" />
<codeBase version="1.0.0.0" href="c:\windows\system32\MyAssembly_1.dll"/>
</dependentAssembly>

i wasnt sure if you could use a configuration file for an unmanaged application calling managed code but looks like it.