Debug WinRT app on second monitor with Visual Stud

2019-06-19 22:39发布

问题:

When I run or debug a winrt application, Visual Studio 2012 seems to start it always on the same monitor.

How can I force Visual Studio 2012 to start the app on my other monitor?

回答1:

Windows will deploy to which ever monitor you last viewed the Start screen on. So, here is what I do.

  • Start VS in Main Monitor
  • Bring up charms bar on Secondary monitor and select the Start charm
  • Launch debug from VS in Main Monitor

Your app should now launch in the secondary monitor.

I don't know if there is a way to set an option to do this - I haven't found one but haven't looked very hard since this works easy enough for me.



回答2:

On Win8.1, it seems like the app always opens on the primary display. I swapped my primary and secondary displays (right click on desktop -> screen resolution -> "Make this my main display").

I also customized my taskbar so that it appears on all monitors (right click on task bar -> properties -> "Show taskbar on all displays").



回答3:

I think, it is impossible. The only solution you have is to move it to that monitor and then open Start Screen only on it while debugging. In this case Win Store apps will open there



回答4:

You cannot force the app to start on the second monitor but you can move Visual Studio 2012 to the second monitor and start the WinRT app on the first monitor. Swap or move the primary monitor if needed.



回答5:

You do just active the Metro screen where you want to start the app ! Or after you can use these shortcut : Win+PageUp and Win+PageDown to switch



回答6:

You can also drag the app itself to the alternative monitor. As others have noted, the apps will continue to open on the last monitor that you used.

Update: If you have Visual Studio 2013, the latest update remembers which monitor was being used to run the WinRT app and opens it on that screen.