views:

366

answers:

1

Different resource files meaning i have different resource files having with no culture,they are not english,french,german files.

I get an exception when i try to do:

Dim res As System.Resources.ResourceManager = New System.Resources.ResourceManager("Resources.myres", System.Reflection.Assembly.GetExecutingAssembly(), Nothing)

res.getstring("val1") -> This throws the below exception.

I am not setting it to any particular culture.

myres is a resx file.

MissingManifestResourceException

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

Else is there any resourcecollection where i can pass the name of the resource file and get values from it.??

A: 

you can access using

GetLocalResourceObject("yourkey").ToString();

Also check this thread.. http://stackoverflow.com/questions/1202999/issue-with-getlocalresource-object

Muhammad Akhtar
The thing im using asp.net mvc furthermore im doing unit testing so this doesnt work for me,thats i havent added them under App_GlobalResource or App_LocalResource folder.