Home:ALL Converter>Create UWP PWA app with Visual Studio 2019

Create UWP PWA app with Visual Studio 2019

Ask Time:2020-04-14T07:14:31         Author:Scott

Json Formatter

I am looking into building a Windows app using Microsoft's PWA model, where a PWA app can be wrapped in a UWP app and submitted to the store. I'm using these instructions: https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-edgehtml/windows-features#feedback

I'm on Visual Studio 2019, because, well, it's 2020 and all. However, these instructions appear to be only for VS 2017. All of the same project templates exist in VS2019, but don't quite work the same. Specifically the App.manifest in the Windows Application Packaging Project template doesn't support "StartPage".

I tried created a blank UWP app and just dropping in a WebView. It'll load an external PWA or webpage, but won't load a site from localhost...which is required to actually do any development.

Does anyone know how to make this work on VS2019 or have other thoughts on how I get this setup?

My ultimate goal is to create an PWA to run on Xbox/Windows 10, possibly using Blazor (client-side) for the PWA.

Author:Scott,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/61198278/create-uwp-pwa-app-with-visual-studio-2019
Richard Zhang :

In Visual Studio 2019, all templates (.jsproj) used to build UWP applications using Javascript have been removed, so you cannot use Visual Studio 2019 to structure your PWA-UWP project.\n\nIf you plan to build your UWP application through PWA and use some WinRT-API, you still need to use Visual Studio 2017.\n\nIn addition, UWP applications have local network loopback restrictions. During debugging, Visual Studio will lift this limitation, but in release mode, UWP applications cannot access localhost. Although the restrictions can be lifted in this way, UWP access to localhost is not A recommended approach.\n\nThanks.",
2020-04-14T01:11:26
yy