4
votes

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

2 Answers

3
votes

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
votes

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