Skip to content

Order of Execution of Startup Codes located on Different Assemblies #10

@csoon1

Description

@csoon1

Okay so let me describe what I'm doing. I have a solution with multiple projects. Let's say I have the projects: Project1 (which is the startup project), Project2, and so on. On some of these projects I have a folder: App_Start where my desired startup codes are located. On the webactivator attribute I specify the desired "Order" for the execution on each code.

The issue is that the sequence of the execution (on multiple assemblies) isn't exactly followed because as soon as an attribute on an assembly is found, the corresponding code is then executed. For example: if Project1 assembly is found first... it will start running the code... even if the Order = 2 (just an example).... but not the code with Order = 1 because it is on another assembly.

I ended up writing my own activator where I scan all assemblies first for any of the startup attributes, put the result on a list, sorting them based on the order, ... then executing the codes.

Is there a chance for webactivator to behave like this? I can place all startup codes in one place and everything would be good... but for some reasons I just like placing each startup code on different assemblies (where they are related... example I place my DI registration startup code on the project that is about DependencyResolution.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions