Create a new class library project (in the appropriate language) and copy
the App_Code files into that project. Run it until you can compile, as there
may be some web libs you need to reference, esp. if there is not a good
separation of concerns (likely considering you have library material in
App_Code).
After it compiles, take one of the websites and exclude everything in the
App_Code folder that you have moved. Make a reference to the new library.
Now go through and correct the using (C#) or Imports (vb) statements for
your project. Once you have a compile, consider it a test build and have
someone from QA (if you have QA) test that build thoroughly. Consider it
suspect, because someone may have tied in some config elements that are not
pulling properly into the lib, etc.
As it is being tested, go to another site and do the same. Rinse and repeat
until all sites are thoroughly clean and tested. Then, go back and delete
the excluded files.
NOTE: If you are using source control (you are, right), you can branch the
build before doing the switcheroo and delete instead of exclude at the first
step. It is unlikely you are going back. But, if you are, you still have the
old branch to go back to.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#
or just read it:
http://feeds.feedburner.com/GregoryBeamer
********************************************
| Think outside the box! |
********************************************
"Jethro" <je*******@hotmail.comwrote in message
news:f0**********************************@i76g2000 hsf.googlegroups.com...
Hi guys,
I have inherited a .NET 2.0 web project. It consists of a root site,
and 3 sub directories.
Ideally these are seperate projects/websites. The root is a customer-
facing one, and the other 3 are for admin, and supervisor use.
I want to break the existing project (all websites treated as one)
into 4 separate websites.
Unfortunately they all share the "App_code" directory, which contains
common classes to all 4 sites.
Can anyone advise on how I can make the App_code a shared component in
4 websites, so that I can rebuild the entire app as 4 projects, which
will speed up development, and make it more robust (90% of development
and fixes go into the public site, why rebuild the other 3 every
time ?
Thanks in advance, guys.