包NLog 3.2.0与netcoreapp1.0不兼容(.NETCoreApp,Version = v1.0)

时间:2016-06-03 12:34:14

标签: asp.net-core .net-core-rc2

这是project.json文件。

{
 "dependencies": {
"Microsoft.NETCore.App": {
  "version": "1.0.0-rc2-3002702",
  "type": "platform"
},
"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",
"Swashbuckle": "6.0.0-beta9",
"Swashbuckle.SwaggerGen": "6.0.0-beta9",
"Swashbuckle.SwaggerUi": "6.0.0-beta9",
"EasyGelf.NLog": "0.4.5.57"
},

"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
  "version": "1.0.0-preview1-final",
  "imports": "portable-net45+win8+dnxcore50"
 }
},

"frameworks": {
"netcoreapp1.0": {
  "imports": [
    "dotnet5.6",
    "dnxcore50",
    "portable-net45+win8"
   ]
 }
},

"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},

错误是

Package NLog 3.2.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package NLog 3.2.0 supports:
  - net35 (.NETFramework,Version=v3.5)
  - net40 (.NETFramework,Version=v4.0)
  - net45 (.NETFramework,Version=v4.5)
  - sl4 (Silverlight,Version=v4.0)
  - sl5 (Silverlight,Version=v5.0)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

虽然您只是间接添加NLog,但如果您使用测试版

,NLog会支持.NET Core

https://www.nuget.org/packages/NLog/4.4.0-betaV14