gpt4 book ai didi

c# - 如何将 PCL 转换为 .Net 标准库

转载 作者:行者123 更新时间:2023-11-30 12:08:53 25 4
gpt4 key购买 nike

所以我有一个 PCL 项目,但现在想更新它以支持 .Net Standard

我已经阅读了 Microsoft website steps这样做:

  • Right-click on the project file and select Properties.
  • Under Library, select Target .NET Platform Standard.

但是在最新版的Visual Studio 2017中没有这个按钮。

我也读过here :

  • Close the solution in VS
  • Take the existing csproj and make a copy of it somewhere else. I’ll keep this other copy open in Notepad.
  • Copy/paste the contents of the new project you created and replace the contents of your existing project. Most of what you had in the old project isn’t really needed anymore. What you’ll likely need are settings like any signing or assembly names that don’t match the folder name/conventions. If you have ResX files with design-time generated code, you’ll need to add the following. Likewise, for Xamarin Forms pages, you’ll need this.

但我不理解上面突出显示的步骤,因为我有大量的 nuget 包和 ResX 文件,所以在我尝试时总是会导致构建错误

那么,是否有任何直接的步骤可以将 PCL 项目更新为 .NetStandrard 项目?

最佳答案

在我看来,最好的方法是从头开始创建一个新项目(.net 标准)并将所有内容复制到那里...在这里你有一些帮助:https://blog.xamarin.com/building-xamarin-forms-apps-net-standard/

关于c# - 如何将 PCL 转换为 .Net 标准库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46825824/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com