Nuget.Core.dll版本号不匹配 [英] Nuget.Core.dll version number mismatch

查看:969
本文介绍了Nuget.Core.dll版本号不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法弄清楚我应该怎么部署由nuget.server包创建了一个网站。
ASP.Net MVC没有安装在服务器上,所以我增加部署的依赖我的项目,并选择用剃刀语法的ASP.NET Web页。

I could not figure out how should I deploy a web site created by nuget.server package. ASP.Net MVC is not installed on server, so I "add deployable dependencies" to my project and select "ASP.NET Web Pages with Razor syntax".

这样做的问题是它增加了Nuget.Core.dll与1.0.11220.104版本,但nuget.server包增加与1.3.20419.9005版Nuget.Core.dll的参考。

The problem with that is it adds Nuget.Core.dll with version 1.0.11220.104, but nuget.server package adds a reference for Nuget.Core.dll with version 1.3.20419.9005.

使用更高版本的部署,我得到了

With higher version deployed, I got

无法加载文件或程序集NuGet.Core,版本= 1.0.11220.104的消息。
  随着低版本的部署,我得到了编译器错误信息:CS1705:大会'NuGet.Server,版本= 1.3.20426.373,文化=中立,公钥=空'使用'NuGet.Core,版本= 1.3.20419.9005,文化=中立,公钥= 31bf3856ad364e35'具有更高的版本比引用的程序集NuGet.Core,版本= 1.0.11220.104,文化=中性公钥= 31bf3856ad364e35'。

Could not load file or assembly 'NuGet.Core, Version=1.0.11220.104" message. With lower version deployed, I got "Compiler Error Message: CS1705: Assembly 'NuGet.Server, Version=1.3.20426.373, Culture=neutral, PublicKeyToken=null' uses 'NuGet.Core, Version=1.3.20419.9005, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'NuGet.Core, Version=1.0.11220.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35'".

我该如何解决呢?

感谢。

推荐答案

我遇到了同样的问题,使用Visual Studio中的添加部署斌'选项之后。我设置了assemblybinding重定向通过Haacked的建议,但将bindingRedirect实际工作。 ;)

I ran into the same issue after using the 'add deployable bin' option in visual studio. I set the assemblybinding redirect as suggested by Haacked but modified the bindingRedirect to actually work. ;)

<bindingRedirect oldVersion="0.0.0.0-1.3.20419.9005"
                             newVersion="1.3.20419.9005"/>

在那之后,我让你用System.Web.Webpages.Administrator得到埃德姆错误。我走进了bin文件夹,并删除了System.Web.WebPages.dll,一切都亮了起来,现在的伟大工程!

After that I was getting the error you were getting Erdem with System.Web.Webpages.Administrator. I went into the bin folder and deleted the System.Web.WebPages.dll and everything lit up and now works great!

这篇关于Nuget.Core.dll版本号不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆