0

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!

user2584960
  • 645
  • 1
  • 6
  • 20
  • Do you know what the name of the DLL will be? you could include a dummy file in your Build and replace it manually later? – Carl Jun 10 '14 at 23:03
  • Yes, however that is not my issue. The issue is that lets say when in DEBUG configuration, the dll generated is to be placed into PROJECTNAME/BIN/ABC.DLL. When I switch to RELEASE configuration, PROJECTNAME/BIN/ABC.DLL is no longer the valid DLL since now my build will produce another version of the ABC.DLL. So therefore, I would like DEBUG configuration to reference PROJECTNAME/DEBUG/BIN/ABC.DLL and RELEASE configuration to use PROJECTNAME/RELEASE/BIN/ABC.DLL. However, visual studio doesn't have such capability as the reference is all statically linked with absolute path. – user2584960 Jun 11 '14 at 15:48
  • anyone? this is driving me nuts... – user2584960 Jun 12 '14 at 17:20

1 Answers1

0

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.

user2584960
  • 645
  • 1
  • 6
  • 20