0

I have enrolled in a course for C# Basics. Most of the course are exercises which are just console apps. However, I want to add them to my GitHub profile. Unfortunately, as already stated, I'm new to C# and Visual Studio and I don't know much. I have learned to create a blank solution and add console app projects for each of the exercises. Each console app has a folder in the solution, which name is usually the exercise name: ex.DepositCalculator. In the folder (DepositCalculator) there are two folders – bin and obj, as well as DepositCalculator.csproj file and Program.cs which appears to be the source code. I have no idea about the .csproj, or bin or obj folders, and this is why I don't know what to upload to GitHub. Do I upload only the .cs file, or I need to .csproj, bin and obj, or should I upload the .sln (which appears to be the solution)?

My whole folder contents with the .sln file:

enter image description here

DepositCalculator folder contents:

enter image description here

Azzarox
  • 27
  • 5
  • Does this answer your question? [What .net files should be excluded from source control?](https://stackoverflow.com/questions/992532/what-net-files-should-be-excluded-from-source-control) – gunr2171 Nov 22 '22 at 21:12
  • Also https://stackoverflow.com/questions/43280351/what-files-for-a-c-sharp-program-created-by-visual-studio-2015-are-worth-to-be-c – gunr2171 Nov 22 '22 at 21:14
  • 3
    https://github.com/github/gitignore/blob/main/VisualStudio.gitignore may help as a place to start. – Retired Ninja Nov 22 '22 at 21:15
  • So, from what I've read I need the .cs, .csproj and .sln files. – Azzarox Nov 22 '22 at 21:24
  • @Azzarox, just add a `.gitignore` file to your repository like Retired Ninja recommended. GitHub even helps you with that. You can also check this question: https://stackoverflow.com/questions/2143956/gitignore-for-visual-studio-projects-and-solutions – Julian Nov 22 '22 at 22:22

0 Answers0