Background
I have several C# code libraries which I recently converted to target .NET Standard 1.4, for use in a Xamarin Forms project as well as many legacy .NET Framework 4.6.1 projects.
I initially added Nuget packages to the .NET Standard class libraries using the Package Reference in Project Files style.
After learning of this bug where transitive package references from .NET Standard projects are not resolved in legacy .NET Framework projects, I tried the workaround of adding <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
to the legacy project's csproj. The legacy projects continued to not resolve the transitive references- that is, the workaround didn't work.
So, I would like to revert to the old style of referencing Nuget packages in a packages.config file in my .NET Standard project.
Steps I followed:
- Uninstalling all Nuget packages in the .NET Standard project, except NETStandard.Library which cannot be uninstalled
- My VS default setting for Nuget is to add the first package in a solution to packages.config
- Reinstalling a Nuget package from the
Manage Nuget Packages
tool window- This package is placed in the csproj as a
PackageReference
, not in a packages.config file.
- This package is placed in the csproj as a
Does anyone know how I can force new Nuget packages in my .NET Standard 1.4 project to be listed in packages.config
instead of as Package References?