本文介绍了UWP Windows-10 无法将 Microsoft.NETCore.UniversalWindowsPlatform 添加到我的 C# 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个面向 Windows UWP 的 C# 应用程序.几个月前一切正常.当我今天打开它时,它找不到这个参考:Microsoft.NETCore.UniversalWindowsPlatform.我也无法安装此参考.这是我的项目详情 &我遵循的步骤:

我的 VS 详情:

I have a C# app targeting windows UWP. It was all working fine couple month's ago. When I opened it today, it cannot find this reference: Microsoft.NETCore.UniversalWindowsPlatform. I am unable to install this reference as well. Here are my project details & the steps I have followed:

My VS details:

  MS VS Professional 2015
  Version 14.0.25123.00 Update 2
  Microsoft .NET Framework
  Version 4.6.01038


当我尝试安装此参考时:Referencs(右键单击)->Manage NuGet Packages,&然后通过选择 Microsoft.NETCore.UniversalWindowsPlatform,我收到此错误:


When I try to install this reference: Referencs(right click)->Manage NuGet Packages, & then by selecting Microsoft.NETCore.UniversalWindowsPlatform, I get this error:

无法安装包Microsoft.NETCore.Platforms 1.0.0".您正在尝试将此包安装到以.NETCore,Version=v5.0"为目标的项目中,但该包不包含任何与该框架兼容的程序集引用或内容文件.如需更多信息,请联系软件包作者.


我安装了 NuGet Package Manager for Visual Studio 2015 版本 3.4.3.855.

基于此处提供的建议 Github MS UWP 示例页面 我从我的项目中删除了 project.json,但这似乎对我没有帮助.不幸的是,我在我的项目中没有看到 project.lock.json 文件


I have NuGet Package Manager for Visual Studio 2015 Version 3.4.3.855 installed.

Based on the suggestion available here Github MS UWP samples page I deleted project.json from my project, but that doesnt seem to help me. Unfortunately I do not see project.lock.json file in my project

推荐答案

将解决方案文件夹复制到其他机器后,我遇到了类似的异常.在packageFolders"和project"字段中的project.lock.json 中,我对预置机器的设置进行了更改并解决了我的问题

I had similar exception after copy solution folder to other machine.In project.lock.json in field "packageFolders" and "project" where my settings for previse machine, I have changed them and it resolve my issue

这篇关于UWP Windows-10 无法将 Microsoft.NETCore.UniversalWindowsPlatform 添加到我的 C# 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 02:52