我正在尝试使用带有VS 2015RC的Windows 10 build 10074在raspberry pi 2上调试示例应用程序.
我之前已成功完成此操作,但我目前正在收到此错误:Visual Studio 2015远程调试器(MSVSMON.EXE)似乎没有运行.
似乎很难解决这个问题,但我找不到任何特定的VS2015和物联网.
我正在调试在Visual Studio 2015 Community Edition中创建的简单Hello World应用程序.它是一个.NET通用应用程序,没有问题.
我只是在应用程序空闲时点击Visual Studio中的Break(暂停)按钮,然后转到Debug | Save dump as ...并尝试使用默认设置(Minidump with heap)保存转储.
但是,我收到以下错误消息:
保存转储时出错.指针无效.
保存没有堆信息的转储有效,但是对于要分析的.NET应用程序,我应该有堆.
版本细节:
我正在制作一个Modbus库(再次......).这次它意味着在Windows 10 IoT Core上运行.
我遇到了一个有趣的问题.这段代码:
string aqs = SerialDevice.GetDeviceSelector();
var dis = await DeviceInformation.FindAllAsync(aqs);
var port = await SerialDevice.FromIdAsync(dis[0].Id);
if (port != null) {
port.BaudRate = 9600;
port.DataBits = 8;
port.StopBits = SerialStopBitCount.One;
port.Parity = SerialParity.None;
port.Handshake = SerialHandshake.None;
port.ReadTimeout = TimeSpan.FromMilliseconds(1000);
port.WriteTimeout = TimeSpan.FromMilliseconds(1000);
}
Run Code Online (Sandbox Code Playgroud)
在通用应用程序中使用完美.当然,如果您将以下代码添加到Package.appxmanifest:
<Capabilities>
<DeviceCapability Name="serialcommunication">
<Device Id="any">
<Function Type="name:serialPort" />
</Device>
</DeviceCapability>
</Capabilities>
Run Code Online (Sandbox Code Playgroud)在通用类库中使用(文件 - >新建项目 - > ... - > Windows - >通用 - > VS2015中的类库(通用Windows))从mscorlib.dll创建空引用异常,这与删除时相同来自Universal app的Package.appxmanifest的DeviceCapability.
我怀疑这种行为与类库没有清单文件有关,因此没有适当的权限.
我可以在类库中使用Windows.Devices.SerialCommunication吗?
是微软让我告诉用户'嘿!我为你制作了一个无用的库,你必须在你的任何应用程序中单独实现传输层.?
c# class-library serial-port win-universal-app windows-10-iot-core
我的设置:
在Windows 7 Pro上的VirtualBox中运行的Windows 10 VM
运行Windows 10 IoT核心的Raspberry Pi 3 - 10.0.16299.19
VM可以看到RaspberryPi/Wionows IoT
我知道这是因为:
我不能做的是使用Windows IoT Remote Client.我想要的,所以我可以看到我的代码产生的变化.
当我启动客户端时,我得到旋转缓冲动画,然后是空白的白色屏幕.
我按照网络文章的建议尝试了以下内容:
在管理员级别PowerShell中键入以下内容:
净启动WinRM
Set-Item WSMan:\ localhost\Client\TrustedHosts -Value PiName
这允许Powershell访问但不更改远程桌面
我接下来应该尝试什么?
我有两台 Zebra 蓝牙打印机,一个 MZ220 和一个 iMZ220。我会做的“唯一”事情是在 Raspberry Pi 2 上使用 Windows IoT 系统打印文本。仅此而已;)
示例: Line1 " Hello World"
Line2 "---------------"
Line3 "Date:01.01.2016"
Line4"Time: 18:00"
ORICO的USB蓝牙适配器BTA-403,我想效果很好。使用资源管理器,我可以连接到打印机。但是,接下来呢?如何连接到打印机?我怎么说打印机打印"Hello World!"
谢谢!
printing bluetooth zebra-printers raspberry-pi2 windows-10-iot-core
我有一个带有Windows 10 ioT的Raspberry Pi 2.如何使用C#设置设备的时间?谢谢
PS如果不可能,我该如何设置时区?
有人可以给我一些关于如何在Windows 10下在Raspberry Pi上播放简单wav文件的开始吗?我想要的是将几个文件加载到内存和特定事件中,如果可能的话,开始播放它们,同时播放声音.我尝试了这个,但它失败了DLLImport行(未找到CoreDll.dll).因此,非常欢迎任何聪明的链接或样本.谢谢,vm
我创建了一个简单的测试项目,它运行,没有错误退出,但我只听到沉默.难道我做错了什么?我预计下面的代码会播放50次短鼓样本.
namespace BackTC
{
public sealed class StartupTask : IBackgroundTask
{
public void Run(IBackgroundTaskInstance taskInstance)
{
btnPlayWavSound_Tapped();
}
private async void btnPlayWavSound_Tapped()
{
StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/CLudwigKick-Dyn01.WAV"));
MediaPlayer player = BackgroundMediaPlayer.Current;
player.SetFileSource(file);
for (int i = 1; i <= 50; i++)
{
player.Volume = 100;
player.Play();
}
}
}
}
Run Code Online (Sandbox Code Playgroud) 我可以在Windows 10 IOT运行设备(R-PI 3)上创建Web应用程序吗?
在其他PI上,我已经使Debian与LightHttpd一起运行,但在Win10 IOT设备上的网络服务器上似乎找不到任何东西。
我确实看到了一些有关自我创建非常简单的Web服务器(例如,侦听端口)的示例,但是应该有更多的示例吗?
PS我添加了2个标记:Windows IOT和Windows-10-IOT-Core ....这些相同吗?
Windows IoT的最新版本是否包含屏幕键盘?我知道使用webview提供键盘的其他建议,但我更喜欢我的UWP应用程序的OSK.理想的国际化.
我正在使用此代码但不工作并抛出此异常:对象引用未设置为对象设备[0]的实例,为我提供空值.
private async void ConnectToSerialPort()
{
string selector = SerialDevice.GetDeviceSelector("COM7");
DeviceInformationCollection devices = await DeviceInformation.FindAllAsync(selector);
if (devices.Count > 0)
{
DeviceInformation deviceInfo = devices[0];
SerialDevice serialDevice = await SerialDevice.FromIdAsync(deviceInfo.Id);
Debug.WriteLine(serialDevice);
serialDevice.BaudRate = 9600;
serialDevice.DataBits = 8;
serialDevice.StopBits = SerialStopBitCount.Two;
serialDevice.Parity = SerialParity.None;
DataWriter dataWriter = new DataWriter(serialDevice.OutputStream);
dataWriter.WriteString("your message here");
await dataWriter.StoreAsync();
dataWriter.DetachStream();
dataWriter = null;
}
else
{
MessageDialog popup = new MessageDialog("Sorry, no device found.");
await popup.ShowAsync();
}
}
private void Button_Click(object sender, RoutedEventArgs e)
{
ConnectToSerialPort();
} …Run Code Online (Sandbox Code Playgroud)