Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - ResXResourceReader

Reply
 
Old 04-24-2008   #1 (permalink)
roryos


 
 

ResXResourceReader

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



My System SpecsSystem Spec
Old 04-24-2008   #2 (permalink)
Kevin S Gallagher


 
 

Re: ResXResourceReader

You need to specifiy a path i.e.

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


"roryos" <roryos@xxxxxx> wrote in message
news:B0097F26-8B7D-4EAF-B525-801E9B2648CB@xxxxxx
Quote:

>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
>
>

My System SpecsSystem Spec
Old 04-25-2008   #3 (permalink)
roryos


 
 

Re: ResXResourceReader



"Kevin S Gallagher" wrote:
Quote:

> You need to specifiy a path i.e.
>
> rsxr = New ResXResourceReader("C:\SomePath\menus.resx")
>
>
> "roryos" <roryos@xxxxxx> wrote in message
> news:B0097F26-8B7D-4EAF-B525-801E9B2648CB@xxxxxx
Quote:

> >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
> >
> >
**************************
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?
Quote:

>
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?
Quote:

>
>
My System SpecsSystem Spec
Reply

Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46