USER_NAME
USER_NAME

Reputation: 1037

effect of adding a existing project to solution

I have two solutions. Let say Sol1 and Sol2.
Now I want to add a project of Sol1 to Sol2. Sol2 is not modifying that project.
So is thr any harm in doing this. Can this effect Sol1 in any way?

Upvotes: 1

Views: 209

Answers (3)

shanky
shanky

Reputation: 396

Oh...it's the common mistake which is done by most of the developers.It affects adversely to your solution1 and solution2 both.

Since the project refers to the same physical location, if you are adding using existing project option, so whenever it changes it'will prompt source changed message in other solution.

So, always make replica of your project to some other physical location and than add using existing project option, it will make your life cool.

Upvotes: 1

D J
D J

Reputation: 7028

[Build break] As Sol2 is using the project from Sol1 and might be referring its classes. On later stage if someone has changed the code of project from sol1 the sol2 will not build anymore..

Upvotes: 1

Shyju
Shyju

Reputation: 218732

If you are doing that by selecting "Add existing project" and select the project from first solution, the source code base (of that project) would be same for both the solutions. So changes in one project will definitly affect the other one.

If you do not want to affect the other project. Take a copy of that project and use that for adding in a different solution.

Upvotes: 2

Related Questions