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)
- Create a WAP (Runner).
- Create a second WAP (ProjectA)
- Create a third WAP (ProjectB)
- Delete the web.config's in ProjectA and ProjectB
- Create a simple aspx-file in Runner, ProjectA and ProjectB with a hello world message
- Remove ProjectA and ProjectB
- Go to Windows Explorer
- Move the folders ProjectA and ProjectB inside the folder Runner
- Go back to Visual Studio
- Add Existing Project to solution (ProjectA and ProjectB)
- Hit F5
- Navigate to http://localhost:4867/WebForm1.aspx
- Navigate to http://localhost:4867/ProjectA/WebForm1.aspx
- Navigate to http://localhost:4867/ProjectB/WebForm1.aspx
Tada! The above works, but it feels like a hack and it smells awful. Is there a better way?