Sign in to follow this  

Moving VS project/solution

This topic is 2847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I have two problems/questions: a) I have a .rar file from another person who archived his VS solution. I open it with major errors and missing reference. The problem is further complicated as it is truly huge with several projects in there. Is there any way to make the solution/ project work as whole without knowing where it previously was(without having same path) b) Whats the best way to move your whole solution ( including several projects ). ... Is there a way to somehow tell VS to use relative paths as with compiling it appears some files are referenced with absolute path. This is all C#. Thank you kindly

Share this post


Link to post
Share on other sites
It's due to a poorly designed project. Your friend hardcoded everything with relative paths into his project instead of using environment variables and Visual Studio pre-defined macro variables.

For example, let's say your program needs to reference DirectX. Did he manually put in C:\Program Files\whatever, or did he put in $(DXSDK_DIR)Include, etc? If it was the second it would work on your computer with no problems.

As for being able to find other projects, the typical approach is to put the .sln file in one folder and then all the projects go either in that folder or folders under it. Then when you reference them they will automatically be referenced with relative paths. If you just decided to add some project from an arbitrary location on your hard drive, however, yea it would get absolute paths.

Lastly, it's possible he had configured his global Visual C++ directories in Tools -> Options -> Visual C++ Directories, or whatever the exact location is of that option, instead of putting the settings directly into each project. That will cause you problems as well.


tl;dr - Don't use global settings, and make use of Visual Studio's macro variables whenever possible and this will be less of an issue in the future.

Share this post


Link to post
Share on other sites

This topic is 2847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this