代码之家  ›  专栏  ›  技术社区  ›  Chris Spicer

使用MSBuild社区任务设置InternalsVisibleTo的程序集信息

  •  1
  • Chris Spicer  · 技术社区  · 16 年前

    我正在使用MSBuild社区任务根据Subversion存储库标记自动更新程序集版本号。我已将以下内容添加到我的项目文件中:

    这给了我一个新的AssemblyInfo.cs文件:不幸的是,我需要添加以下内容才能使MStests正常工作:

    但我不知道如何做到这一点——例如,似乎没有通过MSBuild社区任务实现。有人能提供这方面的指导吗?

    1 回复  |  直到 16 年前
        1
  •  3
  •   cHao    16 年前

    #ifdef DEBUG
    [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("XLComponentsUnitTests")]
    #endif
    

    <AssemblyInfo> 任务。