# How can I run C# code in Visual Studio Code?

**URL:** <https://forum.codewithmosh.com/t/how-can-i-run-c-code-in-visual-studio-code/1853>\
**Category:** C#\
**Created:** [January 11, 2021, 9:32pm UTC](https://forum.codewithmosh.com/t/how-can-i-run-c-code-in-visual-studio-code/1853 "2021-01-11T21:32:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ettolini](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@ettolini](https://forum.codewithmosh.com/u/ettolini)\
**Post date:** [January 11, 2021, 9:32pm UTC](https://forum.codewithmosh.com/t/how-can-i-run-c-code-in-visual-studio-code/1853/1 "2021-01-11T21:32:04Z")

</div>

I’m currently starting Mosh’s C#'s first course, but I won’t be coding with Visual Studio Community, as he says us to. That’s because the software it installs in my computer really slows it down.

Anyway, I was wondering what do I need to set or install to get started.

---

<div class="post-metadata">

**Author:** ![Nabaz](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@Nabaz](https://forum.codewithmosh.com/u/Nabaz)\
**Post date:** [January 13, 2021, 2:00pm UTC](https://forum.codewithmosh.com/t/how-can-i-run-c-code-in-visual-studio-code/1853/2 "2021-01-13T14:00:37Z")

</div>

Hey,

Install Visual Studio Code which is lightweight and free, add C# extension. Use the terminal in VS code to create the project you want (type **dotnet new -l** ) to list all the templates you can create project from. Then run the project by typing **dotnet run** or **dotnet watch run**

---

<div class="post-metadata">

**Author:** ![wlaboy](https://avatars.discourse-cdn.com/v4/letter/w/f1d935/32.png) [@wlaboy](https://forum.codewithmosh.com/u/wlaboy)\
**Post date:** [January 15, 2021, 6:45pm UTC](https://forum.codewithmosh.com/t/how-can-i-run-c-code-in-visual-studio-code/1853/3 "2021-01-15T18:45:17Z")

</div>

You would also need to install the .NET SDK from Microsoft’s website.
