【问题标题】:Update the reference from Microsoft.Phone.WinJS.2.1, version 1.0.9651.0 to version 1.0.9651.40228将参考从 Microsoft.Phone.WinJS.2.1 版本 1.0.9651.0 更新到版本 1.0.9651.40228
【发布时间】:2014-08-12 21:09:23
【问题描述】:

我在 Visual Studio Professional 2013 中使用 Update 3 构建/部署我的 Windows Phone 应用程序。出现以下控制台输出:

1>------ Build started: Project: CapturingVideos, Configuration: Debug ARM ------
2>------ Deploy started: Project: CapturingVideos, Configuration: Debug ARM ------
2>Deploying to Phone Internal Storage...
2>Creating a new clean layout...
2>Copying files: Total <1 mb to layout...
2>Checking whether required frameworks are installed...
2>Warning : DEP0810 : This app references Microsoft.Phone.WinJS.2.1, version 
1.0.9651.0, found in your SDK, but you have a higher version of 
Microsoft.Phone.WinJS.2.1 installed on the target machine, 1.0.9651.40228. If you 
continue to run this application, it will run against the currently installed version,  
Microsoft.Phone.WinJS.2.1, version 1.0.9651.40228. Consider updating your SDK to match     
the version of Microsoft.Phone.WinJS.2.1 that is installed. 
http://go.microsoft.com/fwlink/?LinkId=260891
2>Registering the application to run from layout...

我很好奇警告建议我将参考从 WinJS.2.1 v1.0.9651.0 更新到 v1.0.9651.40228。所以我下载并安装了Visual Studio 2013 Extensions for the Windows Library for JavaScript。重新启动操作系统和 VS 2013 后,我尝试从空白模板创建一个新的 Windows Phone 项目。我希望 References 文件夹包含适用于 JavaScript 2.1 v1.0.9651.40228 的 Windows 库。但是,它仍然只指向旧版本,即 v1.0.9651.0。我是在错误的轨道上还是我错过了什么?请指出正确的方向。谢谢!

【问题讨论】:

  • 建议尝试在项目中删除和添加对 winjs 库的引用
  • 嗨,Sushil,我也在尝试这样做,但不知道新安装的 WinJS 库在哪里。在安装过程中,我没有得到任何关于安装位置的信息。你知道如何找到新的 WinJS 库的路径吗?
  • 在soln explorer中右击引用节点->添加引用。它应该显示所有已安装的扩展。
  • 那行不通。列出的可用扩展仍然是旧版本。

标签: visual-studio-2013 windows-phone-8.1 winjs project-reference


【解决方案1】:

该问题是由错误的应用程序包版本号引起的,尽管该包包含的所有 .js 和 .css 文件都具有正确的内部版本号,但在参考属性中清楚地显示为 1.0.9651.0 1.0.9651.40228 在其标头中指定。

App Package Version 属性的值来自包的清单文件%Program Files%\Microsoft SDKs\WindowsPhoneApp\v8.1\ExtensionSDKs\Microsoft.Phone.WinJS.2.1\1.0\SDKManifest.xml,尤其是以下行:

FrameworkIdentity="Name=Microsoft.Phone.WinJS.2.1, MinVersion=1.0.9651.0"

所以勾选文件的只读标志,以管理员身份打开并更改 MinVersion 编号。重新加载您的解决方案。警告消息应该会消失。

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,并在 StackOverflow 上找到了这篇博文以及您的问题:

    http://blogs.msdn.com/b/lighthouse/archive/2014/04/21/can-t-update-visual-studio-2013-extensions-for-the-windows-library-for-javascript.aspx

    我没有您描述的问题,也没有博客文章中警告过的问题,但他们解释了如何使用 powershell 脚本更正这些问题。

    【讨论】:

    • 我按照链接中的说明进行操作,但在运行以下命令时卡在了第一步:get-msiproductinfo | where { $_.Name -like 'Windows Library for JavaScript' } 我收到以下错误消息:get-msiproductinfo : The 'get-msiproductinfo' command was found in the module 'MSI', but无法加载模块。 ...
    猜你喜欢
    • 2019-03-30
    • 1970-01-01
    • 2021-12-30
    • 2019-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-23
    • 1970-01-01
    相关资源
    最近更新 更多