简体   繁体   English

如何使用 xamarin.forms pcl 或将其转换为 xamarin 本机

[英]How to use or convert xamarin.forms pcl into xamarin native

i have a xamarin project into Xamarin.forms PCL and i want to convert/use it into xamarin.forms native, how can i do it.我有一个 xamarin 项目到 Xamarin.forms PCL 中,我想将它转换/使用到 xamarin.forms 本机,我该怎么做。 if there is a way please guide me to it.如果有办法,请指导我。

thanks in advance :)提前致谢 :)

You will require to edit your project file and set the target framework to netstandard(2/2.1).您将需要编辑您的项目文件并将目标框架设置为 netstandard(2/2.1)。 Then if you reload the project, visual studio will perform automatic migration for you.然后,如果您重新加载项目,visual studio 将为您执行自动迁移。

A file with migration log will be generated, which may contain information about incompatible packages with new framework.将生成带有迁移日志的文件,其中可能包含有关与新框架不兼容的包的信息。 Old project file(.csproj) will also be backed up automatically.旧项目文件(.csproj)也会自动备份。

You should also delete AssemblyInfo.cs and packages.json files.您还应该删除 AssemblyInfo.cs 和 packages.json 文件。 All nuget packages and references need to add again.所有 nuget 包和引用都需要再次添加。

Please refer below guides :请参考以下指南:

Upgrade PCL to .NET Standard Class Library 将 PCL 升级到 .NET Standard 类库

How to Convert a Portable Class Library to .NET Standard and Keep Git History 如何将可移植类库转换为 .NET Standard 并保留 Git 历史记录

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

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