Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

WorkingDirectory in .gitignore? 29 Jun 2022 14:31 #22923

  • ic2
  • ic2's Avatar
  • Topic Author


  • Posts: 1553
  • Frank and I use a different working directory. Every time I pull his changes, I have to change in project properties, Debug, Working Directory.

    That also means that a next pull will fail because this single change leads to a dozen or so "uncommitted changes" which I have to stash every time to enable me to pull Frank's changes. With the risk that if I change something which wasn't committed that I lose it for Frank to use. Or the risk that I commit all and Frank has to change his working directory.

    We know that in the .xsproj <DebuggerWorkingDirectory> is where the directory is stored. However, if we add the project file in .gitignore, important changes like references are not exchanged either.

    Is there a solution for this (apart from using the same working directory which has other disadvantages)?

    Dick

    Please Log in or Create an account to join the conversation.

    WorkingDirectory in .gitignore? 29 Jun 2022 14:39 #22924

    • robert
    • robert's Avatar


  • Posts: 3178
  • Dick,
    The workingdirectory properties also supports macros such as $(Solutiondir) and also $(EnvironmentVariable)
    Can you use one of these ?
    I see that newer versions of the C# project system store the debugger options in a separate file, separated from the project file. I'll see if we can do that too.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    Last edit: by robert.

    WorkingDirectory in .gitignore? 30 Jun 2022 13:07 #22926

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1553
  • Hello Robert,

    Adding $(MyWorkDir) after creating that environmental variable works, thanks!

    Remarkable is that it doesn't show up in the list of $ options when you press the ... key in Project/Debug, also not after a VS restart. But it works and that's what counts. So separating the debugger settings might be a good idea but for me it won't have high priority.

    Dick

    Please Log in or Create an account to join the conversation.

    WorkingDirectory in .gitignore? 30 Jun 2022 13:24 #22927

    • robert
    • robert's Avatar


  • Posts: 3178
  • Dick,
    We could include all environment variables there, but there is no guarantee that on another machine the environment variable exists. That is why we did not do that.
    The fact that this works is "magic" inside MsBuild

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1