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 -
Added the dlls as references
Added the dllls in the RefAssemblies folder
Marked Copy Always and Include in VSIX as true.
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
?
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>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.