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

  • Home
  • SEARCH
  • 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 7494913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:51:01+00:00 2026-05-29T17:51:01+00:00

Is there a way to directly access a string in a .resx? I have

  • 0

Is there a way to directly access a string in a .resx?

I have several different projects, and the .resx was created using a SharpDevelop template “Misc>>Empty resource file.”

I’ve tried most of the methods online, such as:

... = new ResourceManager ("ProjectEtc.resxFileName", 
           Assembly.GetExecutingAssembly)

but I receive the same error:

Could not find any resources appropriate for the specified culture or 
neutral culture. Make sure "ProjectEtc.resxFileName.resources" was 
correctly embedded or linked into assembly "Project calling" at compile time...

no matter what I seem to do.

It would appear that I need to convert my .resx too a .resource file, which I would rather not do.

Am I missing out on some steps by using a #develop template?

Wait a second… is this even the best way to store constant strings in .NET?

Thanks,
Dane

  • 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-29T17:51:11+00:00Added an answer on May 29, 2026 at 5:51 pm

    Check the .resx file has its Build action set to EmbeddedResource. SharpDevelop should do that by default when you create a new file using the Empty resource file template but it is worth checking.

    Now you need to pass the root namespace of your project and the resx file name without the file extension to the ResourceManager constructor.

    So if you create a new project in SharpDevelop called TestResource my root namespace will be TestResource. Then if you add a resource file called Foo.resx to your project. Then add a string named “MyString” then you can access the corresponding string value with the following code:

    Dim resourceManager As New ResourceManager("TestResource.Foo", Assembly.GetExecutingAssembly)
    Dim result = resourceManager.GetString("MyString")
    

    When you compile your application the .resx file will be compiled into a .resources file and embedded into your project. If you use a tool such as ILSpy you can see this embedded resource and what it is called.

    Using .resx files is typically the way you do multilingual applications in .NET so using them to store strings is OK.

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

Sidebar

Related Questions

Is there any way to have a Windows batch file directly input SQL statements
I have the understanding that using data access routines directly from presentation code is
Is there any way to directly access the stemmer used in the FORMSOF() option
Is there any way (maybe directly editing resource files) to configure a Tab Control
Is there a way to directly read a binary file into RAM? What I
Is there a way to directly write result returned from TSQL / stored procedure
The title is self explanatory. Is there a way of directly doing such kind
Is there a way to use records directly in erl? No matter what I
Is there a way to complie code directly into Native Code instead of MSIL
Is there a way to attach metadata directly to a grouping element () in

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.