2

I developed a .NET Standard 2.0 Nuget package (local) for a class library with a dependency on WindowsAzure.Storage, Version=9.3.0.0. It passed unit tests and ran fine when invoked from a .NET Core 2.0 console app. However, when I added my package to an Azure Function project (.Net Standard 2.0) it caused an exception to be thrown whenever I attempted to run the azure function from the VS2017 debugger.

System.Private.CoreLib: Could not load file or assembly 'WindowsAzure.Storage, Version=9.3.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60

I had the same sort of problem with Microsoft.Extensions.Configuration 2.1.1.0 and this was resolved by downgrading to v2.0.0.0 - see Stackoverflow post

Question 1: What version of WindowsAzure.Storage works with .NET Standard 2.0 Azure Functions?

Question 2: Apart from trial and error, how are people using this package meant to find out what it works with?

Rui Jarimba
  • 11,166
  • 11
  • 56
  • 86
wpqs
  • 657
  • 1
  • 7
  • 18
  • this can happen when a nuget package dependency doesnt line up with the application's dependency for the same package. You will want to be sure that your application is Not already referencing that package at a lower version, and that other packages are not referencing it at a lower version. Simple fix is to add the Storage Package directly to your main application. As with all azure packages, its usually best to use the latest version. – Kenneth Garza Jul 31 '18 at 17:19

1 Answers1

1

You will have to downgrade the WindowsAzure.Storage package. I am using version 7.2.1 with Azure Functions v2.

Here is the link of all the file for v1. I asked for v2 but no update yet. https://gist.github.com/fabiocav/8fcccd4d54ec298e3b120cbc1230c02a

Kzryzstof
  • 7,688
  • 10
  • 61
  • 108