目标在vs2015环境中设置为.net 4.6。所有获取并没有构建错误。 使用https://www.hanselman.com/blog/HowToHostYourOwnNuGetServerAndPackageFeed.aspx和MS doco作为参考。 在IIS下运行时,显示错误
如何解决此问题?
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2106.0
注意:Newtonsoft.Json.dll文件的版本是9.0.1.19813 web.config有这两行,我需要这个和nugget.dll.config有newVersion =“9.0.2.0”吗?
< assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
< bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.1.0" />
答案 0 :(得分:0)
我有它工作,我做的是将“nuget”的默认项目更改为“nugetwebserver”并调整程序集和模块名称。 然后做了一个新的编译。我怀疑名称选择不当导致与nuget.server项目所看到的某些设置有一些冲突被称为..
有趣的是,http://server/nugetserver2.7/nuget将在IE中呈现 http://server/nugetserver3.1/nuget询问我是否要下载内容。内容与2.7 ..
的呈现页面相同