Vinod
Vinod

Reputation: 566

MVC Packages.config can be removed

I am migrating a project from ASP.NET WebForms to MVC. The new solution will work on existing pages, ASPX, while the new functionality will be implemented using MVC.

So the code changes have been achieved. I understand MVC includes NuGet package and am seeing packages.config file also understood it helps to keep track of version but right now am not interested in using it ( feeling it's taking extra space ).

So if i remove packages.config from solution will it harm my MVC application?

Upvotes: 2

Views: 2965

Answers (1)

Mihai Dinculescu
Mihai Dinculescu

Reputation: 20033

Just don't, please!

I'm sure that you can live with that extra 2-3kb in your project for now.

NuGet does a lot of things for you and you will end up loving it in time.

PS: Yes, things will break. Maybe not right away, but they will eventually when you try to install/update a package.

If you do not want to have the packages folder (containing the library packages) in source control, it is OK to have the folder ignored. This is safe because you can configure Visual Studio to automatically download the missing packages when you compile the project. It does this based on the packages.config file.

To enable this you have to go in Options -> NuGet Package Manager and check the two check-boxes found there.

enter image description here

Upvotes: 5

Related Questions