简体   繁体   English

将 Packages.config 迁移到 PackageReference

[英]Migrating Packages.config to PackageReference

I trying to Migrate WPF.Net framework to WPF .netcore So I followed this guide , So I tried migrating Packages.config to PackageReference我试图将 WPF.Net 框架迁移到 WPF .netcore 所以我遵循了这个指南,所以我尝试将 Packages.config 迁移到 PackageReference

I also follow the rule.我也遵守规则。 My project is c# wpf, (NOT asp.net)我的项目是 c# wpf,(不是 asp.net)

我的 .net 框架版本

and my.Net framework verison is over 4.7.2, My visual studio version is 2019.并且 my.Net 框架版本超过 4.7.2,我的 Visual Studio 版本是 2019。

but, I clicked the migrate option,但是,我点击了迁移选项,

是翻译成英文的

There an error.有错误。 But I couldn't find any solutions.但我找不到任何解决方案。

I have to migrate to .net core someone help我必须迁移到 .net 核心有人帮忙

I tried a lot of ways to convert to .net core wpf.我尝试了很多方法来转换为.net核心wpf。

Solution :解决方案

  1. Create new .net core wpf Project新建.net内核wpf工程
  2. Copy files which only cs, xaml in .net framework written在.net框架中只复制cs,xaml文件

  3. Paste all that you copied at you project that you create step 0粘贴您在创建步骤 0 的项目中复制的所有内容

  4. Open your .net core project and change the project namespace as same as you pasted csharp files.打开您的 .net 核心项目并更改项目名称空间,就像您粘贴 csharp 文件一样。

  5. Now done!现在完成了!

It really, really worked for me great.它真的,真的对我很有用。

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

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