Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1043997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:45:26+00:00 2026-05-16T15:45:26+00:00

How do I get all th resources dynamically from my current assembly? I have

  • 0

How do I get all th resources dynamically from my current assembly? I have tried two methods, GetManifestResourceNames and GetResourceSet with no success. I am comfortable with solutions in VB.net or C#.

First Method

This first method only returns an array of length 1 with this value “MyNameSpace.Resources.resource”. The problem is that there are more than 1 resource in this file.

Dim ca As Assembly = Assembly.GetExecutingAssembly
Dim rn() As String = CurrentAssembly.GetManifestResourceNames()

Second Method

Dim ca As Assembly = Assembly.GetExecutingAssembly
Dim crm As New ResourceManager("", ca)
''//Dim CurrentResourceManager As New ResourceManager(_
         "MyNamespace.Resources.resources", CurrentAssembly)
''//Dim CurrentResourceManager As New ResourceManager( _
         "My.Resources", CurrentAssembly)
Dim rs As ResourceSet = CurrentResourceManager.GetResourceSet(CultureInfo.CurrentCulture, True, True)
Dim rs As ResourceSet = crm.GetResourceSet( _
              CultureInfo.CurrentCulture, True, True)

MissingManifestResourceException was unhandled

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

Solution (as per Hans Passant)

Copy the Namespace from the Resources.Designer.vb

<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
            Get
                If Object.ReferenceEquals(resourceMan, Nothing) Then
                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("MyNamespace.Resources", GetType(Resources).Assembly)
                    resourceMan = temp
                End If
                Return resourceMan
            End Get
        End Property

and place it in the code

Dim CurrentResourceManager As New ResourceManager( _
         "MyNamespace.Resources", CurrentAssembly)
Dim rs As ResourceSet = CurrentResourceManager.GetResourceSet( _
         CultureInfo.CurrentCulture, True, True)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T15:45:27+00:00Added an answer on May 16, 2026 at 3:45 pm

    Yes, there’s more than 1 resource in MyNameSpace.Resources.resource. Which is the name you have to pass to ResourceManager, an empty string isn’t going to work.

    To see the kind of code you have to write, start a Windows Forms application and add a couple of resources to the Project + Properties, Resources tab. In the Solution Explorer, click the “Show All Files” icon. Open the My Project node, open the Resources.resx node and double-click the Resources.Designer.vb file. Note the code for the ResourceManager property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get all Books from the server (local PHP script), that
I'm trying to get all downloads from an repo on github with help of
How can i get all child nodes from sql table? (MemberJoiners table on pict)
Is anyone aware of a method to dynamically combine/minify all the h:outputStylesheet resources and
I have a TV named Kategorie and I want a list of all resources
I have an app that downloads several resources from the Internet every time it
Can get all triples with value null in specific field? All people with date_of_birth
To get all contacts I'm using ABAddressBookCopyArrayOfAllPeople method but, this method return all contacts
I want to get all the Calendars, which are in my GoogleAccount, using the
Is it possible to get all 7 days for a given date using linq

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.