SharePoint 2010 Resource File Deployment Done Easy

May 28 2012 62 comments

Deployment of resource files with SharePoint has always been a little tricky. With MOSS we used features to provision resource files. With SharePoint 2010 it was a little easier but not enough.
There are blogs with some ideas how to make it easier to deploy resources in multiple locations here, here and here. They did not anyways fill all my requirements.

I do not want to:
1. Use feature to deploy resources
2. Keep two copies of the same resource file in the project
3. Edit the manifest.xml in visual studio.
4. To have “Resources” subfolder inside App_GlobalResources folder.

With the help of the blog post above, I managed to create solution where you only keep one copy of the resource file and that it is easy to manage and easy to deploy to the whole farm.

Add a mappedfolder to your project and point it to 14\Resources folder. Then add your custom resource file(s) to it:

Add a Empty Element to your project and name it App_GlobalResources:

Delete the feature it created automatically, you will not need it:

Delete the Elements.xml file it automatically created, you will not need that:

Edit the SharePointProjectItem.spdata file inside the App_GlobalResources folder (If you cannot see it, press “Show All Files” button from the Solution Explorer). Replace the empty

<Files />

node with the following xml, with your own path and file name:

  <Files >
    <ProjectItemFile Source="..\Resources\EasyResource.en-US.resx" Type="AppGlobalResource"/>
    <ProjectItemFile Source="..\Resources\" Type="AppGlobalResource"/>
    <ProjectItemFile Source="..\Resources\EasyResource.resx" Type="AppGlobalResource"/>

If you add new resource files later remember to update this file too.

Double click the Package folder and add the App_GlobalResource item to the Package:

Build and deploy, all resource files will be deployed to 14Hive and WebApplication.


When editing the resource files, just a normal Update-SPSolution command with PowerShell will update the resources to the whole Farm. I hope this helps someone struggling with the manual copies or other hacks with deployment of resource files.

Jerry Seinfeld: Why not? We’re neighbors. What’s mine is yours.
Cosmo Kramer: [leaning against the door-frame and looking around in wonder] Really?

Popularity: 10% [?]

62 comments to “SharePoint 2010 Resource File Deployment Done Easy”

  1. Sven G says:

    Thanks! Finally a decent method…

  2. user01 says:

    I modify the SharePointProjectItem.spdata and write :

    I am getting the error:” The specified value for the attribute “Type” is not valid “. Please Help

  3. [...] SharePoint 2010 Resource File Deployment Done Easy | SharePoint Blues [...]

  4. tristian o'brien (@tristianobrien) says:

    in visual studio, select “show all files” so that you can see all the .spdata files, check the Type element for say all your ProjectItemFile nodes, mostly thay should be of Type=”ElementFile”

  5. Jarno Leikas says:

    I noticed that when using Visual Studio 2012 with Office Developer tools for SharePoint 2013, this might crash your Visual Studio 2012 on publish with a NullReferenceException.

    In that case, you can try leaving the default Elements.xml file under the App_GlobalResources folder. The file should have at least an empty element in it, but it doesn’t need anything else.

    That will, however, cause Visual Studio 2012 to warn about the file being added as a package-level element manifest. You can then set the deployment type for that file as NoDeployment, and things will still work! So it looks like the build just checks if there’s an XML file with an tag inside it, and if it does find one, it’ll be happy.

    Do note, that the Office Developer Tools preview version didn’t crash this way, it only started doing it with the final release.

  6. Thwnks for sharing your info. I really appreciate your efforts and
    I will be waiting for your next post thanks once

  7. Hey there, You’ve done an incredible job. I will certainly digg it and personally suggest
    to my friends. I am sure they will be benefited from
    this site.

  8. [...] resource file for a SharePoint 2013 farm solution project. I followed the tips from here to ensure that the resource is deployed to both %15hive%/Resources and App_GlobalResources folders [...]

  9. click here says:

    Thanks for the information on this. I really enjoy the write-up!

  10. click says:

    Thanks for sharing this solution in keeping one copy of the resource file.

  11. Click here says:

    You have an impeccable article. Thanks

  12. This solution is very helpful. Thanks for sharing this!

  13. Thanks for sharing this post! Got mine resolved too.

  14. Kyle says:

    Amazing blog post! Thanks for this entry!

  15. This is great! Thanks for sharing this post!

  16. Check us Out says:

    Excellent SharePoint post! THanks for sharing this resource file deployment article!

  17. Rheed says:

    Awesome resource file deployment article! Thanks for sharing this post!

  18. Nice sharepoint ideas! Thanks for sharing this useful ideas.

  19. Eric says:

    Great! Thanks for this article. Keep it up! Free Marketing Guides

  20. Wow! That’s very useful, thanks for your article about it!

  21. Mike says:

    Definitely a deal breaker. site

  22. Thanks for the share, great post.

  23. call says:

    You really made it a whole lot easier.

  24. edclinic says:

    You unquestionably have some extraordinary knowledge, I loved that!

  25. MR136 says:

    Thanks for this helpful article! Keep it coming!

  26. taxi service in rajkot says:

    Best taxi service

  27. taxi service in rajkot says:

    Best taxi service

  28. taxi service in rajkot says:

    Best taxi service

  29. taxi service in rajkot says:

    Best taxi service

  30. Find fine ladies for chat and other kind of contacts at ao sexkontakte

  31. sex darwin says:

    sex darwin is great web platform for chat contacts with nice looking ladies in Australia

  32. nischay says:

    Whatever you mention in this particular article that all information are useful Tenali Ramakrishna stories

  33. shyamal says:

    we providing best wedding photo-shoot, pre wedding, product photography, and many more visit our site or contact us.

  34. Shemales in Coventry is very good chat place with nice girls for lonley guys in UK

  35. Zayn says:

    This is a great solution too! towing service

  36. Mature Ladies UK is the best web place for lonley guys in UK to find fine girls for hot chat

  37. mshahid says:

    Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Anthony Scott Dietrich Gainesville VA

  38. Transexuelles sur Shemale Toulon is great place for finding hot ladies for casual chat contacts in France with fine ladies

  39. Jim says:

    It is very detailed and accurate. I would be able to understand this quickly.

  40. Find fine girls for casual contacts in France on the best web platform Transexuelles Nantes

  41. Thanks for this helpful article! Keep it coming! Roofing Contractor Olympia

  42. Sex NRW says:

    Sex NRW bietet “geführte Kommunikation” an, d. h., wenn Sie Schwierigkeiten haben, eine Nachricht zu verfassen, die cool ist, aber Ihr Interesse zeigt, ohne zu sehr aufdringlich zu sein (ja, Dating ist kompliziert), werden Ihnen einige Fragen zur Auswahl gestellt, die das Eis brechen sollen.

  43. Zona sexy says:

    Zona sexy é um site de encontros muito acessível, onde os encontros nem sempre têm de ser sérios. Embora este site de encontros se destine principalmente a encontrar uma relação, é também o lugar certo para outros tipos de contactos divertidos e excitantes.

  44. Iskuri says:

    Iskuri piti sinusta huolta. Se on periaatteessa ensimmäinen vaihtoehto kaikille, jotka aloittavat seurustelun. Jos haluat olla turvallisella puolella nettideittailussa, sinun on ryömitettävä siellä, missä muutkin ryömivät.

Leave a Reply