[英]How to resolve reference for Azure.Core.dll in VSIX -Visual Studio Extension project?
我有一段代碼將文件上傳到 Azure 存儲。 為此,我必須在參考中添加Azure.Core
dll 和相關程序集。 此代碼在獨立的 WPF 應用程序中運行良好。 在 Visual Studio 擴展項目中,它拋出了這個錯誤——
無法加載文件或程序集“Azure.Core,Version=1.2.2.0,Culture=neutral,PublicKeyToken=92742159e12e44c8”或其依賴項之一。 該系統找不到指定的文件。
我的代碼引用的是 1.3 版本。
我遵循的步驟是 -
添加了 dll 作為參考
在 RefAssemblies 文件夾中添加了 dll
將“始終復制”和“包含在 VSIX 中”標記為 true。
app.config
中提到了 dll 版本
<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>
為什么擴展項目正在尋找 1.2.2 版本dll
?
如錯誤所示,請安裝Azure.Core
版本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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.