1

I am trying to run some integration test on visual studio that test sending data to IoT Hub. When trying to send data using the DeviceClient.SendEventAsync() method, the application crashes with the following exception:

{"Could not load file or assembly 'Validation, Version=2.2.0.0, Culture=neutral, PublicKeyToken=2fc06f0d701809a7' or one of its dependencies.

The system cannot find the file specified.":"Validation, Version=2.2.0.0, Culture=neutral, PublicKeyToken=2fc06f0d701809a7"}

I have also noticed the following in the app.config file:

<?xml version="1.0" encoding="utf-8"?>

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Validation" publicKeyToken="2fc06f0d701809a7" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

I am using version 10.0.20 of the C# SDK My project is targeting .NET 4.5.1 The Validation package installed is version 2.2.8

Can anyone provide some pointers about what is going wrong in the use of the SDK?

Community
  • 1
  • 1
Luis Delgado
  • 3,644
  • 4
  • 34
  • 54
  • if you find this not an issue any more, please consider close this case. https://github.com/Azure/azure-iot-sdks/issues/851 – Jackie Oct 07 '16 at 00:21

1 Answers1

0

Make sure you copy any Nuget.exe to .Nuget folder of github downloaded working folder. As it does not have nuget.exe, restore of solution was not working. Once you copy Nuget.exe and restore the solution (via menu in VS 2015).... you will be relieved from all pain of MS :)

HydTechie
  • 797
  • 10
  • 17