Search code examples
visual-studio-2010configurationreferenceconfiguration-management

Correct way to reference Debug/Release projects in visual studio 2010?


I have a visual studio 2010 solution that contains 72 projects and most of them need to link with other projects. The projects contain references to the other projects in properties->Common Properties-> Framework and References. These references are dlls output from the other projects within this solution.

I have been tasked with adding a "d" to the end of each output to differentiate them from other configurations to avoid linker errors when switching between configurations.

So I've renamed all of the output files to projectd.dll, project2d.dll, etc. I have done the same with the import libraries, projectd.lib, project2d.lib etc.

I do a clean rebuild and get an error that says using failed on project.dll. I see that it isn't projectd.dll like I expected it to be. I check properties->Common Properties->Framework and References. All of the references still reference the original dlls, without the "d" extension. The references are common to each configuration, so adding and removing would probably be a bad idea. What is the correct way to go about this task?

Any help is greatly appreciated.


Solution

  • I went with @armel's comment:

    I suspect that you changed output file name directly in the linker or librerian, this is not the thing to do, you must change the "Target Name" in General panel.

    Thank you armel.