GithubHelp home page GithubHelp logo

Comments (5)

programmersommer avatar programmersommer commented on June 9, 2024 1

Hi!
I have same issue. And previously it was helped to me adding new dependency:

{
  "frameworks": {
  "net46":{
    "dependencies": {
      "Microsoft.Azure.Devices": "1.4.1",
      "Microsoft.Azure.Amqp":"2.0.0.0"
      }
    }
  }
}

But now everything works without Amqp in dependencies

from azure-iot-sdk-csharp.

programmersommer avatar programmersommer commented on June 9, 2024 1

@CIPop, Seems not anymore. Thank you for fixing

from azure-iot-sdk-csharp.

olivierbloch avatar olivierbloch commented on June 9, 2024

Hi @jsturtevant
That sounds like an issue with Functions...
I have tried the below on an older instance of Functions that I had deployed some time ago and had similar issues when running, error saying that it couldn't find Microsoft.Azure.Devices.Shared.
I created a brand new Function service instance and created a new csharp function and didn't have the issue anymore.
I have used the exactly same project.json as yours.
The code in my function looks like this:

    var connectionString = "HostName=XXX.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XXX=";

    try {
        RegistryManager registryManager = RegistryManager.CreateFromConnectionString(connectionString);
        registryManager.AddDeviceAsync(new Device("new_device"));
    } catch (Exception e)
    {
        log.Info($"Exception thrown: {e.Message}");
    }

Hope this helps

from azure-iot-sdk-csharp.

jsturtevant avatar jsturtevant commented on June 9, 2024

I believe it was Functions. I re-ran my function today with no changes and it worked. Thanks for the help.

from azure-iot-sdk-csharp.

CIPop avatar CIPop commented on June 9, 2024

Thanks for adding this @programmersommer !
I thought I've fixed the nuspec dependencies for the service SDK. Is the Amqp reference required?

from azure-iot-sdk-csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.