How to add reference in visual studio

0

In the company we have a problem with some project references, because they are in different folders on the machines of each programmer and usually when you check in and then get latest version, we all have problems in those references. And we all have to add them again.

My question is whether there is any possibility of allocating these references somewhere in the team foundation server or in nuget management or if there is another kind of solution to this problem?

    
asked by anonymous 20.01.2018 / 16:48

1 answer

2

These references are the corporate frameworks or libraries that companies create and leave them on the developers' machines in fixed paths is the worst way to deal with them.

Component Management

For .NET, there is a fairly elegant solution for server-side components: Nuget.

Nuget is a package server, it is possible that it is already known to you, through the Nuget.org website. The interesting thing is that it is not necessary to expose the packages through the public site, since it is possible to have a private package repository in the company.

You can start by creating a folder on the share network for developers, and put the packages there with the nupkg extension. Or use a server application, with portal, much like the public site and even with features ranging from authentication to feeds to other types of packages. Proget has a free commercial version and then paid versions with advanced features. There are also other servers, type Myget, etc ...

Configure a Nuget repository in Visual Studio

To configure a nuget server, eg Proget, or even a folder, as a feed in Visual Studio, go to the Tools > Options.

In the window click the Search Options field and type Nuget (1), click on the menu Package Sources (2), click on the button with the + ), give a name (4), and in the Source field, enter the feed address (5) and click Update (6). It is interesting to place as the first option, then with it selected, click on the arrow pointing up (7), so when it fetches a package, priority will be given to the internal Nuget server.

See that in this example I put a shared folder on the network, which will have the .nupkg files. If you use a server, Source should be an RSS feed address.

    
21.01.2018 / 18:03