当我将包Microsoft.CodeAnalysis.Scripting
添加到我的project.json时,我收到以下错误:
Severity Code Description Project File Line
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.Runtime.Extensions.dll' and 'C:\Users\user-a\.dnx\packages\System.Runtime.Extensions\4.0.10\ref\dotnet\System.Runtime.Extensions.dll'. Remove one of the duplicate references. WebApplication1 1
Error CS0433 The type 'GuidAttribute' exists in both 'System.Runtime.InteropServices, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' WebApplication1.DNX 4.5.1 C:\temp\vs2015\WebApplication1\src\WebApplication1\Properties\AssemblyInfo.cs 23
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.Threading.Tasks.dll' and 'C:\Users\user-a\.dnx\packages\System.Threading.Tasks\4.0.10\ref\dotnet\System.Threading.Tasks.dll'. Remove one of the duplicate references. WebApplication1 1
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.IO.dll' and 'C:\Users\user-a\.dnx\packages\System.IO\4.0.10\ref\dotnet\System.IO.dll'. Remove one of the duplicate references. WebApplication1 1
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.Threading.dll' and 'C:\Users\user-a\.dnx\packages\System.Threading\4.0.10\ref\dotnet\System.Threading.dll'. Remove one of the duplicate references. WebApplication1 1
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.Globalization.dll' and 'C:\Users\user-a\.dnx\packages\System.Globalization\4.0.10\ref\dotnet\System.Globalization.dll'. Remove one of the duplicate references. WebApplication1 1
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.Diagnostics.Debug.dll' and 'C:\Users\user-a\.dnx\packages\System.Diagnostics.Debug\4.0.10\ref\dotnet\System.Diagnostics.Debug.dll'. Remove one of the duplicate references. WebApplication1 1
project.json
中的我的依赖关系看起来像这样;
"dependencies": {
"ClassLibrary1": "",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
"EntityFramework.Commands": "7.0.0-rc1-final",
"System.Reflection": "4.1.0-beta-23516",
"System.Runtime": "4.0.21-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"Microsoft.CodeAnalysis.Scripting": "1.1.0"
},
一旦我删除Microsoft.CodeAnalysis.Scripting
,那么一切都很好。
我该如何解决这个问题?