- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我无法在 Visual Studio 2013 中构建解决方案。
这发生在我将我的 JSON.NET 包更新到 6.0.1 之后。在此之前,它就像一个魅力。
有什么想法吗?
PS:这可能是关于 OWIN 的。我认为它也引用了 JSON.NET,也许是动态的?
完全错误
Error 11 The type 'Newtonsoft.Json.Linq.JObject' exists in both
'c:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend\Newtonsoft.Json.dll' and
'c:\Users\Me\Desktop\Solutions\[Project]\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll'
C:\Users\Me\Desktop\Solutions\[Project]\TrendPin\App_Start\Startup.Auth.cs 48 21 [Project]
我的 Web.Config 中有这个
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
</dependentAssembly>
我的 .csproj 中有这个
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
构建输出
1>------ Build started: Project: [Project].Backend, Configuration: Debug Any CPU ------
1> All packages listed in packages.config are already installed.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
1> [Project].Backend -> C:\Users\Me\Desktop\Solutions\[Project]\[Project].Backend\bin\Debug\[Project].Backend.dll
2>------ Build started: Project: [Project].Data, Configuration: Debug Any CPU ------
2> All packages listed in packages.config are already installed.
2> [Project].Data -> C:\Users\Me\Desktop\Solutions\[Project]\[Project].Data\bin\Debug\[Project].Data.dll
3>------ Build started: Project: [Project], Configuration: Debug Any CPU ------
3> All packages listed in packages.config are already installed.
3>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3243: No way to resolve conflict between "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". Choosing "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" arbitrarily.
3> Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "4.5.0.0" [C:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend\Newtonsoft.Json.dll] to Version "6.0.0.0" [C:\Users\Me\Desktop\Solutions\[Project]\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning.
3>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /><bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /></dependentAssembly></assemblyBinding>
3>C:\Users\Me\Desktop\Solutions\[Project]\[Project]\App_Start\Startup.Auth.cs(48,21,48,28): error CS0433: The type 'Newtonsoft.Json.Linq.JObject' exists in both 'c:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend\Newtonsoft.Json.dll' and 'c:\Users\Me\Desktop\Solutions\[Project]\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll'
4>------ Skipped Build: Project: [Project].Tests, Configuration: Debug Any CPU ------
4>Project not selected to build for this solution configuration
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========
最佳答案
在您的 csproj 文件中,您会注意到 Newtonsoft.Json 有 2 个条目。删除以下条目:
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
关于c# - 'Newtonsoft.Json.. .' exists in both ' Blend\Newtonsoft.Json.dll' 和 'Solution\packages\...\,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21653130/
我的构建菜单包含两个构建选项: 构建解决方案 构建MyProjectName 如果我选择Build Solution(然后是Debug,Start Debugging (F5)),运行的可执行文件不包
我有一个带有一些输入字段的表单。这些输入字段具有指定的背景渐变,如下所示: input { background: #00b7ea; background: url(data:imag
现在这个遗留代码是多个项目,每个项目都有自己的解决方案。每个项目通过它编译的 dll 引用另一个项目。要让主项目运行,您必须以正确的顺序进行 10 多个单独的构建。 我试图解释如何将所有项目移动到一个
我在 Visual Studio 2013 中处理我的项目,我错误地点击了 Rebuild Solution。我收到以下异常,我不知道如何解决它。请建议。 Server Error in '/' Ap
class solution { void table(final int n) { for (int i = 1; i <= 10; i++) { S
我非常需要了解如何使用 Visual Studio 2010 在 c# 中管理一些非常基本的体系结构问题,而且我在教科书和网站上寻找解决方案时遇到了一些困难。假设我有一个 MyWinForm.sln
我有 Java 背景,正在尝试从 C# 开始。 我想用 C# 创建一个将在其他解决方案中使用的库。在 Eclipse 中,只需创建一个 jar 并将其添加到类路径中即可。我知道VS2013中的每个项目
在我目前的工作中,我需要打开 3 个不同的解决方案,构建并运行它们。是否有任何脚本可以像我单击 Web 服务的“构建解决方案”或“启动”或“Google Chrome”一样执行工作人员? 谢谢。 最佳
有什么方法可以告诉Visual Studio 2005的解决方案资源管理器在svn-checkout后第一次打开解决方案时不要扩展所有项目? 编辑: 感谢您指出 PowerCommands。当我使用带
我的 Visual Studio 解决方案的 Subversion 存储库中有以下目录: 项目名称 标签 分支机构 后备箱 我的解决方案.sln MyProject1(目录) MyProject2(目
我刚刚使用 Update 2 更新了 Visual Studio 2015。 现在,经过几个小时的正常工作,我收到:“检测到内存不足。对此解决方案禁用了完整的解决方案分析。”出现在我的 VS2015
在 Visual Studio Code 中,单击我的测试项目中的“调试测试”代码镜头链接: 导致错误信息: MSBUILD : error MSB1011: Specify which projec
我是Docker的新手,正在尝试为ASP.NET Core应用程序创建Dockerfile。有人可以建议我需要哪些更改吗? 这是我的Dockerfile: FROM microsoft/dotnet:
我的入门类(class)的这个实验要求我们以 pig 拉丁语返回任何用户输入。当我运行它并在控制台中输入任何字符串时,我似乎不断收到的错误是: java.lang.StringIndexOutO
关闭。这个问题需要更多focused .它目前不接受答案。 想改善这个问题吗?更新问题,使其仅关注一个问题 editing this post . 4年前关闭。 Improve this questi
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 11 个月前关闭。 Improv
我的 C++ Concert Cplex 有问题。我正在尝试重新创建最短路径问题。输出到文本文件是: Minimize obj: 2 x_12 + x_13 + 2 x_21 + x_24 + x_
有时,当我浏览我的头文件时,我想在 (doxygen) 文档中添加一些小东西。这可能是关于使用某些函数参数的快速说明,或者只是修复了一个小错字。 但后来我想:哦不,这会在下一个 make 调用时触发重
我正在使用缺少 findall 的高阶 Prolog 变体. 还有一个关于实现我们自己的问题 findall这里:Getting list of solutions in Prolog . 低效的实现
如果您的应用程序必须对大尺寸对象(> 85000 字节)进行大量分配/取消分配,则最终会导致内存碎片,并且您的应用程序将抛出内存不足异常。 这个问题有什么解决方案,还是CLR内存管理的限制? 最佳答案
我是一名优秀的程序员,十分优秀!