2013-08-26 72 views
0

爲了在我們的項目中調試和分析性能,我們使用了rhino實體分析器。 它需要添加rhino profiler dll作爲項目參考。如何在項目版本中刪除項目外部依賴項

由於我們僅在調試時需要此功能,因此在發佈時完全刪除此引用會很好。

#if DEBUG 
    <some dll reference /> 
#endif 

是否有任何relativly簡單的解決方案,以實現這一目標:

,如果有類似的東西將是巨大的?

回答

0

如果您不使用任何代碼,則可以安全地刪除發佈版本的依賴關係。

0

您可以通過手動編輯您的項目文件來完成此操作,但我傾向於避免手動修改我的項目文件(如果可能)。如果您不得不在多個項目中進行更改或添加需要這些相同設置的新項目,則可能會成爲噩夢。

<ItemGroup> 
    <Reference Include="System.Data" /> 
    <Reference Include="System.Xml" /> 
    </ItemGroup> 
    <!--put any references you want to just show up in debug mode in here --> 
    <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 
    <Reference Include="System" /> 
    </ItemGroup> 
相關問題