Results 1 to 5 of 5

Thread: ....txt file is not a member of resources

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2011
    Posts
    9

    ....txt file is not a member of resources

    Hi,
    I have the 'resources' folder in my project and it contains a text file called dictionary.txt, which i refer to in my code as
    Code:
    My.Resources.dictionary.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
    This works perfectly.

    I then added a second text file called definition.txt, but when i refer to
    Code:
    My.Resources.definition.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
    This gives me an error 'Definition is not a a member of 'Resources'

    Can anybody help, as i can not see a way to fix this.......
    Last edited by lynxbci2011; Aug 9th, 2011 at 04:09 PM. Reason: forgot title

  2. #2
    Lively Member
    Join Date
    Apr 2010
    Posts
    82

    Re: ....txt file is not a member of resources

    and you can see the file in solution explorer?

  3. #3
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: ....txt file is not a member of resources

    If when you type the following (note the dot) if there is a resource named definition it will show in the drop-down list and if not you have not added the file correctly i.e. Property Properties, Resources, add exiting or new file.

    Code:
    My.Resources.

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2011
    Posts
    9

    Re: ....txt file is not a member of resources

    Hi,

    I solved it by editing the RESX and adding the 2nd file manually to the list of resources. Both files were visible in the Resources section of the project, but it seems that the actual resources were located elsewhere. Bizzarre.

    Thanks

  5. #5
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: ....txt file is not a member of resources

    Quote Originally Posted by lynxbci2011 View Post
    Hi,

    I solved it by editing the RESX and adding the 2nd file manually to the list of resources. Both files were visible in the Resources section of the project, but it seems that the actual resources were located elsewhere. Bizzarre.

    Thanks
    If you added the file via the resource tab under resources then the resource you added will reside by default under the project folder Resources. Something is not right if you can see the resource via the drop-down list but got an error. Either way good to hear you have what you want now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width