I have been able to get DbResourceProvider working.
It seems that the statement:
[DesignTimeResourceProviderFactoryAttribute(typeof(DbDesignTimeResourceProviderFactory))]
should be all that's required for Studio to find the factory.
When I invoke Generate Local Resource on simple test page with a single test string (Label.Text), nothing happens. The edit symbol flashes on the test page filename and then dissapears. There's no resx entry or db entry and there's no meta:resourcekey added in the webform.
I realize design time code is tough to debug, since you need a 2nd instance of Studio to debug the instance that invokes the design time assembly. I don't think the design factory is being invoked at all, since log4net trace statements aren't even called in the ctor.
Am I missing something obvious?
FYI: Visual Studio 2010 Pro, .NET 4.0, Windows7
<UPDATE> Clue from Studio Output window:
Start creating resource content and adding 'meta' attributes to server controls and directives.
Inheritance security rules violated by type: 'Westwind.Globalization.DbDesignTimeResourceProviderFactory'. Derived types must either match the security accessibility of the base type or be less accessible.
Finished creating resource content and adding 'meta' attributes.
Microsoft blog suggests:
Can you try setting the following assembly level attribute to force .NET 2.0 security rules.
[assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)]
Now, when I run Generate Local Resources I get:
Start creating resource content and adding 'meta' attributes to server controls and directives.
Object reference not set to an instance of an object.
Finished creating resource content and adding 'meta' attributes.