This guide will walk you through the set-up process for building cross-platform apps with Uno.
.NET Core is a cross-platform subset of.NET that can be use to build apps for Windows, Linux, Mac, and yes, UWP. UWP Api is also a subset of the.NET API, which can run on.NET Core. It also has a number of API's that are unique to UWP. UWP apps can be.NET core apps, but the reverse is not necessarily true. Not all.NET core apps are UWP apps. Progressive Web Apps. Using this standards-based web technology and feature detection, you can enhance your web apps to provide native app experiences, including access to the entire UWP device family and Microsoft Store, while maintaining a great web experience on browsers or platforms that don’t yet support PWA technology. UWP Windows API for developing Universal Windows Platform apps: Mac Apps using Xamarin and C# Cross-platform development for Android, iOS, and Mac apps with.NET and C#: Console apps with C#: Desktop apps using C: Mobile and gaming; Mobile development with.NET using Xamarin and C# Cross-platform development for Android, iOS, and Mac apps. As I predicted, Microsoft is effectively killing UWP by ensuring that all its capabilities are available to once-legacy app development platforms. Contact More Email for Help/Support.
Choose your IDE
Use Uno with your favorite tools.
Visual Studio
Prerequisites
- Visual Studio 2019 16.3 or later, with:
- Universal Windows Platform workload installed.
- Mobile development with .NET (Xamarin) workload installed.
- the iOS Remote Simulator installed (for iOS development)
- A working Mac with Visual Studio for Mac, XCode 8.2 or later installed (for iOS development)
- Google's Android x86 emulators or a physical Android device (for Android development)
- ASP.NET and web workload installed, along with .NET Core 2.2 or later (for WASM development)
For more information about these prerequisites, see Installing Xamarin. For information about connecting Visual Studio to a Mac build host, see Pair to Mac for Xamarin.iOS development.
Installing the Uno Platform Solution Templates with Visual Studio
- Launch Visual Studio, then click
Continue without code
. ClickExtensions
->Manage Extensions
from the Menu Bar. - In the Extension Manager expand the Online node and search for
Uno Platform Templates
, install theUno Platform Solution Templates
extension or download it from the Visual Studio Marketplace extension, then restart Visual Studio.
Create an application from the solution template
How to close open apps on mac. To easily create a multi-platform application:
- Create a new C# solution using the Cross-Platform App (Uno Platform) template, from Visual Studio's Start Page:
- Update to the latest NuGet package named
Uno.UI
. To get the very latest features, check thepre-release
box. - To debug the iOS head, select the
Debug|iPhoneSimulator
configuration - To debug the Android head, select the
Debug|AnyCPU
configuration - To debug the UWP head, select the
Debug|x86
configuration - To run the WebAssembly (Wasm) head, select IIS Express and press Ctrl+F5 or choose 'Start without debugging' from the menu. Note that F5 will not work because Visual Studio debugging isn't supported. See here for debugging instructions through Chrome.
Make sure XAML Intellisense is enabled
Intellisense is supported in XAML when the UWP head is active:
Uwp App In Mac Download
If XAML Intellisense isn't working on a freshly-created project, try the following steps:
- Build the UWP head.
- Close all XAML documents.
- Close and reopen Visual Studio.
- Reopen XAML documents.
Video Tutorial
VS Code
This guide will walk you through the set-up process for building WebAssembly apps with Uno, under Windows, Linux or macOS.
Prerequisites
Create an Uno Platform project
- Launch Code, then in the terminal type the following to install the Uno Platform templates:
- In the terminal type the following to create a new project:
This will create a solution that only contains the WebAssembly platform support.
Prepare the WebAssembly application for debugging
- Install the C# extension and the JavaScript Debugger (Nightly) extension with the
debug.javascript.usePreview
setting set to true (File / Preference / Settings, search forUse preview
). - Open Code using
- Visual Studio Code will ask to restore the NuGet packages.
Modify the template
- In
MainPage.xaml
, replace the Grid's content with the following: - In your
MainPage.xaml.cs
, add the following method:
Run and Debug the application
![Uwp app mac Uwp app mac](/uploads/1/3/4/2/134256514/611591713.jpg)
- Starting the app with the WebAssembly debugger is a two-step process:
- Start the app first using the “.NET Core Launch (Uno Platform App)” launch configuration
- Then start the browser using the “.NET Core Debug Uno Platform WebAssembly in Chrome” launch configuration (requires Chrome). To use the latest stable release of Edge instead of Chrome, change the type of the launch configuration in
.vscode/launch.json
frompwa-chrome
topwa-msedge
- Place a breakpoint in the OnClick method
- Click the button in the app, and the breakpoint will hit
Updating an existing application to work with VS Code
Snapchat computer app mac. Update photo app mac. If you already have an Uno application, you can add some some missing support files for VS Code to recognize your project.
Here's how to do this:
- Use the same command line above to create a project with the same name as your current project, in a different location.
- Once created, copy the generated
.vscode
folder next to your.sln
file - Update the
Uno.UI
package version to the latest stable version - Update the
Uno.Wasm.Bootstrap
package to 1.2.0 or later version - Add a reference to
Uno.Wasm.Bootstrap.DevServer
version 1.2 or later. - In your Wasm project file, if you had a
<DotNetCliToolReference />
line, remove it
![Windows uwp app Windows uwp app](/uploads/1/3/4/2/134256514/456093587.jpg)
You should now be in the same configuration as the generated template files.
Video Tutorial
Visual Studio For Mac
While it is easier to create apps using Uno on Windows, you can also create all but UWP apps on your Mac.
Prerequisites
- Xcode 10.0 or higher
- An Apple ID
- .NET Core 3.1 or higher
Modifying Existing Uno App
- Open project in Visual Studio for MacOnce open, you should see your folder structure set up like this:
If you have a warning symbol on your iOS project, make sure you have the minimum version of XCode.
To update, go toVisual Studio > Preferences > Projects > SDK Locations > Apple
and select XCode 10.0 or higher.Restart Visual Studio. How to sync apps from iphone to mac sync. - You can now run on iOS, Android, and WebAssembly by setting your startup project and running.
Note: You will not be able to build the UWP project on a Mac. All changes to this project must be made on Windows.
Build for WASM
Building for WebAssembly takes a few more steps than iOS and Android:
- Set yourProject.Wasm to startup project
- Build the project
- In the terminal, navigate to your build output. This will typically be:
yourProject.Wasm > bin > Debug > netstandard2.0 > dist > server.py
Run theserver.py
program. - In your browser, open localhost:8000.
Video Tutorial
Uwp App
JetBrains Rider
Prerequisites
Creating a new Uno project
At this time, there isn't a template for the Rider IDE like there is for Visual Studio, so you can create a new projectby following these steps:
- In your terminal, navigate to the folder that contains your Rider solutions.
- Run these commands:
Installs Uno template:
Creates a new project:
You should now have a folder structure that looks like this:
Android
- Remove the following line from the
.csproj
file:<Target Name='GenerateBuild' DependsOnTargets='SignAndroidPackage' AfterTargets='Build' Condition='$(BuildingInsideVisualStudio)'' />
- Set Android as your startup project. Run.
Note: Whether you're using a physical device or the emulator, the app will install but will not automatically open.You will have to manually open.
Wasm
- Select Wasm as your startup project. Run.
A new browser window will automatically run your application.
Note: There is no debugging for Wasm within Rider, but you debug using the built in Chrome tools.
iOS and MacOS
You will be able to build the iOS project, however, there is currently no support for a simulator to begin debugging.
Alternatively, you can use a tool like VNC to run the simulator on a mac.
Alternatively, you can use a tool like VNC to run the simulator on a mac.
UWP
You will be able to build the UWP project, however, Rider currenly does not support debugging or deploying for UWP.