Create a Tizen .NET Application
The Tizen .NET framework allows you to easily and efficiently create applications for Tizen. Follow the instructions below to familiarize yourself with the Tizen .NET application development process. With the instructions, you can create and run the HelloWorld .NET MAUI application, which displays some text on the screen with a button.
- Before you start developing Tizen applications, set up the development environment.
- Create a Project using Visual Studio.
- Build Your Application.
- Deploy and Run Your Application.
The following example shows you how to create and configure a basic .NET MAUI application project for Tizen in Visual Studio. .NET MAUI project template includes all the files that make up the Tizen application.
Create a Project
To create a new .NET MAUI project:
- Launch Visual Studio 2022, and in the start window click Create a new project to create a new project.
- In the Create a new project window, select MAUI in the All project types drop-down, select the .NET MAUI App template, and click the Next button
- In the Configure your new project window, configure the project properties and click the Next button.
- In the Additional information window, choose .NET 6.0 (Long-term support) for the .NET version to target, and click the Create button.
- Wait for the project to be created. Open and edit the cproj file of the application. Uncomment the target framework for Tizen, net6.0-tizen.
You can see the updated dependencies with net6.0-tizen.
Build Your Application
The building process performs a validation check and compiles your files. You must sign the application package with an author certificate when building the application.
Sign Application with Author Certificate
Using the default certificate
If you do not need to upload your application to App Store, you can use a default certificate and deploy your application in the Emulator for testing purposes.
To use the default certificates,
- In the Visual Studio menu, go to Tools > Options > Tizen > Certification.
- Uncheck the Sign the .TPK file using the following option..
Using the Samsung certificate
To create Samsung certificate:
- In the Visual Studio menu, go to Tools > Tizen > Tizen Certificate Manager.
- Follow the rest of instructions at here to learn about creating Samsung certificate.
Build Your Application
In the Visual Studio toolbar, use the Debug Target drop-down to target the Framework to net6.0-tizen.
There are two different ways to build the application:
- In the Visual Studio menu, select Build > Build Solution.
- In the Solution Explorer view, right-click the solution name and select Build Solution.
Tizen .NET applications are always deployed as installed packages. The package files have the
.tpk file extension, and the process of generating a package is controlled by the manifest file. The .NET MAUI template contains the manifest file (tizen-manifest.xml) under the Platforms/Tizen/ folder.
After you have built the application, deploy and run it.
Deploy and Run Your Application
To run the application, you must first deploy it to the target: either a device or an emulator. Deploying means transferring the package file (
.tpk) to the target and invoking the Tizen package manager to install it.
To deploy and run the application on the emulator:
- In the Visual Studio menu, select Tools > Tizen > Tizen Emulator Manager.
Alternatively, click Launch Tizen Emulator in the Visual Studio toolbar to launch the Tizen Emulator Manager.
- In the Emulator Manager, select an emulator from the list and click Launch.
If no applicable emulator instance exists, you can create one.
- Once you launch an emulator instance, you can deploy the application by clicking the emulator instance in the Visual Studio toolbar.
In the Visual Studio toolbar, you can select the target from the drop-down list to change the deployment target.
- If the deployment is successful, the application launches on the emulator. The following figure shows the launched application on the TV emulator: