SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I asked a question maybe yesterday or two days ago tops about using ScriptResx.ashx with custom resource files. I noticed that at first my custom file wasn't being rendered through the handler because it was missing a chunk of code that the handler requires:

    Whether this .resx could be read by scriptResx.ashx handler. Only a file
    marked with scriptResx:true could be returned to client.
 <resheader name="scriptResx">
 <!-- the full name of the JavaScript class.  -->
 <resheader name="classFullName">

Once I figured that out, I got my .resx file working -- until I added another property. Once you add a property via the Visual Studio Designer it re-writes the entire file, removing that needed code.

Does anyone have any tricks, tips or Visual Studio templates that will allow me to preserve that block of code while still allowing me to add resources via the Design view?

share|improve this question
Stupid problem. I don't know of any way to fix this... – Dennis G Apr 8 '14 at 16:56
@DennisG I don't know if you still need this, but if you do - check the tool I have linked in my answer below. – SPArchaeologist Jun 12 '14 at 14:07
up vote 2 down vote accepted

Don't know if the OP still need this, but I hope it may be usefull to anyone experiencing the same issue.

Turn out that Wictor Wilén has built a visual studio extension that manages the aforementioned setting automatically. You can find it on the Visual Studio Gallery under the name "SPResX Visual Studio 2012 Extension". It also offer the ability to customize the "namespace" of the generated javascript class.

Link to the original blog post

share|improve this answer
Awesome! Good thing I favorited this question. – Dennis G Jun 13 '14 at 5:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.