我创建了一个.NET Core Web应用程序,并尝试在mono 4.4目标框架4.5.1的帮助下在ubuntu上运行,我正面临以下异常。
未处理的例外情况: System.TypeLoadException:无法加载类型' Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsListener'来自assembly' Microsoft.ApplicationInsights,Version = 2.1.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'。 在Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()< 0x40a768d0 + 0x0001f> in:0 在Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()< 0x40a5fee0 + 0x00167> in:0 在/home/glb-014/Documents/Socioboard/src/Socioboard/Program.cs:14中的Socioboard.Program.Main(System.String [] args)[0x00001] [ERROR]致命的未处理的异常:System.TypeLoadException:无法加载类型' Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsListener'来自assembly' Microsoft.ApplicationInsights,Version = 2.1.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'。 在Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()< 0x40a768d0 + 0x0001f> in:0 在Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()< 0x40a5fee0 + 0x00167> in:0
这是我的project.json
{
"dependencies": {
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
"Serilog": "2.0.0-rc-598",
"Serilog.Extensions.Logging": "1.0.0-rc2-10110",
"Serilog.Sinks.ColoredConsole": "2.0.0-beta-700",
"Serilog.Sinks.RollingFile": "2.0.0-rc-703",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0-rc2-final",
"Microsoft.Extensions.Options": "1.0.0-rc2-final",
"MongoDB.Bson": "2.2.4",
"MongoDB.Driver": "2.2.4",
"MySql.Data": "6.9.8",
"MySql.Data.Entity": "6.9.8",
"Newtonsoft.Json": "8.0.3",
"NHibernate.Linq": "1.0.0",
"StackExchange.Redis": "1.1.603",
"Microsoft.AspNetCore.Cors": "1.0.0-rc2-final"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
}
},
"frameworks": {
"net451": {
"frameworkAssemblies": {
"System.Xml": "4.0.0.0"
},
"dependencies": {
"NHibernate": "4.0.4.4000"
}
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"gcServer": true
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
请帮我解决这个问题。