在ASP.NET 1.0的核心是我使用:ASP.NET核心IISIntegration.Tools和.NET Framework
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
運行DOTNET發佈命令,但在ASP.NET 1.1的核心我開始得到以下錯誤:
Package Microsoft.AspNetCore.Server.IISIntegration.Tools 1.1.0-preview4-final is not compatible with net462 (.NETFramework,Version=v4.6.2). Package Microsoft.AspNetCore.Server.IISIntegration.Tools 1.1.0-preview4-final supports: netcoreapp1.0 (.NETCoreApp,Version=v1.0)
我怎樣才能仍然使用ASP.NET核心和常規.NET框架的「dotnet-publish-iis」?
project.json:
{
"dependencies": {
"Dapper": "1.50.2",
"log4net": "2.0.5",
"Microsoft.AspNetCore.Authorization": "1.1.0",
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
"Microsoft.AspNetCore.Routing": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.Extensions.Caching.Abstractions": "1.1.0",
"Microsoft.Extensions.Caching.Memory": "1.1.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final"
},
"frameworks": {
"net462": {}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"publishOptions": {
"include": [
"wwwroot",
"web.config",
"appsettings.json",
"log4net.xml",
]
},
"scripts": {
"prepublish": [ ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},
"configurations": {
"Debug": {
"buildOptions": {
"define": [
"DEBUG",
"TRACE"
]
}
},
"Integration": {
"buildOptions": {
"define": [
"DEBUG",
"TRACE"
]
}
},
"Production": {
"buildOptions": {
"define": [ "RELEASE", "TRACE" ],
"optimize": true
}
}
}
}
你能分享你的project.json嗎? – Sanket