0

我正在研究 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
4

2 回答 2

2

这是你应该做的:

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

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

于 2017-09-13T10:00:06.537 回答
0

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

请参阅设置 git repo

于 2018-02-04T18:50:50.590 回答