Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/310.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.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# 在模块CommonLanguageUntimeLibrary中找不到类型System.Resource.ResourceSet_C#_Uwp_Bluetooth Lowenergy - Fatal编程技术网

C# 在模块CommonLanguageUntimeLibrary中找不到类型System.Resource.ResourceSet

C# 在模块CommonLanguageUntimeLibrary中找不到类型System.Resource.ResourceSet,c#,uwp,bluetooth-lowenergy,C#,Uwp,Bluetooth Lowenergy,我从Microsoft下载了UWP BLE zip示例 一切正常,我只想使用if语句检查从BLE设备接收到的值是否为特定文本 所以我去把这样的代码添加到Scenario2\u Client.xaml.cs private string SupremeTest(IBuffer buffer, GattPresentationFormat format) { byte[] data; CryptographicBuffer.CopyTo

我从Microsoft下载了UWP BLE zip示例

一切正常,我只想使用
if
语句检查从BLE设备接收到的值是否为特定文本

所以我去把这样的代码添加到
Scenario2\u Client.xaml.cs

private string SupremeTest(IBuffer buffer, GattPresentationFormat format)
        {
            byte[] data;
            CryptographicBuffer.CopyToByteArray(buffer, out data);
            if (Encoding.UTF8.GetString(data) == "Test")
            {
                return null;
            }
            return null;
        }
但是在部署项目时出现了一个错误

在模块CommonLanguageUntimeLibrary中找不到System.Resources.ResourceSet类型。


我做错了什么?

这应该是XAML错误,请在输出窗口中查找消息的全文。所以和你发布的代码片段或蓝牙无关。@HansPassant嗨!!非常感谢。在你给了我提示之后,我发现
使用System.Windows.Forms
导致了这个问题。不过,输出中没有说明任何有用的内容。@HansPassant顺便说一句,您是否有幸知道如何将
System.Windows.Forms
导入此UWP项目?UWP项目不支持System.Windows.Forms。我可以知道为什么要使用System.Windows.Forms吗?正如我所说,uwp项目不支持System.Windows.Forms,但您可以尝试使用类来实现与sendkeys类似的功能。