CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2009
    Posts
    27

    Would like to know what location do people normally use for deploying .XML files

    Currently I have used as part of my solution an XML file which I have created on my local machine using a location path which I hard coded in my program based on (i.e. I am copying as a hardcoded string) the location that Visual Studio automatically gave it (I added the XML file by right clicking the project name from VS and then selected add new item XML and VS automatically gave it a location)...

    This location path works nicely when reading the .XML file from my local machine where VS automatically chose the folder path from. The problem that I can see potentially would show itself once I deploy the app is that the deploy environment most probably wont have the same location path as my computer. I can imagine a good location for it but would really like to hear from people who actually have experience deploying XML files.

    I do not want to create the XML on the fly owing to certain complexities in the file. So where should I put it so that I am guaranteed to find it on deploy .. I am sure people with more experience know exactly where it should go .. thanks in advance for all the help it's much appreciated

  2. #2
    Join Date
    Apr 2009
    Posts
    27

    Cool Re: Would like to know what location do people normally use for deploying .XML files

    Maybe just as additional info we are using TFS as our code repository ... so that the hardcoding I've done is local and would like to be sure... that my code will still run when I check it in (I do not know currently what drive/folder structure is in the server) so I imagine I have to "softcode" the path somehow ... thanks again

  3. #3
    Join Date
    Apr 2009
    Posts
    27

    Re: Would like to know what location do people normally use for deploying .XML files

    Quote Originally Posted by matt_1ca View Post
    Maybe just as additional info we are using TFS as our code repository ... so that the hardcoding I've done is local and would like to be sure... that my code will still run when I check it in (I do not know currently what drive/folder structure is in the server) so I imagine I have to "softcode" the path somehow ... thanks again
    Continued the digging not sure if I have found the answer yet ... it could be something as simple as Environment.CurrentDirectory. Trying to do some tests .. please feel free to correct me anytime in case it appears I'm heading the wrong direction .. thanks

  4. #4
    Join Date
    Apr 2009
    Posts
    27

    Cool Re: Would like to know what location do people normally use for deploying .XML files

    I modified a bit and used Application.Startuppath instead ... and that should be it ... thanks ... please consider this case closed ...

Tags for this Thread

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

Featured