Maybe I should have mentioned that the resources were defined in FooText.resx. Using Reflector, I discovered that the resources were embedded in the namespace Foo.SomeFolder.FooText.resources.
In VisStudio, I moved FooText.resx up one level, which fixes things. Seems like a bug in my code, I constructed rMgr with the wrong 1st parameter. But this worked under .NET, and under installed-Mono, so maybe it's a Mono bug. If someone closer to the innards wants a bug report, I'll write it up. On Sep 14, 2010, at 11:02 AM, Eric Slosser wrote: > I'm trying to configure my Mac app to include Mono inside it so I can run on > a machine that doesn't have Mono installed. > > I'm launching it from the Terminal, with 'pwd' as > ..../MyApp.app/Contents/MacOS. I've got MONO_PATH and DYLD_LIBRARY_PATH set > so assemblies and libraries are found. My entry point is in a C-based > executable that calls mono_main(). Mono v. 2.6.4. > > When I launch using my executable on a machine that doesn't have Mono > installed, eventually my Foo.dll calls: > > ResourceManager rMgr = new ResourceManager( "Foo.FooText", > Assembly.GetAssembly( typeof(Foo) ) ); > rMgr.GetString("FOO_STRINGS"); > > ... and mscorlib tells me: > > Looking for assembly /Contents/Runtime/Satellite/Foo.resources.dll > Main: Exception: Could not find any resources appropriate for the specified > culture or the neutral culture. Make sure "Foo.FooText.resources" was > correctly embedded or linked into assembly "Foo" at compile time, or that all > the satellite assemblies required are loadable and fully signed. by mscorlib > at System.Resources.ResourceManager.AssemblyResourceMissing (System.String > fileName) [0x00000] in <filename unknown>:0 > at System.Resources.ResourceManager.InternalGetResourceSet > (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean > tryParents) [0x00000] in <filename unknown>:0 > at System.Resources.ResourceManager.InternalGetResourceSet > (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean > tryParents) [0x00000] in <filename unknown>:0 > at System.Resources.ResourceManager.InternalGetResourceSet > (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean > tryParents) [0x00000] in <filename unknown>:0 > at System.Resources.ResourceManager.GetString (System.String name, > System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 > at System.Resources.ResourceManager.GetString (System.String name) > [0x00000] in <filename unknown>:0 > > This bundle works fine when I launch it using an installed Mono, or if I > launch it using my executable on a machine that has Mono installed, so I'm > guessing that I've failed to copy some bit of Mono into my bundle, or that > I've failed to alter some configuration string. > > All pearls appreciated. > > _______________________________________________ > Mono-list maillist - Mono-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list