cs0815
cs0815

Reputation: 17428

sharing views, css, javascript between multiple asp.net mvc 3 projects

It seems to be impossible/hard to share views between several asp.net mvc 3 projects. At least, that's what Google tells me. Please correct me if I am wrong ...

What's about css and js files? Did someone do this already? If so, what is the best practice to achieve this (within a vs studio 2010 solution with several asp.net mvc 3 projects)?

Just curious, is it possible to share css and js between mvc3 areas?

Upvotes: 3

Views: 1594

Answers (2)

apostolov
apostolov

Reputation: 1646

There is a cool way to share js, cshtml, css etc. files using "Add as Link" feature of VS. There is a great answer here describing the whole process. Also dont forget to add a build task to copy the files on build so you'd be able to debug them.

Upvotes: 1

Igor
Igor

Reputation: 15893

Since you mention svn - it has "svn:externals" property that lets you map a folder (even from a different repository) to a location under the web site root folder. We used it with success to reuse multiple library tools with external resources (scripts, css files, images and views) in a number of MVC applications.

Upvotes: 1

Related Questions