Code Monkey home page Code Monkey logo

azure-iot-protocol-gateway's Introduction

Microsoft Azure IoT Protocol Gateway

Azure IoT protocol gateway is a framework for protocol adaptation that enables bi-directional communication with Azure IoT Hub. It is a pass-through component that bridges traffic between connected IoT devices and IoT Hub. The protocol gateway can be deployed in Azure using Cloud Services worker roles. It can also be deployed in on-premises environments.

The Azure IoT protocol gateway provides a programming model for building custom protocol adapters for variety of protocols. It includes an MQTT protocol adapter to demonstrate the concepts and to enable customizations of the MQTT v3.1.1 protocol. Please note that IoT Hub natively supports the MQTT v3.1.1 protocol and the MQTT protocol adapter should be considered only if specific customizations are required. The protocol gateway programming model also allows you to plug in custom components for specialized processing such as custom authentication, message transformations, compression/decompression, or encryption/decryption of traffic between the devices and IoT Hub.

This document describes how to get started using the Azure IoT protocol gateway including general overview, deployment, and setup instructions.

For guidance on customizations and extensibility of the protocol gateway, please refer to the Azure IoT Protocol Gateway - Developer Guide.

How to Build and Run

Prerequisites

The protocol gateway requires an Azure IoT hub to connect to and an Azure Storage account used for persisting state. You can also use the Azure Storage Emulator for the console or cloud hosts running locally.

To build the protocol gateway you need Microsoft Visual Studio 2013 (or later) and Microsoft Azure SDK 2.6 installed on your development machine. For deployment of the protocol gateway you need Microsoft Azure PowerShell installed.

Running the Console Host

The Azure IoT protocol gateway repository contains reference implementations of hosts in the ‘/host’ folder. The console app in this folder hosts a protocol gateway that connects to IoT Hub and starts listening for devices to connect (Note: by default the gateway listens on port 8883 for MQTTS and uses port 5671 for AMQPS traffic). In order to run the console sample please follow these steps:

  1. Provide the IoT hub connection string in the IotHubClient.ConnectionString setting in the app settings configuration file host\ProtocolGateway.Host.Console\appSettings.config.user. You can use the connection string for the device policy in the Shared access policies settings of IoT Hub.
  2. Run build.cmd or build the solution from Visual Studio. Both the build.cmd and the solution file are in the root folder of the repository
  3. Start the Microsoft Azure Storage Emulator
  4. As administrator, run the compiled binary (host\ProtocolGateway.Host.Console[Debug or Release]\Gateway.Host.Console.exe) If you run this from Visual Studio, then Visual Studio needs to be run as administrator. Note: If the required network ports are not enabled for communication with IoT Hub, you might be prompted to open the firewall ports.

Running an End-to-End Test

There is also an end-to-end test which exercises the following:

  • the test creates an instance of the protocol gateway or alternatively, it can use an existing one
  • the test simulates a device that connects to the protocol gateway (which is connected to an IoT hub)
  • an app backend is simulated by using an Event Hub receiver to read messages from IoT Hub, and an IoT Hub service client to send messages to the device
  • the device sends two messages to IoT Hub (one with QoS 0 and one with QoS 1) and those are received by the app backend (through the Event Hub receiver) and verified
  • the app backend sends 3 messages (with QoS 0, 1, and 2) to the device and those are verified by device when received

Please follow these steps in order to run the end-to-end test for the protocol gateway:

  1. Update the test configuration file (test\ProtocolGateway.Tests\appSettings.config.user) by providing the following settings:
    • IotHubClient.ConnectionString - connection string for your IoT hub that will be used for the test. For this test specifically you need to provide the connection string for the device policy in the Shared access policies settings of the IoT hub. Note: It is recommended to use an IoT hub instance specifically created for the tests. The test will register a device in the IoT hub and will use it for to exchange messages between the device and the simulated app back end.
    • End2End.DeviceName - identity of the device that will be used during the test. If the device name is not specified, a new device will be created for the test.
    • If you want to run the test against an already running protocol gateway, uncomment the End2End.ServerAddress setting in the test configuration file and provide the IP-address of the protocol gateway you want to use. Otherwise, the test will start a new in-process protocol gateway. If you want to connect to a running protocol gateway on the same machine you can use 127.0.0.1 as the IP address. (Note: by default, the gateway listens on port 8883 for MQTTS and uses port 5671 for AMQPS traffic).
  2. In Visual Studio, run the unit test EndToEndTests.BasicFunctionalityTest in the ProtocolGateway.Tests project. This test is expected to pass if the setup has been successful.

Deploying a Cloud Services Host

Please follow these steps to deploy the Cloud Services host in Azure Cloud Services worker roles:

  1. Open the solution in Visual Studio.
  2. Right-click on host/ProtocolGateway.Host.Cloud project and choose Package.
  3. Open command line and set current directory to <repo root>\host.
  4. Execute the following command: PowerShell -File deploy.ps1 <cloud service name> <storage account name> <location> <tls cert path> <tls cert password> <IoT Hub connection string> [-SubscriptionName <subscription name>] [-VmCount <VM count>]
    • <IoT Hub connection string> can contain any credentials as the default Device Identity Provider (SasTokenDeviceIdentityProvider) will override them with the ones provided by the device upon connection.
    • Please note that based on your local configuration you might need to change the PowerShell execution policy if you are receiving an execution error.
  5. You will be prompted to sign-in to your Azure account. Your account will be used for the deployment session.
  6. Wait for the script execution to complete.
  7. To verify the successful deployment, perform an end-to-end test as described in Running an End-to-End Test. Please note that you need to supply the public IP address of the Cloud Service in the End2End.ServerAddress setting.

Deploying a Service Fabric Host

The Service Fabric host runs the protocol gateway in a Service Fabric Cluster using standard logging and configuration techniques for that style of deployment. The following deployment is perfomed on a local Service Fabric cluster but may be adjusted to deploy to production / remote clusters.

  1. Update the IoT Hub client configuration file (ProtocolGateway.Host.Fabric.FrontEnd\PackageRoot\Config\FrontEnd.IoTHubClient.json) by providing the following settings:
    • ConnectionString - connection string for your IoT hub that will be used for the test. For this test specifically you need to provide the connection string for the device policy in the Shared access policies settings of the IoT hub. Note: It is recommended to use an IoT Hub instance specifically created for the tests. The test will register a device in the IoT hub and will use it to exchange messages between the device and the simulated app back end.
  2. Update the Azure Storage configuration file (ProtocolGateway.Host.Fabric.FrontEnd\PackageRoot\Config\FrontEnd.AzureState.json) by providing the following settings:
  • BlobConnectionString - connection string for your Azure Storage that will be used for persisting the BLOB based MQTT session state. Note: The storage emulator can be used for local development cluster deployment.
  • TableConnectionString - connection string for your Azure Storage that will be used for persisting the Table based MQTT session state. Note: The storage emulator can be used for local development cluster deployment.
  1. Open the solution in Visual Studio.
  2. Right-click on host/ProtocolGateway.Host.Fabric project and choose Package.
  3. Open PowerShell and set current directory to <repo root>\host\ProtocolGateway.Host.Fabric\Scripts.
  4. Execute the following commands

Import-Module "$ModuleFolderPath\ServiceFabricSdk.psm1" Connect-ServiceFabricCluster -ConnectEndpoint 'localhost:19000' Test-ServiceFabricClusterConnection ./Deploy-FabricApplication.ps1 -ApplicationPackagePath '..\pkg\Release' -UseExistingClusterConnection


  1. You can see the deployed service through the Service Fabric Local Cluster Manager.

Diagnostics and Monitoring

Logging

The protocol gateway uses EventSource and Semantic Logging Application Block for logging (see https://msdn.microsoft.com/en-us/library/dn440729(v=pandp.60).aspx for details). By default, diagnostic events of all levels (including verbose) are logged to the console output in the Console host and to SLABLogsTable Azure Storage Table in the Cloud hosts.

In addition, the Cloud sample is also configured to collect Windows Event Log events and crash dumps. Please see https://msdn.microsoft.com/en-us/library/azure/dn186185.aspx for details on configuring Windows Azure Diagnostics.

Performance Counters

The protocol gateway emits the following performance counters under the “Azure IoT protocol gateway” performance counter category:

  • Connections Established Total – established connection count since last protocol gateway startup
  • Connections Current – current connection count
  • Connections Established/sec – rate of establishing new connections
  • Failed Connections (due to Auth Issues)/sec – rate of connection authentication failures
  • Failed Connections (due to Operational Errors)/sec – rate of connection failures due to other errors
  • MQTT Packets Received/sec – rate of MQTT packet arrival (from devices)
  • MQTT Packets Sent/sec – rate at which the protocol gateway sends out MQTT packets (to devices)
  • MQTT PUBLISH packets Received/sec – rate of MQTT PUBLISH packet arrival (from devices)
  • MQTT PUBLISH packets Sent/sec – rate at which the protocol gateway sends out MQTT PUBLISH packets (to devices)
  • Messages Received/sec – rate at which the protocol gateway receives messages from IoT hub (intended for forwarding to devices)
  • Messages Sent/sec – rate at which the protocol gateway is sending messages to IoT hub
  • Messages Rejected/sec – rate at which protocol gateway is rejecting messages received from IoT hub (e.g. because of topic name generation errors, no subscription match, or reaching max allowed retransmission count)
  • Outbound Message Processing Time, msec – average time to process outbound messages (from the time a message was received to the time the message was forwarded to a device or acknowledgement was completed (for messages with QoS > 0))
  • Inbound Message Processing Time, msec – average time to process inbound messages (from the time a message was received from a device to the time it was sent (and acknowledgement was completed for QoS > 0).

For the Cloud sample, Windows Azure Diagnostics is configured to collect protocol gateway as well as the default (processor and memory) performance counters. See https://msdn.microsoft.com/en-us/library/azure/dn535595.aspx for details.

Configuration Settings

The protocol gateway provides a number of configuration settings to help fine tune its behavior. Note that the default configuration provides a good starting point. Usually there is no need to adjust it, unless a specific behavior (like retransmission) is required. The Console sample derives the configuration settings from the appSettings.config.user file, while the Cloud sample derives them from the cloud service configuration.

  • ConnectArrivalTimeout. If specified, the time period after which an established TCP-connection will get closed, if a CONNECT packet has not been received. If not specified or is less than or equal to 00:00:00, no timeout will be imposed on a CONNECT packet arrival. Default value: not set
  • MaxKeepAliveTimeout. If specified, and a device connects with KeepAlive=0 or a value that is higher than MaxKeepAliveTimeout, the connections keep alive timeout will be set to MaxKeepAliveTimeout. If not specified or is less than or equal to 0, the KeepAlive value provided by the device will be used. Default value: not set
  • RetainProperty. Protocol gateway will set a property named RetainProperty and a value of “True” on a message sent to IoT hub if the PUBLISH packet was marked with RETAIN=1. Default value: mqtt-retain
  • DupProperty. Protocol gateway will set a property named DupProperty and a value of “True” on a message sent to IoT hub if the PUBLISH packet was marked with DUP=1. Default value: mqtt-dup
  • QoSProperty. Indicates the name of the property on cloud-to-device messages that might be used to override the default QoS level for the device-bound message processing. For device to cloud messages, this is the name of the property that indicates the QoS level of a message when received from the device. Default value: mqtt-qos
  • MaxInboundMessageSize. REQUIRED Maximum message size allowed for publishing from a device to the gateway. If a device publishes a bigger message, the protocol gateway will close the connection. The max supported value is 262144 (256 KB). Default value: 262144
  • MaxPendingInboundAcknowledgements. Maximum allowed number of ACK messages pending processing. Protocol gateway will stop reading data from the device connection once it reaches MaxPendingInboundAcknowledgements and will restart only after the number of pending acknowledgements becomes lower than MaxPendingInboundAcknowledgements. Default value: 16
  • IotHubClient.ConnectionString. REQUIRED Connection string to IoT hub. Defines the connection parameters when connecting to IoT hub on behalf of devices. By default, the protocol gateway will override the credentials from the connection string with the device credentials provided when a device connects to the gateway. No default value.
  • IotHubClient.DefaultPublishToClientQoS. Default Quality of Service to be used when publishing a message to a device. Can be overridden by adding a property on the message in IoT hub with the name defined by the QoSProperty setting and the value of the desired QoS level. Supported values are: 0, 1, 2. Default value: 1 (at least once)
  • IotHubClient.MaxPendingInboundMessages. Maximum allowed number of received messages pending processing. Protocol gateway will stop reading data from the device connection once it reaches MaxPendingInboundMessages and will restart only after the number of pending messages becomes lower than MaxPendingInboundMessages. Default value: 16
  • IotHubClient.MaxPendingOutboundMessages. Maximum allowed number of published device-bound messages pending acknowledgement. Protocol gateway will stop receiving messages from IoT hub once it reaches MaxPendingOutboundMessages and will restart only after the number of messages pending acknowledgement becomes lower than MaxPendingOutboundMessages. The number of messages is calculated as a sum of all unacknowledged messages: PUBLISH (QoS 1) pending PUBACK, PUBLISH (QoS 2) pending PUBREC, and PUBREL pending PUBCOMP. Default value: 1
  • IotHubClient.MaxOutboundRetransmissionCount. If specified, maximum number of attempts to deliver a device-bound message. Messages that reach the limit of allowed delivery attempts will be rejected. If not specified or is less than or equal to 0, no maximum number of delivery attempts is imposed. Default value: -1
  • BlobSessionStatePersistenceProvider.StorageConnectionString. Azure Storage connection string to be used by the BlobSessionStatePersistenceProvider to store MQTT session state data. Default value for Console sample and Cloud sample's Local configuration: UseDevelopmentStorage=true. For Cloud deployment the default value is a connection string to the specified storage account.
  • BlobSessionStatePersistenceProvider.StorageContainerName. Azure Storage Blob Container Name to be used by the BlobSessionStatePersistenceProvider to store MQTT session state data. Default value: mqtt-sessions
  • TableQos2StatePersistenceProvider.StorageConnectionString. Azure Storage connection string to be used by TableQos2StatePersistenceProvider to store QoS 2 delivery information. Default value for Console sample and Cloud sample's Local configuration: UseDevelopmentStorage=true. For Cloud deployment the default value is a connection string to specified storage account.
  • TableQos2StatePersistenceProvider.StorageTableName. Azure Storage Table name to be used by the TableQos2StatePersistenceProvider to store QoS 2 delivery information. Default value: mqttqos2

azure-iot-protocol-gateway's People

Contributors

ailn avatar alextolp avatar ancaantochi avatar arunkaithayil avatar avinashchandru avatar berkozdilek avatar isyama avatar jeanpaulsmit avatar jschaffe avatar kddot avatar krish-gh avatar mastermanu avatar microsoft-github-policy-service[bot] avatar mtuchkov avatar nadeshpa avatar nayato avatar nberdy avatar rafilho avatar reynholds avatar ssankar1984 avatar varunpuranik avatar ytechie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-iot-protocol-gateway's Issues

In Cloud to device scenario , Message having issues with topic name shuts down the channel

In case of Cloud of device scenario if there is an issue with the Topic routing and an exception occurs (Invalid operation exception when an error occurs in template.Bind(context) call) , the message does not get rejected instead the Server closes the channel but does not remove the message from the IOT hub which would mean if the client reconnects , the protocol gateway will try to deliver again and again close the channel. is this an expected behavior ?

Can not create table 'mqttqos2' in Azure Storage Account

I deployed the service via the guide in README.md.
When I executed the following cmdlet, it completed successfully, but I can not find the table mqttqos2 and SLABLogsTable in the Azure Storage Account created by this cmdlet.

PowerShell -File deploy.ps1 <cloud service name> <storage account name> <location> <tls cert path> <tls cert password> <IoT Hub connection string> [-SubscriptionName <subscription name>] [-VmCount <VM count>]

I have helped by the video from Fai Lai : https://channel9.msdn.com/Events/Ignite/Australia-2015/MOB313
In this video at 00:59:00, it shows the tables.
mqttos2

My question is why i can not find the table after deployed the service and how to create the two tables?

Protocol gateway throwing Socket errors and TLS handshake failures subsequently even before a Device Connect.

While running the Protocol gateway in the simultar on TLS , we have noticed that as soon as the channel is active, the ExceptionCaught method gets called having exception set to {"An existing connection was forcibly closed by the remote host"} with exception trace stack trace pointing at below :

at DotNetty.Transport.Channels.Sockets.SocketChannelAsyncOperation.Validate() at DotNetty.Transport.Channels.Sockets.AbstractSocketByteChannel.SocketByteChannelUnsafe.FinishRead(SocketChannelAsyncOperation operation)

The ExceptionCaught implementation then calls the ShutDownOnError in Protocol gateway which in turns calls the self shutdown (The current state flag value is "Waiting for connect"). This continues to happen in cycle and keeps logging tons of errors in the logs along with TLS handshake warning due to the "UserEventTriggered" getting triggered with failed status.

This all happens even before device could connect. In a normal device connect session ,this does not happen in this fashion as it quickly moves the state to processing connect and then connected.

We are currently running a version of Protocol gateway dated (2nd of June) which does not have the latest bits also pointing to its respective dotnetty.

Azure deployment not uploading

Hi,
I'm having issues with trying to deploy the gateway to Azure using the instructions provided to the letter.

I have sucessfully got the power-shell script to run (without any errors) and it appears to be fine. However, when I go to the Azure Portal and look at the newly created Cloud Service, there is nothing running or even uploaded in both Staging or Production.

Would you be able to hopefully help me out with some advice as to what I may be doing wrong, or what you'd like me to send through to help?

Thanks in advance.

Support Multiple Outbound MQTT Topic Mappings

Add support for multiple outbound MQTT topic mappings. This could be supported using either a unique set of placeholders per mapping. e.g.

<template "/{region}/VIN/{vin}/{messageType}" /> <template "/{region}/VIN/{esn}/{messageType}" />

Or through the use of a specific ID property on the template

<templates id-property="MyIdProperty"> <template id="vin-command" map="{region}/VIN/{vin}/{messageType}" /> <template id="esn-command" map="{region}/VIN/{esn}/{messageType}" /> </templates>

QoS 2 table persistence provider: stored entries are not scoped by device ID

Below is the mechanism used by the Protocol Gateway for generating the Packet ID in the Cloud-to-Device scenario
int packetId = unchecked((ushort) {SequenceNumberOfMessage});
int generatedPacketID = packetId |= 0x8000; // set 15th bit
The current Packet id generation logic uses Sequence number property of IoT Hub message which is a number assigned by IoT Hub to each cloud to device message and is unique per device queue. Along with that it uses bitwise operators to differentiate in the packet id generation at different QoS levels. Since the packet identifier is used as the row key for the QoS 2 persistence storage along with hash of it as the partition key, it will ensure uniqueness for packets from a device but not across multiple devices.

Would it make sense to change the logic of Packet Id generation to include Client Id in it for all the cloud to device messages ?. In the same way in order to avoid conflicts between packet id generated for Cloud to device messages and Device-to-Cloud messages, we can use the combination of Device Id and packet Identifier(Since in our case Client id and Device id are different ) while persisting the state of Device-to-Cloud messages. Please suggest.

Protocol gateway does not return appropriate Connack return code as per MQTT Spec.

The Protocol Gateway currently returns RefusedServerUnavailable(0x03) for any exception that we get while Connect. (0x02, 0x04 and 0x05 are not used).As per the MQTT 3.1 / 3.1.1 Spec there should be specific error codes for each kind of failure that we receive.

Protocol gateway currently closes the connection with an error "In correct protocol name or version " instead of returning RefusedUnacceptableProtocolVersion as part of Connack.

Upgrading to latest version of dependencies.

There are several updates available for various dependencies in the IoT Protocol Gateway. I've researched the latest and am wondering timing of upgrading the dependencies in the project.

Dependencies Microsoft.Azure.Devices Microsoft.Azure.Devices.Client Microsoft.Azure.Devices.Shared Microsoft.ServiceFabric Microsoft.ServiceFabric.Services WindowsAzure.Storage DotNetty
Latests Version 1.4.1 1.5.2 1.3.0 6.0.232 2.8.232 8.7.0 0.4.7
Date 2 months ago 2 months ago 17 days ago a month ago a month ago 7 days ago a month ago
none       x      
Newtonsoft.Json (>= 6.0.8)     x     x  
DotNetty.Codecs.Mqtt (>= 0.4.6)   x          
DotNetty.Handlers (>= 0.4.6)   x          
EnterpriseLibrary.TransientFaultHandling (>= 6.0.1304)   x          
Microsoft.AspNet.WebApi.Client (>= 5.2.3) x x          
Microsoft.AspNet.WebApi.Core (>= 5.2.3) x            
Microsoft.Azure.Amqp (>= 2.0.6) x x          
Microsoft.Azure.Devices.Shared (>= 1.1.1) x x          
PCLCrypto (>= 2.0.147) x x          
WindowsAzure.Storage (>= 7.0.0)   x          
Microsoft.ServiceFabric.Data (= 2.8.232)         x    
Microsoft.ServiceFabric.Diagnostics.Internal (= 2.8.232)         x    
Microsoft.Azure.KeyVault.Core (>= 1.0.0)           x  
Microsoft.Data.OData (>= 5.8.2)           x  
Microsoft.Data.Services.Client (>= 5.8.2)           x  
Microsoft.Extensions.Logging (>= 1.1.1)             x
System.Runtime.CompilerServices.Unsafe (>= 4.4.0)             x

EndToEndTests.BasicFunctionalityTest Test doesn't after assigning standalone address

Hi ,
I am getting the following error even after giving the address "127.0.0.1" and runing as administrator,Please help in resolving:
Test Name: Microsoft.Azure.Devices.ProtocolGateway.Tests.EndToEndTests.BasicFunctionalityTest
Test FullName: Microsoft.Azure.Devices.ProtocolGateway.Tests.EndToEndTests.BasicFunctionalityTest
Test Source: G:\azure-iot-protocol-gateway-master\test\ProtocolGateway.Tests\EndToEndTests.cs : line 179
Test Outcome: Failed
Test Duration: 0:05:17.968

Result StackTrace:

at Microsoft.Azure.Devices.ProtocolGateway.Tests.Extensions.TaskExtensions.d__1.MoveNext() in G:\azure-iot-protocol-gateway-master\test\ProtocolGateway.Tests\Extensions\TaskExtensions.cs:line 34
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.Azure.Devices.ProtocolGateway.Tests.EndToEndTests.d__26.MoveNext() in G:\azure-iot-protocol-gateway-master\test\ProtocolGateway.Tests\EndToEndTests.cs:line 273
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Result Message: System.TimeoutException : The operation has timed out.

Microsoft.Azure.IoT.Gateway/ message content type

Hi,

I am using Iot hub edge (V1) and it works fine in sending the data. but by using Microsoft.Azure.IoT.Gateway ,the message class, I can not set the content type for the message before sending it to the Iothub. and I can not use the Microsoft.Azure.Devices.Client in the Iot edge model which has in the message class the message.ContentEncoding = "utf-32" and message.ContentType = "application/json";.

Could you please help in that? How to add the content type to a message send by IoT edge model to Iot hub?

Thanks

Cannot find the certificate and private key to use for decryption

When deploying to Azure, Cloud services get to busy state and then restart - over and over again.
More detailed error msg in the table log is...
"There is no appropriate cert in the store LOCAL_MACHINE\MY to decrypt the data, the data must be decrypted with the cert with serial number 4c51f6477467c09a41200bb1822d4700 and issued by 'DC=Windows Azure Service Management for Extensions'. Please make sure this cert is installed to the store LOCAL_MACHINE\MY along with the corresponding private key."
This seems to be the "default" key added to cloud services environment based on the issuer.

Note I followed exactly your getting started guide on how to deploy it.
please help

Worker role fails when deployed in default configuration

The protocol gateway, when deployed as configured in the master fork currently, was not working (worker role crashing).
After investigation found for a couple of reasons for this which I think everyone will run into so am surprised it has not come up :)

1 If you open the sample in VS2015 (as you pretty much have to as the sample is using a lot of C# 6.0 features), you must upgrade to tools version 2.9. Then all the Microsoft.WindowsAzure.ServiceRuntime versions will be wrong as they point to assembly version 2.6, when it needs to be 2.7. Note in the cloud app.config, there are also multiple binding redirects for this dependency so make sure you clean out the extra one.

2 ServiceConfiguration.Cloud.csfg settings
Master forks configuration is in a state:
<Setting name="DeviceReceiveAckTimeout" value="00:01:00" />
and
<Setting name="IotHubClient.MaxPendingOutboundMessages" value="10" />

This causes an exception to be raised in Bootstrapper.cs at :

if (this.settings.DeviceReceiveAckCanTimeout && this.iotHubClientSettings.MaxPendingOutboundMessages > 1)
            {
                throw new InvalidOperationException("Cannot maintain ordering on retransmission with more than 1 allowed pending outbound message.");
            }

Documentation states the default should be
<Setting name="IotHubClient.MaxPendingOutboundMessages" value="1" />
Setting it to this fixed that issue.

Usage of Code Contracts for validation.

I see that Code contracts are being used for validation in both Protocol gateway and DotNetty code. Visual studio projects of both Dot netty and protocol gateway are currently not having code contracts enabled. Is the intention to use these validations primarily for debug build only (that too only if needed) ?

Build is broken

Compiling in VS2014 - error in MqttAdapter.cs line 981.
FIX: Change to
ShutdownOnError(context, string.Empty, new TimeoutException (ErrorCode.KeepAliveTimedOut.ToString(), new Exception("Keep Alive timed out.")));

MQTT topics

image

Using Paho or MQTT.fx i can't send a message (device->cloud) to devices/{deviceId}/messages/events as per document here https://github.com/Azure/azure-iot-protocol-gateway/blob/master/docs/DeveloperGuide.md#subscriptions-and-topic-names

Result is: $PG.Unmatched

If the topic name of a message doesn’t match the corresponding template, two special properties will be added to the message: ‘Unmatched’ set to ‘True’ and 'Subject' set to the topic name from the MQTT message.

Please clarify structure and topic.

NOTE: I'm not sending to protocol gateway but talking native MQTT to IoT Hub endpoint.

Cloud-to-device Subscription Match CreationTime Check

@nayato @mtuchkov

The current implementation for checking if a subscription exists before publishing a C2D message is too restrictive:

bool TryMatchSubscription(string topicName, DateTime messageTime, out QualityOfService qos)
        {
            bool found = false;
            qos = QualityOfService.AtMostOnce;
            IReadOnlyList<ISubscription> subscriptions = this.sessionState.Subscriptions;
            for (int i = 0; i < subscriptions.Count; i++)
            {
                ISubscription subscription = subscriptions[i];
                if ((!found || subscription.QualityOfService > qos)
                    && subscription.CreationTime < messageTime
                    && Util.CheckTopicFilterMatch(topicName, subscription.TopicFilter))
                {
                    found = true;
                    qos = subscription.QualityOfService;
                    if (qos >= this.maxSupportedQosToClient)
                    {
                        qos = this.maxSupportedQosToClient;
                        break;
                    }
                }
            }
            return found;
        }

Specifically, the check on whether the subscription was created before the message was:

 && subscription.CreationTime < messageTime

The problem is that the Protocol Gateway resides on a different server than the IoT Hub. Any variances in the time between the two servers could cause any initial messages, after the device connects and subscribes, to be created "before" the subscription. The subscription CreationTime is the time on the Protocol Gateway, but the messageTime is the EnqueuedTimeUtc from the Microsoft.Azure.Devices.Client.Message which has the time from the IoT Hub.

I am seeing this behavior fairly regularly on a Protocol Gateway hosted on an Azure Cloud Service and can replicate it fairly easy:

  1. Device connects to Protocol Gateway (CONNECT/CONNACK)
  2. Device subscribes to topic
  3. Device receives SUBACK
  4. Device sends message
  5. Message is consumed on the cloud
  6. Cloud sends response to device
  7. Device does not receive the first message because the PG thinks the message was created before the subscription existed.
  8. Once enough time has passed to make up for the time variance, the device can receive C2D messages.

Before I made any code changes, I wanted to start a discussion about this.

It's impractical to require the client to wait an unknown period of time, after receiving the SUBACK message, before publishing and receiving messages.

Should it be the gateway's responsibility to enforce a subscription/message time check? I understand this is a workaround for the fact that the IoT Hub enqueues messages and has a minimum default message TTL of an hour. Perhaps it should be the responsibility of the sending service to set the ExpiryTimeUtc to a much shorter period of time instead?

It doesn't seem like there is a straightforward solution to this.

how pass X509Certificate2 to potocol gateway

my device is in internal network, and only through internal protocol gateway to access iot hub. every device has X509Certificate2 , how can i pass this X509Certificate2 to gateway ,then gateway act as proxy to use these X509Certificate2 to authen toward iot hub ?

protocol gateway default support sastoken, i used the following code, it work well, but i have choice to pass X509Certificate2 to protocol gateway ? i don't want to modify any device client relatived code, i want to let device client to keep transpent(regardless protocol gateway or iot hub)

sample code as followed:

private const string DeviceConnectionString = "GatewayHostName=127.0.0.1;HostName=xxx.azure-devices.cn;DeviceId=xxx;SharedAccessKey=xxx";

var x509Certificate = new X509Certificate2(@"E:\xxx.cer");
var setting = new MqttTransportSettings(TransportType.Mqtt_Tcp_Only);
setting.RemoteCertificateValidationCallback += (sender, cert, chain, error) => { return true; };
setting.ClientCertificate = x509Certificate;
var settings = new ITransportSettings[]
{
setting
};

            DeviceClient deviceClient = DeviceClient.CreateFromConnectionString(DeviceConnectionString, settings);

deviceClient.OpenAsync();
deviceClient.SendEvent(...);

Cannot find the certificate and private key to use for decryption.

When deploying to Azure, Cloud services get to busy state and then restart - over and over again.

More detailed error msg in the table log is...
"There is no appropriate cert in the store LOCAL_MACHINE\MY to decrypt the data, the data must be decrypted with the cert with serial number 4c51f6477467c09a41200bb1822d4700 and issued by 'DC=Windows Azure Service Management for Extensions'. Please make sure this cert is installed to the store LOCAL_MACHINE\MY along with the corresponding private key."

This seems to be the "default" key added to cloud services environment based on the issuer.

The Azure Iot Procol don't run over a Azure Cloud Services

Hi everyone,

Does some peoples already success to deploying this Azure Iot Protocol Gateway to a Cloud Services Host ?

I'm trying to follow this guide, helped by the video from Fai Lai : https://channel9.msdn.com/Events/Ignite/Australia-2015/MOB313

But I'm still blocked when I'm trying to deploy the services in cloud, I succeed to deploy the solution but the SLA-Table (which normaly contains the logs at 00:59:00 of the video ) doesn't been create and the worker role stayed in busy state ?

Does someone have any clues ?

Best regards,

Reynholds.

Custom Performance counter - "Connections Current" not updated properly

Current value I see in our PG instance is 1.8447+e019 and is the same value across 5 instances of PG that we have setup. However we haven't connect so many devices. The max number of devices we would have connected would be few millions as part of our performance tests.
Issues:

  1. Upon role restart - the values are not set to 0
  • typically when a role starts-up there won't be any devices connected to PG so it should be set to 0
  1. If device disconnects without sending a proper disconnect request the counter is not decremented
    *the counter's value goes off-sync and is not helping the monitoring utilities we have setup on PG
  2. I have tried setting the rawvalue (and cookedValue) of this counter using PowerShell script but still the value 1.8447+e019 is shown when we read the value using perfmon. The last one might be a different issue, but I also noticed that this value doesn't get incremented when devices are getting connected and gets updated only when a device disconnects.

EndToEndTest.BasicFunctionalityTest doesn't pass.

Hey, Im having problems with the EndToEndTest.BasicFunctionalityTest in azure-iot-protocol-gateway/ProtocolGateway - it doesnt pass.

I've input my iot hub connection string and I can see that the devices get provisioned, but no messages are ever received by the hub according the the Azure portal.

I've opened ports 5672 and 8883 on my computer.
I cant seem to get any closer to a reason for the failure - any ideas for what could be wrong?

Error:

Test Name: Microsoft.Azure.Devices.ProtocolGateway.Tests.EndToEndTests.BasicFunctionalityTest
Test FullName: Microsoft.Azure.Devices.ProtocolGateway.Tests.EndToEndTests.BasicFunctionalityTest
Test Source: C:\Users\tomsig\Source\Repos\azure-iot-protocol-gateway\test\ProtocolGateway.Tests\EndToEndTests.cs : line 179
Test Outcome: Failed
Test Duration: 0:05:21,397

Result StackTrace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout)
at Microsoft.Azure.Devices.Gateway.Tests.Extensions.TaskExtensions.d__0.MoveNext() in C:\Users\tomsig\Source\Repos\azure-iot-protocol-gateway\test\ProtocolGateway.Tests\Extensions\TaskExtensions.cs:line 19
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.Azure.Devices.ProtocolGateway.Tests.EndToEndTests.d__30.MoveNext() in C:\Users\tomsig\Source\Repos\azure-iot-protocol-gateway\test\ProtocolGateway.Tests\EndToEndTests.cs:line 285
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
----- Inner Stack Trace -----
at Microsoft.Azure.Devices.ProtocolGateway.Tests.EndToEndTests.<>c.<b__30_9>d.MoveNext() in C:\Users\tomsig\Source\Repos\azure-iot-protocol-gateway\test\ProtocolGateway.Tests\EndToEndTests.cs:line 282
Result Message:
System.AggregateException : One or more errors occurred.
---- System.TimeoutException : Test has timed out.

Incompatible project solution ProtocolGateway.Host.Cloud with VS2015

I have found an incompatibility compiling the azure-iot-protocol-gateway with VS2015.

ProtocolGateway.Host.Cloud and ProtocolGateway.Host.Fabric are reported as incompatible in the Solution Explorer view.

I have tried to build it using the build.cmd and this is the output:

> build.cmd
This folder contains more than one solution file.
Microsoft (R) Build Engine version 12.0.31101.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.


CoreCompile:
  C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:
  DEBUG;TRACE /highentropyva+ /reference:C:\git\azure-iot-protocol-gateway\packages\DotNetty.Buffers.0.4.5\lib\net45\DotN
  etty.Buffers.dll /reference:C:\git\azure-iot-protocol-gateway\packages\DotNetty.Codecs.0.4.5\lib\net45\DotNetty.Codecs.
  dll /reference:C:\git\azure-iot-protocol-gateway\packages\DotNetty.Codecs.Mqtt.0.4.5\lib\net45\DotNetty.Codecs.Mqtt.dll
   /reference:C:\git\azure-iot-protocol-gateway\packages\DotNetty.Common.0.4.5\lib\net45\DotNetty.Common.dll /reference:C
  :\git\azure-iot-protocol-gateway\packages\DotNetty.Handlers.0.4.5\lib\net45\DotNetty.Handlers.dll /reference:C:\git
  \azure-iot-protocol-gateway\packages\DotNetty.Transport.0.4.5\lib\net45\DotNetty.Transport.dll /reference:C:\git\azure-
  iot-protocol-gateway\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.1.0\lib\netstandard1.0\Microsoft.Exte
  nsions.DependencyInjection.Abstractions.dll /reference:C:\git\azure-iot-protocol-gateway\packages\Microsoft.Extensions.
  Logging.Abstractions.1.1.1\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll /reference:C:\git\azure-iot
  -protocol-gateway\packages\Microsoft.Extensions.Logging.1.1.1\lib\netstandard1.1\Microsoft.Extensions.Logging.dll /referenc
  e:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\mscorlib.dll" /reference:"C:\Progra
  m Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.ComponentModel.Composition.dll" /referen
  ce:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.Configuration.dll" /referen
  ce:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.Core.dll" /reference:"C:\Pr
  ogram Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.dll" /reference:"C:\Program Files (x
  86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.IO.Compression.dll" /reference:"C:\Program Files (
  x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.Net.Http.dll" /reference:"C:\Program Files (x86)\
  Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.Numerics.dll" /reference:C:\git\azure-iot-protocol
  -gateway\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeI
  nformation.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.Xml.
  dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.Xml.Linq.dll"
  /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Collections
  .Concurrent.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\S
  ystem.Collections.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Fac
  ades\System.ComponentModel.Annotations.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NE
  TFramework\v4.6.2\Facades\System.ComponentModel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Fram
  ework\.NETFramework\v4.6.2\Facades\System.ComponentModel.EventBasedAsync.dll" /reference:"C:\Program Files (x86)\Reference
  Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Diagnostics.Contracts.dll" /reference:"C:\Program Files
  (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Diagnostics.Debug.dll" /reference:"C:\Pr
  ogram Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Diagnostics.Tools.dll" /refe
  rence:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Diagnostics.Trac
  ing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Dy
  namic.Runtime.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades
  \System.Globalization.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2
  \Facades\System.IO.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Fa
  cades\System.Linq.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Fac
  ades\System.Linq.Expressions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework
  \v4.6.2\Facades\System.Linq.Parallel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETF
  ramework\v4.6.2\Facades\System.Linq.Queryable.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framew
  ork\.NETFramework\v4.6.2\Facades\System.Net.NetworkInformation.dll" /reference:"C:\Program Files (x86)\Reference Assemblies
  \Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Net.Primitives.dll" /reference:"C:\Program Files (x86)\Reference A
  ssemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Net.Requests.dll" /reference:"C:\Program Files (x86)\Refe
  rence Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Net.WebHeaderCollection.dll" /reference:"C:\Progra
  m Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.ObjectModel.dll" /reference:"C:\
  Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Reflection.dll" /reference
  :"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Reflection.Emit.dll"
  /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Reflection.
  Emit.ILGeneration.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Fac
  ades\System.Reflection.Emit.Lightweight.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.N
  ETFramework\v4.6.2\Facades\System.Reflection.Extensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micros
  oft\Framework\.NETFramework\v4.6.2\Facades\System.Reflection.Primitives.dll" /reference:"C:\Program Files (x86)\Reference A
  ssemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Resources.ResourceManager.dll" /reference:"C:\Program Fil
  es (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Runtime.dll" /reference:"C:\Program F
  iles (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Runtime.Extensions.dll" /reference:
  "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Runtime.Handles.dll" /
  reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Runtime.Inte
  ropServices.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\S
  ystem.Runtime.InteropServices.WindowsRuntime.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framewo
  rk\.NETFramework\v4.6.2\Facades\System.Runtime.Numerics.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micros
  oft\Framework\.NETFramework\v4.6.2\Facades\System.Runtime.Serialization.Json.dll" /reference:"C:\Program Files (x86)\Refere
  nce Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Runtime.Serialization.Primitives.dll" /reference:"C:
  \Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Runtime.Serialization.Xml
  .dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Secur
  ity.Principal.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades
  \System.ServiceModel.Duplex.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\
  v4.6.2\Facades\System.ServiceModel.Http.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.N
  ETFramework\v4.6.2\Facades\System.ServiceModel.NetTcp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsof
  t\Framework\.NETFramework\v4.6.2\Facades\System.ServiceModel.Primitives.dll" /reference:"C:\Program Files (x86)\Reference A
  ssemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.ServiceModel.Security.dll" /reference:"C:\Program Files (
  x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Text.Encoding.dll" /reference:"C:\Program
   Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Text.Encoding.Extensions.dll" /re
  ference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Text.RegularEx
  pressions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\Sys
  tem.Threading.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades
  \System.Threading.Tasks.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6
  .2\Facades\System.Threading.Tasks.Parallel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework
  \.NETFramework\v4.6.2\Facades\System.Threading.Timer.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft
  \Framework\.NETFramework\v4.6.2\Facades\System.Xml.ReaderWriter.dll" /reference:"C:\Program Files (x86)\Reference Assemblie
  s\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Xml.XDocument.dll" /reference:"C:\Program Files (x86)\Reference A
  ssemblies\Microsoft\Framework\.NETFramework\v4.6.2\Facades\System.Xml.XmlSerializer.dll" /debug+ /debug:full /filealign:512
   /optimize- /out:obj\Debug\Microsoft.Azure.Devices.ProtocolGateway.Core.dll /subsystemversion:6.00 /target:library /utf8out
  put ..\SharedAssemblyInfo.cs IAppConfigReader.cs ConfigManagerReader.cs ErrorCode.cs Instrumentation\IPerformanceCounter.cs
   Instrumentation\IPerformanceCounterManager.cs Instrumentation\WindowsPerformanceCounterManager.cs Messaging\IMessagingChan
  nel.cs Messaging\IMessage.cs Instrumentation\AveragePerformanceCounter.cs Instrumentation\CommonEventSource.cs Extensions\T
  askExtensions.cs Messaging\IMessagingBridge.cs Messaging\MessageFeedbackChannel.cs Messaging\MessagingException.cs Messagin
  g\SingleClientMessagingBridge.cs Messaging\MessageWithFeedback.cs Mqtt\AckPendingMessageState.cs Identity\IDeviceIdentity.c
  s Mqtt\MessagePropertyNames.cs Mqtt\MessageTypes.cs Mqtt\MessageAsyncProcessorBase.cs Mqtt\ChannelMessageProcessingExceptio
  n.cs Mqtt\MessageAsyncProcessor.cs Mqtt\CompletionPendingMessageState.cs Messaging\IMessagingServiceClient.cs Mqtt\ISupport
  Retransmission.cs Mqtt\MessagingBridgeFactoryFunc.cs Mqtt\Persistence\ISubscription.cs Mqtt\Persistence\TransientSessionSta
  te.cs Mqtt\Persistence\TransientSessionStatePersistenceProvider.cs Mqtt\Persistence\IQos2StatePersistenceProvider.cs Mqtt\I
  PacketReference.cs Mqtt\Persistence\IQos2MessageDeliveryState.cs Mqtt\RequestAckPairProcessor.cs Instrumentation\Performanc
  eCounterCategoryInfo.cs Instrumentation\PerformanceCounters.cs Mqtt\TemplateParameters.cs Mqtt\Persistence\TransientSubscri
  ption.cs ProtocolGatewayException.cs AppConfigSettingsProvider.cs Properties\Friends.cs ISettingsProvider.cs Identity\Unaut
  henticatedDeviceIdentity.cs Mqtt\MqttAdapter.cs Identity\IDeviceIdentityProvider.cs Mqtt\Persistence\ISessionState.cs Mqtt\
  Persistence\ISessionStatePersistenceProvider.cs Mqtt\Settings.cs Mqtt\Util.cs Properties\AssemblyInfo.cs Instrumentation\Sa
  fePerformanceCounter.cs UriPathTemplate.cs "C:\Users\enrique\AppData\Local\Temp\.NETFramework,Version=v4.6.2.AssemblyAttrib
  utes.cs"
Instrumentation\CommonEventSource.cs(25,38): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(25,46): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(25,74): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(25,94): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(27,35): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(27,43): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(27,77): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(27,97): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(29,38): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(29,46): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(29,74): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(29,94): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(31,36): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(31,44): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(31,70): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(31,90): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(34,58): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(34,66): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(34,81): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(34,87): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(34,95): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(34,101): error CS1519: Invalid token ')' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(37,72): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(37,80): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(37,105): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(37,114): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(37,120): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(37,127): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(40,69): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(40,77): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(40,99): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(40,108): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(40,114): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(40,121): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(43,59): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(43,67): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(43,82): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(43,90): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(43,96): error CS1519: Invalid token ',' in class, struct, or interface member declaratio n [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(43,103): error CS1519: Invalid token ')' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(46,80): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(46,88): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(46,103): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(46,115): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(46,116): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gat eway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(46,127): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGat eway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(46,136): error CS1519: Invalid token '.' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(46,142): error CS1519: Invalid token ',' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(46,149): error CS1519: Invalid token ')' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(49,77): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(49,85): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(49,110): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(49,119): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(49,130): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(49,137): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(52,78): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(52,86): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(52,99): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pro tocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(52,111): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(52,112): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gat eway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(52,123): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGat eway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(52,132): error CS1519: Invalid token '.' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(52,138): error CS1519: Invalid token ',' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(52,145): error CS1519: Invalid token ')' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(55,75): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(55,83): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(55,106): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(55,115): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(55,126): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Instrumentation\CommonEventSource.cs(55,133): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\MessageFeedbackChannel.cs(19,36): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGatew ay.Core\ProtocolGateway.Core.csproj]
Messaging\MessageFeedbackChannel.cs(19,63): error CS1519: Invalid token '(' in class, struct, or interface member declaration  [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\MessageFeedbackChannel.cs(19,78): error CS1519: Invalid token ')' in class, struct, or interface member declaration  [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\MessageFeedbackChannel.cs(21,37): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGatew ay.Core\ProtocolGateway.Core.csproj]
Messaging\MessageFeedbackChannel.cs(21,65): error CS1519: Invalid token '(' in class, struct, or interface member declaration  [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\MessageFeedbackChannel.cs(21,80): error CS1519: Invalid token ')' in class, struct, or interface member declaration  [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\MessageFeedbackChannel.cs(23,35): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGatew ay.Core\ProtocolGateway.Core.csproj]
Messaging\MessageFeedbackChannel.cs(23,61): error CS1519: Invalid token '(' in class, struct, or interface member declaration  [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\MessageFeedbackChannel.cs(23,76): error CS1519: Invalid token ')' in class, struct, or interface member declaration  [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(46,44): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gatewa y\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(52,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gatewa y\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(62,46): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Protocol Gateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(62,77): error CS1519: Invalid token '(' in class, struct, or interface member declar ation [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(62,82): error CS1520: Method must have a return type [C:\git\azure-iot-protocol- gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(62,109): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\sr c\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(62,111): error CS1031: Type expected [C:\git\azure-iot-protocol-gateway\src\Prot ocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(62,115): error CS1520: Method must have a return type [C:\git\azure-iot-protocol -gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(62,148): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\sr c\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(62,154): error CS1031: Type expected [C:\git\azure-iot-protocol-gateway\src\Prot ocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(62,170): error CS1519: Invalid token ')' in class, struct, or interface member decla ration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(64,44): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Protocol Gateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(64,74): error CS1519: Invalid token '(' in class, struct, or interface member declar ation [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Messaging\SingleClientMessagingBridge.cs(64,80): error CS1519: Invalid token ')' in class, struct, or interface member declar ation [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\AckPendingMessageState.cs(39,53): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\Prot ocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\AckPendingMessageState.cs(40,21): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\Prot ocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MessageAsyncProcessorBase.cs(27,32): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway .Core\ProtocolGateway.Core.csproj]
Mqtt\MessageAsyncProcessorBase.cs(27,61): error CS1519: Invalid token ';' in class, struct, or interface member declaration [ C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MessageAsyncProcessorBase.cs(29,32): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway .Core\ProtocolGateway.Core.csproj]
Mqtt\MessageAsyncProcessorBase.cs(29,58): error CS1519: Invalid token ';' in class, struct, or interface member declaration [ C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MessageAsyncProcessor.cs(20,102): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Co re\ProtocolGateway.Core.csproj]
Mqtt\MessageAsyncProcessor.cs(20,110): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gateway\sr c\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MessageAsyncProcessor.cs(20,129): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ProtocolG ateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MessageAsyncProcessor.cs(20,137): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ProtocolG ateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Persistence\TransientSessionState.cs(22,59): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Protoco lGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Persistence\TransientSessionState.cs(22,80): error CS1519: Invalid token ';' in class, struct, or interface member decla ration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(142,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(149,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(40,49): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.C ore\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(40,80): error CS1519: Invalid token '==' in class, struct, or interface member declaration [C :\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(40,104): error CS1519: Invalid token ')' in class, struct, or interface member declaration [C :\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(40,133): error CS1519: Invalid token '(' in class, struct, or interface member declaration [C :\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(42,43): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.C ore\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(42,67): error CS1519: Invalid token '.' in class, struct, or interface member declaration [C: \git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(42,74): error CS1519: Invalid token '??' in class, struct, or interface member declaration [C :\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(46,42): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.C ore\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(46,66): error CS1519: Invalid token '??' in class, struct, or interface member declaration [C :\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(46,91): error CS1519: Invalid token '=' in class, struct, or interface member declaration [C: \git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(46,113): error CS1519: Invalid token '(' in class, struct, or interface member declaration [C :\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(48,28): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.C ore\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(48,47): error CS1519: Invalid token '>' in class, struct, or interface member declaration [C: \git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\RequestAckPairProcessor.cs(48,62): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C: \git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Persistence\TransientSubscription.cs(31,66): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Protoco lGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Persistence\TransientSubscription.cs(31,95): error CS1031: Type expected [C:\git\azure-iot-protocol-gateway\src\Prot ocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Persistence\TransientSubscription.cs(31,112): error CS1519: Invalid token ',' in class, struct, or interface member decl aration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Persistence\TransientSubscription.cs(31,130): error CS1519: Invalid token ',' in class, struct, or interface member decl aration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Persistence\TransientSubscription.cs(31,135): error CS1519: Invalid token ')' in class, struct, or interface member decl aration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Identity\UnauthenticatedDeviceIdentity.cs(10,57): error CS1519: Invalid token '=' in class, struct, or interface member decla ration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Identity\UnauthenticatedDeviceIdentity.cs(16,37): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Protoco lGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(135,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatewa y.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(155,116): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatew ay.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(175,29): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatewa y.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(212,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatewa y.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(250,118): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatew ay.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(279,87): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatewa y.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(429,107): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatew ay.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(818,74): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatewa y.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(925,51): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatewa y.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(1159,49): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGatew ay.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(62,26): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protocol Gateway.Core.csproj]
Mqtt\MqttAdapter.cs(62,69): error CS1519: Invalid token '(' in class, struct, or interface member declaration [C:\git\azu re-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(92,33): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protocol Gateway.Core.csproj]
Mqtt\MqttAdapter.cs(92,57): error CS1519: Invalid token '!=' in class, struct, or interface member declaration [C:\git\az ure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(94,25): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protocol Gateway.Core.csproj]
Mqtt\MqttAdapter.cs(94,44): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\azu re-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(96,32): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protocol Gateway.Core.csproj]
Mqtt\MqttAdapter.cs(98,13): error CS1519: Invalid token '+' in class, struct, or interface member declaration [C:\git\azu re-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(99,13): error CS1519: Invalid token '+' in class, struct, or interface member declaration [C:\git\azu re-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(99,54): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\azu re-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(511,44): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protoco lGateway.Core.csproj]
Mqtt\MqttAdapter.cs(511,52): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gateway\src\Protocol Gateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(511,80): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Cor e\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(1164,54): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protoc olGateway.Core.csproj]
Mqtt\MqttAdapter.cs(1164,74): error CS1519: Invalid token '&' in class, struct, or interface member declaration [C:\git\a zure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(1164,93): error CS1519: Invalid token ')' in class, struct, or interface member declaration [C:\git\a zure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\MqttAdapter.cs(1164,115): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\ azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Settings.cs(93,49): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGat eway.Core.csproj]
Mqtt\Settings.cs(93,81): error CS1519: Invalid token '??' in class, struct, or interface member declaration [C:\git\azure -iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Settings.cs(93,101): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\azure -iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Settings.cs(95,48): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGat eway.Core.csproj]
Mqtt\Settings.cs(95,88): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\azure- iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Settings.cs(97,55): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGat eway.Core.csproj]
Mqtt\Settings.cs(97,94): error CS1519: Invalid token '>' in class, struct, or interface member declaration [C:\git\azure- iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Settings.cs(97,133): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\azure -iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
Mqtt\Util.cs(91,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\P rotocolGateway.Core.csproj]
Mqtt\Util.cs(104,51): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ ProtocolGateway.Core.csproj]
Done Building Project "C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj" (default t argets) -- FAILED.

Done Building Project "C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Console\ProtocolGateway.Host.Console.c sproj" (default targets) -- FAILED.

Project "C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (1) is building "C:\git\azure-iot-protocol-gateway\ho st\ProtocolGateway.Host.Cloud\ProtocolGateway.Host.Cloud.ccproj" (8) on node 1 (default targets).
C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Cloud\ProtocolGateway.Host.Cloud.ccproj(62,3): error MSB4019:  The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.9\Microsoft.WindowsA zure.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Cloud\ProtocolGateway.Host.Cloud.ccpro j" (default targets) -- FAILED.

Project "C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (1) is building "C:\git\azure-iot-protocol-gateway\ho st\ProtocolGateway.Host.Fabric\ProtocolGateway.Host.Fabric.sfproj" (11) on node 1 (default targets).
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(617,5): error : The OutputPath property is no t set for project 'ProtocolGateway.Host.Fabric.sfproj'.  Please check to make sure that you have specified a valid combinatio n of Configuration and Platform for this project.  Configuration='Debug'  Platform='x64'.  You may be seeing this message bec ause you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform th at doesn't exist for this project. [C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Fabric\ProtocolGateway.Ho st.Fabric.sfproj]
Done Building Project "C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Fabric\ProtocolGateway.Host.Fabric.sfp roj" (default targets) -- FAILED.

Project "C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (1) is building "C:\git\azure-iot-protocol-gateway\ho st\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Configuration\ProtocolGateway.Host.Fabric.FabricShared.Configuration .csproj" (13) on node 1 (default targets).
Project "C:\git\azure-iot-protocol-gateway\host\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Configuration\Proto colGateway.Host.Fabric.FabricShared.Configuration.csproj" (13) is building "C:\git\azure-iot-protocol-gateway\host\fabric shared\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj" (14) on node  1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input f iles.
CoreCompile:
  C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /unsafe+ /nowarn:1701,1702 /nostdlib+ /platform:x64 /errorreport:
  prompt /define:DEBUG;TRACE /highentropyva+ /reference:C:\git\azure-iot-protocol-gateway\packages\Microsoft.ServiceFabri
  c.5.1.163\lib\net45\Microsoft.ServiceFabric.Internal.dll /reference:C:\git\azure-iot-protocol-gateway\packages\Microsof
  t.ServiceFabric.5.1.163\lib\net45\Microsoft.ServiceFabric.Internal.Strings.dll /reference:"C:\Program Files (x86)\Reference
   Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\
  Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft
  \Framework\.NETFramework\v4.5.1\System.dll" /reference:C:\git\azure-iot-protocol-gateway\packages\Microsoft.ServiceFabr
  ic.5.1.163\lib\net45\System.Fabric.dll /debug+ /debug:full /filealign:512 /out:obj\x64\Debug\ProtocolGateway.Host.Fabric.Fa
  bricShared.Logging.dll /subsystemversion:6.00 /target:library /utf8output ExceptionExtensions.cs ILogger.cs IServiceLogger.
  cs LoggerBase.cs Properties\AssemblyInfo.cs ServiceLoggerBase.cs "C:\Users\enrique\AppData\Local\Temp\.NETFramework,Version
  =v4.5.1.AssemblyAttributes.cs"
ServiceLoggerBase.cs(884,248): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\host\fabricshare d\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj]
ServiceLoggerBase.cs(903,248): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\host\fabricshare d\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj]
ServiceLoggerBase.cs(922,254): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\host\fabricshare d\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj]
ServiceLoggerBase.cs(1026,249): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\host\fabricshar ed\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj]
Done Building Project "C:\git\azure-iot-protocol-gateway\host\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Loggi ng\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj" (default targets) -- FAILED.

Project "C:\git\azure-iot-protocol-gateway\host\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Configuration\Proto colGateway.Host.Fabric.FabricShared.Configuration.csproj" (13) is building "C:\git\azure-iot-protocol-gateway\host\fabric shared\ProtocolGateway.Host.Fabric.FabricShared.Security\ProtocolGateway.Host.Fabric.FabricShared.Security.csproj" (15) on no de 1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input f iles.
CoreCompile:
  C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:x64 /errorreport:prompt /d
  efine:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework
  \v4.5.1\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Syst
  em.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll" /
  debug+ /debug:full /filealign:512 /out:obj\x64\Debug\ProtocolGateway.Host.Fabric.FabricShared.Security.dll /subsystemversio
  n:6.00 /target:library /utf8output CertificateUtilities.cs Properties\AssemblyInfo.cs SecureStringExtensions.cs "C:\Users\e
  nrique\AppData\Local\Temp\.NETFramework,Version=v4.5.1.AssemblyAttributes.cs"
CertificateUtilities.cs(37,23): error CS1525: Invalid expression term '.' [C:\git\azure-iot-protocol-gateway\host\fabrics hared\ProtocolGateway.Host.Fabric.FabricShared.Security\ProtocolGateway.Host.Fabric.FabricShared.Security.csproj]
CertificateUtilities.cs(37,24): error CS1003: Syntax error, ':' expected [C:\git\azure-iot-protocol-gateway\host\fabricsh ared\ProtocolGateway.Host.Fabric.FabricShared.Security\ProtocolGateway.Host.Fabric.FabricShared.Security.csproj]
Done Building Project "C:\git\azure-iot-protocol-gateway\host\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Secur ity\ProtocolGateway.Host.Fabric.FabricShared.Security.csproj" (default targets) -- FAILED.

Done Building Project "C:\git\azure-iot-protocol-gateway\host\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Confi guration\ProtocolGateway.Host.Fabric.FabricShared.Configuration.csproj" (default targets) -- FAILED.

Done Building Project "C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (default targets) -- FAILED.


Build FAILED.

"C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (default target) (1) ->
"C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Console\ProtocolGateway.Host.Console.csproj" (default target ) (2) ->
"C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj" (default target) (3) ->
(CoreCompile target) ->
  Instrumentation\CommonEventSource.cs(25,38): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(25,46): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(25,74): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(25,94): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(27,35): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(27,43): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(27,77): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(27,97): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(29,38): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(29,46): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(29,74): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(29,94): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(31,36): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(31,44): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(31,70): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(31,90): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(34,58): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(34,66): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(34,81): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(34,87): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(34,95): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(34,101): error CS1519: Invalid token ')' in class, struct, or interface member declara tion [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(37,72): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(37,80): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(37,105): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(37,114): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(37,120): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(37,127): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(40,69): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(40,77): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(40,99): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(40,108): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(40,114): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(40,121): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(43,59): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(43,67): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(43,82): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(43,90): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(43,96): error CS1519: Invalid token ',' in class, struct, or interface member declarat ion [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(43,103): error CS1519: Invalid token ')' in class, struct, or interface member declara tion [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(46,80): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(46,88): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(46,103): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(46,115): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(46,116): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-g ateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(46,127): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolG ateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(46,136): error CS1519: Invalid token '.' in class, struct, or interface member declara tion [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(46,142): error CS1519: Invalid token ',' in class, struct, or interface member declara tion [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(46,149): error CS1519: Invalid token ')' in class, struct, or interface member declara tion [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(49,77): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(49,85): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(49,110): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(49,119): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(49,130): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(49,137): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(52,78): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(52,86): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(52,99): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\P rotocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(52,111): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(52,112): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-g ateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(52,123): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolG ateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(52,132): error CS1519: Invalid token '.' in class, struct, or interface member declara tion [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(52,138): error CS1519: Invalid token ',' in class, struct, or interface member declara tion [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(52,145): error CS1519: Invalid token ')' in class, struct, or interface member declara tion [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(55,75): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGa teway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(55,83): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-ga teway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(55,106): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(55,115): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(55,126): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Instrumentation\CommonEventSource.cs(55,133): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\MessageFeedbackChannel.cs(19,36): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGat eway.Core\ProtocolGateway.Core.csproj]
  Messaging\MessageFeedbackChannel.cs(19,63): error CS1519: Invalid token '(' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\MessageFeedbackChannel.cs(19,78): error CS1519: Invalid token ')' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\MessageFeedbackChannel.cs(21,37): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGat eway.Core\ProtocolGateway.Core.csproj]
  Messaging\MessageFeedbackChannel.cs(21,65): error CS1519: Invalid token '(' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\MessageFeedbackChannel.cs(21,80): error CS1519: Invalid token ')' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\MessageFeedbackChannel.cs(23,35): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGat eway.Core\ProtocolGateway.Core.csproj]
  Messaging\MessageFeedbackChannel.cs(23,61): error CS1519: Invalid token '(' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\MessageFeedbackChannel.cs(23,76): error CS1519: Invalid token ')' in class, struct, or interface member declarati on [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(46,44): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(52,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gate way\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(62,46): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Protoc olGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(62,77): error CS1519: Invalid token '(' in class, struct, or interface member decl aration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(62,82): error CS1520: Method must have a return type [C:\git\azure-iot-protoco l-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(62,109): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\ src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(62,111): error CS1031: Type expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(62,115): error CS1520: Method must have a return type [C:\git\azure-iot-protoc ol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(62,148): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\ src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(62,154): error CS1031: Type expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(62,170): error CS1519: Invalid token ')' in class, struct, or interface member dec laration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(64,44): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Protoc olGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(64,74): error CS1519: Invalid token '(' in class, struct, or interface member decl aration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Messaging\SingleClientMessagingBridge.cs(64,80): error CS1519: Invalid token ')' in class, struct, or interface member decl aration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\AckPendingMessageState.cs(39,53): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\AckPendingMessageState.cs(40,21): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MessageAsyncProcessorBase.cs(27,32): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGatew ay.Core\ProtocolGateway.Core.csproj]
  Mqtt\MessageAsyncProcessorBase.cs(27,61): error CS1519: Invalid token ';' in class, struct, or interface member declaration  [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MessageAsyncProcessorBase.cs(29,32): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGatew ay.Core\ProtocolGateway.Core.csproj]
  Mqtt\MessageAsyncProcessorBase.cs(29,58): error CS1519: Invalid token ';' in class, struct, or interface member declaration  [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MessageAsyncProcessor.cs(20,102): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway. Core\ProtocolGateway.Core.csproj]
  Mqtt\MessageAsyncProcessor.cs(20,110): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gateway\ src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MessageAsyncProcessor.cs(20,129): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Protoco lGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MessageAsyncProcessor.cs(20,137): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\Protoco lGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Persistence\TransientSessionState.cs(22,59): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Proto colGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Persistence\TransientSessionState.cs(22,80): error CS1519: Invalid token ';' in class, struct, or interface member dec laration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(142,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(149,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(40,49): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway .Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(40,80): error CS1519: Invalid token '==' in class, struct, or interface member declaration
[C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(40,104): error CS1519: Invalid token ')' in class, struct, or interface member declaration
[C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(40,133): error CS1519: Invalid token '(' in class, struct, or interface member declaration
[C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(42,43): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway .Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(42,67): error CS1519: Invalid token '.' in class, struct, or interface member declaration [ C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(42,74): error CS1519: Invalid token '??' in class, struct, or interface member declaration
[C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(46,42): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway .Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(46,66): error CS1519: Invalid token '??' in class, struct, or interface member declaration
[C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(46,91): error CS1519: Invalid token '=' in class, struct, or interface member declaration [ C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(46,113): error CS1519: Invalid token '(' in class, struct, or interface member declaration
[C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(48,28): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway .Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(48,47): error CS1519: Invalid token '>' in class, struct, or interface member declaration [ C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\RequestAckPairProcessor.cs(48,62): error CS1519: Invalid token ';' in class, struct, or interface member declaration [ C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Persistence\TransientSubscription.cs(31,66): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Proto colGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Persistence\TransientSubscription.cs(31,95): error CS1031: Type expected [C:\git\azure-iot-protocol-gateway\src\Pr otocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Persistence\TransientSubscription.cs(31,112): error CS1519: Invalid token ',' in class, struct, or interface member de claration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Persistence\TransientSubscription.cs(31,130): error CS1519: Invalid token ',' in class, struct, or interface member de claration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Persistence\TransientSubscription.cs(31,135): error CS1519: Invalid token ')' in class, struct, or interface member de claration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Identity\UnauthenticatedDeviceIdentity.cs(10,57): error CS1519: Invalid token '=' in class, struct, or interface member dec laration [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Identity\UnauthenticatedDeviceIdentity.cs(16,37): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\Proto colGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(135,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(155,116): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGat eway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(175,29): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(212,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(250,118): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGat eway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(279,87): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(429,107): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGat eway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(818,74): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(925,51): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGate way.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(1159,49): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGat eway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(62,26): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protoc olGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(62,69): error CS1519: Invalid token '(' in class, struct, or interface member declaration [C:\git\a zure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(92,33): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protoc olGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(92,57): error CS1519: Invalid token '!=' in class, struct, or interface member declaration [C:\git\ azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(94,25): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protoc olGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(94,44): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\a zure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(96,32): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Protoc olGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(98,13): error CS1519: Invalid token '+' in class, struct, or interface member declaration [C:\git\a zure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(99,13): error CS1519: Invalid token '+' in class, struct, or interface member declaration [C:\git\a zure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(99,54): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\a zure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(511,44): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Proto colGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(511,52): error CS1520: Method must have a return type [C:\git\azure-iot-protocol-gateway\src\Protoc olGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(511,80): error CS1001: Identifier expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.C ore\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(1164,54): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\Prot ocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(1164,74): error CS1519: Invalid token '&' in class, struct, or interface member declaration [C:\git \azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(1164,93): error CS1519: Invalid token ')' in class, struct, or interface member declaration [C:\git \azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\MqttAdapter.cs(1164,115): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\gi t\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Settings.cs(93,49): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolG ateway.Core.csproj]
  Mqtt\Settings.cs(93,81): error CS1519: Invalid token '??' in class, struct, or interface member declaration [C:\git\azu re-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Settings.cs(93,101): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\azu re-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Settings.cs(95,48): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolG ateway.Core.csproj]
  Mqtt\Settings.cs(95,88): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\azur e-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Settings.cs(97,55): error CS1002: ; expected [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolG ateway.Core.csproj]
  Mqtt\Settings.cs(97,94): error CS1519: Invalid token '>' in class, struct, or interface member declaration [C:\git\azur e-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Settings.cs(97,133): error CS1519: Invalid token ';' in class, struct, or interface member declaration [C:\git\azu re-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj]
  Mqtt\Util.cs(91,47): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core \ProtocolGateway.Core.csproj]
  Mqtt\Util.cs(104,51): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Cor e\ProtocolGateway.Core.csproj]


"C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (default target) (1) ->
"C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Cloud\ProtocolGateway.Host.Cloud.ccproj" (default target) (8 ) ->
  C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Cloud\ProtocolGateway.Host.Cloud.ccproj(62,3): error MSB401 9: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.9\Microsoft.Window sAzure.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk .


"C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (default target) (1) ->
"C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Fabric\ProtocolGateway.Host.Fabric.sfproj" (default target)
(11) ->
(_CheckForInvalidConfigurationAndPlatform target) ->
  C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(617,5): error : The OutputPath property is
not set for project 'ProtocolGateway.Host.Fabric.sfproj'.  Please check to make sure that you have specified a valid combinat ion of Configuration and Platform for this project.  Configuration='Debug'  Platform='x64'.  You may be seeing this message b ecause you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform
that doesn't exist for this project. [C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Fabric\ProtocolGateway. Host.Fabric.sfproj]


"C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (default target) (1) ->
"C:\git\azure-iot-protocol-gateway\host\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Configuration\ProtocolGatew ay.Host.Fabric.FabricShared.Configuration.csproj" (default target) (13) ->
"C:\git\azure-iot-protocol-gateway\host\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Hos t.Fabric.FabricShared.Logging.csproj" (default target) (14) ->
(CoreCompile target) ->
  ServiceLoggerBase.cs(884,248): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\host\fabricsha red\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj]
  ServiceLoggerBase.cs(903,248): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\host\fabricsha red\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj]
  ServiceLoggerBase.cs(922,254): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\host\fabricsha red\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj]
  ServiceLoggerBase.cs(1026,249): error CS1056: Unexpected character '$' [C:\git\azure-iot-protocol-gateway\host\fabricsh ared\ProtocolGateway.Host.Fabric.FabricShared.Logging\ProtocolGateway.Host.Fabric.FabricShared.Logging.csproj]

"C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (default target) (1) ->
"C:\git\azure-iot-protocol-gateway\host\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Configuration\ProtocolGatew ay.Host.Fabric.FabricShared.Configuration.csproj" (default target) (13) ->
"C:\git\azure-iot-protocol-gateway\host\fabricshared\ProtocolGateway.Host.Fabric.FabricShared.Security\ProtocolGateway.Ho st.Fabric.FabricShared.Security.csproj" (default target) (15) ->
  CertificateUtilities.cs(37,23): error CS1525: Invalid expression term '.' [C:\git\azure-iot-protocol-gateway\host\fabri cshared\ProtocolGateway.Host.Fabric.FabricShared.Security\ProtocolGateway.Host.Fabric.FabricShared.Security.csproj]
  CertificateUtilities.cs(37,24): error CS1003: Syntax error, ':' expected [C:\git\azure-iot-protocol-gateway\host\fabric shared\ProtocolGateway.Host.Fabric.FabricShared.Security\ProtocolGateway.Host.Fabric.FabricShared.Security.csproj]

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 13.07.2017 03:39:37 PM.
Project "C:\RTI\git\azure-iot-protocol-gateway\ProtocolGateway.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Any CPU".
Project "C:\git\azure-iot-protocol-gateway\ProtocolGateway.sln" (1) is building "C:\RTI\git\azure-iot-protocol-gateway\ho st\ProtocolGateway.Host.Console\ProtocolGateway.Host.Console.csproj" (2) on node 1 (default targets).
Project "C:\git\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Console\ProtocolGateway.Host.Console.csproj" (2) is
building "C:\git\azure-iot-protocol-gateway\src\ProtocolGateway.Core\ProtocolGateway.Core.csproj" (3) on node 1 (default
targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input f iles.
    0 Warning(s)
    173 Error(s)

Time Elapsed 00:00:00.92

Unexpected matching with sequence number

Recently I found my device will lose some messages. After enabling verbose log and digging into, I found it is due to unexpected matching with sequence number.
Here are my analysis:

  1. When the issue happening, I only found a PUBREL packet sent to device from Protocol Gateway. Normally, it should send PUBLISH packet at first.
Publish Cloud to device Message Id received is 1ed186d2-27cd-4ca0-9e7c-fa1b24fcc1d1
Publish Cloud to device Message Id received
Publish Cloud to device Publish message received at 09-28-2017 03:04:56.843 for Cloud to Device transmission.
PubRelPacket[Type=PUBREL, QualityOfService=AtLeastOnce, Duplicate=False, Retain=False] PacketPUBREL sent at 09-28-2017 03:04:56.859.
  1. I checked the code, found below condition:
async Task PublishToClientQos2Async(IChannelHandlerContext context, MessageWithFeedback messageWithFeedback, PublishPacket packet, string[] userContext)
        {
            int packetId = packet.PacketId;
            IQos2MessageDeliveryState messageInfo = await this.qos2StateProvider.GetMessageAsync(this.identity, packetId);
 
            if (messageInfo != null && messageWithFeedback.Message.SequenceNumber != messageInfo.SequenceNumber)
            {
                await this.qos2StateProvider.DeleteMessageAsync(this.identity, packetId, messageInfo);
                messageInfo = null;
            }
 
            if (messageInfo == null)
            {
                await this.publishPubRecProcessor.SendRequestAsync(context, packet, new AckPendingMessageState(messageWithFeedback, packet));
                CommonEventSource.Log.Info($"Packet {packet.PacketType} sent.", packet.ToString(), userContext);
            }
            else
            {
                await this.PublishReleaseToClientAsync(context, packetId, messageWithFeedback.FeedbackChannel, messageInfo, PreciseTimeSpan.FromStart);
            }
        }
  1. So it should goes with this condition that
else
{
      await this.PublishReleaseToClientAsync(context, packetId, messageWithFeedback.FeedbackChannel, messageInfo, PreciseTimeSpan.FromStart);
}

Which means messageInfo != null && messageWithFeedback.Message.SequenceNumber != messageInfo.SequenceNumber.
4. Then I checked my state provider which is storage table, I founded below records with device id as filtering condition

PartitionKey RowKey Timestamp LastModified MessageNumber
7 DEVICE001_33002 2017-05-03T10:58:07.765Z 2017-05-03T10:58:09.450Z 233
7 DEVICE001_33944 2017-06-19T05:38:47.198Z 2017-06-19T05:38:46.826Z 1175
1 DEVICE001_32786 2017-08-17T00:42:48.145Z 2017-08-17T00:42:49.222Z 17
7 DEVICE001_32795 2017-08-17T01:11:41.114Z 2017-08-17T01:11:41.286Z 26
  1. There were obsolete records, and defenitely not the right state for messages I am sending now because current date is 2017-09-28. And here message number is the value of sequence number. So seems sequence number recycled to reach a duplicate one with value in table.

Other protocols available

Hi all,
are there any other protocol implementations beside Mqtt available for the Protocol gateway?
Are there any good directions on how to implement your own protocol like tcp, websockets, http and so on?

PS: i don't see a lot of activity lately, is this project still alive?

regards

Device disconnections during concurrent connect request

We are observing some issues in Protocol Gateway, when we try to connect a higher number of devices with higher concurrency. The issue we are observing is that we receive a connect packet just once for a particular device, but the point where PG creates a device scoped connection in IoT hub Client, the connection request is made more than once with same device scoped connection string. Due to this, we are seeing session eviction in the IoTHub (same device trying connect more than once to Iot hub). This results in closing the connection between the device and PG as well.

We could conclude on this behavior by introducing a few logs statements in the code:

  1. In the Receive() method of IotHubClient, we have a log statement in the condition where the message is null.
  2. In the CreateFromConnectionStringAsync() of IotHubClient, we are printing the connection string, using which a device client was being created.

The connection string mentioned above ideally has to be unique for each device. But, when we enabled logging and tried to connect the devices, we were seeing that the connection string carries the deviceid of a different device instead of the current device for which the request has been created. This happens in cases where two devices have sent the connection request at the same time.

Below are the test numbers:

Number of batches: 10
Number of devices per batch: 300
We try to activate the TCP channel for these 300 devices in a loop and wait until this batch is completed. Once a batch is completed, we start the next batch.

Below is a sample of the log statements we have observed :

DeviceI=K2274100. ConnectionString=HostName=xxxx.azure-devices.net;DeviceId=K1529890;SharedAccessKey===;X509Cert=False

DeviceI=K1741670. ConnectionString=HostName=xxxx.azure-devices.net;DeviceId=K2795030;SharedAccessKey=sxxx==;X509Cert=False

Message id not getting Persisted in the QOS 2 state

Message id not getting Persisted in the QOS 2 state , which leads to failure in processing any QOS 2 message in transit. This is happening because the Message id setter is marker as private in TableMessageDeliveryState. Do you see any issues marking it as public instead. ?

Provide non MQTT device sample

Hi guys,

From what I understand, one of the main goal of the protocol gateway is to allow non iot ready devices to communicate with Azure IoT Hub. For instance, a TCP based proprietary protocol GPS tracker could connect to the protocol gateway and reach the Azure IoT Hub though it.

The sample provided in this project is demonstrating a device that already support MQTT. I think you should provide a sample where the iot device don't support any of MQTT/AMQP/HTTP/TLS but plain old TCP with some basic protocol.

What do you think ?
Thanks!
Jean

Azure-iot-protocol-gateway git repo to replace SLAB with this: https://www.nuget.org/packages?q=Microsoft.Diagnostics.EventFlow

Basically if you use an Azure Storage library greater than or equal to 7.0, the SemanticLogging library doesn’t seem to work for cloud deployment.

Deploying a Cloud Services Host and after deployment we are getting following error with worker role.

ProtocolGateway.Host.Cloud.Service_IN_0: BusyRole
Starting role... Unhandled Exception: One or more errors occurred. at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at ProtocolGateway.Host.Cloud.Service.WorkerRole.Run() in C:\azure-iot-protocol-gateway-master\host\ProtocolGateway.Host.Cloud.Service\WorkerRole.cs:line 31 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal() at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b__2() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Inner Exception: Method not found: 'Void Microsoft.WindowsAzure.Storage.Table.CloudTableClient.set_RetryPolicy(Microsoft.WindowsAzure.Storage.RetryPolicies.IRetryPolicy)'. at Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Sinks.WindowsAzureTableSink..ctor(String instanceName, String connectionString, String tableAddress, TimeSpan bufferInterval, Int32 maxBufferSize, TimeSpan onCompletedTimeout) at Microsoft.Practices.EnterpriseLibrary.SemanticLogging.WindowsAzureTableLog.LogToWindowsAzureTable(IObservable1 eventStream, String instanceName, String connectionString, String tableAddress, Nullable1 bufferingInterval, Boolean sortKeysAscending, Nullable`1 onCompletedTimeout, Int32 maxBufferSize) at ProtocolGateway.Host.Cloud.Service.WorkerRole.d__5.MoveNext() in C:\azure-iot-protocol-gateway-master\host\ProtocolGateway.Host.Cloud.Service\WorkerRole.cs:line 68

How do I take this for a spin in my local environment?

I am just trying to learn the programming concepts used in this project and would like to take it for a spin so that I can debug and understand the code flow.

The issue I am facing is that I am unable to get any MQTT clients to connect. I've tried MQTT.fx and MQTT Spy. Both of them fail when trying to establish a connection. The exception message is:

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

So it looks like I may have mis-configured the certificates somewhere, but have no clue what or where. For the server project, I have replaced the default .pfx with a certificate from a real CA. I am just reusing the certificate I purchased from a CA for my domain to use https. Is it ok to use this certificate for this purpose?

On the client, I choose TLS 1.2 as the protocol version. Is that ok?

On the client, I choose the root CA certificate (.cer file) I got from the CA that signed my domain certificate (Comodo). Is this the correct certificate to use on the client app?

I've been struggling for 2 days now, but have no clue what/where to fix. Any help is appreciated.

Device disconnects not detected

This is related to #101, since downloading the code, creating my own nuget packages and publishing them to my own repo solves this, but because off #101, this fix cannot be downloaded because dotnetty dependencies are out-of-band between the protocol gateway nuget packages.

When I break an MQTT client/device connection, the disconnect is never relayed to the IOT hub via the protocol gateway UNLESS I update the storage package which depends upon dotnetty-signed nuget packages AND remove and reinstall dotnetty (to the non "-signed") versions.

Please, please please update your storage provider nuget package. For now I'm switching to forked protocol gateway nuget packages since it's apparent that nobody here will keep these packages up-to-date.

Deploying Cloud Sample - References not correct

I've been trying to package the cloud example in order to deploy the Gateway as a WorkerRole.

Some of the references could not be resolved. I used "Manage Nuget Packages for Solution" and restored missing packages, this fixed some errors but not all.

In Solution Explorer the following references are still marked with a warning sign:

  • Microsoft.Azure.Devices.ProtocolGateway.Core
  • Microsoft.Azure.Devices.ProtocolGateway.Providers.CloudStorage

Is there a way to resolve this or is this in fact an issue?

Additional Information
Complete Error Output from packaging:
https://gist.github.com/bastisk/342a0fed8ece3e4b79d9

Environment

  • Visual Studio 2015 CE on Windows Server 2012 VM on Azure
  • installed Azure SDK v2.7

Creation Date in subscription is always set to Current UTC date time During DeSerialization

During the Connect in case of clean session set to false the Session state is loaded from the Blob storage is de serialized. During the deserialization , the subscription creation date time is always getting set to current UTC date time due to which protocol gateway fails to process the messages sent during the disconnection.

In order to fix this we have added [JsonConstructor] attribute on top of the one which requires the Creation time. Please share your inputs on this proposed change.

Current repository may not be up to date

Update: I messed up something. This issue may be deleted/closed.

Current version of MqttIotHubAdapter.cs in the repository calls this method with two parameters:

Util.DeriveQos(message, this.settings);

But the DeriveQos method in Util Class expects a third Scope parameter (and is not an overloaded method).

Did I miss something or is the current version of MqttIotHubAdapter.cs on GitHub outdated?

mqtt-dup property handling

Setup Description

In my company's setup we use set of services (written in Java + Spring) running as Docker swarm containers. One of these services takes care of processing messages from IoT Hub, augmenting them and dispatching them to their respective destinations (mostly Service Bus queues).

When an event is read from IoT Hub, it is read by Event Processor Host and all of its application properties are copied while system properties are ignored apart from sender device ID.

When a message is sent to the receiver's queue, the Spring's JmsTemplate is used and BytesMessage is created with the payload and properties read from the initial event's application properties as well as properties collected during message augmentation are assigned to it as String properties.

Problem Description

Sometimes when trying to send the message via JMS tools to the Service Bus queue we get following JMSException:

Identifier contains invalid JMS identifier character '-': 'mqtt-dup'

I haven't found the specific messages causing this problem, but I presume that the mqtt-dup is used as value of the DupProperty and this property is assigned not as system property of an event, but as application property. Then this property slips through during reading the event from IoT Hub and causes incompatibility issues with JMS when trying to apply it to a JMS message.

I only found such property value used in iot protocol gateway code so that is why ask here if such problem is reald or if I should search for the root of the issue elsewhere. Thanks for any comment on this!

No longer compatible with new Microsoft.Azure.Devices.Client releases

ReadOnlyByteBufferStream throws a NotSupportedException when Position is called:
https://github.com/Azure/azure-iot-protocol-gateway/blob/master/src/ProtocolGateway.Core/ReadOnlyByteBufferStream.cs#L44

RetryDelegatingHandler calls the stream's Position when sending messages SendMessageWithRetryAsync:
https://github.com/Azure/azure-iot-sdks/blob/master/csharp/device/Microsoft.Azure.Devices.Client/Transport/RetryDelegatingHandler.cs#L178

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.