473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

codeSubDirectories and build order

So, this link:
http://msdn2.microsoft.com/en-us/library/54dwfbb7.aspx

says, "The build order is inferred from the top-down order of the codeSubDirectories collection. The App_Code directory is built last. However, there are no build order dependencies, which means that the build order is not significant."

Yet, if I have two subfolders in my project and have the web.config set like this:
<codeSubDirectories>
<add directoryName="SalesOrderViewer" />
<add directoryName="InterCoInvoices" />
</codeSubDirectories>

.... then classes inside SalesOrderViewer cannot see classes inside InterCoInvoices.... but InterCoInvoices can see SalesOrderViewer. Neither of these subfolders of classes can see anything in the App_Code root directory.

So is the documentation lying to me? or am I doing something wrong?

Thanks in advance!
-Nick Franceschina


Oct 2 '06 #1
2 3174
Nick,
It looks correct to me actually. Since App_Code is built last, none of the code should have access to the App_Code directory since it hasn't been built yet. I think it's basically just a mis-interpretation. By dependencies you can think of it as projects. In solutions that would have numerous projects to build into something like a desktop app, the order that the projects are built becomes important and the compiler determines a best order to build them in to ensure that project b, which includes project a, is built after project a so it (project b) can then be compiled with project c. The docs here are basically saying that they don't care about this build dependency and pretty much just build in top down order of the directory list.

With the standard VS web project you really don't want code that depends upon code in other directories. You might try the Web Application Project instead (it's an add-on at: http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx) This is very similar to the old VS.Net 2003 web project and compiles everything into a binary, thus you're not limited to only code in your directory. It also has better performance in the fact that, since each directory and/or file can be compiled into it's own dll, to call code in another directory you end up having to call outside the dll. Doing this a lot will slow things down when you don't need them to.

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Nick" <nf***********@fujitecamerica.comwrote in message news:OT*************@TK2MSFTNGP06.phx.gbl...
So, this link:
http://msdn2.microsoft.com/en-us/library/54dwfbb7.aspx

says, "The build order is inferred from the top-down order of the codeSubDirectories collection. The App_Code directory is built last. However, there are no build order dependencies, which means that the build order is not significant."

Yet, if I have two subfolders in my project and have the web.config set like this:
<codeSubDirectories>
<add directoryName="SalesOrderViewer" />
<add directoryName="InterCoInvoices" />
</codeSubDirectories>

... then classes inside SalesOrderViewer cannot see classes inside InterCoInvoices.... but InterCoInvoices can see SalesOrderViewer. Neither of these subfolders of classes can see anything in the App_Code root directory.

So is the documentation lying to me? or am I doing something wrong?

Thanks in advance!
-Nick Franceschina


Oct 2 '06 #2
Thanks Mark. I guess the wording was just tripping me up. I just created a new codeSubDirectory entry for the stuff that all other App_Code classes need to access... and put that first in the list. So it gets built first, and everyone can then see it.

I am aware of the WAP model, but I really like the benefits of the website model and thus I'm moving everything over to it.

Thanks again,
-Nick

"Mark Fitzpatrick" <ma******@fitzme.comwrote in message news:uI**************@TK2MSFTNGP04.phx.gbl...
Nick,
It looks correct to me actually. Since App_Code is built last, none of the code should have access to the App_Code directory since it hasn't been built yet. I think it's basically just a mis-interpretation. By dependencies you can think of it as projects. In solutions that would have numerous projects to build into something like a desktop app, the order that the projects are built becomes important and the compiler determines a best order to build them in to ensure that project b, which includes project a, is built after project a so it (project b) can then be compiled with project c. The docs here are basically saying that they don't care about this build dependency and pretty much just build in top down order of the directory list.

With the standard VS web project you really don't want code that depends upon code in other directories. You might try the Web Application Project instead (it's an add-on at: http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx) This is very similar to the old VS.Net 2003 web project and compiles everything into a binary, thus you're not limited to only code in your directory. It also has better performance in the fact that, since each directory and/or file can be compiled into it's own dll, to call code in another directory you end up having to call outside the dll. Doing this a lot will slow things down when you don't need them to.

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Nick" <nf***********@fujitecamerica.comwrote in message news:OT*************@TK2MSFTNGP06.phx.gbl...
So, this link:
http://msdn2.microsoft.com/en-us/library/54dwfbb7.aspx

says, "The build order is inferred from the top-down order of the codeSubDirectories collection. The App_Code directory is built last. However, there are no build order dependencies, which means that the build order is not significant."

Yet, if I have two subfolders in my project and have the web.config set like this:
<codeSubDirectories>
<add directoryName="SalesOrderViewer" />
<add directoryName="InterCoInvoices" />
</codeSubDirectories>

... then classes inside SalesOrderViewer cannot see classes inside InterCoInvoices.... but InterCoInvoices can see SalesOrderViewer. Neither of these subfolders of classes can see anything in the App_Code root directory.

So is the documentation lying to me? or am I doing something wrong?

Thanks in advance!
-Nick Franceschina


Oct 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: cody | last post by:
We have a huge project, the solutuion spans 50 projects growing. Everytime I want to start the project I have to wait nearly over 1 minute for the compiler to complete building. This is...
0
by: valmir cinquini | last post by:
i'm developing a faq session of our website and I'm facing some problems handling xml files and DataSet relations First off all, here's the structure of my xml file: <?xml version="1.0"?>...
2
by: Rudy Ray Moore | last post by:
How can I modify the project build order of a multi-project workspace under "Visual Studio .net 2003 7.1 c++"? I tried to modify the .sln by hand to influence the build order, but it didn't seem...
6
by: Willie wjb | last post by:
Hi, i have a solution with 4 projects sdk, control1, control2 and controls the sdk is the base control1 uses the sdk control2 uses the sdk controls uses the sdk,control1 and control2
4
by: Dennis | last post by:
I have three projects in my Solution. How do I designate which gets built first when selecting the Build Solution. -- Dennis in Houston
4
by: Nick | last post by:
Hi there, I have a solution which consists of 2 class libraries and 2 executables which both consume these class libraries. I've set the correct dependencies in order for the VS to...
9
by: Brett Romero | last post by:
I have an EXE project with four project dependencies (DLLs). I need to set the order of these builds. However they are automatically ordered by alpha. There aren't any settings to change this. ...
1
by: Matt Fielder | last post by:
I need to customize the build process beyond just selecting which projects get built in what order. What I want to happen is when I select "Release" 1: Pop a dialog confirming I want to build...
0
by: =?Utf-8?B?UnVzc2VsbCBCb2xhbmQ=?= | last post by:
In the codeSubDirectories and controsl configuration sections, the <remove /> and <clear /tags are not recognized. Because of this, there is no way to reverse these settings for any child...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.