Search code examples
c#.netjscript.net

Resolving Microsoft.jscript.resources.dll fails


I have code that creates and invokes methods from Microsoft.Jscript objects.

I'm registering on the ResourceResolve event on the AppDomain (fired when the resources for a specific assembly cannot be loaded).

I have the Windows Localization set to Portuguese and the Portuguese .Net Framework Language pack.

From what I understand, each time anything in .Net needs to be localized, the resources assembly is loaded for each of the installed languages.

Now, whenever I get an exception thrown within a Jscript object (I'm guessing it is a Microsoft.JScript exception), the ResourceResolve event is being fired. Is there anything I can do to fix this? I thought installing the .Net Framework language pack would do it but apparently it didn't. I've unsuccessfuly searched for an assembly with that name both in my computer and google.


Solution

  • The .NET framework language pack doesn't cover JScript resources. There's a separate download for that. The link I gave you is for English, you have to change the Language choice. But Portuguese is not listed, I seriously doubt that language is supported. And is not going to be either, JScript is deprecated.

    Well, no joy. Nothing much you can do but fail the ResourceResolve event. Return null so it uses the default exception message text.