Conditional Reference

送分小仙女□ 提交于 2019-12-01 19:51:00

Not sure whether I understand term "reference a class".

You can do a conditional referencing of an entire Assembly (DLL)

<Reference 
        Include="LegacyServices.dll" 
        Condition="$(AppVersion == '2.0')" />

or conditionally include a source file into a project

<Compile 
       Include="LegacyServices.cs" 
       Condition="$(AppVersion == '2.0')" />

Both using MSBuild Condition in csproj file.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!