Exception Could not load file or assembly Microsoft.WindowsAzure.Storage Edit

Murugan Andezuthu Dharmaratnam | 19 January 2021 | 86

asp .mvc exception Could not load file or assembly 'Microsoft.WindowsAzure.Storage' writing code to upload file to blob stroage.

Exception Details

Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=8.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Solution

The solution Was to add a reference to WindowsAzure.Storage using NuGet package manager.

  1. Right click on references in the project
  2. Click on Manage NuGet packages
  3. On the browse tag search for Microsoft.WindowsAzure.Storage
  4. Select WindowsAzure.Storage by Microsoft
  5. Select the latest version and click on install