locked
Copy JS/CSS from dependency dlls to a folder on the website RRS feed

  • Question

  • We have a website that has a dependency on several other common internally created projects. The dependency projects contain javascript/css files that are used in our website. The reason, those projects are also used by other websites and are maintained separately etc.

    Our site also references these projects via a DLL reference and not a Project reference. [Disclosing, in case that my have any cause]

    Right now, to access those javascript/css files we use an MVC Controller in each Dependency DLL to access the JS/CSS, because that controller will know where it's JS/CSS files are etc and these controllers are registered in the RouteTable using AreaRegistration. So for every HTTP request, the Project Controller is asked for a certain JS/CSS files and the controller writes the content to the HTTP Response etc.

    We are looking at using the build process instead of the the controller. So at build time, access the JS/CSS from the Dependency DLL using a Build task and copy all of them to their respective folders on the website.

    I know this has been rather long winded, but there has to be a better way than using MVC controllers.

    Is this possible?

    • Moved by Victor_Chen Wednesday, June 1, 2011 9:38 AM ASP.Net (From:MSBuild)
    Wednesday, May 25, 2011 5:36 PM

Answers