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:
Microsoft.Tpl.Dataflow
deprecated.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
IMO we should pick option 2 and then unlist the Microsoft.Tpl.Dataflow package so it doesn't show in search results.
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:
@weshaggard can't we just unlist (not delete) the package?
I just unlisted all the versions so that should help with the confusion.
Except I now can't install Microsoft.Azure.WebJobs.Extensions 2.2.2 because it has a direct dependency on Microsoft.Tpl.Dataflow :(
@HowardvanRooijen how are you installing? By unlisting the package it should still be install-able when there are references to exact versions.
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
The packages directory for the solution does have a local copy Microsoft.Tpl.Dataflow.4.5.24.
^^ Exactly the same for me both locally and on our VSTS hosted VS2017 build agent.
@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
@weshaggard What's your result when running the command "Update-Package -Reinstall"?
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
@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:UsersweshsourcereposConsoleApp2packages'
Please retest:
1) Delete the packages directory,
2) Run the command "Update-Package -Reinstall" without any additional parameters.
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?
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.
@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.
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
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.
Linking Deprecate packages issue: https://github.com/NuGet/Home/issues/2867
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?
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)?
Option 2 is the right way of deprecating packages until the “deprecation” feature becomes a reality
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.
@azureskydiver if you like you can offer a PR in the docs repo
@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.
@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?
@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, 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.
Thanks, Immo. Seems like everything here has been done, so I'll close.
Most helpful comment
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: