Visual Studio Code Extension
To get started on using VS Code, head over to our guides.
In this page, you'll find other topics about VS Code support, such as code snippets or how to upgrade an existing app to use VS Code.
Explore other features
The Uno Platform extension provides additional features to help you develop your application.
You can explore them by pressing F1
or Ctrl-Shift-P
and typing Uno Platform
to see the list of available commands.
Using code snippets
Adding a new Page
- In the MyApp folder, create a new file named
Page2.xaml
- Type
page
then press thetab
key to add the page markup - Adjust the name and namespaces as needed
- In the MyApp folder, create a new file named
Page2.xaml.cs
- Type
page
then press thetab
key to add the page code behind C# - Adjust the name and namespaces as needed
Adding a new UserControl
- In the MyApp folder, create a new file named
UserControl1.xaml
- Type
usercontrol
then press thetab
key to add the page markup - Adjust the name and namespaces as needed
- In the MyApp folder, create a new file named
UserControl1.xaml.cs
- Type
usercontrol
then press thetab
key to add the page code behind C# - Adjust the name and namespaces as needed
Adding a new ResourceDictionary
- In the MyApp folder, create a new file named
ResourceDictionary1.xaml
- Type
resourcedict
then press thetab
key to add the page markup
Other snippets
rd
creates a newRowDefinition
cd
creates a newColumnDefinition
tag
creates a new XAML tagset
creates a newStyle
setterctag
creates a newTextBlock
close XAML tag
Updating an existing application to work with VS Code
An existing application needs additional changes to be debugged properly.
- At the root of the workspace, create a folder named
.vscode
- Inside this folder, create a file named
launch.json
and copy the contents of this file. - Replace all instances of
MyExtensionsApp._1
with your application's name inlaunch.json
. - Inside this folder, create a file named
tasks.json
and copy the contents of this file.
Advanced debugging
You can find advanced Code debugging topic here.