ResXResourceReader

R

roryos

I am tryng to read a resource file using the following code and I am getting
an error stating that it can't find it in the C:\Windows\System32 directory.
I do not want to place it in that directory as I have it included in my
project as an embedded resource in a specific directory. I receive the error
as soon as it tries to perform the GetEnumerator.

Any ideas?

Here is a snippet of the code:

Private en As IDictionaryEnumerator
Private rsxr As System.Resources.ResXResourceReader

rsxr = New ResXResourceReader("menus.resx")
en = rsxr.GetEnumerator
 
K

Kevin S Gallagher

You need to specifiy a path i.e.

rsxr = New ResXResourceReader("C:\SomePath\menus.resx")
 
R

roryos

Kevin S Gallagher said:
You need to specifiy a path i.e.

rsxr = New ResXResourceReader("C:\SomePath\menus.resx")

**************************
I just noticed that as I try and deploy this approach with the path hard
coded I am running into problems as we do not want all of the users to have
to have this resx file on their local machine. I added it to my project as
an embedded resource but it does not appear to be working that way.

I was under the impression that if it is an embedded resource that once the
code is compiled I should not need to have the resx stored on the user's
machine.

Is this not correct?However, as soon as I don't fully qualify the path of the file, and only use
the file name, I get an error stating that it cannot find the file in the
c:\windows\system32 directory.

Any ideas on what I should different to get around this pathing issue?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top