Quantcast
Channel: typesafe » .Net
Viewing all articles
Browse latest Browse all 10

The PreApplicationStartMethodAttribute cannot point to types in a different assembly

$
0
0

I was almost going crazy before I found out that when you use a PreApplicationStartMethodAttribute for bootstrapping your hosting environment you must point to a type that resides in the same assembly that is being decorated!

Pointing to types in a different assembly will just blow up with a YSOD saying ‘The method specified by the PreApplicationStartMethodAttribute on assembly ‘assembly name’ cannot be resolved. Type: ‘type name’, MethodName: ‘Initialize’. Verify that the type is public and the method is public and static (Shared in Visual Basic).’.

Just though I’d mention it here, there’s not to much info on this…



Viewing all articles
Browse latest Browse all 10

Trending Articles