locked
wdp build fails for resource expressions when using custom ResourceProviderFactory RRS feed

  • Question

  • User1070236303 posted

    I've implemented a custom ResourceProviderFactory which uses satellite assemblies for resource look up. I have this in a wap application and the application works fine.

    I have also a wdp project for this application which precompile the site.

    When I try to build the wdp I get error messages for any page which uses <%$ Resource: classname, reskey %>, like:

    error ASPPARSE: Object reference not set to an instance of an object. 

    The resource expressions and the custom provider works fine in the app, but wdp cannot precompile the site.

    What can be the problem? 

    Thursday, March 12, 2009 7:58 AM

Answers

  • User1070236303 posted

    I found the answer here:

    Custom Localization ResourceProviders and Compiler Errors

     

    Comment from <small>Grady </small>in the blog helped me:

    I used HttpContext.Current in my resource provider which is totally valid.

    However the pre-compiler during compilation creates the custom resourceproviderfactory (because the compiler try to validate <%$ Resource ... %> for missing resource keys). "Obviously" there is no available HttpContext during pre-compilation for a wap application...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 12, 2009 10:41 AM