visual-studio-2015 - "Visual Studio update required",但它是最新的

标签 visual-studio-2015 win-universal-app

我在计算机上运行Windows 10 UWP SDK并重新安装了Visual Studio 2015社区。最近,我尝试打开从另一台计算机导入的项目,并且在启动解决方案时收到下一条错误消息:

查看解决方案操作
enter image description here

需要Visual Studio更新
一个或多个项目需要一个平台SDK(UAP,版本:10.0.10586.0),该平台SDK可能没有安装,也可能作为Visual Studio将来更新的一部分包含在其中。

安装平台SDK以打开这些项目。

当我单击“确定”时,我看到解决方案资源管理器中的所有项目旁边都有文本(需要更新)

enter image description here

当我单击它时,它将带我到Windows 10 SDK下载页面,以下载我已经一遍又一遍安装的SDK。我还修复了该解决方案不止一次。最后,我再次从头开始重新安装了Visual Studio 2015。

我该怎么做才能使我的项目再次正常工作?

最佳答案

该错误非常容易引起误解。我花了很多宝贵的时间来修复它。
如果确定Visual Studio是最新的,则不需要更新或修复Visual Studio 2015。

请按照以下步骤操作:

  • 在错误消息上单击确定。
  • 转到解决方案资源管理器,然后右键单击带有(需要更新)标记的项目。
  • 右键单击项目,然后选择选项:“Edit MyProject.csproj”
  • 将Windows 10 SDK的所有外观编辑为较低的版本,例如 10.0.10240.0

  • 由此:

    <SDKReference Include="WindowsDesktop, Version=10.0.10586.0">
      <Name>Windows Desktop Extensions for the UWP</Name>
    </SDKReference>
    <SDKReference Include="WindowsMobile, Version=10.0.10586.0">
      <Name>Windows Mobile Extensions for the UWP</Name>
    </SDKReference>
    
    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
    <TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
    <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
    

    对于这样的事情:

    <SDKReference Include="WindowsDesktop, Version=10.0.10240.0">
      <Name>Windows Desktop Extensions for the UWP</Name>
    </SDKReference>
    <SDKReference Include="WindowsMobile, Version=10.0.10240.0">
      <Name>Windows Mobile Extensions for the UWP</Name>
    </SDKReference>
    
    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
    <TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
    <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
    

    对解决方案中的所有项目重复上述步骤,然后多次重新加载项目(VS在刷新其结构时遇到了问题),您必须耐心等待,并可能需要重新启动几次。

    而且你很好走!
    有关更多信息,请查看此页面:
    https://msdn.microsoft.com/en-us/library/Mt148501.aspx#RCUpdate10CSharp

    关于visual-studio-2015 - "Visual Studio update required",但它是最新的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35733621/

    相关文章:

    windows-phone - 无法让 WinAppDeployCmd 进行 Appx 部署工作

    c# - 智能感知在我输入时删除代码

    c# - 使用 Visual Studio 2015 社区开发安全的 Android 和 iOS 应用程序,无需像 Xamarin 这样的第 3 方许可

    c# - 带有 Windows 通用应用程序的 Active Directory 身份验证库

    xaml - Visual Studio 2013 更新 3,设计器不会加载

    win-universal-app - 检测到未处理的错误 : Unspecified error COMException

    c - 将 offsetof 与 enum 一起使用不会在 Visual Studio 2015 中编译

    c# - ASP.NET Core 1.0.0 Nuget 依赖问题

    visual-studio - 在 Visual Studio 2015 上安装 Xamarin,并在 Visual Studio 2013 上安装 Xamarin

    c# - 使用通用类库中的 Windows UWP Windows.Devices.SerialCommunication.SerialDevice