我將項目更新到最新的Asp.net核心1.1。 經過對配置的一些調整後,我可以從VS代碼進行調試和編譯。不過,我不能在VS調試(但可以建造)2015年更新到ASP.NET Core 1.1後無法從VS Studio 2015進行調試
在VS 2015顯示「引用(錯誤 - 參見錯誤列表)」這是顯示如下:
的具有相同密鑰的項目已被添加。重點: Microsoft.NETCore.App
這是我目前global.json:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-1-003177"
}
}
而且我project.json:
{
"version": "1.11.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"dependencies": {
"Microsoft.NETCore.App": "1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
"Dapper": "1.50.2",
"BCrypt.Net-Core": "1.1.0",
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Logging": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.1.0-preview4-final",
"imports": "portable-net45+win8+dnxcore50"
}
},
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
}
},
"imports": [
"dotnet5.6",
"portable-net45+win8",
"dnxcore50"
]
}
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"Areas/**/Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
從是否有任何變化再次調試VS Studio 2015?
基於最近的消息,最終的.NET Core支持似乎只會出現在VSCode和VS2017中。不要浪費你的時間在VS2015,如果其他兩個是你更好的選擇。 –