Visual Studio - How to remove a reference in Release mode

后端 未结 5 2288
谎友^
谎友^ 2021-02-12 15:02

I\'m developing a library for use in other apps and this library has lots of debugging and logging statements thanks to NLog.

Is it possible to exclude the reference to

5条回答
  •  Happy的楠姐
    2021-02-12 15:56

    You can manually edit the csproj file, and do something like this:

    
    

    This only makes it reference that assembly in Debug. I wouldn't recommend doing this often though, because this behavior isn't reflected in the references list in Visual Studio when you change the configuration. It does work when compiling though

提交回复
热议问题