Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can something be done about the Microsoft.Tpl.Dataflow package? #23792

Closed
svick opened this issue Oct 10, 2017 · 28 comments
Closed

Can something be done about the Microsoft.Tpl.Dataflow package? #23792

svick opened this issue Oct 10, 2017 · 28 comments
Labels
area-System.Threading.Tasks documentation Documentation bug or enhancement, does not impact product or test code packaging Related to packaging
Milestone

Comments

@svick
Copy link
Contributor

svick commented Oct 10, 2017

The Microsoft.Tpl.Dataflow package is outdated and generally shouldn't be used anymore. The replacement is the System.Threading.Tasks.Dataflow package.

But people keep using the old package (see e.g. https://github.com/dotnet/corefx/issues/202#issuecomment-335470737), not knowing they should switch to the new one. Is there something that can be done to help those people?

Some options I considered:

  1. Add an analyzer to dotnet/platform-compat that will consider Microsoft.Tpl.Dataflow deprecated.
  2. Release a new version of Microsoft.Tpl.Dataflow that will contain no code of its own and will "redirect" to System.Threading.Tasks.Dataflow by having a dependency on it. (And then keep releasing a new version every time System.Threading.Tasks.Dataflow updates?)

cc: @stephentoub

@akoeplinger
Copy link
Member

IMO we should pick option 2 and then unlist the Microsoft.Tpl.Dataflow package so it doesn't show in search results.

@jmazouri
Copy link

jmazouri commented Jun 6, 2018

I just had someone ask me a question about this and wasn't sure of the answer, so I had to look into it and found this issue.

Keeping both listed can cause confusion for those unaware of the difference - especially when Visual Studio's package manager lists the "incorrect" one first, with the proper one being quite far down the list:

image

@danmoseley
Copy link
Member

@weshaggard can't we just unlist (not delete) the package?

@weshaggard
Copy link
Member

I just unlisted all the versions so that should help with the confusion.

@HowardvanRooijen
Copy link

Except I now can't install Microsoft.Azure.WebJobs.Extensions 2.2.2 because it has a direct dependency on Microsoft.Tpl.Dataflow :(

@weshaggard
Copy link
Member

@HowardvanRooijen how are you installing? By unlisting the package it should still be install-able when there are references to exact versions.

@tfritzke
Copy link

My project is using Microsoft.AspNet.WebHooks.Custom.Mvc, which has a dependency on Microsoft.AspNet.WebHooks.Custom which, in turn, has a dependency on Microsoft.Tpl.Dataflow (>= 4.5.24)

Running this command in the Package Manager Console now generates an error:

Update-Package -Reinstall

Update-Package : Unable to find package 'Microsoft.Tpl.Dataflow'. Existing packages must be restored before performing an install or update.At
line:1 char:1

  • Update-Package -Reinstall -IgnoreDependencies
  •   + CategoryInfo          : NotSpecified: (:) [Update-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand
    
    

The packages directory for the solution does have a local copy Microsoft.Tpl.Dataflow.4.5.24.

@HowardvanRooijen
Copy link

^^ Exactly the same for me both locally and on our VSTS hosted VS2017 build agent.

@weshaggard
Copy link
Member

@tfritzke @HowardvanRooijen are you doing it from the VS "Package Manager Console".

It seems to work for me locally:

PM> Install-package Microsoft.AspNet.WebHooks.Custom.Mvc
Attempting to gather dependency information for package 'Microsoft.AspNet.WebHooks.Custom.Mvc.1.2.1' with respect to project 'ConsoleApp2', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 20.6 sec
Attempting to resolve dependencies for package 'Microsoft.AspNet.WebHooks.Custom.Mvc.1.2.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.AspNet.WebHooks.Custom.Mvc.1.2.1'
Resolved actions to install package 'Microsoft.AspNet.WebHooks.Custom.Mvc.1.2.1'
  GET https://api.nuget.org/v3-flatcontainer/microsoft.tpl.dataflow/4.5.24/microsoft.tpl.dataflow.4.5.24.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webpages/3.2.2/microsoft.aspnet.webpages.3.2.2.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.web.infrastructure/1.0.0/microsoft.web.infrastructure.1.0.0.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webapi.core/5.2.2/microsoft.aspnet.webapi.core.5.2.2.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.razor/3.2.2/microsoft.aspnet.razor.3.2.2.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.mvc/5.2.2/microsoft.aspnet.mvc.5.2.2.nupkg
  GET https://api.nuget.org/v3-flatcontainer/newtonsoft.json/6.0.4/newtonsoft.json.6.0.4.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webapi.client/5.2.2/microsoft.aspnet.webapi.client.5.2.2.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.web.infrastructure/1.0.0/microsoft.web.infrastructure.1.0.0.nupkg 5ms
Installing Microsoft.Web.Infrastructure 1.0.0.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webhooks.common/1.2.1/microsoft.aspnet.webhooks.common.1.2.1.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.mvc/5.2.2/microsoft.aspnet.mvc.5.2.2.nupkg 241ms
Installing Microsoft.AspNet.Mvc 5.2.2.
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.razor/3.2.2/microsoft.aspnet.razor.3.2.2.nupkg 262ms
Installing Microsoft.AspNet.Razor 3.2.2.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webhooks.custom/1.2.1/microsoft.aspnet.webhooks.custom.1.2.1.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webhooks.custom.mvc/1.2.1/microsoft.aspnet.webhooks.custom.mvc.1.2.1.nupkg
Retrieving package 'Microsoft.AspNet.Mvc 5.2.2' from 'nuget.org'.
Retrieving package 'Microsoft.AspNet.Razor 3.2.2' from 'nuget.org'.
Retrieving package 'Microsoft.AspNet.WebApi.Client 5.2.2' from 'nuget.org'.
Retrieving package 'Microsoft.AspNet.WebApi.Core 5.2.2' from 'nuget.org'.
Retrieving package 'Microsoft.AspNet.WebHooks.Common 1.2.1' from 'nuget.org'.
Retrieving package 'Microsoft.AspNet.WebHooks.Custom 1.2.1' from 'nuget.org'.
Retrieving package 'Microsoft.AspNet.WebHooks.Custom.Mvc 1.2.1' from 'nuget.org'.
Retrieving package 'Microsoft.AspNet.WebPages 3.2.2' from 'nuget.org'.
Retrieving package 'Microsoft.Tpl.Dataflow 4.5.24' from 'nuget.org'.
Retrieving package 'Microsoft.Web.Infrastructure 1.0.0' from 'nuget.org'.
Retrieving package 'Newtonsoft.Json 6.0.4' from 'nuget.org'.
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webapi.core/5.2.2/microsoft.aspnet.webapi.core.5.2.2.nupkg 518ms
Installing Microsoft.AspNet.WebApi.Core 5.2.2.
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webpages/3.2.2/microsoft.aspnet.webpages.3.2.2.nupkg 520ms
Installing Microsoft.AspNet.WebPages 3.2.2.
Adding package 'Microsoft.AspNet.Razor.3.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
  OK https://api.nuget.org/v3-flatcontainer/microsoft.tpl.dataflow/4.5.24/microsoft.tpl.dataflow.4.5.24.nupkg 533ms
Installing Microsoft.Tpl.Dataflow 4.5.24.
  OK https://api.nuget.org/v3-flatcontainer/newtonsoft.json/6.0.4/newtonsoft.json.6.0.4.nupkg 530ms
Installing Newtonsoft.Json 6.0.4.
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webapi.client/5.2.2/microsoft.aspnet.webapi.client.5.2.2.nupkg 613ms
Installing Microsoft.AspNet.WebApi.Client 5.2.2.
Added package 'Microsoft.AspNet.Razor.3.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webhooks.common/1.2.1/microsoft.aspnet.webhooks.common.1.2.1.nupkg 747ms
Installing Microsoft.AspNet.WebHooks.Common 1.2.1.
Added package 'Microsoft.AspNet.Razor.3.2.2' to 'packages.config'
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webhooks.custom.mvc/1.2.1/microsoft.aspnet.webhooks.custom.mvc.1.2.1.nupkg 501ms
Installing Microsoft.AspNet.WebHooks.Custom.Mvc 1.2.1.
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.webhooks.custom/1.2.1/microsoft.aspnet.webhooks.custom.1.2.1.nupkg 545ms
Installing Microsoft.AspNet.WebHooks.Custom 1.2.1.
Successfully installed 'Microsoft.AspNet.Razor 3.2.2' to ConsoleApp2
Adding package 'Microsoft.Tpl.Dataflow.4.5.24' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.Tpl.Dataflow.4.5.24' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.Tpl.Dataflow.4.5.24' to 'packages.config'
Successfully installed 'Microsoft.Tpl.Dataflow 4.5.24' to ConsoleApp2
Adding package 'Microsoft.Web.Infrastructure.1.0.0' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to 'packages.config'
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0' to ConsoleApp2
Adding package 'Microsoft.AspNet.WebPages.3.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebPages.3.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebPages.3.2.2' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebPages 3.2.2' to ConsoleApp2
Adding package 'Microsoft.AspNet.Mvc.5.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.Mvc.5.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.Mvc.5.2.2' to 'packages.config'
Successfully installed 'Microsoft.AspNet.Mvc 5.2.2' to ConsoleApp2
Adding package 'Newtonsoft.Json.6.0.4' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Newtonsoft.Json.6.0.4' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Newtonsoft.Json.6.0.4' to 'packages.config'
Executing script file 'C:\Users\wesh\source\repos\ConsoleApp2\packages\Newtonsoft.Json.6.0.4\tools\install.ps1'
Successfully installed 'Newtonsoft.Json 6.0.4' to ConsoleApp2
Adding package 'Microsoft.AspNet.WebApi.Client.5.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebApi.Client.5.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebApi.Client.5.2.2' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebApi.Client 5.2.2' to ConsoleApp2
Adding package 'Microsoft.AspNet.WebApi.Core.5.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebApi.Core.5.2.2' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebApi.Core.5.2.2' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebApi.Core 5.2.2' to ConsoleApp2
Adding package 'Microsoft.AspNet.WebHooks.Common.1.2.1' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebHooks.Common.1.2.1' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebHooks.Common.1.2.1' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebHooks.Common 1.2.1' to ConsoleApp2
Adding package 'Microsoft.AspNet.WebHooks.Custom.1.2.1' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebHooks.Custom.1.2.1' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebHooks.Custom.1.2.1' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebHooks.Custom 1.2.1' to ConsoleApp2
Adding package 'Microsoft.AspNet.WebHooks.Custom.Mvc.1.2.1' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebHooks.Custom.Mvc.1.2.1' to folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebHooks.Custom.Mvc.1.2.1' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebHooks.Custom.Mvc 1.2.1' to ConsoleApp2
Executing nuget actions took 3.79 sec
Time Elapsed: 00:00:25.2066344
PM> Update-package Microsoft.AspNet.WebHooks.Custom.Mvc


Attempting to gather dependency information for multiple packages with respect to project 'ConsoleApp2', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 22.8 sec
Attempting to resolve dependencies for multiple packages.
Resolving dependency information took 0 ms
Resolving actions install multiple packages
Resolution was successful but resulted in no action
There are no new updates available.
No package updates are available from the current package source for project 'ConsoleApp2'.
Executing nuget actions took 210.23 ms
Time Elapsed: 00:00:23.1770654
PM> 

cc @rrelyea

@tfritzke
Copy link

@weshaggard What's your result when running the command "Update-Package -Reinstall"?

@weshaggard
Copy link
Member

Same.

PM> Update-package -reinstall Microsoft.AspNet.WebHooks.Custom.Mvc


Attempting to gather dependency information for multiple packages with respect to project 'ConsoleApp2', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 21.2 sec
Attempting to resolve dependencies for multiple packages.
Resolving dependency information took 0 ms
Resolving actions install multiple packages
Retrieving package 'Microsoft.AspNet.Mvc 5.2.2' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Retrieving package 'Microsoft.AspNet.Razor 3.2.2' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Retrieving package 'Microsoft.AspNet.WebApi.Client 5.2.2' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Retrieving package 'Microsoft.AspNet.WebApi.Core 5.2.2' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Retrieving package 'Microsoft.AspNet.WebHooks.Common 1.2.1' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Retrieving package 'Microsoft.AspNet.WebHooks.Custom 1.2.1' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Retrieving package 'Microsoft.AspNet.WebHooks.Custom.Mvc 1.2.1' from 'nuget.org'.
Retrieving package 'Microsoft.AspNet.WebPages 3.2.2' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Retrieving package 'Microsoft.Tpl.Dataflow 4.5.24' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Retrieving package 'Microsoft.Web.Infrastructure 1.0.0' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Retrieving package 'Newtonsoft.Json 6.0.4' from 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Removed package 'Microsoft.AspNet.WebHooks.Custom.Mvc 1.2.1' from 'packages.config'
Successfully uninstalled 'Microsoft.AspNet.WebHooks.Custom.Mvc 1.2.1' from ConsoleApp2
Removed package 'Microsoft.AspNet.WebHooks.Custom 1.2.1' from 'packages.config'
Successfully uninstalled 'Microsoft.AspNet.WebHooks.Custom 1.2.1' from ConsoleApp2
Removed package 'Microsoft.AspNet.WebHooks.Common 1.2.1' from 'packages.config'
Successfully uninstalled 'Microsoft.AspNet.WebHooks.Common 1.2.1' from ConsoleApp2
Removed package 'Microsoft.AspNet.WebApi.Core 5.2.2' from 'packages.config'
Successfully uninstalled 'Microsoft.AspNet.WebApi.Core 5.2.2' from ConsoleApp2
Removed package 'Microsoft.AspNet.WebApi.Client 5.2.2' from 'packages.config'
Successfully uninstalled 'Microsoft.AspNet.WebApi.Client 5.2.2' from ConsoleApp2
Removed package 'Newtonsoft.Json 6.0.4' from 'packages.config'
Successfully uninstalled 'Newtonsoft.Json 6.0.4' from ConsoleApp2
Removed package 'Microsoft.AspNet.Mvc 5.2.2' from 'packages.config'
Successfully uninstalled 'Microsoft.AspNet.Mvc 5.2.2' from ConsoleApp2
Removed package 'Microsoft.AspNet.WebPages 3.2.2' from 'packages.config'
Successfully uninstalled 'Microsoft.AspNet.WebPages 3.2.2' from ConsoleApp2
Removed package 'Microsoft.Web.Infrastructure 1.0.0.0' from 'packages.config'
Successfully uninstalled 'Microsoft.Web.Infrastructure 1.0.0.0' from ConsoleApp2
Removed package 'Microsoft.Tpl.Dataflow 4.5.24' from 'packages.config'
Successfully uninstalled 'Microsoft.Tpl.Dataflow 4.5.24' from ConsoleApp2
Removed package 'Microsoft.AspNet.Razor 3.2.2' from 'packages.config'
Successfully uninstalled 'Microsoft.AspNet.Razor 3.2.2' from ConsoleApp2
Package 'Microsoft.AspNet.Razor.3.2.2' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.Razor.3.2.2' to 'packages.config'
Successfully installed 'Microsoft.AspNet.Razor 3.2.2' to ConsoleApp2
Package 'Microsoft.Tpl.Dataflow.4.5.24' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.Tpl.Dataflow.4.5.24' to 'packages.config'
Successfully installed 'Microsoft.Tpl.Dataflow 4.5.24' to ConsoleApp2
Package 'Microsoft.Web.Infrastructure.1.0.0' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to 'packages.config'
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0' to ConsoleApp2
Package 'Microsoft.AspNet.WebPages.3.2.2' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebPages.3.2.2' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebPages 3.2.2' to ConsoleApp2
Package 'Microsoft.AspNet.Mvc.5.2.2' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.Mvc.5.2.2' to 'packages.config'
Successfully installed 'Microsoft.AspNet.Mvc 5.2.2' to ConsoleApp2
Package 'Newtonsoft.Json.6.0.4' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Newtonsoft.Json.6.0.4' to 'packages.config'
Executing script file 'C:\Users\wesh\source\repos\ConsoleApp2\packages\Newtonsoft.Json.6.0.4\tools\install.ps1'
Successfully installed 'Newtonsoft.Json 6.0.4' to ConsoleApp2
Package 'Microsoft.AspNet.WebApi.Client.5.2.2' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebApi.Client.5.2.2' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebApi.Client 5.2.2' to ConsoleApp2
Package 'Microsoft.AspNet.WebApi.Core.5.2.2' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebApi.Core.5.2.2' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebApi.Core 5.2.2' to ConsoleApp2
Package 'Microsoft.AspNet.WebHooks.Common.1.2.1' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebHooks.Common.1.2.1' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebHooks.Common 1.2.1' to ConsoleApp2
Package 'Microsoft.AspNet.WebHooks.Custom.1.2.1' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebHooks.Custom.1.2.1' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebHooks.Custom 1.2.1' to ConsoleApp2
Package 'Microsoft.AspNet.WebHooks.Custom.Mvc.1.2.1' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.AspNet.WebHooks.Custom.Mvc.1.2.1' to 'packages.config'
Successfully installed 'Microsoft.AspNet.WebHooks.Custom.Mvc 1.2.1' to ConsoleApp2
Executing nuget actions took 3.07 sec
Time Elapsed: 00:00:24.3488176

@tfritzke
Copy link

@weshaggard
In your case, the package is being reinstalled from the package cache for the solution:
Package 'Microsoft.Tpl.Dataflow.4.5.24' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Please retest:

  1. Delete the packages directory,
  2. Run the command "Update-Package -Reinstall" without any additional parameters.

@weshaggard
Copy link
Member

OK I was able to repro it now as it seems as though it only fails if trying to install or update Microsoft.Tpl.Dataflow package without a specified version.

To workaround you can call Update-Package -Reinstall Microsoft.AspNet.WebHooks.Custom.Mvc which will work because it is installing/updating to a specific version of Microsoft.Tpl.Dataflow.

@rrelyea to repro this you can do:

PM> install-package Microsoft.Tpl.Dataflow
install-package : Unable to find package 'Microsoft.Tpl.Dataflow'
At line:1 char:1
+ install-package Microsoft.Tpl.Dataflow
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
 
Time Elapsed: 00:00:00.2303222

When someone does a general update like Update-Package -Reinstall it loops through all packages and calls update on each without a specified version and thus fails when it hits Microsoft.Tpl.Dataflow.

It works if you specify the version like:

PM> install-package Microsoft.Tpl.Dataflow -version 4.5.24


Attempting to gather dependency information for package 'Microsoft.Tpl.Dataflow.4.5.24' with respect to project 'ConsoleApp2', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 2.66 ms
Attempting to resolve dependencies for package 'Microsoft.Tpl.Dataflow.4.5.24' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.Tpl.Dataflow.4.5.24'
Resolved actions to install package 'Microsoft.Tpl.Dataflow.4.5.24'
Found package 'Microsoft.Tpl.Dataflow 4.5.24' in 'C:\Users\wesh\source\repos\ConsoleApp2\packages'.
Package 'Microsoft.Tpl.Dataflow.4.5.24' already exists in folder 'C:\Users\wesh\source\repos\ConsoleApp2\packages'
Added package 'Microsoft.Tpl.Dataflow.4.5.24' to 'packages.config'
Successfully installed 'Microsoft.Tpl.Dataflow 4.5.24' to ConsoleApp2
Executing nuget actions took 504.67 ms
Time Elapsed: 00:00:00.6016677
PM> 

@rrelyea is this the expected behavior for unlisted packages?

@hennys
Copy link

hennys commented Sep 2, 2018

We are running into the exact same issues after the unlisting.

For a bit of background, our CMS Library, which has net461 and netstandard2.0 targets, is using Dataflows. We wanted to use the newer System.Threading.Tasks.Dataflow package, but as it only has .NET Standard and Portable targets, any .NET Framwork 4.6.x application that uses our library would end up with the .NET Standard 2.0 version, which in turn brings with it all sorts of issues. Instead we chose to make it a conditional dependency and use the Microsoft.Tpl.Dataflow package in the net461 compilation.
This could then be removed once we will be able to move our platform requirement to .NET Framework 4.7.2. (While we have no problem with this, we have thousands of customers who are making this decision, many who has been constrained by Azure Web Apps until recently).

Until the Microsoft.Tpl.Dataflow package was delisted we were pretty happy to stick with this solution but this is not really feasible anymore with the issues that the delisting is causing for our users when they are trying to update our package.

With this in mind I'm hoping that you would reconsider the delisting, or even better, add a proper .NET Framework target to the System.Threading.Tasks.Dataflow package.

@weshaggard
Copy link
Member

@rrelyea is there anything we can do in the package manager console to better handle unlisted packages? We need a way to let our customers know they shouldn't be installing this package any more while not breaking existing customer projects that still reference it.

@rrelyea
Copy link
Contributor

rrelyea commented Sep 6, 2018

we are doing work in the deprecated packages area...which will include marking a package for security or other reasons. you will have more power than just "unlisting"
We'll then think this through on the client, updates, etc... how it should work based on that setting.
/cc @anangaur

@weshaggard
Copy link
Member

OK to unblock folks that still reference this package in their projects I've relisted the latest version of Microsoft.Tpl.Dataflow https://www.nuget.org/packages/Microsoft.Tpl.Dataflow/4.5.24.

We will keep this issue open until we have another option to help deprecate this package without breaking folks that currently reference it.

@anangaur
Copy link

anangaur commented Sep 6, 2018

Linking Deprecate packages issue: NuGet/Home#2867

@Peter-B-
Copy link

Peter-B- commented Sep 7, 2018

In my experience unlisting is a bad practice, since it is not handled well by many tools like, for example, the nuget integration of LinqPad.

I think unlisting old packages was the single worst thing the RX-Team ever did.

What is so bad about option 2 of the original post?

@weshaggard
Copy link
Member

What is so bad about option 2 of the original post?

That is a possibility. I just did a quick diff of the two assemblies and they do look compatible enough but we would need to do further testing to ensure it doesn't break folks.

@danmosemsft do we have someone that can attempt to do option (2)?

@anangaur
Copy link

anangaur commented Sep 7, 2018

Option 2 is the right way of deprecating packages until the “deprecation” feature becomes a reality

@azureskydiver
Copy link

Unfortunately, MSDN's older TPL Dataflow Library page also needs to be updated:

To install the TPL Dataflow Library
Open your project in Visual Studio and choose Manage NuGet Packages from the Project menu.
Optionally, check the Include Prerelease box at the top of the page. This option will give you access to new prerelease versions of the TPL Dataflow Library as they become available.
Use the search box at the top right of the page to locate the Microsoft.Tpl.Dataflow (Task Parallel Library (TPL) Dataflow) package.
In the left pane, select Microsoft.Tpl.Dataflow and then choose Install.

Fortunately, the newer Dataflow (Task Parallel Libary) page talks about the more current package.

@danmoseley
Copy link
Member

@azureskydiver if you like you can offer a PR in the docs repo

@svick
Copy link
Contributor Author

svick commented Oct 14, 2018

@danmosemsft For some reason, the problematic page is still on MSDN (and isn't redirected or archived), so there is no way to contribute to fix that.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 5.0 milestone Jan 31, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@stephentoub stephentoub added area-Meta and removed question Answer questions and provide assistance, not an issue with source code or documentation. untriaged New issue has not been triaged by the area owner labels Feb 25, 2020
@stephentoub stephentoub added documentation Documentation bug or enhancement, does not impact product or test code packaging Related to packaging and removed area-Meta labels Feb 25, 2020
@stephentoub
Copy link
Member

@terrajobst, it looks like NuGet added the necessary feature to properly deprecate packages. Can you help get that taken care of here?

@svick, I'm not seeing the bad reference in the docs, so either I'm missing it or it's been fixed in the interim. Is there still an issue there?

@svick
Copy link
Contributor Author

svick commented Feb 25, 2020

@stephentoub It seems the old MSDN article has been redirected to the updated docs.microsoft.com article since 2018. So I think the docs are okay now.

@terrajobst
Copy link
Member

@terrajobst, it looks like NuGet added the necessary feature to properly deprecate packages. Can you help get that taken care of here?

Good call. Done. It will take a few hours before NuGet has updated its caches, tho.

@stephentoub
Copy link
Member

Thanks, Immo. Seems like everything here has been done, so I'll close.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Threading.Tasks documentation Documentation bug or enhancement, does not impact product or test code packaging Related to packaging
Projects
None yet
Development

No branches or pull requests