Month: January 2013

How to deploy a Resource File in SharePoint 2010

Hello again 🙂

Resource files are typically any non-executable data file used by your application, such as image, audio, and video files. A resource file can also have specific meanings in certain contexts. For example, in the context of application localization, resource files refer to .resx files, which you can deploy in localized satellite assemblies.

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.

Developers usually keep two copies of the same resource file in the project !

But today i am going to give u an easy way to deploy only one file, and guess what it works !! and it will save u the trouble of having to update 2 files !

so here are the steps

1. create an empty SP project:

2. create a 14\Resources mapped Folder

  • right clic on the projet
  • add a mapped folder


  • choose ressources folder


3. add your ressource file:

  • right clic on the projet
  • add new item ( or existing item if you already have ur  ressource file)


  • choose ressource file and name it SP.Layouts.resx

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


5. press “Show All Files” button from the Solution Explorer


6. Edit the SharePointProjectItem.spdata file inside the App_GlobalResources folder

add this code


<ProjectItemFileSource=Elements.xml  Target=App_GlobalResources\  Type=ElementManifest />

<ProjectItemFileSource=..\Resources\CoE.SP.CS.Layouts.resx          Type=AppGlobalResource />


or  your own path and file name.


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

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

that’s it 😉 it’s done !!