Reputation: 1858
We want to split our large asp.net mvc web application into multiple Visual Studio projects so that each team can independently on their visual studio project.
Desired structure is:
Each module should contain it's own controller & views that are responsible for functioning of the module. T
How to split the ASP.NET Application in to multiple projects and then merge them as a single website during build process?
Upvotes: 16
Views: 16450
Reputation: 5614
Follow this link it will solve you problem.
Takes just 10 mins to complete the walk-through.
Walkthrough: Organizing an ASP.NET MVC Application by Logical Areas
Upvotes: 1
Reputation: 3644
You could just use good Source Control and have the respective teams check out what they need to work on.
This way you have only one dll at compile time...
Upvotes: 0
Reputation: 1039398
ASP.NET MVC V2 has a feature called Areas which allows you to have separate projects referenced by the main application. Check out ScottGu's post.
Upvotes: 8
Reputation: 2367
One way we handled this in my previous job was to build a master 'controller' application. This app was deployed and was public facing. It's job was to read the incoming URL and, based on a bunch of mapping rules in config files, map that URL to other MVC applications running on the same server. This gave us lots of options such as being able to run the backing apps on different servers in the farm if we wanted to do crude load balancing. You need to manage things such as authentication across the multiple apps (if you're using authentication).
This basically gives you the ability to have as many different MVC apps as you need running on the servers all with the same front controller (essentially)
Upvotes: 0
Reputation: 1858
The problem is sorted out by just creating multiple MVC projects and merging the output at the end by simple copy & paste :)
here is the structure we followed:
At the end we are using build scripts to merge output of all the projects and generate the files required for the total web app to run.
If you need any help in implementing similar solution, get in touch with me at link text
Upvotes: 3
Reputation: 19171
If your app doesn't require areas, and your goal is just to allow team independence, why not just use a better source code control system? Unless you have truly independent modules, sounds like managing via branches in subversion is appropriate.
Upvotes: -1
Reputation: 755337
One tool you may be interested in looking at is called ILMerge
This is a tool that will allow you to merge several .Net assemblies into a single DLL. It could be used to combine the output of your several projects into a single DLL for deployment.
I haven't ever tried it with Asp.Net MVC and I'm not familiar enough with the MVC architecture to say whether or not it will work for your situation. But it's likely worth a try.
Upvotes: 2