Nuget package handling – Using package.config instead of new PackageReference in csproj Visual Studio 2017

In Visual Studio 2017 and with .NET Core projects a new way of referencing nuget packages was introduced. Somehow during a .NET project upgrade one of the nuget packages were converted into a PackageReference (referenced in the csproj file and not from package.config). Below are the steps to convert such package reference back into plain old package.config behaviour:

In addition to removing the PackageReferences from the project file, I also had to remove the following files from the $ProjectDir\obj directory: Myproject.csproj.nuget.cache Myproject.csproj.nuget.g.props Myproject.csproj.nuget.g.targets project.assets.json

Source: How can I revert to referencing Nuget packages in packages.config after using Package References in a .NET Standard project? – Stack Overflow

Leave a Reply

Your email address will not be published. Required fields are marked *