Results 1 to 4 of 4

Thread: Access to the file in the same directory

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Access to the file in the same directory

    Correction to my previous post.

    I have created a windows application.
    There are forms inside the windows form application project. There is a class library project too.

    The .sln is in the following path:
    C:\Work\Developments\SQLchecks\SQLchecks

    The windows forms are inside the windows application project as below:
    C:\Work\Developments\SQLchecks\SQLchecks\SQLchecks

    There is a class library project called DataAccess which has classes and an xml file called Settings.xml :
    C:\Work\Developments\SQLchecks\SQLchecks\DataAccess

    Question:
    from within a class inside the DataAccess project which is a class library project, how do I refer to the Settings.xml file which is also in the same directory?

    Thanks

  2. #2

  3. #3
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Access to the file in the same directory

    When the project is compiled, it moves all relevant files to a directory under bin\
    and builds the .exe there. Settings.xml may not be getting moved over or may be getting compiled into your executable as content. Click on the file and check it's settings. Be sure "Copy of newer" is enabled, and it should copy it along with everything else to the output directory. You can access it there.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Re: Access to the file in the same directory

    Yes, Apologiese.
    I will modify my other post.
    Sorry

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