My Project1 is here \Project1\Bin\Debug\application.exe and my dlls are in \Project1\Debug\3rdparty.dll
How to get path that include this dll in my code?
[DllImport("????????/3rdparty.dll")]
what should i write at question marks (?????) My solution includes other c++ projects inside. So whenever i compiled c++ project, it refresh dll in project1\Debug (some how i am not familiar with c++) I need to use that dlls in DllImport [Path]. If i tried to add reference, it gives me error. This might be really easy question, but i am not able to solve it for some reason.
Anwered by Hans Pasant in comment section :
Change the Output Directory setting in the C++ project to $(SolutionDir)bin\$(ConfigurationName) so that the native DLL ends up in the same folder as your managed program. Just use [DllImport("3rdparty.dll")] in your C# code. – Hans Passant