-2

I don't know if there's a way to achieve this, but I have a solution with its references on a single form page (made with ext.net, by the way) and wanted to use it as a reference to another project.

Is this possible?

Edit: I think it was a poor question afterall. I have a solution with 3 different projects (web, entity and bals) and it's all good there. They all work together for a single form page. Now, I want all of that stuff to be inside another project, which is inside another solution, and call that page with its references from this other solution I'm trying to get it in.

Vic Wolk
  • 166
  • 1
  • 14
  • You probably mean a **project** and not a **solution**? If so, just add the already existing project by clicking "File" > "Add" > "Existing Project" (in the menu bar). – Styxxy Apr 14 '14 at 23:14
  • No, I didn't. It's just poorly asked. I'll edit. – Vic Wolk Apr 14 '14 at 23:34

2 Answers2

1

To call an object (or a form) from your original solution in your new solution, you need to add references to Web, Entity and Bals.

There's 2 way to add a reference. You can add a reference to the compiled DLL / EXE or, if you have the source project, you can include the project in your solution (File -> Add -> Add Existing Project) and then add reference to that project.

If I understand your question, you would like to link an entire Solution instead of each projects individually. This can be done by changing the Add Existing Project filter from All Projects Files to Solution Files. This will allow you to import every project from the given .sln file.

However, this is a one shot deal operation that will import the projects at a given time. If you add or remove a project from your original solution after you linked them, you will have to do the same in your new solution.

The_Black_Smurf
  • 5,178
  • 14
  • 52
  • 78
  • Thanks, I get it now. What I was trying to do is not that simple and, in my case, won't be possible to achieve for several other reasons, but I'll give this the correct answer status, cause it's helpful now. – Vic Wolk Apr 16 '14 at 18:12
0

When adding a reference to a project, you can select another project within the same solution or you can select a compiled DLL. If you have a library project in one solution and an application project in another solution then your only choice is to build the library project and then reference the compiled DLL in the application solution.

That said, there's nothing to stop you adding the same project to multiple solutions. You can add the library project to the same solution as the application project without removing it from its current solution and then you can work on it at the same time as the application, including debugging both at the same time. The application project can then reference the library project instead of the compiled DLL.

jmcilhinney
  • 50,448
  • 5
  • 26
  • 46
  • I think it was a poor question afterall. I have a solution with 3 different projects (web, entity and bals) and it's all good there. Now, I want that all to be inside another project, which is inside another solution. Is it clear now? I think it's pretty confusing, to be honest, but I hope I'm making it a little bit more reachable. – Vic Wolk Apr 14 '14 at 23:34
  • 2
    There's no such thing as a project inside another project or a solution inside a project. A solution contains projects and those projects can reference other projects in the same solution. That's it, that's all. – jmcilhinney Apr 14 '14 at 23:46
  • @jmcilhinney exactly. A solution is just a flat list of projects, though the Project Dependencies will control the order of building them. It is quite possible to have unrelated projects in a single solution, or to have the same project in multiple solutions. The professional VS products allow you to Unload Project for even finer control (I don't think the Express editions allow that), but as you say nowhere is there the option to have anything hierarchical per se. – ClickRick Apr 15 '14 at 00:05