AppStart_* in the root: can we move them?

Oct 31, 2010 at 12:14 AM

Before we hit 1.0 RTM, I'd like to suggest we slightly modify the recommended behavior for AppStart_* files, which is to make a folder for them (perhaps called AppStart). I'm not fond of having all the files populating the root of my projects. Am I the only one? :)

Oct 31, 2010 at 12:18 AM

Yes, that would be fine.  I was sort of hesitating between the two patterns when I did all the current packages.

Note that this is just guidance, and has no bearing on the NuGet code.

Oct 31, 2010 at 12:20 AM
I realize it's guidance and not a hard rule. I just wondered if others thought this was a good idea, and if so, change all the default packages before RTM is reached. :)
Oct 31, 2010 at 12:21 AM

Sounds good, if most agree, I'll change the 4 or 5 existing packages.

Editor
Oct 31, 2010 at 12:38 AM
Also, any thoughts about other hooks in similar ways? It was *hard and hacky* to modify the routing table from
one of these as it was very soon. Maybe hook up an event in start then act on it later?
>
Oct 31, 2010 at 1:13 AM

So you're looking for something that would get called after global.asax's Application_Start?

Editor
Oct 31, 2010 at 1:18 AM
Exactly, so I can map httphandlers.
>
Oct 31, 2010 at 2:13 AM

We had this same discussion last week. +1

sent from my mobile

On Oct 30, 2010 7:18 PM, "shanselman" <notifications@codeplex.com> wrote:
> From: shanselman
>
> Exactly, so I can map httphandlers.
>>
>
>
Oct 31, 2010 at 4:02 PM

Rails has a config folder that contains an initializers folder.

config\initializers

Seems like a good place to me.

Oct 31, 2010 at 5:14 PM

[We're now discussing two unrelated things in parallel]

Right, same thing as we discussed last week Eric.  The problem is that the ASP.NET runtime doesn't really support such event.  The closest we can get is to register a module and run the logic in its Init method (with checks to make sure it only happens once, as module can get instantiated multiple times).

But unfortunately, the only official way of registering a module is via config, and we don't want to do that.  There is actually another way using a method from Microsoft.Web.Infrastructure.dll (which comes with WebMatrix & MVC3 betas): Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule. Eventually, this will make its way into the framework.

So bottom line is in the short term: it may not be that easy to support such event.

Oct 31, 2010 at 6:54 PM

+1 to a folder convention

sent from my mobile

On Oct 30, 2010 6:14 PM, "bradwilson" <notifications@codeplex.com> wrote:
> From: bradwilson
>
> Before we hit 1.0 RTM, I'd like to suggest we slightly modify the recommended behavior for AppStart_* files, which is to make a folder for them (perhaps called AppStart). I'm not fond of having all the files populating the root of my projects. Am I the only one? :)
>
>