question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to load DLL 'fusion.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

See original GitHub issue

From @nefcanto on December 23, 2017 15:1

Environment: VS 2017 Community edition 15.5.2 dotnet --version => 2.1.2 Windows 10 Enterprise

Steps to reproduce this bug:

  1. Create a simple console application using default template
  2. Add these Nuget packages:
  <ItemGroup>
    <PackageReference Include="WindowsAzure.Storage" Version="8.7.0" />
    <PackageReference Include="Microsoft.WindowsAzure.ConfigurationManager" Version="3.2.3" />
  </ItemGroup>
  1. Write these lines of codes to get a container:
var accessKey = "your access key";
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting(accessKey));
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference("images");
  1. Run the application

Copied from original issue: Azure/azure-storage-net#596

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:23 (5 by maintainers)

github_iconTop GitHub Comments

10reactions
SaadMarwancommented, Feb 1, 2018

I had the same issue with .net core console app. I couldn’t make CloudConfigurationManager work so I used this approach instead

var storageCredentials = new StorageCredentials("myAccountName", "myAccountKey"); var cloudStorageAccount = new CloudStorageAccount(storageCredentials, true); var cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();

Once you have your cloud storage account reference you can do whatever you want. For example, creating a new container

var container = cloudBlobClient.GetContainerReference("mycontainer"); await container.CreateIfNotExistsAsync();

But remember that every remote action in the storage library is async so you have to do something like this

static void Main(string[] args)
{
	MainAsync(args)).GetAwaiter().GetResult();
}

static async void MainAsync(string[] args)
{
	var storageCredentials = new StorageCredentials("myAccountName", "myAccountKey");
	var cloudStorageAccount = new CloudStorageAccount(storageCredentials, true);
	var cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();

	var container = cloudBlobClient.GetContainerReference("mycontainer");
	await container.CreateIfNotExistsAsync();
}

Reference: https://dotnetcoretutorials.com/2017/06/17/using-azure-blob-storage-net-core/

I only changed the Mainasync method call from Task.Run(() => MainAsync(args)).GetAwaiter().GetResult();

to

MainAsync(args)).GetAwaiter().GetResult();

7reactions
csharpfritzcommented, Apr 15, 2020

Friends, this is broken… and we should move on with a work-around.

The documentation now recommends that you fetch configuration settings as EnvironmentVariables:

 System.Environment.GetEnvironmentVariable("AzureWebJobsStorage", EnvironmentVariableTarget.Process);

Let’s close this issue and mark it as abandoned with this as the recommended work-around.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to load DLL 'fusion.dll': The specified module could ...
Unable to load DLL 'fusion.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) #596.
Read more >
fusion.dll on Azure storage using Visual Studio for Mac
System.DllNotFoundException: fusion.dll. AFAIK, Fusion.dll is a type of DLL file associated with Microsoft .NET Framework for the Windows ...
Read more >
Error when you try to copy content to Azure
DllNotFoundException,Message=Unable to load DLL 'jvm.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) ...
Read more >
System.DllNotFoundException: Unable to Load DLL 'file. ...
DllNotFoundException: Unable to Load DLL 'file. dll'. The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Read more >
Unable to call method because (Unable to load DLL
Unable to call method because (Unable to load DLL '': The specified module could not be found. (Exception from HRESUClosed - Not Enough...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found