Still not enough detail.
Where are you running the code, what are the specs of the
environment, which version of Sharepoint does it have?
Are your assemblies registered in the GAC?
Take some time and formulate a post with as much detail as possible.
All you have given is a very generic error message. If you want help,
be more forthcoming.