GoogleAnalyticsSDK 1.3 in 64-bit JavaScript Windows 10 App - 找不到模块

GoogleAnalyticsSDK 1.3 in 64-bit JavaScript Windows 10 App - Module Could Not Be Found

如何让 Google Analytics SDK 1.3 在 x64 模式下的 JavaScript Windows 10 (UWP) 应用程序中工作?在项目页面上引用通过 VISX 安装程序安装的库适用于 x86,但不适用于 x64。

当 运行 应用程序处于 x64 模式时,我收到以下错误:

0x8007007e - JavaScript runtime error: The specified module could not be found. 
  1. 删除项目中对 GoogleAnalytics 库的任何引用。
  2. 从标准 nuget.org 存储库安装 GoogleAnalyticsSDK 包(如 CodePlex 站点上 XAML 应用程序的文档中所述)。
  3. 此时引用了库,但在 .jsproj 文件中,NuGet 错误地引用了 Windows 8 个 WinMD 文件并指定了一些导致问题的其他设置。
  4. 在文本编辑器中打开您的 .jsproj。
  5. 将 GoogleAnalytics 和 GoogleAnalytics.Core 引用更改为如下所示:
    <ItemGroup>
        <Reference Include="GoogleAnalytics">
            <HintPath>..\packages\GoogleAnalyticsSDK.1.3.00\lib\uap10.0\GoogleAnalytics.winmd</HintPath>
            <IsWinMDFile>true</IsWinMDFile>
        </Reference>
        <Reference Include="GoogleAnalytics.Core">
            <HintPath>..\packages\GoogleAnalyticsSDK.1.3.00\lib\uap10.0\GoogleAnalytics.Core.winmd</HintPath>
        </Reference>
    </ItemGroup>
  1. 在 Visual Studio 中重新加载项目,您应该可以开始比赛了。