-
Notifications
You must be signed in to change notification settings - Fork 80
Getting started
To get started with the Windows Community Toolkit, you can follow these steps:
git clone --recurse-submodules https://github.com/CommunityToolkit/Windows.git
The folder will contain a tooling
and components
folder. The latter contains all the individual Toolkit components.
In an existing component folder, you can run OpenSolution.bat
to generate the .sln
:
cd *path of your component*
.\OpenSolution.bat
The .sln` will open automatically, and contains the source project (component code), samples project (samples and documentation) and tests project (for all tests).
You can test your component code by adding it to a sample, and use the different startup projects to test it on UWP, WinAppSDK or Uno.
Run the following script to navigate to the cloned folder, install SlnGen
and run GenerateAllSolutions.bat
.
cd *path of your Toolkit folder*
dotnet tool restore
.\GenerateAllSolution.bat
This will generate and open the CommunityToolkit.AllComponents.sln
. In Visual Studio, select the preferred startup project (Uwp
(WinUI2), WinAppSDK
(WinUI3) or Wasm
(Uno).
To create a new component run the following script:
cd *path of your Toolkit folder*
dotnet new --install .\tooling\ProjectTemplate\
cd components
dotnet new ctk-component -n MyExperimentNameHere
This will generate a new component folder that contains src
, samples
and tests
folders.
Errors that might come up when running the .bat
files:
Make sure you set the execution policy. (More info: https://lazyadmin.nl/powershell/running-scripts-is-disabled-on-this-system/)
Error: Could not find a Visual Studio installation. Please run from a command window that has MSBuild.exe on the PATH or specify the full path to devenv.exe via the -vs command-line argument
Use Developer Command Prompt for VS2022
, or add msbuild.exe
to your PATH variables to use it in e.g. PowerShell
. (More info: https://stackoverflow.com/a/12608705)
- Home π
- Welcome π
- Principles βοΈ
- Roadmap πΊ
- .NET Foundation
- Why Microsoft supports this project
- License π
- Getting Started π
- Sample App π±
- NuGet Packages π¦
- Preview Packages π
- Toolkit Labs π§ͺ
- Questions β
- Discussions π₯
- Submitting an Issue βοΈ
- Good First Issue π
- Help Wanted π
- Bug Fixes π
- Feature Requests π«
- Create and Submit PullRequest π
- Documentation π
- Review PR π
- Avoid Roadblocks π§
- Required Dependencies π
- Quick Start β‘
- Sample Development π±
- Testing π§ͺ
- Accessibility Guideline βΏ
- Coding Style and Conventions β
- Building XAML Controls π
- CI and Infrastructure πΎ
- Updating ToolkitLabs.dev π
- Migration Guide from v7 to v8 π
- How the Project is Organized ποΈ
- Join the Toolkit Organization πͺ
- Hall of Fame π