![]() |
VOOZH | about |
dotnet add package Azure.DigitalTwins.Core --version 1.6.0
NuGet\Install-Package Azure.DigitalTwins.Core -Version 1.6.0
<PackageReference Include="Azure.DigitalTwins.Core" Version="1.6.0" />
<PackageVersion Include="Azure.DigitalTwins.Core" Version="1.6.0" />Directory.Packages.props
<PackageReference Include="Azure.DigitalTwins.Core" />Project file
paket add Azure.DigitalTwins.Core --version 1.6.0
#r "nuget: Azure.DigitalTwins.Core, 1.6.0"
#:package Azure.DigitalTwins.Core@1.6.0
#addin nuget:?package=Azure.DigitalTwins.Core&version=1.6.0Install as a Cake Addin
#tool nuget:?package=Azure.DigitalTwins.Core&version=1.6.0Install as a Cake Tool
This library provides access to the Azure Digital Twins service for managing twins, models, relationships, etc.
The complete Microsoft Azure SDK can be downloaded from the Microsoft Azure downloads page, and it ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more.
For the best development experience, developers should use the official Microsoft NuGet packages for libraries. NuGet packages are regularly updated with new functionality and hotfixes.
Install the Azure Digital Twins client library for .NET with NuGet:
dotnet add package Azure.DigitalTwins.Core
View the package details at nuget.org.
In order to interact with the Azure Digital Twins service, you will need to create an instance of a TokenCredential class and pass it to the constructor of your DigitalTwinsClient.
Azure Digital Twins is an Azure IoT service that creates comprehensive models of the physical environment. It can create spatial intelligence graphs to model the relationships and interactions between people, spaces, and devices.
You can learn more about Azure Digital Twins by visiting Azure Digital Twins Documentation
We guarantee that all client instance methods are thread-safe and independent of each other (guideline). This ensures that the recommendation of reusing client instances is always safe, even across threads.
Client options | Accessing the response | Long-running operations | Handling failures | Diagnostics | Mocking | Client lifetime
You can familiarize yourself with different APIs using samples for Digital Twins.
The Digital Twins public client, DigitalTwinsClient, and the additional configuration options, DigitalTwinsClientOptions, that can be sent to the Digital Twins service.
The code generated by autorest using the swagger file defined in the autorest config file.
To regenerate the code, run the powershell script generate.ps1.
Any time the client library code is updated, the following scripts need to be run:
The customzied code written to override the following behavior of auto-generated code:
Model classes useful for use with the Digital Twins client operations.
Assembly properties required for running unit tests.
Serialization helpers provided to help serialize/deserialize commonly used types within the Digital Twins service.
All service operations will throw RequestFailedException on failure reported by the service, with helpful error codes and other information.
For example, use the GetModelAsync operation to check if the model exists before creating it, catch only when that specific HttpStatusCode is specified.
try
{
Response<ModelData> desiredModel = await DigitalTwinsClient.GetModelAsync(desiredModelId);
}
catch (RequestFailedException ex) when (ex.Status == (int)HttpStatusCode.NotFound)
{
// Model does not exist, so create it.
}
See implementation examples with our code samples.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Azure.DigitalTwins.Core:
| Package | Downloads |
|---|---|
|
Elastacloud.DigiTwin.SDK
Package Description |
|
|
Microsoft.DigitalWorkplace.DigitalTwins.QueryBuilder
A C# query builder for Azure Digital Twins based on Azure Digital Twins SDK. |
|
|
Kae.DomainModel.Csharp.Framework.Adaptor.ExternalStorage.AzureDigitalTwins
Domain Model C# Code Generator Library for Azure Digital Twins as External Storage |
|
|
AspNetCore.HealthChecks.AzureDigitalTwin
HealthChecks.AzureDigitalTwin is the health check package for Azure DigitalTwin. |
|
|
ScaleOut.AzureDigitalTwins.PersistenceProvider
This package contains all necessary components to connect ScaleOut StreamServer™ to Microsoft Azure Digital Twins service, interact with it and use it as a persistence storage. |
Showing the top 5 popular GitHub repositories that depend on Azure.DigitalTwins.Core:
| Repository | Stars |
|---|---|
|
Xabaril/AspNetCore.Diagnostics.HealthChecks
Enterprise HealthChecks for ASP.NET Core Diagnostics Package
|
|
|
digitaltwinconsortium/ManufacturingOntologies
A reference solution for leveraging manufacturing ontologies.
|
|
|
Azure-Samples/streaming-at-scale
How to implement a streaming at scale solution in Azure
|
|
|
Azure-Samples/digital-twins-samples
Azure Digital Twins building scenario sample code
|
|
|
Azure-Samples/azure-digital-twins-unreal-integration
Sample project demonstrating the Unreal Engine plug-in for Azure Digital Twins
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.0 | 477,199 | 6/4/2025 |
| 1.4.0 | 1,091,236 | 7/9/2022 |
| 1.4.0-beta.1 | 3,696 | 3/25/2022 |
| 1.3.0-beta.2 | 2,642 | 8/6/2021 |
| 1.3.0-beta.1 | 427 | 8/4/2021 |
| 1.2.2 | 351,946 | 4/12/2021 |
| 1.2.1 | 13,097 | 2/4/2021 |
| 1.2.0 | 102,431 | 11/16/2020 |
| 1.0.1 | 3,081 | 11/5/2020 |
| 1.0.0 | 3,817 | 10/30/2020 |
| 1.0.0-preview.3 | 32,417 | 7/13/2020 |
| 1.0.0-preview.2 | 7,715 | 6/8/2020 |