none
How do I specify multiple search paths for each project file?

    Question

  • I have a problem where our code base is currently split into two repositories. One repository contains the entire source for v1 of our software and the second repository contains any changes for v2. In order to build a project for v2 I have to modify the project to look for some files in the v2 directory and some files in the v1 directory. This is obviously not ideal and is hopefully only temporary but is something I need to deal with for now. 

    To get to the question, what I would like to do is have each project first look in the v2 path for it's source files and if they are not found look in the v1 path. This is similar to how I can specify multiple paths for each of the "VC++ Directories" properties but I have not been able to find an equivalent setting for the project files. Does anyone know if something like this is possible? We have multiple C++, C#, and VB.NET projects all in Visual Studio 2013 that I would like to find a solution for.

    Wednesday, June 08, 2016 2:03 PM

Answers

  • Hi sfitzp2,

    In my opinion, Visual Studio doesn't have such feature about compare files in different paths.

    If you want to compare the different path files, I suggest you use some tools to compare the files and merge them. For example WinMerge, Odd, Windiff tool and so on. I prefer the Windiff which is provided by Microsoft, please refer to the document about how to use it.

    https://support.microsoft.com/en-us/kb/159214

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    It's not really about comparing files but I guess to close this out and to answer this for anyone else looking for something similar:

    What I have learned from this is Visual Studio does not support the ability to specify multiple search paths for its project files. I know this is probably not a common scenario but it still would be nice if this feature existed as it would have saved our team a lot of time. 

    We are attempting to accelerate our migration away form SourceSafe to one central repository to avoid this problem all together. Now to see if we can do it in a way that frustrates as few developers as possible :).


    • Marked as answer by sfitzp2 Tuesday, June 14, 2016 11:02 AM
    • Edited by sfitzp2 Tuesday, June 14, 2016 11:24 AM
    Tuesday, June 14, 2016 11:02 AM

All replies

  • Why don't you create a small app to do the checking and copying for you?

    It can check the directory and do copy whatever needs copying into the V2.1 folder, or subsequent versions.

    Since your process has multiple sources to check and combine it would make sense to create the utility to solve your own process problems...

    Wednesday, June 08, 2016 7:35 PM
  • My original plan was to do something similar which avoids the problem all together. Unfortunately, it ended up not being a good solution for everyone on our team.

    A little more background on the problem:

    V1 of our software is hosted in SourceSafe while the V2 changes are hosted in Git. We haven't yet made the commitment to go all in with Git so we are in this weird transitional state for the time being. I'd also like to avoid two complete sets of source to maintain. The entire V1 source is huge while the V2 changes are small. The V1 source is also not static as there is a V1.1 release being developed concurrently with V2 at the moment. 

    Most people on the team prefer to keep the V2 source separate from the V1 source. When the V2 source is in same directory as the V1 source (and vice/versa) some source accidentally gets checked into the wrong place.

    If I had a way to have the projects in the V2 source search for project files in the V2 source first and then the V1 source if they aren't found I could create a solution that would work in this current transitional state but would not require many changes when we make the full transition to V2. This would also help down the road when we start working on V3 and beyond.

    Wednesday, June 08, 2016 8:19 PM
  • Hi sfitzp2,

    As far as I know, there doesn't have such settings for project files.

    In my previous experience, we will mange our project with source control. For example, the first version of our software is version 1.0. After this version is released, we will backup this version of code first. And then create a branch for this project source code and which used to develop the functions in version 2.0. At the same time, the original source code used to modify bugs and used to release for the version of 1.*.*.

    Then after the version 2 develop complete, we will merge the version 2 code to the version 1, which can make sure there are only one main source code used to publish.

    So I suggest you use source control to manage your project, which is more easy and clear for different version of the projects.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 09, 2016 6:21 AM
    Moderator
  • It seems that you are trying to reinvent a separate version tracking method.

    Maybe you should reconsider how the developpers check-out and submit code to that project before reengineering around a problem.

    Thursday, June 09, 2016 10:40 AM
  • Hi sfitzp2,

    As far as I know, there doesn't have such settings for project files.

    In my previous experience, we will mange our project with source control. For example, the first version of our software is version 1.0. After this version is released, we will backup this version of code first. And then create a branch for this project source code and which used to develop the functions in version 2.0. At the same time, the original source code used to modify bugs and used to release for the version of 1.*.*.

    Then after the version 2 develop complete, we will merge the version 2 code to the version 1, which can make sure there are only one main source code used to publish.

    So I suggest you use source control to manage your project, which is more easy and clear for different version of the projects.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    This is certainly the route we may end up taking. It seemed to me that being able to configure a Visual Studio project to look for source V2 location first and V1 location second would have provided an easy solution until we fully commit to one source control system or another.
    Thursday, June 09, 2016 10:56 AM
  • It seems that you are trying to reinvent a separate version tracking method.

    Maybe you should reconsider how the developpers check-out and submit code to that project before reengineering around a problem.

    I am not trying to reinvent anything.  I'm just trying to find an easy solution until we fully commit on what source control system we use for V2 and beyond.

    Getting every developer to follow one pattern for checking out and committing code is also a bit like herding cats :).

    Thursday, June 09, 2016 11:00 AM
  • Hi sfitzp2,

    In my opinion, Visual Studio doesn't have such feature about compare files in different paths.

    If you want to compare the different path files, I suggest you use some tools to compare the files and merge them. For example WinMerge, Odd, Windiff tool and so on. I prefer the Windiff which is provided by Microsoft, please refer to the document about how to use it.

    https://support.microsoft.com/en-us/kb/159214

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, June 10, 2016 9:14 AM
    Moderator
  • Hi sfitzp2,

    In my opinion, Visual Studio doesn't have such feature about compare files in different paths.

    If you want to compare the different path files, I suggest you use some tools to compare the files and merge them. For example WinMerge, Odd, Windiff tool and so on. I prefer the Windiff which is provided by Microsoft, please refer to the document about how to use it.

    https://support.microsoft.com/en-us/kb/159214

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    It's not really about comparing files but I guess to close this out and to answer this for anyone else looking for something similar:

    What I have learned from this is Visual Studio does not support the ability to specify multiple search paths for its project files. I know this is probably not a common scenario but it still would be nice if this feature existed as it would have saved our team a lot of time. 

    We are attempting to accelerate our migration away form SourceSafe to one central repository to avoid this problem all together. Now to see if we can do it in a way that frustrates as few developers as possible :).


    • Marked as answer by sfitzp2 Tuesday, June 14, 2016 11:02 AM
    • Edited by sfitzp2 Tuesday, June 14, 2016 11:24 AM
    Tuesday, June 14, 2016 11:02 AM