You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Launch Visual Studio, then click `Continue without code`. Click `Extensions` -> `Manage Extensions` from the Menu Bar.
54
37
55
-
:::image type="content" source="images/hello-world/manage-extensions.png" alt-text="Visual Studio Menu bar item that reads manage extensions":::
38
+
:::image type="content" source="../images/uno/uno-manage-extensions.png" alt-text="Visual Studio Menu bar item that reads manage extensions":::
56
39
57
40
In the Extension Manager expand the **Online** node and search for `Uno`, install the `Uno Platform` extension, or download it from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=unoplatform.uno-platform-addin-2022), then restart Visual Studio.
58
41
59
-
:::image type="content" source="images/hello-world/uno-extensions.png" alt-text="Manage Extensions window in Visual Studio with Uno Platform extension as a search result":::
42
+
:::image type="content" source="../images/uno/uno-extensions.png" alt-text="Manage Extensions window in Visual Studio with Uno Platform extension as a search result":::
60
43
61
44
## Create an application
62
45
@@ -66,26 +49,26 @@ Soon enough, you will be able to reap the benefits of this approach, as you can
66
49
67
50
Open Visual Studio and create a new project via `File` > `New` > `Project`:
68
51
69
-
:::image type="content" source="images/hello-world/uno-create-project.png" alt-text="Create a new project":::
52
+
:::image type="content" source="../images/uno/uno-create-project.png" alt-text="Create a new project":::
70
53
71
54
Search for Uno and select the Uno Platform App project template:
Specify a project name, solution name, and directory. In this example, our Hello World MultiPlatform project belongs to a Hello World MultiPlatform solution, which will live in C:\Projects:
Create a new C# solution using the **Uno Platform App** type from Visual Studio's **Start Page**. To avoid conflicting with the code from the previous tutorial, we'll give this solution a different name, "Hello World Uno".
80
63
81
-
Now you'll choose a base template to take your Hello World application multi-platform. The Uno Platform App template comes with two preset options that allow you to quickly get started with either a Blank solution or the Default configuration which includes references to the Uno.Material and Uno.Toolkit libraries. The Default configuration also includes Uno.Extensions which is used for dependency injection, configuration, navigation, and logging, and it uses MVUX in place of MVVM, making it a great starting point for rapidly building real-world applications.
64
+
Now you'll choose a base template to take your Hello World application multi-platform. The Uno Platform App template comes with two preset options that allow you to quickly get started with either a Blank solution or the Default configuration which includes references to the Uno.Material and Uno.Toolkit libraries. The Default configuration also includes Uno.Extensions which is used for dependency injection, configuration, navigation, and logging, and it uses MVUX in place of MVVM, making it a great starting point for rapidly building real-world applications.
82
65
83
-
:::image type="content" source="images/hello-world/vsix-new-project-options.png" alt-text="Uno solution template for project startup type":::
66
+
:::image type="content" source="../images/uno/uno-vsix-new-project-options.png" alt-text="Uno solution template for project startup type":::
84
67
85
68
To keep things simple, select the **Blank** preset. Then, click the **Create** button. Wait for the projects to be created and their dependencies to be restored.
86
69
87
70
A banner at the top of the editor may ask to reload projects, click **Reload projects**:
88
-
:::image type="content" source="images/hello-world/vs2022-project-reload.png" alt-text="Visual Studio banner offering to reload your projects to complete changes":::
71
+
:::image type="content" source="../images/uno/uno-project-reload.png" alt-text="Visual Studio banner offering to reload your projects to complete changes":::
89
72
90
73
## Building your app
91
74
@@ -99,13 +82,13 @@ Make sure Visual Studio has your WinUI 3 project open, then copy the child XAML
<!-- Below is the code you copied from MainWindow: -->
111
94
<StackPanelOrientation="Horizontal"
@@ -122,30 +105,30 @@ Launch the HelloWorld.Windows target. Observe that this WinUI app is identical t
122
105
123
106
You can now build and run your app on any of the supported platforms. To do so, you can use the debug toolbar drop-down to select a target platform to deploy:
124
107
125
-
* To run the **WebAssembly** (Wasm) head:
126
-
- Right-click on the `HelloWorld.Wasm` project, select **Set as startup project**
127
-
- Press the `HelloWorld.Wasm` button to deploy the app
128
-
- If desired, you can use the `HelloWorld.Server` project as an alternative
129
-
* To debug for **iOS**:
130
-
- Right-click on the `HelloWorld.Mobile` project, select **Set as startup project**
131
-
- In the debug toolbar drop-down, select an active iOS device or the simulator. You'll need to be paired with a Mac for this to work.
132
-
133
-
:::image type="content" source="images/hello-world/net7-ios-debug.png" alt-text="Visual Studio dropdown to select a target framework to deploy":::
134
-
135
-
- Select an active device
136
-
* To debug the **Android** platform:
137
-
- Right-click on the `HelloWorld.Mobile` project, select **Set as startup project**
138
-
- In the debug toolbar drop-down, select either an active Android device or the emulator
139
-
- Select an active device in the "Device" sub-menu
140
-
* To debug on Linux with Skia GTK:
141
-
- Right-click on the `HelloWorld.Skia.Gtk` project, and select **Set as startup project**
142
-
- Press the `HelloWorld.Skia.Gtk` button to deploy the app
143
-
108
+
- To run the **WebAssembly** (Wasm) head:
109
+
- Right-click on the `HelloWorld.Wasm` project, select **Set as startup project**
110
+
- Press the `HelloWorld.Wasm` button to deploy the app
111
+
- If desired, you can use the `HelloWorld.Server` project as an alternative
112
+
- To debug for **iOS**:
113
+
- Right-click on the `HelloWorld.Mobile` project, select **Set as startup project**
114
+
- In the debug toolbar drop-down, select an active iOS device or the simulator. You'll need to be paired with a Mac for this to work.
115
+
116
+
:::image type="content" source="../images/uno/uno-mobile-debug.png" alt-text="Visual Studio dropdown to select a target framework to deploy":::
117
+
118
+
- To debug for **Mac Catalyst**:
119
+
- Right-click on the `HelloWorld.Mobile` project, select **Set as startup project**
120
+
- In the debug toolbar drop-down, select a remote macOS device. You'll need to be paired with one for this to work.
121
+
- To debug the **Android** platform:
122
+
- Right-click on the `HelloWorld.Mobile` project, select **Set as startup project**
123
+
- In the debug toolbar drop-down, select either an active Android device or the emulator
124
+
- Select an active device in the "Device" sub-menu
125
+
- To debug on **Linux** with **Skia GTK**:
126
+
- Right-click on the `HelloWorld.Skia.Gtk` project, and select **Set as startup project**
127
+
- Press the `HelloWorld.Skia.Gtk` button to deploy the app
144
128
145
129
Now you're ready to start building your multi-platform application!
0 commit comments