> When this code goes live (put into production, or whatever) what will the
> current directory be that the code executes "from?" In other words, how
> will the code find this file in production?
>
> Once that is known then ideas for pointing to the file while debugging
> will probably be easier to suggest.
Current directory would be Environment.CurrentDirectory. The xml file would
be located relative to that directory. I have already listed two working
solutions for pointing to it both during debugging and runtime. But the
fact that MSFT doesn't handle this transparently is seems like terrible
design to me, and I was hoping that I was missing something. It doesn't do
this nonsense when it comes to Content in XNA games, it does the obvious
thing and copies over the relevant audio and image content files to the
appropriate bin folder so that a kludge is not necessary.
R
>> Well I found
>> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=65821&SiteID=1
[quoted text clipped - 39 lines]
>>>
>>> Reese
G.Doten - 01 Aug 2007 21:26 GMT
>> When this code goes live (put into production, or whatever) what will the
>> current directory be that the code executes "from?" In other words, how
[quoted text clipped - 57 lines]
>>>>
>>>> Reese
What I've seen done (and what I do) in this case is to have a post-build
event in Visual Studio that copies the file from wherever it lives
during development to the directory it needs to be in when the code runs
under the debugger.
Just FYI: If you have the test capabilities in VS, and if you create a
unit test for your code, then you can use the DeploymentItem attribute
(I think that's it name) on the test case's method and VS' test engine
will copy the file for you.

Signature
-glenn-
Reece - 01 Aug 2007 21:42 GMT
Thanks, Glenn. At this point I think I will just keep my kludge, unless as
my app grows it becomes a problem that would make it more of a hassle than
what you have offered here. But thanks for the ideas, which I will keep in
mind.
R
> What I've seen done (and what I do) in this case is to have a post-build
> event in Visual Studio that copies the file from wherever it lives during
[quoted text clipped - 5 lines]
> think that's it name) on the test case's method and VS' test engine will
> copy the file for you.