# Update-database result in an error

**URL:** <https://forum.codewithmosh.com/t/update-database-result-in-an-error/4416>\
**Category:** Uncategorized\
**Created:** [April 24, 2021, 10:49pm UTC](https://forum.codewithmosh.com/t/update-database-result-in-an-error/4416 "2021-04-24T22:49:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naif](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@Naif](https://forum.codewithmosh.com/u/Naif)\
**Post date:** [April 24, 2021, 10:49pm UTC](https://forum.codewithmosh.com/t/update-database-result-in-an-error/4416/1 "2021-04-24T22:49:56Z")

</div>

Hi,  
I’ve tried to run the migration update command but I got this error, could you help, please?

* * *

Exception calling “LoadFrom” with “1” argument(s): “Could not load file or assembly  
‘file:///D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\tools\EntityFramework.PowerShell.Utility.dll’ or one of its dependencies. Operation is not  
supported. (Exception from HRESULT: 0x80131515)”  
At D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\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 D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\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:///D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\tools\EntityFramework.PowerShell.dll’ or one of its dependencies. Operation is not supported.  
(Exception from HRESULT: 0x80131515)”  
At D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\tools\EntityFramework.psm1:809 char:5

- 

```
$domain.CreateInstanceFrom(

```

- 

```
~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

  - CategoryInfo : NotSpecified: (🙂 [], MethodInvocationException
  - FullyQualifiedErrorId : FileLoadException

PM\> Add-Migration InitialModel -force  
Exception calling “LoadFrom” with “1” argument(s): “Could not load file or assembly  
‘file:///D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\tools\EntityFramework.PowerShell.Utility.dll’ or one of its dependencies. Operation is not  
supported. (Exception from HRESULT: 0x80131515)”  
At D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\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 D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\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:///D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\tools\EntityFramework.PowerShell.dll’ or one of its dependencies. Operation is not supported.  
(Exception from HRESULT: 0x80131515)”  
At D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\tools\EntityFramework.psm1:809 char:5

- 

```
$domain.CreateInstanceFrom(

```

- 

```
~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

  - CategoryInfo : NotSpecified: (🙂 [], MethodInvocationException
  - FullyQualifiedErrorId : FileLoadException

PM\> Update-Database  
Exception calling “LoadFrom” with “1” argument(s): “Could not load file or assembly  
‘file:///D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\tools\EntityFramework.PowerShell.Utility.dll’ or one of its dependencies. Operation is not  
supported. (Exception from HRESULT: 0x80131515)”  
At D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\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 D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\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:///D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\tools\EntityFramework.PowerShell.dll’ or one of its dependencies. Operation is not supported.  
(Exception from HRESULT: 0x80131515)”  
At D:\Projects\Examples\PlutoWeb\packages\EntityFramework.6.1.1\tools\EntityFramework.psm1:809 char:5

- 

```
$domain.CreateInstanceFrom(

```

- 

```
~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

  - CategoryInfo : NotSpecified: (🙂 [], MethodInvocationException
  - FullyQualifiedErrorId : FileLoadException

PM
