I am trying to create the sample on the following website. Its suppose to allow me to send data to Azure.
I looked up this error but I am not using the Interactive window and #r doesn't seem to be the answer. I believe that this issue prevents me from the use of my title, but I will try.
https://catalog.azureiotsuite.com/details?title=Raspberry_Pi3&source=home-page
"Reference to type 'stream' claims to be defined in 'System.RunTime', but it could not be found."
The line referring to Message gets this and the line below with the await gets it for 'Task'
using System.Text;
using System.Threading.Tasks;
using Microsoft.Azure.Devices.Client;
using Windows.UI.Xaml.Controls;
namespace MyFirstIotCoreApp
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
SendDataToAzure();
}
private async Task SendDataToAzure()
{
DeviceClient deviceClient = DeviceClient.CreateFromConnectionString(<replace>, TransportType.Http1);
var text = "Hello, Windows 10!";
var msg = new Message(Encoding.UTF8.GetBytes(text));
await deviceClient.SendEventAsync(msg);
}
}
}