简体   繁体   English

无法在Windows 10 IoT上执行.NET HelloWorld示例应用程序

[英]Unable to execute .NET HelloWorld sample app on Windows 10 IoT

I am using Visual Studio 2015 Community on Windows 7 with VS 2015 Update 1 and universal applications package installed. 我正在Windows 7上使用Visual Studio 2015社区,并安装了VS 2015 Update 1和通用应用程序包。 I am able to compile the HelloWorld C# sample for ARM from the Windows 10 IoT samples package. 我可以从Windows 10 IoT示例程序包中为ARM编译HelloWorld C#示例。 I am also able to copy the file (and all assemblies) to my Raspberry Pi2 using the Windows Explorer. 我还可以使用Windows资源管理器将文件(和所有程序集)复制到Raspberry Pi2中。

Still I can not run the application on Windows 10 IoT. 仍然无法在Windows 10 IoT上运行该应用程序。 It says "The system cannot execute the specified program". 它显示“系统无法执行指定的程序”。

I can not run it on my Windows 7 as well (compiled for x86), but I suppose that is because I lack the Windows 10 universal applications runtime. 我也不能在Windows 7(针对x86编译)上运行它,但是我想那是因为我缺少Windows 10通用应用程序运行时。 But then it should still work on the Windows 10 IoT. 但是然后它仍然可以在Windows 10 IoT上运行。

Just copy/paste shoule work, right? 只是复制/粘贴单元工作,对吗?

I also have the "Compile with .NET Native tool chain" enabled in VS. 我还在VS中启用了“使用.NET本机工具链进行编译”。

You need to upgrade your PC to the public release of Windows 10 (version 10.0.10240) 您需要将PC升级到Windows 10的公共发行版(版本10.0.10240)

See all requirements here: http://ms-iot.github.io/content/en-US/GetStarted.htm 在此处查看所有要求: http : //ms-iot.github.io/content/zh-CN/GetStarted.htm

Please mark my reply as answer if you found it helpful. 如果您认为有帮助,请标记为答复。

One way that I found is to create an AppPackage (Store package). 我发现的一种方法是创建AppPackage(存储包)。 Then you access the Windows IoT webgui through http://yourwindowsiot:8080 . 然后,您可以通过http:// yourwindowsiot:8080访问Windows IoT webgui。 Then you can deploy your package from the "Apps" menu. 然后,您可以从“应用程序”菜单部署程序包。

Do not forget to add the dependencies. 不要忘记添加依赖项。 For me these are 3: 对我来说,这些是3:

Microsoft.NET.Native.Framework.1.2.appx
Microsoft.NET.Native.Runtime.1.1.appx
Microsoft.VCLibs.ARM.14.00.appx

Tested in release mode. 在发布模式下测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM