Jump to content

C# - Visual Studio Code (IDE)

Hi P

I'm trying to get started on C# since I will have a class on it, I just wanted to get started on the basics, the problem is I had a hard time running the code but upon doing a bit of google search I came a cross a little tutorial, so I did the following that worked:

 

(on the visual studio code terminal)

  1. dotnet new console
  2. dotnet code .
  3. dotnet build
  4. dotnet run

 

Two problems:

 

1.- Whenever I want to update and run the code I have to repeat every single time "dotnet build" followed by "dotnet run", is this normal? any quicker way?

 

2.- If a path (folder) contains multiple .cs files, the dotnet build takes them all, so if a single .cs file has a problem I can't compile, therefore I've been separating them, a .cs file per folder, which I am sure shouldn't be the case...

  1. What am I doing wrong?
  2. How do I compile a single .cs file besides all of them?

 

Thank you very much

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×