botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Packages compatibility issues between Microsoft.Bot.Connector and Microsoft.Azure.Management.ResourceManager

Open ejadib opened this issue 10 years ago • 3 comments

Hi,

I'm trying to use the Microsoft.Azure.Management.ResourceManager package on my bot and it's failing because the one of the dependencies of the ResourceManager packages requires the Microsoft.Rest.ClientRuntime package to be of version 2.1.0 or higher.

The issue is that the Microsoft.Bot.Connector package constrains that same package (Microsoft.Rest.ClientRuntime) to be between versions 1.8.2 && 2.0.0.

Is there a plan to update the Microsoft.Bot.Connector dependencies to the latest versions?

Thanks. Ez.

ejadib avatar May 02 '16 14:05 ejadib

Hi @dandriscoll, any idea on this?

ejadib avatar May 04 '16 12:05 ejadib

Hi @ejadib, unfortunately we don't have plans to update to the new version of ClientRuntime at the moment. Microsoft.Rest.ClientRuntime has breaking changes between version 1 and version 2, and we are currently using features in version 1. That said, it would be nice to upgrade, but I can't promise a timeline at this point.

dandriscoll avatar May 09 '16 17:05 dandriscoll

My 2 cents: I did a little spike to workaround this issue leveraging ILMerge to include the required Microsoft.Rest.Client.Runtime clases inside the Bot.Connector assembly, thus, removing the offending dependency. The downside here is that then I was required to recompile the Bot.Builder project using the new assembly. This last recompile step could be avoided if this is done on the Bot.Connector build process since it should be re-signed after merge (ILMerge does it provided the .snk file)

I've used the following command line to merge both assemblies:

ILMerge.exe Microsoft.Bot.Connector.dll Microsoft.Rest.ClientRuntime.dll 
/out:Microsoft.Bot.Connector.Merged.dll
/lib:<path to Newtonsoft.Json.dll>
/lib:<path to System.Net.Http.Formatting.dll>
/lib:<path to System.Web.Http.dll>
/internalize:excludes.txt

Notice the /internalize switch which makes all classes internal avoiding conflicts with the new version of the package. However, Bot.Builder uses two public classes added to the excludes.txt file:

Microsoft.Rest.ValidationException
Microsoft.Rest.ValidationRules

Hope this helps!

JuanAr avatar May 17 '16 14:05 JuanAr