Ambiguous CloudStorageAccount in aspnetcore when used with bot framework

旧城冷巷雨未停 提交于 2019-12-30 14:20:05

问题


I have just upgraded bot framework project which is based on SDK v4 and built using aspnet core and now I end up getting conflict for CloudStorageAccount class. It says

The type 'CloudStorageAccount' exists in both 'Microsoft.Azure.Storage.Common, Version=9.4.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'Microsoft.WindowsAzure.Storage, Version=8.1.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

Anyone also faced the same issue? Please note that I have already tried to use an alias for the namespace but it still does not work and we have no clue why.

The closest match w.r.t this issue we found was on this thread and sounds similar issue there too. (comment by Jerome) but remains unanswered.

Sharing the version of each nuget I have installed in the project

Please suggest if anyone has faced it or has any suggestion.


回答1:


There is a github thread about this issue here

To recap, issue was caused by conflicts in the AspNetCore references. The issue was resolved by going into the .csproj file and removing the references to WindowsAzure.Storage.

<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />

Additionally, there will be a PR soonish that will address this dependency.



来源:https://stackoverflow.com/questions/55100241/ambiguous-cloudstorageaccount-in-aspnetcore-when-used-with-bot-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!