none
Difference between Referene, Template, and a NuGet package?

    Question

  • What is the difference between a NuGet package, a Reference (is reference similar to a tool?), and a template in Visual Studio?

    Why do we need them?

    What is done / changed in our project when we install each one of them?

    Are they dependent on each other in some way? Which one(s) of them are global installs, and which one(s) need to be installed in every project?

    Sunday, November 29, 2015 3:57 PM

Answers

  • Hi anubhav756,

    >>What is the difference between a NuGet package, a Reference (is reference similar to a tool?), and a template in Visual Studio?

    References are used to pull additional libraries into your project. For example, your colleague develop a library which implement some functions that you wanted. You needn't write it by yourself, just add the dll into your project through add reference. Of course you can add any libraries not it come from third part or from Microsoft. But it won't notice you when the libraries changed or updated.

    NuGet package is the package manager for the Microsoft development platform including .NET. It will help you manage your packages which installed on your project. When the package has new version released, it will notice you to update it. The NuGet client is a tool provide the ability to produce and consume packages.

    Template is similar to a sample project which provides the frameworks based on different type of project. You just need to add your content/functions into this frameworks to implement your requirement. For example, if create a WinForms project, it will reference System.Windows.Forms automatically which contains all stuffs you needed in WinForms project.

    >>Why do we need them?

    NuGet package and Reference can help us invoke some functions which have been implemented by others or some have been encapsulated by Microsoft. And the Template can help us create a project without build framework by our self. All of them help us save a lot of time when developing a project.

    >>What is done / changed in our project when we install each one of them?

    Add references in your project, it will let you invoke the functions in these references in your project.

    Install NuGet packages will add the package reference into your project automatically and then you can use the functions the package provided.

    The template will be installed when you install Visual Studio. Most of common templates will be installed. Then you can create a new project through these templates quickly.

    >>Are they dependent on each other in some way? Which one(s) of them are global installs, and which one(s) need to be installed in every project?

    Reference and NuGet packages need to referenced/installed on a project. But this project can be create through the templates or can be create by customer self. So in some way, reference and NuGet package are dependent on project.

    Templates is global installs and NuGet packages and reference need to be install in every project.

    Best Regards,
    Weiwei

    • Marked as answer by anubhav756 Tuesday, December 1, 2015 4:51 AM
    Tuesday, December 1, 2015 3:29 AM
    Moderator