How to add reference in visual studio



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

    Is my question whether there is any possibility of allocating these reference anywhere in the team foundation server or in nuget management or if there is another kind of solution to this problem?



  • These references are the corporate frameworks or libraries that companies create and leave them on the developers' machines in fixed paths's 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 package server, it is possible that it is already your knowledge, 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 repository of packages in the company.

    One can start by creating a folder on the network with share for the developers, and put the packages there, with the extension No.. Or use a server application, with portal, much like the public site and even features that go from authentication to feeds to other package types. Proget has a version for free start use 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, Proget, for example, or even a folder, such as feed in Visual Studio, go to the Tools > Options menu.

    In the window click 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 place the feed address (5) and click Update (6). It is interesting to place as the first option, so with it selected, click the arrow that points up (7), so when you search for a package, priority will be given to the internal server of Nuget.

    inserir a descrição da imagem aqui

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




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2