0

I was working on ASP.Net boilerplate framework and now that machine is not available where i was working, But i have backup on my Google drive. How i can use that backup properly? Database creation , project running etc??? I am getting error on Enable-Migrations and Update Database Commands

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

2 Answers 2

2

Here is what you should do:

  1. Download the project from your Google drive
  2. Open in Visual Studio
  3. Run Database-Update (Make sure the Entity Framework project is selected in the Nuget Package Manager.

That is all you need to do to get. All you will lose is the data in your previous database on the unavailable machine.

6
  • Ok @Sleek let me check Commented Sep 13, 2017 at 10:07
  • Here is the error : on Applying command Update-Database it is giving "Could not load file or assembly" Commented Sep 13, 2017 at 10:10
  • Try building the project first. Does it succeed?
    – Sleek
    Commented Sep 13, 2017 at 10:27
  • Check Edit version of the Question i pasted the Error Sir @Sleek Commented Sep 13, 2017 at 11:06
  • Try this: Navigate to EntityFramework.PowerShell.Utility.dll, right-lick on it, choose Properties, and remove the Read Only check mark. Also, you may need to unblock it using the same process (Right Click > Properties > Unblock). After this, try building again to see if EntityFramework.PowerShell.Utility.dll throws this same error. If not, unblock all the other DLLs that throw this error.
    – Sleek
    Commented Sep 13, 2017 at 11:29
0

Best solution is to create a repo in Git, add you project in it. On there PC run git clone on the desired path.

Refer Setting up git repo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.