Visual Studio 2013: creating a new ASP.Net project WITHOUT nuget

Firstly, I want to say that I love nuget in general and use its LOT for many small projects, and especially when testing new things.

However, I have a number of reasons why I think Nuget is not suitable for my main project / environment:

  • Code is deployed in a secure environment - this requires a high level of control.
  • This is a fairly large project with ~ 10 developers, spanning several years - the time saved by quickly adding packages is negligible.
  • I am not interested in automatically updating libraries.
  • I want to know what configurations are created when I accept the new library and what other parameters I have, except that a "reasonable default" was defined on my behalf.

Simply put, I want to know what is included in my project, and Nuget is too aggressive in โ€œhelping meโ€ than I can in my stomach.

So, I was very disappointed when I created a new "empty" asp.net project with support for MVC and WebAPI and found that 8 nuget packages were configured. Most of these files are wasteful (I really don't need JSON.Net for every version of the .NET Framework, but thanks).

To get a similar setup without nuget, I did the following:

  • Hide a copy of the web.config file
  • I copied all the DLLs that interested me in the new folder
  • All nuget packages removed
  • Link to the necessary DLL files
  • Added necessary web.config bit

Ah, there we go. Much better.

Then I went ahead and right-click the folder Controllers> Add Controller and right-click the folder views and> Add View.

Inexplicably, the nuget package file came back and โ€œhelped meโ€ by adding

  • JQuery
  • jquery validation
  • jquery unobtrusive check.

Who says I want to use jquery validation ?!

So my question is: how to stop madness? Am I doomed to tiptoe around VS toolkit if I don't want to use nuget?

Alternatively, I also accept a convincing argument, explaining that I am overly anal-retentive about what is included in my project and should just drink Kool-Aid.

+6
source share
1 answer

I do not see the reason why you do not want to use NuGet. These are my thoughts about this:

Code is deployed in a secure environment - this requires a high level of oversight.

This has nothing to do with NuGet. If you need a high level of supervision, then you need a good branching and release strategy with your choice of source. Code viewing policy, etc.

This is a fairly large project with ~ 10 developers spanning several years - the time saved by quickly adding packages is negligible.

NuGet does not require fast add dependencies. It's about effectively managing your dependencies. So the question is, do you have any dependencies? If so, why do you want to stop using a tool that will help you manage them in such a way that you are less likely to make mistakes?

I'm not interested in automatically updating libraries

NuGet does not automatically update your libraries.

However, it shows all available updates in one place, and you can choose which updates you want to receive. This is a great opportunity, and I donโ€™t understand why it bothers you. To be honest, you are more likely to miss very important updates if you are not using NuGet. What if Microsoft fixes a critical security issue in one of the MVC libraries?

NuGet will be

  • show available update
  • helps you apply the update in all places where you have a dependency on the updated library.
  • Helps you choose the right version for your target project.

I want to know what configurations are created when I accept the new library and other options that I have, in addition to the fact that the "reasonable default" was defined on my behalf.

This has nothing to do with NuGet. Regardless of whether you use a third-party library through NuGet or manually, in both cases you will need to read the library documents in order to make an informed decision about how you want to set up your project.

The only difference is that when you install the NuGet package, it will most likely be sent with a reasonable configuration out of the box. So you can benefit from it. If you want to change your configuration, it doesnโ€™t matter which default you change, does it?

+1
source

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


All Articles