【问题标题】:Every time I switch git branches I end up missing DLL references (Elmah)每次我切换 git 分支时,我最终都会丢失 DLL 引用 (Elmah)
【发布时间】:2020-07-18 05:33:51
【问题描述】:

这是我第一次初始化一个项目并从另一个开发者的 repo 中下载它。当我尝试初始化它时。我缺少参考资料。我通过在参考选项卡单击属性中右键单击它们并启用“复制本地”为真来解决缺少的一些参考...这对其他人有用。但是当我为这个特定的参考(Elmah)这样做时,它会不断地变回错误。如果我尝试手动添加它,我也看不到文件夹中的 .DLL。它只显示一个 .nuget 文件。当您第一次下载解决方案时,有人可以准确地向我解释 .nuget 的工作原理吗?它是如何工作的 - 有人可以告诉我为什么这可能会失败吗?以下是我尝试过的一些失败的参考。 "'Could not load file or assembly 'Elmah' or one of its dependencies. The system cannot find the file specified'' after using Elmah.MVC in NuGet

此解决方案适用于我的基础架构 .dll Could not load file or assembly 'Microsoft.Web.Infrastructure,

每当我尝试从 .nuget 包管理器中简单地重新安装 Elmah 时,我都会收到错误消息

"Severity   Code    Description Project File    Line    Suppression State
Error       Failed to add reference to 'Elmah'.
Error HRESULT E_FAIL has been returned from a call to a COM component.

            

【问题讨论】:

  • 您的 gitignore 是否忽略了 dll(很可能)?您将需要为您需要的例外情况

标签: c# dll reference elmah


【解决方案1】:

解决了。我手动删除它并在手动删除它后重新安装它。我还没有看到我是否会切换分支,如果它会保留。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-12-06
    • 2022-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-11
    • 1970-01-01
    相关资源
    最近更新 更多