【问题标题】:Build&Release Error CS0234: The type or namespace name 'Security' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)Build&Release 错误 CS0234:命名空间“Microsoft”中不存在类型或命名空间名称“Security”(您是否缺少程序集引用?)
【发布时间】:2017-06-10 16:48:42
【问题描述】:

当我将项目提交到 vsts 以进行构建自动化时

有错误

Error CS0234: The type or namespace name 'Security' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

但我的项目可以使用 vs 在本地运行

有人知道如何解决这个错误吗?

【问题讨论】:

    标签: azure-devops azure-pipelines ms-release-management


    【解决方案1】:

    将 NuGet 还原任务添加到您的构建/发布定义中。

    1. 将版本更改为 0.*
    2. 解决方案或 packages.config 的路径:***.sln
    3. 为安装类型选择恢复

    【讨论】:

      【解决方案2】:

      您的构建找不到引用的程序集。这可能是因为缺少 nuget restore 构建步骤(在此处查看其他答案),或者因为您的存储库中缺少此特定构建的某些条目。

      【讨论】:

        【解决方案3】:

        在我的例子中,我忘记将 packages.config 文件添加到源代码管理中。

        【讨论】:

          猜你喜欢
          • 2017-05-01
          • 2020-12-17
          • 2020-03-31
          • 2021-06-14
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2018-07-15
          • 1970-01-01
          相关资源
          最近更新 更多