在更新所有通過NuGet的包之前,我更新了帶有更新4的Visual Studio。現在,當我嘗試運行我的網站,我得到這個錯誤:在VS和NuGet更新後,無法加載文件或程序集netwonsoft.json
An exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll but was not handled in user code
Additional information: 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)
檢查錯誤列表後,我看到了這樣的警告:
Warning 14 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. C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets 1697 5 Project
設置冗長設置爲詳細我這後(有的更多考慮....文字:?
1> Could not resolve this reference. Could not locate the assembly "log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
1> For SearchPath "projectfolder\bin".
1> Considered "projectfolder\bin\log4net.winmd", but it didn't exist.
1> Considered "projectfolder\bin\log4net.dll", but it didn't exist.
1> Considered "projectfolder\bin\log4net.exe", but it didn't exist.
確實是有沒有log4net的文件或任何我想的東西是使用該組件是否有辦法來自動檢測裝配問題和解決這些問題因爲?這是對我來說技術的方式。
我覺得很奇怪的是,我的newsoft.json引用指出版本4.5.0,錯誤指出它需要6.0.0.0,我的package.config說它包含6.0.8版本。
我特別有JSON問題。
的[不同版本的相同依賴性組件,其不能被解析的實測值之間的衝突(可能重複http://stackoverflow.com/questions/24772053/found-conflicts-between-different-versions-of -the-same-dependent-assembly-that-c) – trailmax
我想我有一個特定的JSON問題。 – Kraishan
您有2個引用2個不同的Json.Net dll版本。可能你已經在一個項目中更新了nuget,但是舊版本用於相同解決方案的其他項目中。試試鏈接問題中的說明。 – trailmax