Go back to package.config

Is it possible to return to the scheme of packages.configthings? When I created the project, I switched to the scheme PackageReference, but for some reason now I need to go to the old methods.

I tried package manager console commands, for example, recover using the Updateand options Reinstall. They no longer generate package.config. I also switched Tools > Options > NuGet Package Managerto packages.config. Not good.

+16
source share
3 answers

You will need:

  1. Add an "empty" file packages.configto the project (that is, xml, as in the example , but without separate elements <package>)
  2. vs csproj .
  3. PackageReference .
  4. , <RestoreProjectStyle> .
  5. VS.
+24

:

4,5. , Tools>Options>NuGet Package Manager>General>Default package management format " Packages.config

+4

. , Visual Studio repositoryPath Nuget.config. , obj dir package-lock.json, . - Visual Studio ,

git clean -x -d -f

. .gitignore. , , . Nuget restore repositoryPath, Nuget.Config.

+1
source

Source: https://habr.com/ru/post/1684758/


All Articles