简体   繁体   English

如何在现有的 Uno 解决方案中添加额外的 Uno 头?

[英]How to add an additional Uno head to an existing Uno solution?

I can only find commands how to create and build Uno solutions from scratch but nowhere how to add - for example an additional mobile head ?我只能找到如何从头开始创建和构建 Uno 解决方案的 命令,但无处可添加 - 例如额外的移动头? Neither Visual Studio templates offer it on such granularity. Visual Studio 模板都没有提供这种粒度。

dotnet new unoapp-net6 -h tells neither anything about such option. dotnet new unoapp-net6 -h对此类选项一无所知。

在此处输入图像描述

Adding Platforms to an Existing Project If you have an existing Uno Platform project, and you have not selected all the platforms you need when creating the project, this guide will show you how to add new ones.将平台添加到现有项目 如果您有一个现有的 Uno Platform 项目,并且在创建项目时没有选择您需要的所有平台,本指南将向您展示如何添加新平台。

Considering that your project is called MyProject, and you want to add the Gtk project head:考虑到您的项目名为 MyProject,并且您要添加 Gtk 项目头:

  1. In a separate temporary folder, create a new project using the Visual Studio 2022 or dotnet new templates, using MyProject for its name.在单独的临时文件夹中,使用 Visual Studio 2022 或 dotnet new 模板创建一个新项目,并使用 MyProject 作为其名称。

  2. Unselect all platforms except Gtk in the platforms selection dialog在平台选择对话框中取消选择除 Gtk 之外的所有平台

  3. Once the project has been created, navigate to the new folder MyProject.Skia.Gtk创建项目后,导航到新文件夹 MyProject.Skia.Gtk

  4. Copy this folder to the existing project structure, at the same level as the other platform folders将此文件夹复制到现有项目结构中,与其他平台文件夹处于同一级别

  5. In Visual Studio, right-click on the Platforms solution folder, then select Add, Existing project在 Visual Studio 中,右键单击平台解决方案文件夹,然后选择添加、现有项目

  6. Save your solution保存您的解决方案

Your new platform project is now ready to be compiled.您的新平台项目现在可以编译了。

platform.uno 平台.uno

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM