Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C#Azure和IOT对类型'的引用;溪流';要求在'中定义;System.RunTime';,但是找不到_C#_Azure_Windows 10 Iot Core_Azure Iot Hub - Fatal编程技术网

C#Azure和IOT对类型'的引用;溪流';要求在'中定义;System.RunTime';,但是找不到

C#Azure和IOT对类型'的引用;溪流';要求在'中定义;System.RunTime';,但是找不到,c#,azure,windows-10-iot-core,azure-iot-hub,C#,Azure,Windows 10 Iot Core,Azure Iot Hub,我正在尝试创建以下网站上的样本。它应该允许我向Azure发送数据 我查找了这个错误,但我没有使用交互式窗口,而且#r似乎不是答案。我相信这个问题阻止我使用我的头衔,但我会尝试 对类型“stream”的引用声明在“System.RunTime”中定义,但找不到该类型 引用消息的行获取此消息,下面带有wait的行获取“任务”消息。 using System.Text; using System.Threading.Tasks; using Microsoft.Azure.Devices.Clien

我正在尝试创建以下网站上的样本。它应该允许我向Azure发送数据

我查找了这个错误,但我没有使用交互式窗口,而且#r似乎不是答案。我相信这个问题阻止我使用我的头衔,但我会尝试

对类型“stream”的引用声明在“System.RunTime”中定义,但找不到该类型

引用消息的行获取此消息,下面带有wait的行获取“任务”消息。

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);
        }
    }
}
使用System.Text;
使用System.Threading.Tasks;
使用Microsoft.Azure.Devices.Client;
使用Windows.UI.Xaml.Controls;
命名空间MyFirstIotCoreApp
{
/// 
///可以单独使用或在框架内导航到的空页。
/// 
公共密封部分类主页面:第页
{
公共主页()
{
this.InitializeComponent();
SendDataToAzure();
}
专用异步任务SendDataToAzure()
{
DeviceClient DeviceClient=DeviceClient.CreateFromConnectionString(,TransportType.Http1);
var text=“您好,Windows 10!”;
var msg=新消息(Encoding.UTF8.GetBytes(text));
等待deviceClient.SendEventAsync(消息);
}
}
}
早上好

 Anytime I see an error referencing a missing item in a Framework library like
我的第一个想法是检查框架版本。一些功能 在开发新功能时,仅在框架的某些版本中存在

检查框架版本以查看是否已选择支持的版本 那个功能。

早上好

 Anytime I see an error referencing a missing item in a Framework library like
我的第一个想法是检查框架版本。一些功能 在开发新功能时,仅在框架的某些版本中存在

检查框架版本以查看是否已选择支持的版本
该功能。

我最终更改了目标,最小版本以匹配目标版本。在我的例子中,我使用的是Windows Fall Creators Update(10.0;Build 16299),我最终更改了目标的最小版本以匹配目标版本。就我而言,我使用的是Windows Fall Creators Update(10.0;Build 16299)