- VSCode or Visual Studio 2017
- .NET Core 2.0
- PWABuilder CLI Tool (install it with
npm install -g pwabuilder
)
- Open the demo-app.sln Solution file in VS 2017
- Press F5 to run and debug the web application.
-
From VSCode, use the Open Folder option from the File Menu and select the
webapp
folder. -
Press F5 to run and debug the web application.
(The first time, VSCode will ask for an Environment, select .NET Core and press F5 again)
-
(Alternatively) From a terminal/cmd run
dotnet run
from thewebapp
folder.
-
Open a terminal/cmd on the root repository folder.
-
Run
pwabuilder run windows10 package\BUILD2018DEMO
to sideload and start the PWA. (Make sure the application is running, otherwise the PWA won't work)
In order to recieve Push Notifications in the PWA when you send emails from Outlook, the application's backend needs to be available to the outside world, so Microsoft Graph can invoke the listening endpoint in the NotificationsController.
-
Create a Windows App registration in the Windows Dev Center (You'll need to register for a Windows Developer account).
-
Create a Notification Hub in Azure (more information).
-
Configure the Notification Hub with Windows Native Notifications (WNS), using the PackageSID + Secret from your Windows App registration in the Windows Dev Center (more information).
-
Open appsettings.json and update the
HubConnectionString
andHubName
settings. -
Either deploy the application or expose your http://localhost:5000/ using ngrok to the outside world.
-
When using ngrok, update the ClientApp/services/config.ts with the https url provided by ngrok. E.g.:
export const BackendBaseUrl: string = 'https://XXXXX.ngrok.io'
-
Update the APPX Manifest with the Package Indentity Name and Publisher Identity:
From:
<Identity Name="INSERT-YOUR-PACKAGE-IDENTITY-NAME-HERE" Publisher="CN=INSERT-YOUR-PACKAGE-IDENTITY-PUBLISHER-HERE" Version="1.0.0.0" ProcessorArchitecture="neutral"/>
To:
<Identity Name="12836YourPublisherName.BUILD2018DEMO" Publisher="CN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" Version="1.0.0.0" ProcessorArchitecture="neutral"/>
-
Re-install your PWA using the steps above, Installing the PWA in Windows 10.
-
Open the PWA and login.
-
(Recommended) Install the Microsoft Edge DevTools Preview to debug and see errors in the Microsoft Graph API Subscription requests. Press F12 once the tools are installed and the PWA opened.