简体   繁体   English

Azure SDK 2.2升级打破了SDK 2.0解决方案

[英]Azure SDK 2.2 Upgrade breaks SDK 2.0 solution

Platform: Windows 7 (64 bit) Visual Studio 2012 平台:Windows 7(64位)Visual Studio 2012

I recently installed azure SDK 2.2 and got my solution running with the new references. 我最近安装了azure SDK 2.2,并使我的解决方案与新参考一起运行。 However, if I use a previous version of my solution (with old references and SDK version - 2.0) I get this runtime exception: 但是,如果我使用解决方案的早期版本(带有旧参考和SDK版本-2.0),则会收到此运行时异常:

Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 无法加载文件或程序集“ Microsoft.WindowsAzure.Storage,版本= 2.0.0.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35”或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference. 找到的程序集的清单定义与程序集引用不匹配。 (Exception from HRESULT: 0x80131040) (来自HRESULT的异常:0x80131040)

I had some hints from previous upgrades and understood that you may need to override the versions grabbed by Visual Studio if they aren't supposed to be the most recent so I added the following lines to me Web.config: 我从以前的升级中获得了一些提示,并且了解到,如果不应该将Visual Studio抓取的版本视为最新版本,则可能需要覆盖它们,因此我在Web.config中添加了以下几行:

<dependentAssembly>
    <assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.WindowsAzure.Configuration" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.0.0.0" />
</dependentAssembly>

I was hoping this would direct visual studio to grab the appropriate versions but it still fails. 我希望这能指导Visual Studio抢到合适的版本,但仍然失败。

Any help would be appreciated. 任何帮助,将不胜感激。

Do you have both Azure SDK 2.0 and 2.2 installed on your machine side by side? 您的计算机上是否同时安装了Azure SDK 2.0和2.2?

  • If that is the case you would not have to add these re-directs. 如果是这种情况,则不必添加这些重定向。

  • I have a machine with both 2.0 and 2.2 installed and the references are correctly resolved depending on if you are opening the project with 2.0 or 2.2. 我有一台同时安装了2.0和2.2的计算机,并且引用是否正确解析取决于您是使用2.0还是2.2打开项目。

  • Any information about the state of the project before you opened on the machine with 2.2 在使用2.2打开计算机上之前,有关项目状态的任何信息
    installed could help us in identifying the issue. 安装后可以帮助我们确定问题。

When you refer to opening previous version of solution with 2.0 references, do you mean you upgraded the solution using the upgrade wizard to 2.2? 当您提到使用2.0参考打开解决方案的先前版本时,是否意味着您使用升级向导将解决方案升级到2.2? If this is the case, could you confirm if the upgrade was successful and you could build your project and are there any unresolved references in the solution explorer? 如果是这种情况,您可以确认升级是否成功并且可以构建项目,并且解决方案资源管理器中是否有未解决的引用?

Also, it is recommended to update the Storage and other Nuget package references using the Nuget Package Manger update console. 另外,建议使用Nuget Package Manger更新控制台更新存储和其他Nuget软件包引用。 Did you update any of these references manually? 您是否手动更新了任何这些参考?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM