Where to store third-party libraries?

I have an asp.net mvc 2 application.

Now I redefine it to work with Ninject . Everything is in order, except for one: where should I store Ninject.dll ??

I created the lib directory inside my appdir and made a link to lib/Ninject.dll .

But can there be some general agreements on how to act in such cases?

+4
source share
3 answers

I think it depends on what you are going to do with the application. If the project will be transferred to other developers, I would use one of the structures described in other answers. However, if this is a project built into your organization where you will have several projects and developers, we hope that they will all share libraries. I would use something like this, where the library contains only the DLL:

  • Library
    • Ninject
      • 1.0
      • 1.5
      • 2.0
    • NHibernate
      • 2.1.0
      • 2.1.2
  • Project 1
  • Project 2

This is the structure that we have implemented in our development process. We have several projects using different versions of the same library. We can easily port applications to newer versions of the library. It also prevents the presence of seven copies of the DLL in seven different projects.

For our own internal libraries, the code is stored in a tree within the project with copying DLLs to the library branch. Then our projects refer to release versions.

This structure simplifies the synchronization of open source library versions (such as Hibernate, Fluent NHibernate, and NHibernate Linq).

+3
source

UPDATE: FYI - Here's a link to how the MVC team structures its own repository .

As part of my installation of the MVC directory, I put the libraries outside the project into their own folder structure and add links to these libraries.

So my proven directory structure would look something like this:

 Apps Project 1 - Project files Project 2 - Project files Libraries - LibraryName -- LibraryVersion 

This provides a standard place to host all the libraries, especially useful when several projects use the same libraries and have one sub-truth.

Fixes problems with links to server servers.

NTN

+4
source

The agreement uses this folder structure:

  • Project line
    • assembly
      • Build scripts.
    • db
      • Database staff. (you must control the db version with all the code).
    • documents
      • Documentation, specification and everything related.
    • Lib
      • Ninject
    • CSI
      • ProjectName.Core
      • ProjectName.UI
      • ProjectName.sln
+2
source

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


All Articles