I was getting a lot of error when compiling a project with a custom resource provider:

The resource object with key 'xxxxx' was not found.

cause: in my resource provider, somme calls are made to HttpContext.Current...
However, at compile time, there is NO current context... bang
http://www.hanselman.com/blog/AmIRunningInDesignMode.aspx

Solution: add a test before calling the context to see if you are in compile mode..

If Not HttpContext.Current is Nothing Then...

.. End If

 

See also: http://www.west-wind.com/weblog/posts/4008.aspx