How to add Resece in Visual Studio

Asked

Viewed 86 times

0

In the company we have a problem with some of the projects, 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 the mentioned References. And we all have to add them again.

My question is whether there is any possibility of allocating these changes on some site of the team Foundation server or nuget management or if there is another type of solution to this problem?

1 answer

2


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

Component management

For . Net there is a rather elegant solution for server-side components: Nuget.

Nuget is a package server, it is possible that it is already known to you, through the site Nuget.org. 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 archive of packages in the company.

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

Set up a Nuget repository in Visual Studio

To set up a nuget server, Proget, for example, or even a folder, as a feed in Visual Studio, go to Tools > Options menu.

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

inserir a descrição da imagem aqui

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

  • So the best I can try to solve this situation is to create a shared folder over the network where these external libraries will be placed and all Developers point the references in the project to that folder?

  • Don’t take this as a shared folder, because when you sign up for VS, it’s like a feed And yes, using Nuget will be the best you can do to manage the componentization in your application

  • Is it possible to create a repository in my libs' Nuget? So that everyone can go there and find the libs and add them to the project.

  • Yes the idea is this! Create this folder and put your Nuget packets there

  • And creating that folder where I put it to be visible to the whole team, that’s the part I’m missing.

  • I complemented the answer, see if it’s clear now

  • Your reply is spectacular and has helped me a lot. Thank you very much

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.