【问题标题】:Could not copy the files .... because it was not found error无法复制文件....因为找不到错误
【发布时间】:2017-12-23 13:17:24
【问题描述】:

我从朋友那里得到了一个 asp.net mvc 项目。这是她的项目,但我需要继续努力。因此,当我尝试启动它时,会出现一些错误。这是错误;

Could not copy the file "_bin_deployableAssemblies\x86\sqlceme40.dll" because it was not found.
Could not copy the file "_bin_deployableAssemblies\x86\sqlcecompact40.dll" because it was not found.
Could not copy the file "_bin_deployableAssemblies\x86\sqlceer40EN.dll" because it was not found.
Could not copy the file "_bin_deployableAssemblies\x86\sqlceca40.dll" because it was not found.
Could not copy the file "_bin_deployableAssemblies\x86\sqlcese40.dll" because it was not found.
Could not copy the file "_bin_deployableAssemblies\x86\sqlceqp40.dll" because it was not found.     

我做了一些搜索,找到了一些关于更新我的 nuget 包的解决方案。我做了所有更新,包括 EntityFramework.SQLServerCompact。但我仍然有错误,不知道该怎么做。那么有人可以帮助我吗? 提前致谢。

【问题讨论】:

  • 您确定所有这些引用都包含在项目中吗?
  • @demo 我是,现在我为您检查了我的参考部分,EntityFramework.SQLServerCompact 上有一个黄色警告图标,我应该删除并重新安装它吗?
  • 好吧,你可以 :) 或者如果这个引用位于解决方案中的某个特定文件夹中,你可以尝试手动添加它们
  • @demo 我确实卸载并再次安装了它,同样的错误:(

标签: asp.net-mvc visual-studio visual-studio-2015 build


【解决方案1】:

我在将 VS 更新到 153 后遇到了同样的问题。

但是,由于我没有在我的项目中的任何地方使用 SqlServerCompact 版本:我使用实体框架到 SQL Server,我觉得不需要在 web.config 中包含这些引用和提供程序。

在 Web 项目中 - 我使用 NUGET 删除了对 SQLServer Compact Edition 的所有引用。然后我在 web.config 的提供程序部分中删除了对 SqlCEProvider 的引用。重新编译后一切正常。

【讨论】:

  • 这是您应该首先与 OP 验证的假设:不能假设他们不需要参考。更适合作为评论。
【解决方案2】:

你可以试试这个命令:

Update-package -Reinstall

来自控制台管理员包 (PM)

【讨论】:

    【解决方案3】:

    我使用以下步骤解决了这个错误(某些步骤的顺序很重要):

    • 已安装SQL Server CE 4.0。我必须安装 x64 版本以匹配我的操作系统,但它包含我项目中引用的 x86 可再发行文件。
    • 使用 NuGet,从我的项目中删除 EntityFramework.SqlServerCompact
    • 使用 NuGet,从我的项目中删除了 Microsoft.SqlServer.Compact
    • 使用 NuGet,安装 EntityFramework.SqlServerCompact,其中还安装了 Microsoft.SqlServer.Compact。

    【讨论】:

      【解决方案4】:

      我遇到了同样的问题,我卸载了 SQLServer Compact Edition 并从 nuget 包重新安装

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-08-28
        • 2017-06-20
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多