美文网首页
How to set Different References

How to set Different References

作者: XBruce | 来源:发表于2021-12-16 15:01 被阅读0次

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

相关文章

网友评论

      本文标题:How to set Different References

      本文链接:https://www.haomeiwen.com/subject/ksdvfrtx.html