Hi
I'm trying to load an image from a resource file, The resource file is located in a folder in the root of the app. When I call the resource file
VB generates the following error.
An unhandled exception of type 'System.Resources.MissingManifestResourceException ' occurred in mscorlib.dll
Additional information: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "IPS.Darwin.Resource.Image.resources" was correctly embedded or linked into assembly "Darwin".
baseName: IPS.Darwin.Resource.Image locationInfo: <null> resource file name: IPS.Darwin.Resource.Image.resources assembly: Darwin, Version=1.0.1520.21275, Culture=neutral, PublicKeyToken=null
Yet when I move the resource file to root of the app it works whats going on why can't I load the resource from the folder.
Code used to call resource within folder: (Does not work generates above error)
Dim asm As [Assembly] = [Assembly].GetCallingAssembly()
Dim rm As ResourceManager = New ResourceManager("IPS.Darwin.Resource.Image", asm)
picUserImage.Image = CType(rm.GetObject("UserImage"), Bitmap)
Yet when I move the resource file to the root and change the code it works
Dim asm As [Assembly] = [Assembly].GetCallingAssembly()
Dim rm As ResourceManager = New ResourceManager("IPS.Darwin.Image", asm)
picUserImage.Image = CType(rm.GetObject("UserImage"), Bitmap)
What's the difference?
Duncan