.NET (Visual Studio) Share assets between projects

前端 未结 5 534
别那么骄傲
别那么骄傲 2021-02-04 07:14

I\'m working with Visual Studio. There I have a solution with several web-projects (.net MVC 4). All of these web-projects use the same javascript-libs. Currently I copied the l

5条回答
  •  抹茶落季
    2021-02-04 07:51

    This is an older thread but due to complex business requirements these days applications are divided in to different modules or sub projects.Thus, brings us the need to share common resources like JavaScript files, themes and CSS style sheet files.

    I personally feel that common files should be put in separate Asp .Net MVC 5 project which has following structure :ASP.NET MVC5 folder structure

    Now the best part is you can separately manage the dependencies using Bower,NPM or Nuget package manager.

    After you have organised all the files in this project host this project to your own CDN or may be on cloud. You can use Using CDN in Bundle Approach to get script or link references.

    That will help you sharing common resources across all the projects.There us a short coming though if you have many developers on the team and if someone added incompatible version lib can affect all the apps.

提交回复
热议问题