开发者

How to Deploy Resource to Hive in Sharepoint 2010

I've read a lot of examples and tutorials about it. But none of the so called solutions helped me in my case.

Problem: I have multiple web parts using the same resource files, so there is a solution for resource files that has a mapped folder to Resources with resx files in it.

When I deploy with resx file's "build action" property set to embedded or none, resources are not deployed to Hive/Resources.


When I deploy with "build action" set to "content", resources are deployed but the webparts that use resources get the error below:

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "ResourceWp.Resources.ListNames.resources" was correctly embedded or linked into assembly "ResourceWp" at compile time, or that all the satellite assemblies required are loadable a开发者_如何学Pythonnd fully signed.

This is the place where my last healthy nerves couldn't resist the pain. I want to use the resx file neutral in culture like any simple asp.net webApp. I think something really simple is here that I'm missing because of my lack of knowledge about the assembly usage.


Through all the reading, I just couldn't understand one point that if I am able to use resource files like super.resx without writing super.en-US.resx (neutral I mean).

Because only difference that I have is this point, I don't use any tr-TR or likewise culture identifier and I use this project in a Turkish language-pack installed and in a site created by selecting "Turkish" as language.

But in my opinion, that shouldn't be the point, right?


Summary: I want to deploy my resource in Hive/Resources and them to be available to my webparts

I have tried:

  • http://johanleino.wordpress.com/2010/11/08/working-with-resource-files-in-sharepoint-2010/
  • http://weblogs.asp.net/jevgeni/archive/2010/02/02/using-resource-files-in-sharepoint-2010-and-visual-studio-2010.aspx

kind of approaches. But didn't accomplish any success with them.

I hope, someone can help me, thanks in advance.


It seems as it is necessary to place the resource files in App_GlobalResources folder. This approach worked well in my (similar) case: https://sharepoint.stackexchange.com/questions/20851/localizing-asp-markup-in-webpart-issue

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜