NuGet.Server: install of 2.11.2 succeeds on projects less than net46 #3257

Closed
joelverhagen opened this Issue Sep 29, 2016 · 1 comment

Projects

None yet

2 participants

@joelverhagen
Member

Steps

  1. Open VS.
  2. Create a .NET Framework 4.5.2 empty web project.
  3. Install NuGet.Server 2.11.2 via VS.

Expected

Installation should fail since version 2.11.2 supports net46 or higher.

Actual

The package installs but build fails with missing NuGet.Server reference.

Example

Attempting to gather dependency information for package 'NuGet.Server.2.11.2' with respect to project 'WebApplication10', targeting '.NETFramework,Version=v4.5.2'
Gathering dependency information took 2.93 sec
Attempting to resolve dependencies for package 'NuGet.Server.2.11.2' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'NuGet.Server.2.11.2'
Resolved actions to install package 'NuGet.Server.2.11.2'
Retrieving package 'Microsoft.Web.Infrastructure 1.0.0' from 'nuget.org (v3)'.
Retrieving package 'RouteMagic 1.3.0' from 'nuget.org (v3)'.
Retrieving package 'WebActivatorEx 2.1.0' from 'nuget.org (v3)'.
Retrieving package 'Microsoft.Web.Xdt 2.1.1' from 'nuget.org (v3)'.
Retrieving package 'NuGet.Core 2.11.1' from 'nuget.org (v3)'.
Retrieving package 'NuGet.Server 2.11.2' from 'nuget.org (v3)'.
Retrieving package 'Newtonsoft.Json 8.0.3' from 'nuget.org (v3)'.
Adding package 'Microsoft.Web.Infrastructure.1.0.0' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to 'packages.config'
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0' to WebApplication10
Adding package 'Microsoft.Web.Xdt.2.1.1' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'Microsoft.Web.Xdt.2.1.1' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'Microsoft.Web.Xdt.2.1.1' to 'packages.config'
Successfully installed 'Microsoft.Web.Xdt 2.1.1' to WebApplication10
Adding package 'Newtonsoft.Json.8.0.3' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'Newtonsoft.Json.8.0.3' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'Newtonsoft.Json.8.0.3' to 'packages.config'
Executing script file 'd:\trash\2016-09-29\WebApplication10\packages\Newtonsoft.Json.8.0.3\tools\install.ps1'...
Successfully installed 'Newtonsoft.Json 8.0.3' to WebApplication10
Adding package 'NuGet.Core.2.11.1' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'NuGet.Core.2.11.1' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'NuGet.Core.2.11.1' to 'packages.config'
Successfully installed 'NuGet.Core 2.11.1' to WebApplication10
Adding package 'RouteMagic.1.3.0' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'RouteMagic.1.3.0' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'RouteMagic.1.3.0' to 'packages.config'
Successfully installed 'RouteMagic 1.3.0' to WebApplication10
Adding package 'WebActivatorEx.2.1.0' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'WebActivatorEx.2.1.0' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'WebActivatorEx.2.1.0' to 'packages.config'
Successfully installed 'WebActivatorEx 2.1.0' to WebApplication10
Adding package 'NuGet.Server.2.11.2' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Added package 'NuGet.Server.2.11.2' to folder 'd:\trash\2016-09-29\WebApplication10\packages'
Overwriting existing file 'Web.config'..
Added package 'NuGet.Server.2.11.2' to 'packages.config'
Successfully installed 'NuGet.Server 2.11.2' to WebApplication10
Executing nuget actions took 5.54 sec
========== Finished ==========
Time Elapsed: 00:00:11.1586970

1>------ Build started: Project: WebApplication10, Configuration: Debug Any CPU ------
1>d:\trash\2016-09-29\WebApplication10\WebApplication10\DataServices\Routes.cs(4,13,4,19): error CS0234: The type or namespace name 'Server' does not exist in the namespace 'NuGet' (are you missing an assembly reference?)
1>d:\trash\2016-09-29\WebApplication10\WebApplication10\DataServices\Routes.cs(5,13,5,19): error CS0234: The type or namespace name 'Server' does not exist in the namespace 'NuGet' (are you missing an assembly reference?)
1>d:\trash\2016-09-29\WebApplication10\WebApplication10\DataServices\Routes.cs(6,13,6,19): error CS0234: The type or namespace name 'Server' does not exist in the namespace 'NuGet' (are you missing an assembly reference?)
1>d:\trash\2016-09-29\WebApplication10\WebApplication10\DataServices\Routes.cs(34,24,34,39): error CS0246: The type or namespace name 'IPackageService' could not be found (are you missing a using directive or an assembly reference?)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This is due to the fact that the package content is not under any TFM directory. The content should be put under a net46 directory.

@maartenba
Contributor
maartenba commented Sep 30, 2016 edited

Fixed in dev

@maartenba maartenba closed this Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment