Windows 10 IoT Raspberry Pi 2:自动发布应用程序

时间:2021-10-05 07:29:23

I'm starting making experience with the Raspberry Pi 2 Development with Windows 10 and I was wondering how can I configurate the Raspberry Pi 2 to autostart my own published application, I developed in Visual Studio? And furthermore: How can I set up time & Region on my device?

我正在开始使用Windows 10的Raspberry Pi 2开发经验,我想知道如何配置Raspberry Pi 2以自动启动我自己发布的应用程序,我在Visual Studio中开发?此外:如何在我的设备上设置时间和地区?

Thank you so much for all helpfull and well meant answers.

非常感谢你们所有有用和善意的答案。

4 个解决方案

#1


I was looking at how to do this myself this evening. What I found was that you can edit the Pi's startup through Powershell on your PC and tell it what app to load.

我今晚看着自己该怎么做。我发现你可以通过PC上的Powershell编辑Pi的启动,并告诉它要加载什么应用程序。

Setting startup app:
Use the startup editor to configure startup apps on your Windows IoT Core device. Run Startup with any of the following options:

Startup /d displays the list of startup apps.

Startup /a [name] [path] adds an app with name name located at path path to the list of startup tasks.

Startup /r [name] removes an app with name name from the list of startup tasks.

For further help, try startup.exe /?

设置启动应用程序:使用启动编辑器在Windows IoT核心版设备上配置启动应用程序。使用以下任一选项运行Startup:Startup / d显示启动应用程序列表。启动/ [名称] [路径]添加名称位于启动任务列表的路径路径的应用程序。 Startup / r [name]从启动任务列表中删除名称为name的应用程序。如需进一步的帮助,请尝试startup.exe /?

http://ms-iot.github.io/content/win10/tools/CommandLineUtils.htm

As far as region settings, you can do that while loading up the default screen on the Pi. When you get to the Windows screen, there is a gear icon in the lower right that will bring you there. Unfortunately, there isn't a real time clock built into the Raspberry Pi, so you'd have to add one (hardware) or pull it from the internet.

就区域设置而言,您可以在加载Pi上的默认屏幕时执行此操作。当您进入Windows屏幕时,右下方会出现一个齿轮图标,可以将您带到那里。不幸的是,Raspberry Pi中没有内置的实时时钟,所以你必须添加一个(硬件)或从互联网上取下它。

#2


Use IotStartup.exe by Power shell.

使用Power shell的IotStartup.exe。

  1. IotStartup list -> Find out your app name.

    IotStartup列表 - >找出您的应用名称。

  2. IotStartup add [YourApp] -> Add App init startup.

    IotStartup添加[YourApp] - >添加App init启动。

  3. Reboot.

#3


Something to be warned about.

需要警告的事情。

At the current version, by default Visual Studio generates a random package name for your application, regardless your Project Name. My project's name was HelloWorld but it generated a totally different package name.

在当前版本中,默认情况下,无论您的项目名称如何,Visual Studio都会为您的应用程序生成随机包名称。我的项目名称是HelloWorld,但它生成了一个完全不同的包名。

The name is a random guid and it is being deployed by that name. You can change that name at Project Properties screen. In this example the package name goes as 7e3bb987-a1b9-4a67-9750492af7c7.

该名称是随机guid,并且正在使用该名称进行部署。您可以在“项目属性”屏幕中更改该名称。在此示例中,包名称为7e3bb987-a1b9-4a67-9750492af7c7。

Windows 10 IoT Raspberry Pi 2:自动发布应用程序

When I remotely connect and run iotstartup list I see that my package is there with that guid name.

当我远程连接并运行iotstartup列表时,我看到我的包有那个guid名称。

Windows 10 IoT Raspberry Pi 2:自动发布应用程序

I spent some time to find which app is mine, so I wanted to give heads up to others who might encounter the same. Just rename your Package Name to whatever you want and you'll be fine.

我花了一些时间来找到哪个应用程序是我的,所以我想要对可能遇到同样问题的其他人进行调查。只需将您的包名重命名为您想要的任何内容,您就可以了。

#4


The world's easiest way to accomplish this is the following order:

世界上实现这一目标的最简单方法是以下顺序:

  1. open your browser
  2. 打开你的浏览器

  3. Go to > http://your_RPI2_IP:8080/AppXManager.htm
  4. 转到> http:// your_RPI2_IP:8080 / AppXManager.htm

  5. deploy your App from Visual Studio 2015 with configurations as seen here 3.1 to get this screen go to: project --> Properties --> Right click --> Open 4 after succesfull deployment select your startup app in the webManager and your RPI2 restarts
  6. 从Visual Studio 2015部署您的应用程序,其配置如此处所示3.1以使此屏幕转到:项目 - >属性 - >右键单击 - >在成功部署后打开4在webManager中选择您的启动应用程序并重新启动RPI2

#1


I was looking at how to do this myself this evening. What I found was that you can edit the Pi's startup through Powershell on your PC and tell it what app to load.

我今晚看着自己该怎么做。我发现你可以通过PC上的Powershell编辑Pi的启动,并告诉它要加载什么应用程序。

Setting startup app:
Use the startup editor to configure startup apps on your Windows IoT Core device. Run Startup with any of the following options:

Startup /d displays the list of startup apps.

Startup /a [name] [path] adds an app with name name located at path path to the list of startup tasks.

Startup /r [name] removes an app with name name from the list of startup tasks.

For further help, try startup.exe /?

设置启动应用程序:使用启动编辑器在Windows IoT核心版设备上配置启动应用程序。使用以下任一选项运行Startup:Startup / d显示启动应用程序列表。启动/ [名称] [路径]添加名称位于启动任务列表的路径路径的应用程序。 Startup / r [name]从启动任务列表中删除名称为name的应用程序。如需进一步的帮助,请尝试startup.exe /?

http://ms-iot.github.io/content/win10/tools/CommandLineUtils.htm

As far as region settings, you can do that while loading up the default screen on the Pi. When you get to the Windows screen, there is a gear icon in the lower right that will bring you there. Unfortunately, there isn't a real time clock built into the Raspberry Pi, so you'd have to add one (hardware) or pull it from the internet.

就区域设置而言,您可以在加载Pi上的默认屏幕时执行此操作。当您进入Windows屏幕时,右下方会出现一个齿轮图标,可以将您带到那里。不幸的是,Raspberry Pi中没有内置的实时时钟,所以你必须添加一个(硬件)或从互联网上取下它。

#2


Use IotStartup.exe by Power shell.

使用Power shell的IotStartup.exe。

  1. IotStartup list -> Find out your app name.

    IotStartup列表 - >找出您的应用名称。

  2. IotStartup add [YourApp] -> Add App init startup.

    IotStartup添加[YourApp] - >添加App init启动。

  3. Reboot.

#3


Something to be warned about.

需要警告的事情。

At the current version, by default Visual Studio generates a random package name for your application, regardless your Project Name. My project's name was HelloWorld but it generated a totally different package name.

在当前版本中,默认情况下,无论您的项目名称如何,Visual Studio都会为您的应用程序生成随机包名称。我的项目名称是HelloWorld,但它生成了一个完全不同的包名。

The name is a random guid and it is being deployed by that name. You can change that name at Project Properties screen. In this example the package name goes as 7e3bb987-a1b9-4a67-9750492af7c7.

该名称是随机guid,并且正在使用该名称进行部署。您可以在“项目属性”屏幕中更改该名称。在此示例中,包名称为7e3bb987-a1b9-4a67-9750492af7c7。

Windows 10 IoT Raspberry Pi 2:自动发布应用程序

When I remotely connect and run iotstartup list I see that my package is there with that guid name.

当我远程连接并运行iotstartup列表时,我看到我的包有那个guid名称。

Windows 10 IoT Raspberry Pi 2:自动发布应用程序

I spent some time to find which app is mine, so I wanted to give heads up to others who might encounter the same. Just rename your Package Name to whatever you want and you'll be fine.

我花了一些时间来找到哪个应用程序是我的,所以我想要对可能遇到同样问题的其他人进行调查。只需将您的包名重命名为您想要的任何内容,您就可以了。

#4


The world's easiest way to accomplish this is the following order:

世界上实现这一目标的最简单方法是以下顺序:

  1. open your browser
  2. 打开你的浏览器

  3. Go to > http://your_RPI2_IP:8080/AppXManager.htm
  4. 转到> http:// your_RPI2_IP:8080 / AppXManager.htm

  5. deploy your App from Visual Studio 2015 with configurations as seen here 3.1 to get this screen go to: project --> Properties --> Right click --> Open 4 after succesfull deployment select your startup app in the webManager and your RPI2 restarts
  6. 从Visual Studio 2015部署您的应用程序,其配置如此处所示3.1以使此屏幕转到:项目 - >属性 - >右键单击 - >在成功部署后打开4在webManager中选择您的启动应用程序并重新启动RPI2