<tfoot id='Nk01i'></tfoot>

<i id='Nk01i'><tr id='Nk01i'><dt id='Nk01i'><q id='Nk01i'><span id='Nk01i'><b id='Nk01i'><form id='Nk01i'><ins id='Nk01i'></ins><ul id='Nk01i'></ul><sub id='Nk01i'></sub></form><legend id='Nk01i'></legend><bdo id='Nk01i'><pre id='Nk01i'><center id='Nk01i'></center></pre></bdo></b><th id='Nk01i'></th></span></q></dt></tr></i><div id='Nk01i'><tfoot id='Nk01i'></tfoot><dl id='Nk01i'><fieldset id='Nk01i'></fieldset></dl></div>

    <small id='Nk01i'></small><noframes id='Nk01i'>

    1. <legend id='Nk01i'><style id='Nk01i'><dir id='Nk01i'><q id='Nk01i'></q></dir></style></legend>
        <bdo id='Nk01i'></bdo><ul id='Nk01i'></ul>
      1. 无法加载文件或程序集“Newtonsoft.Json,Version=9.0.0.0,Culture=neutral,P

        时间:2023-09-15

                <tbody id='SSPeK'></tbody>
              <legend id='SSPeK'><style id='SSPeK'><dir id='SSPeK'><q id='SSPeK'></q></dir></style></legend>
              • <i id='SSPeK'><tr id='SSPeK'><dt id='SSPeK'><q id='SSPeK'><span id='SSPeK'><b id='SSPeK'><form id='SSPeK'><ins id='SSPeK'></ins><ul id='SSPeK'></ul><sub id='SSPeK'></sub></form><legend id='SSPeK'></legend><bdo id='SSPeK'><pre id='SSPeK'><center id='SSPeK'></center></pre></bdo></b><th id='SSPeK'></th></span></q></dt></tr></i><div id='SSPeK'><tfoot id='SSPeK'></tfoot><dl id='SSPeK'><fieldset id='SSPeK'></fieldset></dl></div>
                • <bdo id='SSPeK'></bdo><ul id='SSPeK'></ul>

                  <tfoot id='SSPeK'></tfoot>
                • <small id='SSPeK'></small><noframes id='SSPeK'>

                • 本文介绍了无法加载文件或程序集“Newtonsoft.Json,Version=9.0.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed"或其依赖项之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个以前使用 VS 2013 在 Windows 8.1 上构建的 WinJS 项目.

                  I have a WinJS project that is previously built on Windows 8.1 using VS 2013.

                  最近我通过创建一个空白的 Javascript Universal windows 10 项目将该项目升级到 Universal Windows 10,然后添加了旧项目中的所有文件.

                  Recently I upgraded this project to Universal Windows 10 by creating a blank Javascript Universal windows 10 project and then added all my files from old project.

                  我有 Windows 运行时组件和 SQLite 类库.

                  I have Windows Runtime Components and also Class Library for SQLite.

                  我添加了通用 Windows 运行时组件和通用类库,并将我的所有文件从旧项目复制到相应的位置.

                  I added Universal Windows Runtime Component and Universal Class Library and copied all my files from old project to respective places.

                  不知何故,我设法消除了所有构建错误.

                  Somehow I managed to remove all the build errors.

                  我安装了所有必需的 SQLite-net、SQLite for Universal Windows Platform、Newtonsoft 等.

                  I installed all the required SQLite-net, SQLite for Universal Windows Platform, Newtonsoft, etc.

                  但是当我运行应用程序并在 Windows 运行时组件中调用本机方法时,它会给出一些奇怪的错误:

                  But when I run the application and call a Native method in Windows Runtime Component it gives some kind of strange errors as:

                  System.IO.FileNotFoundException"类型的异常发生在 mscorlib.ni.dll 中,但未在用户代码中处理.

                  附加信息:无法加载文件或程序集Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed"或其依赖项之一.系统找不到指定的文件.

                  Newtonsoft 版本为:9.0.1

                  Newtonsoft version is: 9.0.1

                  我的 Windows 运行时组件的 project.json 文件有以下内容:

                  My project.json file of Windows Runtime Component has following:

                    {
                    "dependencies": {
                      "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
                      "Newtonsoft.Json": "9.0.1"
                    },
                    "frameworks": {
                      "uap10.0": {}
                    },
                    "runtimes": {
                      "win10-arm": {},
                      "win10-arm-aot": {},
                      "win10-x86": {},
                      "win10-x86-aot": {},
                      "win10-x64": {},
                      "win10-x64-aot": {}
                    }
                  }
                  

                  我的 Visual Studio 版本是:

                  My Visual Studio version is:

                  我尝试删除所有 Newtonsoft json 并重新安装它,但没有成功.

                  I tried removing all the Newtonsoft json and re-installing it but no luck.

                  推荐答案

                  我做了一个基本的Demo,重现了这个问题.似乎 WinRT 组件未能找到正确的 Newton.Json 程序集.临时解决方法是手动添加 Newtonsoft.json.dll 文件.您可以通过以下步骤实现:

                  I made a basic Demo and reproduced this problem. It seems that WinRT component failed to find the correct assembly of Newton.Json. Temporarily the workaround is to manually add the Newtonsoft.json.dll file. You can achieve this by following steps:

                  1. 右键引用->添加引用->浏览...->找到C:Users.nugetpackagesNewtonsoft.Json9.0.1libportable-net45+wp80+win8+wpa81Newtonsoft.json.dll->点击添加按钮.

                  1. Right click References-> Add Reference->Browse...-> Find C:Users.nugetpackagesNewtonsoft.Json9.0.1libportable-net45+wp80+win8+wpa81Newtonsoft.json.dll->Click Add button.

                  重建您的运行时组件项目并运行.这个错误应该消失了.

                  Rebuild your Runtime Component project and run. This error should be gone.

                  这篇关于无法加载文件或程序集“Newtonsoft.Json,Version=9.0.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed"或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:自适应触发器和数据模板 下一篇:如何更改 UWP 中选定 ListView 项的突出显示颜色(Windows 10)

                  相关文章

                    <i id='ILB2T'><tr id='ILB2T'><dt id='ILB2T'><q id='ILB2T'><span id='ILB2T'><b id='ILB2T'><form id='ILB2T'><ins id='ILB2T'></ins><ul id='ILB2T'></ul><sub id='ILB2T'></sub></form><legend id='ILB2T'></legend><bdo id='ILB2T'><pre id='ILB2T'><center id='ILB2T'></center></pre></bdo></b><th id='ILB2T'></th></span></q></dt></tr></i><div id='ILB2T'><tfoot id='ILB2T'></tfoot><dl id='ILB2T'><fieldset id='ILB2T'></fieldset></dl></div>
                      <bdo id='ILB2T'></bdo><ul id='ILB2T'></ul>

                    1. <legend id='ILB2T'><style id='ILB2T'><dir id='ILB2T'><q id='ILB2T'></q></dir></style></legend>

                      <small id='ILB2T'></small><noframes id='ILB2T'>

                      <tfoot id='ILB2T'></tfoot>