Skip to content

Commit 512a04f

Browse files
Merge pull request #2 from CommunityToolkit/readme-build
Add readme and build scripts from other repo for initial setup and testing
2 parents b1fd78d + bd5d524 commit 512a04f

20 files changed

Lines changed: 1708 additions & 4 deletions

.config/dotnet-tools.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"uno.check": {
6+
"version": "1.10.0",
7+
"commands": [
8+
"uno-check"
9+
]
10+
},
11+
"xamlstyler.console": {
12+
"version": "3.2206.4",
13+
"commands": [
14+
"xstyler"
15+
]
16+
},
17+
"microsoft.visualstudio.slngen.tool": {
18+
"version": "9.5.4",
19+
"commands": [
20+
"slngen"
21+
]
22+
}
23+
}
24+
}

.devcontainer/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet/.devcontainer/base.Dockerfile
2+
3+
# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal
4+
ARG VARIANT="6.0-bullseye-slim"
5+
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
6+
7+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
8+
ARG NODE_VERSION="none"
9+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10+
11+
# [Optional] Uncomment this section to install additional OS packages.
12+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13+
# && apt-get -y install --no-install-recommends <your-package-list-here>
14+
15+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
16+
&& apt-get -y install --no-install-recommends ninja-build
17+
18+
RUN apt-get update && apt-get install -y --no-install-recommends apt-transport-https dirmngr gnupg ca-certificates \
19+
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
20+
&& echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list \
21+
&& apt-get update && apt-get -y --no-install-recommends install mono-complete
22+
23+
# [Optional] Uncomment this line to install global node packages.
24+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"folders": [
3+
{
4+
"path": ".."
5+
}
6+
],
7+
"settings": {
8+
"omnisharp.defaultLaunchSolution": "CommunityToolkit.AllComponents.sln",
9+
"omnisharp.disableMSBuildDiagnosticWarning": true,
10+
"omnisharp.enableRoslynAnalyzers": true,
11+
"omnisharp.useGlobalMono": "never",
12+
"csharp.suppressBuildAssetsNotification": true,
13+
"csharp.suppressDotnetInstallWarning": true,
14+
"csharp.suppressDotnetRestoreNotification": true,
15+
"csharp.semanticHighlighting.enabled": true,
16+
"omnisharp.enableImportCompletion": true,
17+
"omnisharp.enableMsBuildLoadProjectsOnDemand": true
18+
}
19+
}

.devcontainer/devcontainer.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet
3+
{
4+
"name": "C# (.NET)",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
9+
// Append -bullseye or -focal to pin to an OS version.
10+
"VARIANT": "6.0",
11+
// Options
12+
"NODE_VERSION": "lts/*"
13+
}
14+
},
15+
// Set *default* container specific settings.json values on container create.
16+
"settings": {},
17+
// Add the IDs of extensions you want installed when the container is created.
18+
"extensions": [
19+
"ms-dotnettools.csharp",
20+
"unoplatform.vscode",
21+
"ms-vsliveshare.vsliveshare",
22+
"ms-vscode.powershell"
23+
],
24+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
25+
"forwardPorts": [
26+
5000,
27+
5001
28+
],
29+
30+
"appPort": [
31+
5000,
32+
5001
33+
],
34+
// [Optional] To reuse of your local HTTPS dev cert:
35+
//
36+
// 1. Export it locally using this command:
37+
// * Windows PowerShell:
38+
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
39+
// * macOS/Linux terminal:
40+
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
41+
//
42+
// 2. Uncomment these 'remoteEnv' lines:
43+
// "remoteEnv": {
44+
// "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere",
45+
// "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx",
46+
// },
47+
//
48+
// 3. Do one of the following depending on your scenario:
49+
// * When using GitHub Codespaces and/or Remote - Containers:
50+
// 1. Start the container
51+
// 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer
52+
// 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https"
53+
//
54+
// * If only using Remote - Containers with a local container, uncomment this line instead:
55+
// "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ],
56+
// Use 'postCreateCommand' to run commands after the container is created.
57+
// "postCreateCommand": "dotnet restore",
58+
"postCreateCommand": "dotnet dev-certs https --trust",
59+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
60+
"remoteUser": "vscode",
61+
"features": {
62+
"powershell": "latest"
63+
},
64+
"portsAttributes": {
65+
"5000": {
66+
"label": "WebAssembly App",
67+
"onAutoForward": "openPreview"
68+
}
69+
}
70+
}

0 commit comments

Comments
 (0)