Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codespace Config: project launching #19

Merged
merged 17 commits into from
Feb 17, 2022
Merged

Conversation

Arlodotexe
Copy link
Member

@Arlodotexe Arlodotexe commented Dec 28, 2021

Overview

This PR aims to configure the repo so we can launch sample apps in a GitHub Codespace as easily as possible.
Closes #15, closes #16, partially addresses #28

Demo from a freshly rebuilt container:

launch-samples-in-codespace-demo.mp4

Changes

  • Added devcontainer config - with PowerShell (for future scripting), .NET 6 and other required components for building WASM in VSCode.
  • Renamed root solution - AllExperimentsSamples.sln -> Toolkit.Labs.All.sln
  • Added extension recommendation - An optional solution explorer that feels more like Visual Studio, instead of browsing raw files.
  • Autostart / autoforward ports -- when an Uno app is available on port 5000, a preview window opens automatically.
  • Launch configs - for the multi-sample and current single-sample projects. When a new sample project is created, we'll need to amend this file so it can be launched in a codespace
  • Add infrastructure for multi-targeting Uno libraries between WinUI 2 and WinUI 3.

Notes

  • Uno requires port 5000 to be made public to view the app in a codespace. After much research, I wasn't able to find a way to automatically make this port public. For now, I've added a label to the port to make instructions a bit clearer.
  • First build in a Codespace is slow. Subsequent builds are much quicker.
  • Direct linking to specific samples may be possible, but it'll require some tinkering and research to nail down the setup
    • Separate folders can have a different devcontainer files. (Configuring separate containers).
    • Workspaces can be scoped to different folders.
    • You can link directly to a workspace in a codespace like this (see link format, clicking won't work anymore).

@Arlodotexe
Copy link
Member Author

Arlodotexe commented Feb 8, 2022

The addition of the WinAppSDK has broken this PR. WASM is .NET 5 and WinAppSDK is .NET 6 (Windows specific), so it's attempting to compile both for libraries and failing because a codespace isn't Windows.

@Arlodotexe Arlodotexe mentioned this pull request Feb 10, 2022
@Arlodotexe
Copy link
Member Author

@michael-hawker Ready to merge

@Arlodotexe Arlodotexe merged commit 903b4cb into main Feb 17, 2022
@Arlodotexe Arlodotexe deleted the feature/codespace-config branch February 17, 2022 21:51
Martin1994 pushed a commit to Martin1994/Labs-Windows that referenced this pull request Sep 2, 2023
…despace-config

Codespace Config: project launching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up launch.json to open each sample in VSCode Live-Share Enabled by Default
3 participants