title: Download blob from Azure storage with powershell -> LoaderException
body: <p>I use powershell to download a blob from blobstorage in an Azure startup task. I updated Microsoft.WindowsAzure.Storage library today from 3.0.3.0 to 4.0.1.0 via NuGet.</p>
  
  <p>After the library update files are still downloaded correctly but I get same sort of warning in command window:</p>
  
  <p>'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'</p>
  
  <pre><code>function download_from_storage ($container, $blob, $connection, $destination) {
      Add-Type -Path ((Get-Location).Path + '\Microsoft.WindowsAzure.Storage.dll')
      $storageAccount = [Microsoft.WindowsAzure.Storage.CloudStorageAccount]::Parse($connection)
      $blobClient = New-Object Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient($storageAccount.BlobEndpoint, $storageAccount.Credentials)   
      $container = $blobClient.GetContainerReference($container)
      $remoteBlob = $container.GetBlockBlobReference($blob)
      $remoteBlob.DownloadToFile($destination + "\" + $blob, [System.IO.FileMode]::OpenOrCreate)
  }
  
  $connection_string = 'DefaultEndpointsProtocol=https;AccountName=&lt;AcountName&gt;;AccountKey=&lt;Accountkey&gt;'
  
  # JRE
  $jre = 'jre-7u60-windows-x64.exe'
  $node = 'node-v0.10.29-x64.msi'
  download_from_storage 'java-runtime' $jre $connection_string (Get-Location).Path
  download_from_storage 'nodejs' $node $connection_string (Get-Location).Path
  </code></pre>
  
  <p>Since it is still working I am just clueless why the message occurs in the first place.</p>