我與β-8 MVC6項目,當我添加了System.Security.Claims NuGet包,我會得到以下編譯錯誤:具有同等身份的多組件 - System.Runtime.dll
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\username.dnx\packages\System.Runtime\4.0.20\ref\dotnet\System.Runtime.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\Facades\System.Runtime.dll'. Remove one of the duplicate references.
有關解決此問題的任何指導將不勝感激!
我能夠從僅僅是一種簡單的新項目,以複製,Beta8Class只是在解決方案中常見的類庫,這裏是project.json:
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"Beta8Class": "1.0.0-*",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta8",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-beta8",
"Microsoft.AspNet.Mvc": "6.0.0-beta8",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta8",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta8",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta8",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
"Microsoft.Framework.Logging": "1.0.0-beta8",
"Microsoft.Framework.Logging.Console": "1.0.0-beta8",
"Microsoft.Framework.Logging.Debug": "1.0.0-beta8",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta8",
"System.Security.Claims": "4.0.1-beta-23409"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc"
],
"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
}
}
感謝
因此,它看起來像我不需要Nuget包來訪問System.Security.Claims。它實際上是mscorlib的一部分。 –