How to Run C# code in VS code? - MY-NOTES

Saturday, April 2, 2022

How to Run C# code in VS code?

 How to Run C# code in VS code?



Steps:

1: Install vs code Link

2: Got to https://dotnet.microsoft.com/

3: Click on Download or direct go to this Link

-> https://download.visualstudio.microsoft.com/download/pr/1eb43f77-61af-40b0-8a5a-6165724dca60/f12aac6d4a907b4d54f5d41317aae0f7/dotnet-sdk-6.0.201-win-x64.exe


4: Download it and Install it by just simple default steps.

5: Go to vscode and Install 3 Extensions

 i)   C# by Microsoft

 ii)  C# Snippets by Jorge Serrano

 iii) C# Extension by JosKreativ


6: To create Project: dotnet new console

$ dotnet new console

Welcome to .NET 6.0!

---------------------

SDK Version: 6.0.201

Telemetry

---------

The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------

Installed an ASP.NET Core HTTPS development certificate.

To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).

Learn about HTTPS: https://aka.ms/dotnet-https

----------------

Write your first app: https://aka.ms/dotnet-hello-world

Find out what's new: https://aka.ms/dotnet-whats-new

Explore documentation: https://aka.ms/dotnet-docs

Report issues and find source on GitHub: https://github.com/dotnet/core

Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli


7: To execute: dotnet restore

$ dotnet restore

  Determining projects to restore...

  All projects are up-to-date for restore.

8: To run: dotnet run

$ dotnet run

Hello, World!

What is your name:

Aryan

---------------------

My name is : Aryan   

No comments:

Post a Comment