We have a mixed mode DLL written in C++ which wraps native C++ DLLs and exposes managed classes. In the exposed managed classes, we use method arguments of type Vector3D etc., which are part of PresentationCore.DLL.
Therefore, the mixed mode C++ code needs to reference PresentationCore.DLL. We do this via
#using <PresentationCore.dll>
which requires the project's search path to include the folder PresentationCore.dll lives in.
This is bad, because these folders vary on different machines, and our projects need to compile without changes on several machines. At the moment, we have solved this by including a copy of PresentationCore.dll in our code repository, which is obviously not a good solution.
I'd be grateful for suggestions how we can get around specifying an explicit path to a DLL that should be perfectly accessible via GAC.
The GAC is found in %windir%\Assembly\ then the subdirectory GAC_32 or GAC_64
In a situation like this I would use a symbolic link. Create a link to the DLL in the local directory. Then compile from that link.
Yes you have to change it for each machine. But all you have to do is a single line of batch script to do it.
Consider this running on my machine.
Pick the one you need (say GAC_64) and set a link to it- this all you should need.