我们的团队将我们的项目从.net core rc2升级到.net core 1.0。当我运行集成测试时,我收到错误
发生了一个或多个错误。 (无法加载文件或程序集 ' System.Net.Http,Version = 4.1.0.0,Culture = neutral, 公钥= b03f5f7f11d50a3a&#39 ;.定位组件的清单 定义与程序集引用不匹配。 (例外 HRESULT:0x80131040))无法加载文件或程序集 ' System.Net.Http,Version = 4.1.0.0,Culture = neutral, 公钥= b03f5f7f11d50a3a&#39 ;.定位组件的清单 定义与程序集引用不匹配。 (例外 HRESULT:0x80131040)
我不确定为什么会抛出异常。
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
"Autofac.Extensions.DependencyInjection": "4.0.0-rc2-240",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.EntityFrameworkCore.InMemory": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Mvc.WebApiCompatShim": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"VisitorDigitalSignIn.Core": "1.0.0-*",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0",
"Microsoft.AspNetCore.Cors": "1.0.0",
"MimeKit": "1.4.2",
"MailKit": "1.4.2.1",
"Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Serilog.Extensions.Logging": "1.0.0-rc2-10110",
"Serilog.Sinks.Seq": "2.0.0-rc-46",
"Microsoft.AspNet.WebApi.Client": "5.2.3"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview2-final",
"imports": [
"netstandard1.6",
"portable-net45+netcore45+wp8+wp81+wpa81"
]
},
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview2-final",
"imports": [
"netstandard1.6",
"portable-net45+netcore45+wp8+wp81+wpa81"
]
},
"Microsoft.Extensions.SecretManager.Tools": {
"version": "1.0.0-preview2-final",
"imports": [
"netstandard1.6",
"portable-net45+netcore45+wp8+wp81+wpa81"
]
},
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.0.0-preview2-final",
"imports": [
"netstandard1.6",
"portable-net45+netcore45+wp8+wp81+wpa81"
]
}
},
"scripts": {
"postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"netstandard1.6",
"dnxcore50",
"portable-net451+win8"
]
}
},
"publishOptions": {
"include": [
"appsettings.json",
"web.config"
]
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
}
}