“您的项目未引用”UAP,Version = v10.0.10586“在UWP cs项目上使用PackageReferences时 [英] "Your project is not referencing the "UAP,Version=v10.0.10586" when using PackageReferences on UWP cs project

查看:211
本文介绍了“您的项目未引用”UAP,Version = v10.0.10586“在UWP cs项目上使用PackageReferences时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2017开发一个跨平台的应用项目。在我的开发机器上,我可以毫无问题地编译,运行和测试UWPSntiión应用程序。但是,当我尝试在VS Team System站点上构建应用程序或使用Mobile Center时,MSBUILD阶段会返回
此错误消息:


错误:您的项目未引用" ; UAP,版本= v10.0.10586"框架。添加对"UAP,Version = v10.0.10586"的引用。在"框架"中project.json的一部分,然后重新运行NuGet还原。 [d:\\\\\\\VisorMapaFSM \VisorMapaFSM.UWP \ VisorMapaFSM.UWP.csproj]


我对project.json文件做了一些更改但是我意识到这个文件没有使用最新的nuget软件包和versión软件包进行更新。然后我用记事本打开csproj文件,我可以看到更新的nuget包引用存储在
csproj文件中,而不是存储在project.json文件中。


我删除了PackageReferences从csproj文件中,签入到VSTS并以这种方式构建成功,但是当尝试在VisualStudio上运行应用程序时,此次在开发环境中显示错误。






MARCELO CESAR AUGUSTO TORRES ORTIZ IC-EISIG-MCP-MCAD-MCSD-MCTS-MCPD-MCT mt @ marceloctorres.net

解决方案

嗨Marcelo Cesar Torres,


感谢您在此发帖。


此问题与#4515 类似,zhili1208正在调查此问题。问题出在msbuild构建期间,

在C:\Program Files(x86)\ Microsoft Visual Studio \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Microsoft.NuGet.targets。它检查".xproj"获取ProjectReferencesCreatingPackages的扩展,因为没有xproj项目,所以未指定ProjectReferencesCreatingPackages


此问题有一个热门修复:
https:// github。 com / NuGet / NuGet.BuildTasks
,复制并粘贴所有dll并覆盖C:\Program Files下的所有文件(x86)\ Microsoft Visual Studio \\\ 201717\\Enterprise \ MSBuild\Microsoft \ NuGet\15.0。


您也可以在GitHub上关注您的问题评论。


希望这可以帮助您。


I'm developing a cross-platform apps project with VS2017. On my developing machine I can compile, run and test the UWP versión app without problems. But when I try to build the app on VS Team System site or using Mobile Center the MSBUILD phase return me this error message:

error : Your project is not referencing the "UAP,Version=v10.0.10586" framework. Add a reference to "UAP,Version=v10.0.10586" in the "frameworks" section of your project.json, and then re-run NuGet restore. [d:\a\1\s\VisorMapaFSM\VisorMapaFSM.UWP\VisorMapaFSM.UWP.csproj]

I made some changes on project.json file but I realized that this file was not updated with the most recent nuget packages and versión packages. Then I open csproj file with notepad and I could see that the updated nuget package references were stored on csproj file and not in the project.json file.

I deleted the PackageReferences from the csproj file, made checkin to VSTS and in this way the build was successful, but when a try to run the app on VisualStudio the error was shown this time on development environment.


MARCELO CESAR AUGUSTO TORRES ORTIZ IC-EISIG-MCP-MCAD-MCSD-MCTS-MCPD-MCT mt@marceloctorres.net

解决方案

Hi Marcelo Cesar Torres,

Thanks for posting here.

This issue is similar to #4515, and zhili1208 was investigating it. The issue is during msbuild build,
In C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets. It check ".xproj" extension to get ProjectReferencesCreatingPackages, since there is no xproj project, ProjectReferencesCreatingPackages is not specified.

There is a hot fix for this issue: https://github.com/NuGet/NuGet.BuildTasks, copy&paste all dlls and overwrite all files under C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0.

You can also follow with your comments for your issue on the GitHub.

Hope this can help you.


这篇关于“您的项目未引用”UAP,Version = v10.0.10586“在UWP cs项目上使用PackageReferences时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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