How to set Different References

2021-12-16  本文已影响0人  XBruce

Hi,

It is possible to do this in VS 2008. Build both the debug and release version of the C# library and place each one within a debug and release folder. You can also include pdbs in the debug folder for debugging support. The folder hierarchy for the c# library should look like:
lib\debug\lib.dll (debug config)
lib\debug\lib.pdb
lib\release\lib.dll (release config)

In the c# application, set a reference to the debug version. Now edit the project file in a text editor, locate the reference and edit the "hint path" element. Replace the word "debug" in the path with "(ConfigurationName)". It should read <HintPath>...\lib\(ConfigurationName)\lib.dll</HintPath>

Now in the IDE when the C# app is in debug mode the reference points to the debug ver of the library and in release it uses the release version. If PDBs are included in the debug version, full debugging support is available.

I haven't tried this is vs 2005.

Brian

Wednesday, October 14, 2009 11:50 AM

上一篇 下一篇

猜你喜欢

热点阅读