Designs of a C#Solution

Asked

Viewed 332 times

6

I have a question about projects and solutions in visual studio.

Suppose I have a solution that has three projects, being two Winforms projects (exe) and one of class libraries. It is correct that I have two "exe" projects in a solution that uses the same class library?

Supplemented:

The two "exe" projects are:

1 - It is an application to register customers and other things for storage of dead archive boxes.

2 - The second and the application where the user launches the boxes.

3 - It is the shared library.

I could join the two in an application, however the client wants so, separate.

Today as I need to test, I go and mark the application as "startup Project" and then build.

There is a technically better approach to this?

  • 2

    Normal. And if the client wants, difficult to convince him otherwise.

2 answers

6


It is correct that I have two "exe" projects in a solution that uses the same class library?

Yes, it’s super normal. In fact, I’ve participated in a project that had 5 executables and a few more web projects in the same solution.

There is still the option to make several solutions with just a few .csproj, I don’t think this is interesting for your case.

If you are interested in this, just create a blank solution and add the existing projects you want in this solution. It’s an approach I’ve seen a lot when the scope of the project changes dramatically. Like, for example, a solution containing everything for the main system and the project with the shared classes, another solution with everything for interface system management web, plus shared classes and other solution with projects mobile and more shared classes.

Today as I need to test, I go and mark the application as "startup Project" and then build. There is a technically better approach to this?

I don’t know if it’s technically better, but it’s still possible to run several projects at the same time. Going to the menu Debug > Start new instance

inserir a descrição da imagem aqui

  • Thanks for the help, I really was in doubt and afraid to be doing "gambiarra". Thanks.......

1

Today as I need to test, I go and mark the application as "Startup Project" and then build. There is an approach technically best for this?

You can start more than one project in your solution through Solution Properties > Common Properties > Startup Project > Multiple startup Projects

In the column Action you select the desired action for each project.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.