Xamarin.mac是否支持GTK#用户界面 [英] Does Xamarin.mac Support GTK# User Interface

查看:46
本文介绍了Xamarin.mac是否支持GTK#用户界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用GT.#用于UI的Mono.Mac编码的应用程序.我现在可以访问Xamarin.mac.Im正在尝试将mono.mac解决方案迁移到xamarin.mac.我正在尝试将代码从 mono.mac 复制粘贴到新的 xamarin.mac 项目,但 Xamarin.mac 项目中没有 GUI 构建器.那么 Xamarin.mac 是否支持 GTK#?有没有更好的方法可以迁移?

I have an application coded with Mono.Mac using GTK# for the UI.I now have access to Xamarin.mac.Im trying to migrate the mono.mac solution to xamarin.mac. I'm trying copy-paste the code from mono.mac to a new xamarin.mac project,but there is no GUI builder in the Xamarin.mac project.So does Xamarin.mac support GTK#? Is there a better way i can migrate?

我的目标是将Mono运行时与应用程序包捆绑在一起,以便用户无需手动安装它.

My goal is to bundle the mono runtime with the app package so that the user need not install it manually.

推荐答案

MonoMac .csproj信息:

MonoMac .csproj information:

首先,如果您没有升级到Xam.Mac对话框,则可能是由于MonoMac项目文件中的以下两行之一或两行所致:

First if you are not getting the upgrade to Xam.Mac dialog, it could be due to one or both of the following lines in your MonoMac project file:

<SuppressXamMacUpsell>True</SuppressXamMacUpsell>
<SuppressXamMacMigration>True</SuppressXamMacMigration>

如果存在,则只需编辑csproj文件(右键单击项目文件:选择工具/编辑文件"),删除这些行,然后保存文件,以防自动项目刷新,如果没有,请关闭并重新打开解决方案/项目.

If they exist, just edit the csproj file (right-click on project file: select Tools/Edit file), delete those lines, and save the file which should case an auto-project refresh, if no, close and reopen the solution/project.

当然,这假定该项目在csproj文件中被标记为 MonoMac Type项目.

Of course this assumes that the project is tagged as a MonoMac Type project in the csproj file.

在这一点上,我假设您的项目最初是作为普通的.Net项目创建的,并且您手动添加了MonoMac作为参考,因此XamStudio和xbuild不会将其视为特殊项目类型".

At this point I would assume your project was originally created as a normal .Net project and you manually added MonoMac as a reference and thus XamStudio and xbuild would not see it as a 'special project type'.

在项目文件中查找ProjectTypeGuids标记:

Look for the ProjectTypeGuids tag in the project file:

以下是C#/MonoMac项目:

The following is a C# / MonoMac project:

<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

假设您仅找到C#标记,而不找到MonoMac/Xam.Mac标记,我将更改项目类型并添加MonoMac,然后允许XamStudio将其转换为Xamarin.Mac(实际上只是更新guid和MonoMac参考)到XamMac)..

Assuming you only find the C# tag and not the MonoMac/Xam.Mac tag, I would change the project type and add MonoMac and then allow XamStudio to convert it to Xamarin.Mac (really just updating the guid and the MonoMac reference to XamMac)..

当前项目:

<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

编辑为:

<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

XamMac转换后:

After XamMac conversion:

<ProjectTypeGuids>{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23};{FAE04EC0-301F-11D3-BF4B 00C04F79EFBC}</ProjectTypeGuids>

这时,您的项目应该被视为XamMac类型,并且现在应该显示菜单中的捆绑包,额外的项目选项等.

At this point, your project should be seen as a XamMac type and the bundling from the menu, extra project options, etc. should now be exposed.

标准C#/.Net项目标签:

Standard C#/.Net project tag:

{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}

Xamarin.Mac项目标签:

Xamarin.Mac project tag:

{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23}

MonoMac项目标签:

MonoMac project tag:

{948B3504-5B70-4649-8FE4-BDE1FB46EC69}

这篇关于Xamarin.mac是否支持GTK#用户界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆