Reputation: 1
I have a repo with code written in C# and I want to understand how we proceed with building the .dlls and finally reach to the final working application.
What I want to understand is which is the process/ logic we follow to build the final application. For example the repository has too many solutions inside the repository, how can I distinguish which is the first I need to build and do I have to follow a specific order?
Please let me know if you have any suggestions or tutorials, as I am new to this and I am trying to learn.
Thank you in advance.
Upvotes: 0
Views: 1383
Reputation:
The answers above are already detailed.
C# Forms Project:
Creating Windows Forms Applications in Visual Studio Using C#.
First, you will create a C# application project. The project type provides all the template files needed before adding anything.
Open Visual Studio 2022.
In the Start window, select Create New Project.
Create an application
After you select the C# project template and name the file, Visual Studio opens a form for you. Forms are the Windows user interface. We'll create a "Hello World" application by adding controls to the form, and then run the application.
Add a button to the form
Select the Dock icon to dock the Toolbox window.
Select the button control and drag it onto the form.
Add the code to the form
In the Form1.cs [Design] window, double-click the "Click this button" to open the Form1.cs window. (Alternatively, you can expand Form1.cs in Solution Explorer and select Form1.)
In the Form1.cs window, write the code: MessageBox.Show("Hello World"); as shown in the following picture:
Run the application: Select the Start button to run the application.
Close the Form1 dialog to stop the application from running.
Upvotes: 0
Reputation: 162
This is far too broad of a question to provide any kind of decent answer.
There's a plethora of tutorials and guides on the internet for how to start out in c# and VS 2022.
https://visualstudio.microsoft.com/vs/getting-started/
As a small attempt to point you in the right direction...
I'm not really sure what "too many projects" means. If you downloaded a repo it's possible that they're all needed. They likely reference each other in order to have all of the code it needs to compile and run. For example, you could have a DAL layer (data access layer), Business Layer, and a UI layer. You could even have multiple UI layers, or separate projects that consume various parts of the project for various reasons. That is, you could have a project that contains a bunch of timers that monitor changes in your application and they're deployed separately from the rest of the app, etc. There's really no telling what's going on without seeing the project or repo you downloaded.
What happens when you build the project? Does it compile? If not, does it use nuget packages that aren't being restored? Maybe that needs to be enabled.
If it does build, and you want to run it, then you need to figure out which project is the "UI" project and set that as the starting project.
Again, this is a very broad question, and you'd be best served by reading a few tutorials and then coming back with specific questions.
Upvotes: 3