【问题标题】:Asp.Net boilerplate,, How to Move boilerplate project to another Computer?Asp.Net 样板,如何将样板项目移动到另一台计算机?
【发布时间】:2017-09-13 06:59:40
【问题描述】:

我正在研究 ASP.Net 样板框架,现在该机器在我工作的地方不可用,但我的 Google 驱动器上有备份。我怎样才能正确使用该备份?数据库创建,项目运行等??? 我在启用迁移和更新数据库命令时遇到错误

Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///F:\Qubit 
 Systems\ShipperBuyerV1\module-zero-template-2.1.1\src\packages\EntityFramework.6.1.3\tools\EntityFramework.PowerShell.Utility.dll' or one of its dependencies. Operation is not supported. 
    (Exception from HRESULT: 0x80131515)"
 At F:\Qubit Systems\ShipperBuyerV1\module-zero-template-2.1.1\src\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:5
+     $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-P ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileLoadException

 You cannot call a method on a null-valued expression.
  At F:\Qubit Systems\ShipperBuyerV1\module-zero-template-2.1.1\src\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5
 +     $dispatcher = $utilityAssembly.CreateInstance(
 +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

 Exception calling "CreateInstanceFrom" with "8" argument(s): "Could not load file or assembly 'file:///F:\Qubit 
   Systems\ShipperBuyerV1\module-zero-template-2.1.1\src\packages\EntityFramework.6.1.3\tools\EntityFramework.PowerShell.dll' or one of its dependencies. Operation is not supported. (Exception 
 from HRESULT: 0x80131515)"
    At F:\Qubit Systems\ShipperBuyerV1\module-zero-template-2.1.1\src\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:809 char:5
 +     $domain.CreateInstanceFrom(
 +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileLoadException

【问题讨论】:

    标签: c# asp.net ef-code-first aspnetboilerplate asp.net-boilerplate


    【解决方案1】:

    这是你应该做的:

    1. 从您的 Google 云端硬盘下载项目
    2. 在 Visual Studio 中打开
    3. 运行数据库更新(确保在 Nuget 包管理器中选择实体框架项目。

    这就是你需要做的所有事情。您将丢失的只是不可用机器上以前数据库中的数据。

    【讨论】:

    • 好的 @Sleek 让我检查一下
    • 这是错误:在应用命令更新数据库时,它给出“无法加载文件或程序集”
    • 先尝试构建项目。成功了吗?
    • 检查问题的编辑版本我粘贴了错误先生@Sleek
    • 试试这个:导航到EntityFramework.PowerShell.Utility.dll,右键单击它,选择属性,然后删除只读复选标记。此外,您可能需要使用相同的过程取消阻止它(右键单击 > 属性 > 取消阻止)。在此之后,再次尝试构建以查看 EntityFramework.PowerShell.Utility.dll 是否会引发同样的错误。如果没有,请取消阻止所有其他引发此错误的 DLL。
    【解决方案2】:

    最好的解决方案是在 Git 中创建一个 repo,在其中添加你的项目。在 PC 上,在所需路径上运行 git clone。

    参考Setting up git repo

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-26
      • 1970-01-01
      相关资源
      最近更新 更多