|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
including resource filesvb2005
i have a resource file (MyFile.resources) created using resgen. how do i inculde it within my assembly? i have tried adding it to my project but it does not get built into the exe, so i get a MissingManifestResourceException when trying to use resources within it. any ideas? "guy" <g**@discussions.microsoft.com> schrieb Select the file in the solution explorer. In the property window, did you> vb2005 > i have a resource file (MyFile.resources) created using resgen. > how do i inculde it within my assembly? i have tried adding it to my > project but it does not get built into the exe, so i get a > MissingManifestResourceException when trying to use resources within > it. > > any ideas? set the "build action" to embedded resource? Or, maybe you misspelled the resource name. Try this at application startup to see the embedded resources: MsgBox(String.Join(vbCrLf, _ System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceNames _ )) Armin thanks Armin,
yes it has Build Action set to Embedded Resource. looking at it witl ILDasm does not show the resource, nor does GetMainfestResourceNames in your example - i must be doing something else wrong! Show quoteHide quote "Armin Zingler" wrote: > "guy" <g**@discussions.microsoft.com> schrieb > > vb2005 > > i have a resource file (MyFile.resources) created using resgen. > > how do i inculde it within my assembly? i have tried adding it to my > > project but it does not get built into the exe, so i get a > > MissingManifestResourceException when trying to use resources within > > it. > > > > any ideas? > > > Select the file in the solution explorer. In the property window, did you > set the "build action" to embedded resource? > > > Or, maybe you misspelled the resource name. Try this at application startup > to see the embedded resources: > > MsgBox(String.Join(vbCrLf, _ > System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceNames _ > )) > > > > Armin > > "guy" <g**@discussions.microsoft.com> schrieb Hmm.. strange. I tried the same now: I used "reseditor.exe" (from the > thanks Armin, > yes it has Build Action set to Embedded Resource. > looking at it witl ILDasm does not show the resource, nor does > GetMainfestResourceNames in your example - i must be doing something > else wrong! samples), added one bitmap, saved as "test.resources", added the file to the project ("embedded resource" is set by default) and built the exe. GetManifestResourceNames returns WindowsApplication1.Form1.resources WindowsApplication1.test.resources WindowsApplication1.Resources.resources where "test.resources" is the embedded file. I currently have no clue what's going wrong in your project.... I'll let you know if something comes into my mind. Armin Armin, a power off/on fixed this (it makes you wonder...)
thanks guy Show quoteHide quote "Armin Zingler" wrote: > "guy" <g**@discussions.microsoft.com> schrieb > > thanks Armin, > > yes it has Build Action set to Embedded Resource. > > looking at it witl ILDasm does not show the resource, nor does > > GetMainfestResourceNames in your example - i must be doing something > > else wrong! > > > Hmm.. strange. I tried the same now: I used "reseditor.exe" (from the > samples), added one bitmap, saved as "test.resources", added the file to the > project ("embedded resource" is set by default) and built the exe. > GetManifestResourceNames returns > > > WindowsApplication1.Form1.resources > WindowsApplication1.test.resources > WindowsApplication1.Resources.resources > > where "test.resources" is the embedded file. > > I currently have no clue what's going wrong in your project.... I'll let you > know if something comes into my mind. > > > > Armin > > "guy" <g**@discussions.microsoft.com> schrieb Never wonder. :)> Armin, a power off/on fixed this (it makes you wonder...) > > thanks > > guy Armin
XML to ODBC
DataView Multiple Change String builder (Parsing vertically presented records) Programming for Touch Screens I'm perplexed with simple ADO.NET - Access DB Access - Please Help Edit and Continue?? VS2005 Sending web email Enabling / Disabling Tab Pages need help with regular expression generating dev documentation from standard commenting. |
|||||||||||||||||||||||