我安装了.NET Core并使用 ASP.NET核心Web应用程序(.NET Core)模板创建了一个新的VS2015项目。
这个基础项目编译并运行得很好,并且在“参考”部分下没有任何奇怪的错误。
然而,NuGet包管理器UI识别出13个更新。 Boldly / Naively我在PM控制台上执行了这个命令:
Update-Package
它会在此问题的底部(为简洁起见)输出显示的成功消息,并更新project.json
中的版本号。
这是project.json
的依赖关系部分:
"dependencies": {
"Microsoft.ApplicationInsights.AspNetCore": "1.0.2",
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Routing": "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.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.Extensions.Options.ConfigurationExtensions": "1.1.0",
"Microsoft.NETCore.App": {
"version": "1.1.0",
"type": "platform"
}
},
在解决方案资源管理器中,软件包版本不更新。
当我重建时,我会收到大量警告,所有这些格式都是:
warning NU1007: Dependency specified was Microsoft.AspNetCore.Mvc >= 1.1.0 but ended up with Microsoft.AspNetCore.Mvc 1.0.1.
我不明白为什么NuGet会更新package.json,而不是项目引用。而且,我不知道如何手工修复它。更新project.json
时,project.lock.json
不会更新,但手动更改版本号会导致警告更改为以下格式的错误:
NU1001 The dependency Microsoft.Extensions.Logging.Console >= 1.1.0 could not be resolved.
我正在使用VS2015 Update 3和NuGet 3.5。
我的问题是:
以下是Update-Package
的输出:
Retrieving package 'Microsoft.ApplicationInsights.AspNetCore 1.0.2' from 'nuget.org'.
Retrieving package 'Microsoft.AspNetCore.Mvc 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.AspNetCore.Routing 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.AspNetCore.Server.IISIntegration 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.AspNetCore.Server.Kestrel 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.Extensions.Configuration.EnvironmentVariables 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.Extensions.Configuration.FileExtensions 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.Extensions.Configuration.Json 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.Extensions.Logging 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.Extensions.Logging.Console 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.Extensions.Logging.Debug 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.Extensions.Options.ConfigurationExtensions 1.1.0' from 'nuget.org'.
Retrieving package 'Microsoft.NETCore.App 1.1.0' from 'nuget.org'.
Uninstalling NuGet package Microsoft.ApplicationInsights.AspNetCore.1.0.0.
Successfully uninstalled 'Microsoft.ApplicationInsights.AspNetCore.1.0.0' from WebApplication3
Installing NuGet package Microsoft.ApplicationInsights.AspNetCore.1.0.2.
Successfully installed 'Microsoft.ApplicationInsights.AspNetCore 1.0.2' to WebApplication3
Uninstalling NuGet package Microsoft.AspNetCore.Mvc.1.0.1.
Successfully uninstalled 'Microsoft.AspNetCore.Mvc.1.0.1' from WebApplication3
Installing NuGet package Microsoft.AspNetCore.Mvc.1.1.0.
Successfully installed 'Microsoft.AspNetCore.Mvc 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.AspNetCore.Routing.1.0.1.
Successfully uninstalled 'Microsoft.AspNetCore.Routing.1.0.1' from WebApplication3
Installing NuGet package Microsoft.AspNetCore.Routing.1.1.0.
Successfully installed 'Microsoft.AspNetCore.Routing 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.AspNetCore.Server.IISIntegration.1.0.0.
Successfully uninstalled 'Microsoft.AspNetCore.Server.IISIntegration.1.0.0' from WebApplication3
Installing NuGet package Microsoft.AspNetCore.Server.IISIntegration.1.1.0.
Successfully installed 'Microsoft.AspNetCore.Server.IISIntegration 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.AspNetCore.Server.Kestrel.1.0.1.
Successfully uninstalled 'Microsoft.AspNetCore.Server.Kestrel.1.0.1' from WebApplication3
Installing NuGet package Microsoft.AspNetCore.Server.Kestrel.1.1.0.
Successfully installed 'Microsoft.AspNetCore.Server.Kestrel 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.Extensions.Configuration.EnvironmentVariables.1.0.0.
Successfully uninstalled 'Microsoft.Extensions.Configuration.EnvironmentVariables.1.0.0' from WebApplication3
Installing NuGet package Microsoft.Extensions.Configuration.EnvironmentVariables.1.1.0.
Successfully installed 'Microsoft.Extensions.Configuration.EnvironmentVariables 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.Extensions.Configuration.FileExtensions.1.0.0.
Successfully uninstalled 'Microsoft.Extensions.Configuration.FileExtensions.1.0.0' from WebApplication3
Installing NuGet package Microsoft.Extensions.Configuration.FileExtensions.1.1.0.
Successfully installed 'Microsoft.Extensions.Configuration.FileExtensions 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.Extensions.Configuration.Json.1.0.0.
Successfully uninstalled 'Microsoft.Extensions.Configuration.Json.1.0.0' from WebApplication3
Installing NuGet package Microsoft.Extensions.Configuration.Json.1.1.0.
Successfully installed 'Microsoft.Extensions.Configuration.Json 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.Extensions.Logging.1.0.0.
Successfully uninstalled 'Microsoft.Extensions.Logging.1.0.0' from WebApplication3
Installing NuGet package Microsoft.Extensions.Logging.1.1.0.
Successfully installed 'Microsoft.Extensions.Logging 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.Extensions.Logging.Console.1.0.0.
Successfully uninstalled 'Microsoft.Extensions.Logging.Console.1.0.0' from WebApplication3
Installing NuGet package Microsoft.Extensions.Logging.Console.1.1.0.
Successfully installed 'Microsoft.Extensions.Logging.Console 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.Extensions.Logging.Debug.1.0.0.
Successfully uninstalled 'Microsoft.Extensions.Logging.Debug.1.0.0' from WebApplication3
Installing NuGet package Microsoft.Extensions.Logging.Debug.1.1.0.
Successfully installed 'Microsoft.Extensions.Logging.Debug 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.Extensions.Options.ConfigurationExtensions.1.0.0.
Successfully uninstalled 'Microsoft.Extensions.Options.ConfigurationExtensions.1.0.0' from WebApplication3
Installing NuGet package Microsoft.Extensions.Options.ConfigurationExtensions.1.1.0.
Successfully installed 'Microsoft.Extensions.Options.ConfigurationExtensions 1.1.0' to WebApplication3
Uninstalling NuGet package Microsoft.NETCore.App.1.0.1.
Successfully uninstalled 'Microsoft.NETCore.App.1.0.1' from WebApplication3
Installing NuGet package Microsoft.NETCore.App.1.1.0.
Successfully installed 'Microsoft.NETCore.App 1.1.0' to WebApplication3
Executing nuget actions took 729.79 ms
Time Elapsed: 00:00:08.2056394