If you are willing to manipulate IL .net supports Module Initializers
http://blogs.msdn.com/b/junfeng/archive/2005/11/19/494914.aspx
http://tech.einaregilsson.com/2009/12/16/module-initializers-in-csharp/
Are Module initializers supported in Silverlight and Windows Phone 7?
Only C++/CLI supports a module initializer. And that's only indirectly, it uses them to get the CRT started and to get unmanaged variables and objects initialized. You have to write on in IL. I tried, it worked just fine on Silverlight 4:
Its a silly example, the module initializer sets a static field of Class1. I then created an instance of Class1 in a sample Silverlight app and verified the value with the debugger.
This exact same code did not work in the Windows Phone emulator. I should have modified the TargetFrameworkAttribute, did not actually try this. I doubt that it is the source of the problem.