4

I have problem to add a assembly to my sharepoint project. I have a assembly that contains resource files for different language. I have one file for English, Utility.resx och one for Swedish Utility.sv-SE.resx. When I build it, it will be one dll for the project and one for the swedish language. The problem is when I should deploy it to Sharepoint with Visual Studio. I have added the assembly for the project to my packagefile in my sharepoint project. But when I trying to deploy it but I got the message:

Error occurred in deployment step 'Add Solution': Error: Cannot add the specified assembly to the global assembly cache: Utility.resources.dll

I have tried to specified both sv-SE\Utility.resources.dll and Utility.resources.dll as Location when I added the assembly i package. Note that I want to add it as assembly from project output.

Anyone having an ideas how to solve this problem?

2 Answers 2

3

This should help - http://blogs.visigo.com/chriscoulson/deploying-localized-satellite-assemblies-with-sharepoint-2010/

You have to add the resource assemblies using "Add Existing Assembly" and hard code the path to the BIN\release\ folder and NOT "Add Assembly from Project Output" for some reason...

And no - you can't use bin\$(ConfigurationName) -- GAHH!

1
  • For me (VS2012 + SP2013), there was no need to hard code the path (i.e. relative path), but "Add Existing Assembly" was necessary.
    – kevin
    Dec 5, 2014 at 3:07
-1

Why not deploying the resource files as resx? They need to be added to the manifest.xml as "RootFiles":

<RootFile>
    <RootFile Location="Resources\Utility.sv-SE.resx"></RootFile>
    <RootFile Location="Resources\Utility.resx"></RootFile>
</RootFiles>

Hope that helps, marco

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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