2
votes

I have used resource file(.resx) file in a class library project to store some error messages. When I set the "Build Action" to "Embedded Resource" for the resx file and deploy it works fine. But I would like to separate the resource file from the dll since I may need to change the error messages in resx file in future without the need to recompiling the class library project. I tried the other option in "Build Action" property Content,resource, etc but nothing seems to be working in the way I require. When I use these property I am getting the below error,

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure was correctly embedded or linked into assembly at compile time, or that all the satellite assemblies required are loadable and fully signed.

Is there any way to resolve this error and make it work?

1
the answer you seek should be in this question right here: stackoverflow.com/questions/782899/…Joakim

1 Answers

0
votes

Resource files have to be set to embedded - that's how they work.

You can create another assembly containing the resources and reference it - this way you can redeploy the updated resources. It requires a bit more work in your code (loading the assembly in order to be able to get the embedded resources).

However, from your description (text messages that need to be editable after deployment), perhaps storing these in configuration is a better option (in particular if you are not localizing).