The instructions below aren't tested in all scenarios, and assume familiarity with Visual Studio, NuGet Package Manager, etc. They should be enough to help.

Backup, branch, or otherwise protect your source first!

To revert from PackageReference to packages.config:

  1. Close the solution.

  2. Delete the project's obj and bin folders (which is where the Reference references are stored)

  3. Edit the .csproj file. Remove <RestoreProjectStyle>PackageReference</RestoreProjectStyle>

  4. Cut/Paste all PackageReference elements into a separate text editor, e.g.

        <PackageReference Include="MSTest.TestAdapter">
        <PackageReference Include="MSTest.TestFramework">
        <PackageReference Include="Selenium.WebDriver">
        <PackageReference Include="Selenium.WebDriver.ChromeDriver">
  5. Save and close the .csproj file.

  6. Open Visual Studio (but not the solution).

  7. Change the VS default package management format to Packages.config
    Check Allow format selection on first package
    Add a packages.config file to the project folder with this text:

    <?xml version="1.0" encoding="utf-8"?>
        <package id="MSTest.TestFramework" version="1.4.0" />

    Note: If you don't enable using packages.config, you must manually add at least one of the packages to the xml.

    Note: It's optional, but recommended, to add the targetFramework element with the correct moniker for the project's framework.

  8. Open the solution.

  9. If you manually created a packages.config file, restore missing NuGet packages.

  10. If needed, install remaining NuGet packages using package manager.

  11. Build and test.