diff --git a/.github_changelog_generator b/.github_changelog_generator
new file mode 100644
index 0000000..e28a517
--- /dev/null
+++ b/.github_changelog_generator
@@ -0,0 +1,13 @@
+user=nanoframework
+project=nanoFramework.Azure.Devices
+issues=true
+add_issues_wo_labels=false
+add_pr_wo_labels=false
+add_issues_wo_labels=false
+filter_issues_by_milestone=false
+exclude_labels=Area: Config-and-Build,Area: Infrastructure-and-Organization,reverted
+enhancement_labels=Type: enhancement
+bug_labels=Type: bug
+merge_prefix=**Documentation and other chores:**
+unreleased_label=**Changes available only in 'Preview' NuGet packages:**
+author=false
diff --git a/Azure.Devices.DeviceClient/Azure.Devices.DeviceClient.nfproj b/Azure.Devices.DeviceClient/Azure.Devices.DeviceClient.nfproj
index 6a1af5f..9c35ee1 100644
--- a/Azure.Devices.DeviceClient/Azure.Devices.DeviceClient.nfproj
+++ b/Azure.Devices.DeviceClient/Azure.Devices.DeviceClient.nfproj
@@ -12,10 +12,19 @@
Library
Properties
512
- AzureMqttSDK
- AzureMqttSDK
+ nanoFramework.Azure.Devices.Client
+ nanoFramework.Azure.Devices.Client
v1.0
+
+ true
+
+
+ key.snk
+
+
+ false
+
diff --git a/Azure.Devices.DeviceClient/key.snk b/Azure.Devices.DeviceClient/key.snk
new file mode 100644
index 0000000..67c9bb0
Binary files /dev/null and b/Azure.Devices.DeviceClient/key.snk differ
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..7feff0a
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,3 @@
+# Contributor Code of Conduct
+
+Please refer to the contributor Code of Conduct at the Home repository [here](https://github.com/nanoframework/Home/blob/master/CODE_OF_CONDUCT.md.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..5a6a6c1
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,3 @@
+# Contributing to **nanoFramework**
+
+Please refer to the contribution guidelines at the Home repository [here](https://github.com/nanoframework/Home/blob/master/CONTRIBUTING.md).
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..94286c9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) .NET Foundation and Contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/NuGet.Config b/NuGet.Config
new file mode 100644
index 0000000..ef0bacf
--- /dev/null
+++ b/NuGet.Config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..3d3e747
--- /dev/null
+++ b/README.md
@@ -0,0 +1,41 @@
+[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_Azure.Devices&metric=alert_status)](https://sonarcloud.io/dashboard?id=nanoframework_Azure.Devices) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_Azure.Devices&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=nanoframework_Azure.Devices) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![NuGet](https://img.shields.io/nuget/dt/nanoFramework.Azure.Devices.Client.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Azure.Devices.Client/) [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/master/CONTRIBUTING.md) [![Discord](https://img.shields.io/discord/478725473862549535.svg?logo=discord&logoColor=white&label=Discord&color=7289DA)](https://discord.gg/gCyBu8T)
+
+![nanoFramework logo](https://github.com/nanoframework/Home/blob/master/resources/logo/nanoFramework-repo-logo.png)
+
+-----
+
+# Welcome to the **nanoFramework** Azure.Devices.Client Library repository!
+
+## Build status
+
+| Component | Build Status | NuGet Package |
+|:-|---|---|
+| nanoFramework.Azure.Devices.Client | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.Azure.Devices.Client/_apis/build/status/nanoframework.Azure.Devices.Client?branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.Azure.Devices.Client/_build/latest?definitionId=7?branchName=master) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.Azure.Devices.Client.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Azure.Devices.Client/) |
+| nanoFramework.Azure.Devices.Client (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.Azure.Devices.Client/_apis/build/status/nanoframework.Azure.Devices.Client?branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.Azure.Devices.Client/_build/latest?definitionId=7?branchName=develop) | [![](https://badgen.net/badge/NuGet/preview/D7B023?icon=https://simpleicons.now.sh/azuredevops/fff)](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&package=nanoFramework.Azure.Devices.Client&protocolType=NuGet&view=overview) |
+
+## Usage
+
+TODO
+
+## Feedback and documentation
+
+For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
+
+Join our Discord community [here](https://discord.gg/gCyBu8T).
+
+## Credits
+
+The list of contributors to this project can be found at [CONTRIBUTORS](https://github.com/nanoframework/Home/blob/master/CONTRIBUTORS.md).
+
+## License
+
+The **nanoFramework** Class Libraries are licensed under the [MIT license](LICENSE.md).
+
+## Code of Conduct
+
+This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
+For more information see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
+
+### .NET Foundation
+
+This project is supported by the [.NET Foundation](https://dotnetfoundation.org).
diff --git a/assets/nf-logo.png b/assets/nf-logo.png
new file mode 100644
index 0000000..6f576ca
Binary files /dev/null and b/assets/nf-logo.png differ
diff --git a/assets/readme.txt b/assets/readme.txt
new file mode 100644
index 0000000..fae61c7
--- /dev/null
+++ b/assets/readme.txt
@@ -0,0 +1,21 @@
+ _____ _
+ _ __ __ _ _ __ ___ | ___| __ __ _ _ __ ___ _____ _____ _ __| | __
+ | '_ \ / _` | '_ \ / _ \| |_ | '__/ _` | '_ ` _ \ / _ \ \ /\ / / _ \| '__| |/ /
+ | | | | (_| | | | | (_) | _|| | | (_| | | | | | | __/\ V V / (_) | | | <
+ |_| |_|\__,_|_| |_|\___/|_| |_| \__,_|_| |_| |_|\___| \_/\_/ \___/|_| |_|\_\
+
+===================================================================================
+
+API docs: https://docs.nanoframework.net/api
+
+Browse our samples repository: https://github.com/nanoframework/samples
+
+Check our documentation online: https://docs.nanoframework.net
+
+Join our lively Discord community: https://discord.gg/gCyBu8T
+
+Report issues: https://github.com/nanoframework/Home/issues
+
+Follow us on Twitter: https://twitter.com/nanoframework
+
+Follow our YouTube channel: https://www.youtube.com/c/nanoFramework
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 0000000..10d16cf
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,44 @@
+trigger:
+ branches:
+ include: [main, develop, "release-*" ]
+ paths:
+ exclude: ["*.md", .gitignore]
+ tags:
+ include: ["v*"]
+
+# PR always trigger build
+
+# add nf-tools repo to resources (for Azure Pipelines templates)
+resources:
+ repositories:
+ - repository: templates
+ type: github
+ name: nanoframework/nf-tools
+ endpoint: nanoframework
+
+pool:
+ vmImage: 'VS2017-Win2016'
+
+variables:
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
+ solution: '**/*.sln'
+ buildPlatform: 'Any CPU'
+ buildConfiguration: 'Release'
+ nugetPackageName: 'nanoFramework.Azure.Devices.Client'
+ repoName: 'nanoFramework.Azure.Devices'
+
+steps:
+
+# step from template @ nf-tools repo
+# all build, update and publish steps
+- template: azure-pipelines-templates/class-lib-build.yml@templates
+ parameters:
+ sonarCloudProject: 'nanoFramework.Azure.Devices'
+
+# step from template @ nf-tools repo
+# report error
+- template: azure-pipelines-templates/discord-webhook-task.yml@templates
+ parameters:
+ status: 'failure'
+ webhookUrl: '$(DiscordWebhook)'
+ message: ''
diff --git a/nanoFramework.Azure.Devices.Client.nuspec b/nanoFramework.Azure.Devices.Client.nuspec
new file mode 100644
index 0000000..aede47a
--- /dev/null
+++ b/nanoFramework.Azure.Devices.Client.nuspec
@@ -0,0 +1,35 @@
+
+
+
+ nanoFramework.Azure.Devices.Client
+ $version$
+ nanoFramework.Azure.Devices.Client
+ nanoFramework project contributors
+ nanoFramework project contributors
+ false
+ MIT
+
+
+ false
+ https://github.com/nanoframework/lib-nanoFramework.Azure.Devices.Client
+ https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad
+
+ Copyright (c) .NET Foundation and Contributors
+ This package includes the nanoFramework.Azure.Devices.Client assembly for nanoFramework C# projects.
+This is an SDK for Azure IoT Hub using MQTT boker.
+ nanoFramework.Azure.Devices.Client assembly for nanoFramework C# projects
+ nanoFramework C# csharp netmf netnf Microsoft.Azure.Devices nanoFramework.Azure.Devices
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sample/AzureIoTExample.nfproj b/sample/AzureIoTExample.nfproj
index e0e2302..8848af8 100644
--- a/sample/AzureIoTExample.nfproj
+++ b/sample/AzureIoTExample.nfproj
@@ -25,9 +25,6 @@
-
-
-
..\packages\nanoFramework.Iot.Device.Bmxx80.1.0.118\lib\Iot.Device.Bmxx80.dll
@@ -155,6 +152,9 @@
True
+
+
+
diff --git a/sample/Program.cs b/sample/Program.cs
index 38df507..8e4f408 100644
--- a/sample/Program.cs
+++ b/sample/Program.cs
@@ -3,10 +3,6 @@
// See LICENSE file in the project root for full license information.
//
-///
-/// NOTE: this demo uses the information outlined in https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support
-///
-
using nanoFramework.Azure.Devices.Client;
using nanoFramework.Azure.Devices.Shared;
using nanoFramework.Networking;
@@ -78,8 +74,8 @@ try
catch (Exception ex)
{
// We won't do anything
- // This global try catch is to make sure whatever happen, we will safely be able to go
- // To sleep
+ // This global try catch is to make sure whatever happen, we will safely be able to
+ // reboot or do anything else.
Debug.WriteLine(ex.ToString());
}
diff --git a/version.json b/version.json
new file mode 100644
index 0000000..4e3f81d
--- /dev/null
+++ b/version.json
@@ -0,0 +1,25 @@
+{
+ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
+ "version": "1.0.0-preview.{height}",
+ "assemblyVersion": {
+ "precision": "revision"
+ },
+ "semVer1NumericIdentifierPadding": 3,
+ "nuGetPackageVersion": {
+ "semVer": 2.0
+ },
+ "publicReleaseRefSpec": [
+ "^refs/heads/develop$",
+ "^refs/heads/main$",
+ "^refs/heads/v\\d+(?:\\.\\d+)?$"
+ ],
+ "cloudBuild": {
+ "setAllVariables": true,
+ "buildNumber": null
+ },
+ "release": {
+ "branchName": "release-v{version}",
+ "versionIncrement": "build",
+ "firstUnstableTag": "preview"
+ }
+}