.NET Forum / ASP.NET / General / February 2006
Compiling directories in web project...
|
|
Thread rating:  |
jojobar - 04 Feb 2006 20:07 GMT In vs.net 2005 you can build the entire website, entire solution or a single page. The project I am working on has more than 1000 pages spread over 50-60 directories. We work on one or two of the directories most of the time.
When an external dependency is changed (say a function in business layer), we have to compile the entire web project, which takes a lot of time because vs.net compiles all 60 directories.
What is need is an option to just compile one directory (to minimize the development time).
Is this possible? I could not find an option to do this in vs.net 2005. Also, if it is not directly possible, is it possible to do it by writing a macro or build script? Any pointers will be appreciated.
Thanks
 Signature -jojobar
S. Justin Gengo [MCP] - 05 Feb 2006 00:44 GMT jojobar,
The main .dll file of the site contains all the codebehind for each page. So I don't think this is possible. However if you were to use a modular usercontrol system such as the one .net nuke uses then you could update and install those modules. The way the DotNetNuke site works is probably the closest to what you describe: www.dotnetnuke.com
 Signature Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche
> In vs.net 2005 you can build the entire website, entire solution or a > single [quoted text clipped - 15 lines] > > Thanks jojobar - 05 Feb 2006 04:36 GMT I am not sure what you mean by the modular user control that dotnetnuke uses. I just downloaded their source. Their architecture is very modular but the user controls are all in a folder below the websie.
I tried changing one of their lirary files and then compiled the website (after initially compiling the solution).
It took about 35 seconds on my 2.4ghz 786MB RAM & 7200 rpm laptop. Maybe my machine is slow, but I as looking fo making the development cycle fater. This was a big problem with asp.net 1.1
Thanks for your help.
 Signature -jojobar
> jojobar, > [quoted text clipped - 23 lines] > > > > Thanks S. Justin Gengo [MCP] - 05 Feb 2006 14:42 GMT jojobar,
You can build just the module and then deploy the module's .dll file (and .aspx file depending on your compile choice). There is no need for the entire solution to be built if you are just adding a module or making a change to an included module. The neat thing about DotNetNuke is that modules are their own separate "entities" which can be created and installed separately from any given instance of DotNetNuke itself. This means separate modules may be worked on and then installed on a production site without compiling everything.
 Signature Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche
>I am not sure what you mean by the modular user control that dotnetnuke >uses. [quoted text clipped - 43 lines] >> > >> > Thanks "Yuan Ren[MSFT]" - 06 Feb 2006 02:51 GMT Hi jojobar,
Thanks for posting!
As Ken mentioned, I think the West Wind ASP.NET 2.0 Compiler Utility is appropriate for current demand.
Otherwise, if you want to make the build flexible, I suggest you use the MSBuild for ASP.NET 2.0. You can create your own task for the requirement. http://msdn2.microsoft.com/en-us/library/ms171452.aspx
I hope the information will be helpful.
Regards,
Yuan Ren [MSFT] Microsoft Online Support
jojobar - 14 Feb 2006 05:43 GMT Thanks for the comment. I believe all these suggestions are pretty good when you are deploying the solution. However, if you are going through the iterative cycles of edit/compile/run, these solutions (I suspect) may not work very well.
I was wondering if smart C# compiler can be designed that would parse the code and not compile the code if not needed (even though the library is referenced)!
Finally I stumbled across an article by Scott Guthrie, that explains how you can make a directory hidden so that it does not show up in vs.net (and hence does not compile). So I decided to go with that idea and compile less! even though it is not an ideal solution for me.
 Signature -jojobar
> Hi jojobar, > [quoted text clipped - 13 lines] > Yuan Ren [MSFT] > Microsoft Online Support "Yuan Ren[MSFT]" - 15 Feb 2006 12:09 GMT Hi Jojo,
Thanks for your reply!
From your description, I think the problem is caused that all directories are in the same project. This means that you have a single project for the current application. Based on my experience, I think you can try to separate the project to many parts. For example, the business objects layer in one project and data access layer in another. So, if you have some changed in the business objects layer, you just rebuild the business project. I think this is an easy way to build a complex solution. Thanks for your understanding!
Regards,
Yuan Ren [MSFT] Microsoft Online Support
jojobar - 23 Feb 2006 14:02 GMT Hello Yuan,
That is not true. Let me explain our configuration a little bit:
We have separate projects as follows:
Solution Project: BusinessLayer Project: DBLayer Project: Utils Website: Folder: App_Code Folder: App_Themes Folder: App1 (500+ files in many subfolders) Folder: App2 (250+ files in many subfolders) Folder: App3 (500+ files in many subfolders) Folder: App4 (200+ files in many subfolders) ....{{ more applications in various folders... a total of 3000 files) web.config
Note that each apps share the same web.config, so they are in the same website. Also they depend on the other projects like BusinessLayer, DBLayer etc.
In asp.net 1.1 we had separate projects (not website) for each App1, App2 etc. So when we were fixing bugs (say in App1), we just needed to compile App1.
In asp.net 2.0, all the apps have to be in under the same web project (to facilitate sharing of web.config, skins etc). Now when a developer changes a small function in that dblayer that is related to app1 and does a build website, the asp.net 2.0 compilier cannot figure out that folder app1 is only dependent on this function so it compiles all the apps, a total of 3000 files (it takes more than 2 and half minutes on my latop which is 3.4Ghz cpu and has 1GB of RAM and 7200rpm drive).
I understand that if only the apps files change, the compilation is very fast. however, in the development cycle, developers also change library projects as well as apps.
I think this is a limitation, it would be nice if MS provided a folder compile in addition to file compile and website compile for a vs.net 2005 website. Otherwise it would be good to know if some hack exists.
Some people on this thread has suggested I use msbuild for this. I do want to stay in the development environment of vs.net 2005 and take advantage of it. I understand msbuild is good for deployment options.
I hope I explained my problem well, I think all the advantages of 2.0 motivated us to migrate our program. This is however a big bottleneck that needs addressing. Any other ideas/hack etc?
 Signature -jojobar
> Hi Jojo, > [quoted text clipped - 13 lines] > Yuan Ren [MSFT] > Microsoft Online Support "Yuan Ren[MSFT]" - 24 Feb 2006 12:39 GMT Hi JoJo,
Thanks for your reply!
I do understand your issue. As your appreciated idea, the issue is a product limitation because the new compilation mode in ASP.NET 2.0. If you publish the website, I think this will take more time to approach this. However, I recommend you submit a feedback for the current issue. You can do this by accessing the link below: https://support.microsoft.com/common/survey.aspx?scid=sw;en;1214&showpage=1& WS=mscom&url=http%3a%2f%2fwww.microsoft.com%2f
Thanks for your understanding!
Regards,
Yuan Ren [MSFT] Microsoft Online Support ====================================================== PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were updated on February 14, 2006. Please complete a re-registration process by entering the secure code mmpng06 when prompted. Once you have entered the secure code mmpng06, you will be able to update your profile and access the partner newsgroups. ====================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ====================================================== This posting is provided "AS IS" with no warranties, and confers no rights. ======================================================
Ken Cox - Microsoft MVP - 05 Feb 2006 00:57 GMT Be sure to check out Rick Strahl's free West Wind ASP.NET 2.0 Compiler Utility
http://www.west-wind.com/tools/aspnetcompiler.asp
Also, I wonder if MSBuild would help you there if you added the directories as items?
http://msdn2.microsoft.com/en-us/library/ms171452.aspx
Ken Microsoft MVP [ASP.NET]
> In vs.net 2005 you can build the entire website, entire solution or a > single [quoted text clipped - 15 lines] > > Thanks
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|