Multiple solutions...how?


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I've reached the point where I need to have multiple solutions for my application. However, a couple of issues came up.



- How do you create a solution and not create a folder for the solution? Is there any problem with just moving it after you create it?



- Once I had my blank solution, I added an existing project. All the reference to the other projects were then broken in that project. Next I tried copying my main solution and then removing the projects I didn't want. This removed the references to those projects. I assume that I'd then add references to the DLL for each missing project. So, two questions: first, how were are these references stored? If I mess with the references in my new solution, won't it break the references in my existing solution? Second, if I have to add references to the DLLs, were should I pull from? I'm guessing bin\debug, but is this the best place?



Thanks!
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
References to a project are stored within the .vbproj (.csproj) file, not the .sln file.  The solution is just a grouping of projects that you want to work on at the same time.  So, when you add a reference from one project to another and the referencing project belongs to more than one solution, it's going to expect that the referenced project belong to the solution no matter what solution it's in.  So, if projA -> projB (-> means references) and projA belongs to SlnA and SlnB, then projB will need to belong to both solutions. 

Now, what I said pertains to referencing the projects, not referencing the DLLs.  If you reference the DLL, it doesn't matter what solution the referenced project belongs to.  Now, when you reference DLLs, you'll have a few issues (especially if you have the assemblies stored in the GAC).  First off, when you debug a solution, it locks open the .pdb files for the references, so you'll need to close the referencing solution before you try to modify and build the referenced solution.  Secondly, if you change the referenced solution, you have to rebuild it before the changes will be visible in the referencing solution; so none of the adding a new method to projA and having it immediatly visible in projB without rebuilding A first.

Hopefully that answers your questions.

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Oh, and you can certainly move a solution once it's created.  We have about 20 projects in our medical software; each project is in its own folder; the root folder that contains the project folders also contains about 5 or so solution files; each solution contains a subset of those 20 project files. 

The solution file also stores off the relative path to its projects, so when you move solution, you'll need to move the projects with it.  However, if you want to change the path of a project within the solution, simply remove it (it won't delete the project, just remove it from the solution), move the project to the desired location, and re-add it to the solution.

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Thanks Ben. That really helps.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search