Closed grtn316 closed 6 years ago
I get the same error. I event tries to add DotNetty.Codecs.Mqtt, Version=0.4.7.0 nuget my self. Running .net core 2.0.
I just pulled down and installed 1.6.0 and received the exact same error. Reverted back to 1.5.2 and everything works.
Thanks for reporting @grtn316 and for confirming @henrikstromberg and @adamkjonesmesh . This should only happen for .NET Framework and not .NET Core / Standard. Looks like there's an issue with our NuSpec for .Net 4.6. As a workaround please manually reference the DotNetty.Codecs.Mqtt version=0.4.7.0 in your application.
The fix will come in 2 steps:
dotnet pack
command.Should be fixed by #308.
I tried updating the device client and am getting this error now:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'DotNetty.Codecs.Mqtt, Version=0.4.7.0, Culture=neutral, PublicKeyToken=bc13ca065fa06c29'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Microsoft.Azure.Devices.Client.DeviceClient.CreateFromConnectionString(String connectionString, IAuthenticationMethod authenticationMethod, TransportType transportType, IDeviceClientPipelineBuilder pipelineBuilder)
Running .net core 2.0.