Reputation: 1650
We have been building ASP.Net websites for many years. During this time we gathered a lot of knowledge of ASP.Net. We know what to use, a what not. One problem is still, persistently, bugging us. I hope to solve this for once and for all.
We have a fairly large solution with lots of aspx-files. All aspx-files reside in one Web Application Project. This single big WAP needs to be split in multiple smaller projects. The exact reasoning is beside the point, please believe me ;-).
There are a number of ways to accomplish this, but I am still unsure what the best way would be. We use ASP.Net 4.0 and Visual Studio 2010 Premium.
Any advice is greatly appreciated.
This is our current work-around (which we do not like)
Tada! The above works, but it feels like a hack and it smells awful. Is there a better way?
Upvotes: 2
Views: 567
Reputation: 5072
Here is what Scott Guthrie says on this. I think the second method is a superset of your procedure. In my opinion you are right: This is a hack - but the official one.
Upvotes: 1
Reputation: 21905
I suggest creating a new solution, and creating your required new empty web application projects under it. Then, manually copy your files from their original locations into the proper new folders which were created when you created the empty projects. After all the files are in place, go back to VS. Set Solution Explorer to 'Show All Files'. Select the the files you need in each project, right click, and select 'Include in Project'.
The only wrinkle I can think of is that creating all web applications will mean you have a web.config file in each. If this is what you need, then fine. Otherwise, you create some of the projects as class libraries.
Upvotes: 1