0
votes

I have a piece of code that uploads a file to Azure storage. To do this I had to add Azure.Core dll in reference, and dependent assemblies. This code works fine in a standalone WPF application. In the visual studio Extension project, it throws this error-

Could not load file or assembly 'Azure.Core, Version=1.2.2.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.

My code is referencing to 1.3 version.

Steps that I followed are -

  1. Added the dlls as references

  2. Added the dllls in the RefAssemblies folder

  3. Marked Copy Always and Include in VSIX as true.

  4. Mentioned dll version in app.config

      <dependentAssembly>
         <assemblyIdentity name="Azure.Core" publicKeyToken="92742159e12e44c8" culture="neutral" />
         <bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
       </dependentAssembly>
    

Why the extension project is looking for 1.2.2 version dll?

1

1 Answers

0
votes

As the error says, please install Azure.Core version 1.2.2.0:

<dependentAssembly>
     <assemblyIdentity name="Azure.Core" publicKeyToken="92742159e12e44c8" culture="neutral" />
     <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
   </dependentAssembly>