[MonoDevelop] problem with import and resources
Rodolfo Campero
rodolfo.campero at gmail.com
Fri Aug 19 08:42:16 EDT 2005
Hello,
On 8/19/05, pissblach <pissblach at gmail.com> wrote:
> hi,
> [...]
> the problem i have now, is that i can not include any resources and i
> get an exception
> when executing.
>
> EXCEPTION <Main> exception: Could not find any resource appropiate for the
> specified culture or its parents. Make sure
> "test.main.CMainWin.resources" was correctly embedded or linked into
> assembly "monoContractOrganizer"., stackTrace = in <0x002fd>
> System.Resources.ResourceManager:InternalGetResourceSet
> (System.Globalization.CultureInfo culture, Boolean Createifnotexists,
> Boolean tryParents)
>
> if i go on recources and say "add resource" then i can choose the resource which
> has been created by VS, but it does not get included and obviously not compiled.
> if i include them in the normal source folder and set them to compile,
> then that does
> not work either.
>
> i am using:
> mono-develop: 0.7
> mono-1.1.8.3
>
>
> has anyone got an idea ?
The problem here is that VS modifies the name of the resources when it
embeds them in the assembly, prepending the value of the project
property "default namespace" to the name. Thus, a file named
"CMainWin.resources" that is included in a VS project whose default
namespace is "test.main" gets called test.main.CMainWin.resources.
On the other hand, MonoDevelop doesn't mangle the resource names, so
when you try to load a resource using the VS convention, you get a
runtime exception because there's no resource with that name.
I hope that this information helps you to find a solution to your problem.
Cheers,
Rodolfo
More information about the Monodevelop-list
mailing list