Visual Studio C# One project in multiple Solutions? [closed] - c#

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
The community reviewed whether to reopen this question 7 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am developing an N-tier application and want to create each tier separately (i mean not in one solution), so i have the DAL, BLL and Entities DLLs created separately, then i reference them in my presentation layer solution, anyway, for quick maintenance, i thought on creating a solution in which i add the projects DAL, BLL, Entities and the Presentation layer as existing projects, is it ok or it will have concequences ?

Every decision has consequences.
Splitting an application into multiple solutions has some positive and some negative. If you have dozens of projects, multiple solutions is a good way to reduce load and navigation time. However you may spend more time flipping between solutions or instances of Visual Studio.
You can also put the same projects in multiple solutions; solutions do not have to represent a physical folder necessarily. If you "add existing project" you can grab an existing project from another solution and have it in both solutions.
Generally, I avoid this because it can create issues with multiple instances of Visual Studio using the same files, but it can be helpful at times. Usually I only do it for debugging help when working on the boundaries between two related applications in different solutions, or an application and a library it consumes.

Related

Is it possible to have multiple git projects in one solution? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I have a relatively comprehensive solution that contains about 20 projects. One of the projects is "Utils", which I would like to have shared for other solutions. Unfortunately, if I added this project to another solution as a linked project, then this project didn't upload me to Git for this solution, so then teamwork is not possible. Therefore, I am looking for a solution to achieve that I can share the source codes of this project between the individual solutions. I use VS2019 and as a Git repository xxx.visualstudio.com. Thanks for the advice.
If doing a nuget package is not a solution for you because it add too much friction (even if you could also give access to the util repository), and that you want to be able to update the "Utils" source directly from the sln file, then the solution for you is to use Git submodules.
From the documentation:
It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other.
You will have to create a repository for the "Utils" code and include it in the other(s) repositories as submodules.
But Visual Studio still no support it...
It's not crippling because you could still use it from the command line or from an external git GUI that support it (like GitExtensions for example).

What is the difference between File and Project [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
In New File I can choose empty class but it does not close the project I am working on. As in the title, what is the difference between a file and a project?
One ore more files create a project and one ore more projects create a solution.
You are probably adding a new file to you're existing project.
Projects are "buildable" things (they have output) and are composed of files. Thus, adding a new file has no reason to "close" the project (whatever that means).
When you get far enough, Solutions are "groups" of projects. Adding a new project to a solution doesn't close anything either.
In any IDE, project is a logical collection of different types of files, such as programs, resources, configuration files etc. There are so many different formats for storing the project information on disk such as .xproj, .csproj etc.
A "solution" is a logical collection of projects. A solution can have just one project in that as well. Solution is stored on disk typically by .sln extension by visual studio. In a solution, programmer can specify the build order of the projects, build configurations etc.

Best way to create same file structures in visual studio [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Given a huge EF MVC solution where there are separate projects for data models, services (interfaces and their implementations) and repositories. It is necessary to create new files with given structures, e.g.: different using, namespaces, etc.
Example
New database table is created with the following names:
SomesSession
SomeQuestions
SomeAnswers
SomeScores
Four files under the Models project, four files under Services - Interfaces, four files Services (where implementing the interfaces), four files under Repositories.
Is there or what is the best way to make automatic this tedious task?
Maybe Visual studio macros?
Out-of-the-box Visual Studio templating to generate code on Entity Framework and many other frameworks is implemented using T4.
Check this MSDN article to learn more about how to implement these code generation templates from scratch:
Code Generation and T4 Text Templates

Web projects via Folders [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
If I have to develop large system using ASP.NET with multi modules. What is the best practice of designing it? Is it be divide the modules to folders in the same web project or divide them to separated web projects in the same solution?
In a project containing more than 500 aspx pages, we used a single web project, a data connection layer project, a dataaccess project and a business layer project.
The web project is divided into multiple folders also containing sub folders.
The result is a very fast running asp.net project. Also, opening the project in Visual Studio takes only a few seconds.
Project, Folders, Solution Folders and even Solutions (where necessary) can be used to divide large system into readable, easy to understand logical blocks.
Dividing it into folders is better as it would maintain the simplicity of your project.
less references is proportional to faster loading time.

Visual Studio - How to create a solution from existing solutions/projects including webservices and a web that uses those webservices? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How do I create the solution in Visual Studio 2008 from which I should be able to press F5 (debug) and get all webservices going aswell as start up Microsoft Internet Explorer with the frontpage of the websolution?
I need to create a solution in which I will add all existing projects for an existing application. The projects are at present located in several diffrent solutions, several for diffrent webservices and one for the main web application, which makes it hard to debug. I have tried to just create a new solution and add all existing projects, but it did not work - the webservices won't start automatically. If there is some configuration that needs to be done in order to get the webservices started, please explain that part too.
Sorry for not being able to include any example code.
If you want to add nothing but existing projects to a solution then you should use the Blank Solution template. You can then use the Add Existing Project option to add the projects to the solution.
As for running multiple projects when debugging, right-click the solution and select Set Startup Projects. You can then select multiple startup projects instead of just one.

Categories