C# Project add reference - dynamic path based on configuration?

1.7k Views Asked by At

One of my C# project needs to reference a .dll that is manually created (post build event) using tlbimp.exe after building another project. The reason is because I have chosen to deprecate DLL registration due to the fact that our development computers don't have privileges to register DLL anymore.

So now i have two configuration of the solution, one is RELEASE and the other is DEBUG. the DLL's generated from the two are different. How can I add reference so that they are dynamically referenced to their appropriate build folder /RELEASE/AVClib.dll and /DEBUG /AVClib.dll.

I do not want to copy them elsewhere and reference to a single location because I anticipate switching back and forth between the project configuration often and do not want to rebuild each time.

I am relatively new to the configuration of the project so if I am approaching the issue incorrectly, please advice!

1

There are 1 best solutions below

0
On BEST ANSWER

I found the solution to my problem. You would open the csproj file to manually edit in the environmental variable. This is a hidden feature I suppose and I don't know why Microsoft removed it.