How to deal with Libraries which are needed in many projects (+ svn)
-
06-07-2019 - |
Question
Good morning!
We have a SVN-Repository, which holds a VS-Solution. In this solution are many web-projects and each of them is using a JavaScript-Lib which is atm developed in an extra project (let's call it DemoWeb
) and deployed manually to the other Web-Projects.
This construct has many disadvantages:
- You can forget a project to copy to when deploying.
- You can miss some files out
- You have the same .js-files several times in the SVN-Repository
- ...
I think that the scenario (many Projects using the same Libs - eg. JavaScript, .dll-files, Images, ...) is very common, so I ask you:
How do you deal with it?
How do you get rid of this disadvantages?
How do you don't loose the references for IntelliSense in VS (eg. CssClass-Checking)?
Solution
- Automated builds for building/deployment
- for intellisense: VS have something called 'add as link' so you can have your js in one place and referense it from all projects : click project->add->existing item, find your files and take a look at 'add' btn, there is a little arrow at the right, use it and choose 'add as link'
OTHER TIPS
Automate your build and/or deployment routines. Look into continuous integration. Deploying your application should take one step. (a click on a link, execution of a script, etc...) Anything more than that and you are asking to screw up.