是否可以将 System.windows.form 引用添加到 Xamarin 项目? [英] Is it possible to add a System.windows.form reference to a Xamarin project?

查看:27
本文介绍了是否可以将 System.windows.form 引用添加到 Xamarin 项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Visual Studio 中开发 Xamarin.Forms 应用,我需要使用 专用于 Windows 窗体应用外部 SDK.我一直在尝试添加对 System.Windoes.Form 的引用,但它没有出现在程序集中.我知道在 Xamarin 项目中使用 Windows 窗体没有意义,但我正在使用 Xamarin 图形创建用户界面,我只需要添加对 Windows.Forms 的引用即可消除以下错误:

I am developing a Xamarin.Forms app in Visual Studio and I need to use an external SDK that is dedicated for Windows Form apps. I have been trying to add a reference to System.Windoes.Form but it doesn't appear in the assemblies. I know it wouldn't make sense using windows forms in a Xamarin project, but I am creating the user interface with Xamarin graphics, I just need to add the reference to Windows.Forms to get rid of the following error:

无法解析引用:System.Windows.Forms,由MY DLL 引用.请为 System.Windows.Forms 添加 NuGet 包或程序集引用,或删除对 MYDLL 的引用.

Can not resolve reference: System.Windows.Forms, referenced by MY DLL. Please add a NuGet package or assembly reference for System.Windows.Forms, or remove the reference to MYDLL.

有没有办法做到这一点?谢谢

Is there a way to do so? Thanks

推荐答案

.NET 可以分为三类,分别是 .NET Core、.NET Framework 和 Xamarin.

.NET can be categorized into three and those are, .NET Core, .NET Framework and Xamarin.

.NET Framework 支持 Windows 和 Web 应用程序.

The .NET Framework supports Windows and Web applications.

.NET Core 是新的开源和跨平台框​​架,用于为所有操作系统(包括 Windows、Mac 和 Linux)构建应用程序.

.NET Core is the new open-source and cross-platform framework to build applications for all operating system including Windows, Mac, and Linux.

如果您想使用 C# 构建移动(iOS、Android 和 Windows Mobile)应用,Xamarin 是您唯一的选择.

When you want to build mobile (iOS, Android, and Windows Mobile) apps using C#, Xamarin is your only choice.

您不能在 Xamarin 项目中使用 System.Windows.Forms 并且它不兼容.

You cannot use System.Windows.Forms inside a Xamarin Project and it is incompatible.

这篇关于是否可以将 System.windows.form 引用添加到 Xamarin 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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