How can I compile and run c program without using visual studio

0 votes
I'm a complete novice when it comes to C#. I just used Visual Studio to run a C# 'Hello World' programme.

Is it possible to run or compile a C# programme without Visual Studio?

If that's the case, which compiler should I use?
Jun 8, 2022 in C# by pranav
• 2,590 points
569 views

1 answer to this question.

0 votes

If you have.NET Framework v4 installed, then

C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe somefile.cs

or

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe nomefile.sln

or

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe nomefile.csproj

If you have.NET installed, it is likely, the FrameworkDir variable is almost certainly set, so:

%FrameworkDir%\v4.0.30319\csc.exe ...

%FrameworkDir%\v4.0.30319\msbuild.exe ...
answered Jun 9, 2022 by rajiv
• 1,620 points

Related Questions In C#

0 votes
1 answer

How to quickly code and run small C# code

I personally use this LINQPad for this. ...READ MORE

answered Jun 23, 2022 in C# by krishna
• 2,820 points
162 views
0 votes
1 answer

Which version of C# am I using

From developer cmd, type this csc -langversion:? This will ...READ MORE

answered Jun 7, 2022 in C# by pranav
• 2,590 points
201 views
0 votes
1 answer

Why should I avoid using Properties in C#?

Jeff dislikes properties because they resemble fields, ...READ MORE

answered Jun 7, 2022 in C# by rajiv
• 1,620 points
313 views
0 votes
1 answer

How do I turn a C# object into a JSON string in .NET

Newtonsoft.json can be used to accomplish this. ...READ MORE

answered Jun 13, 2022 in C# by krishna
• 2,820 points
262 views
0 votes
1 answer

How to install C#

Hi @Akanksha, C# is a programming language ...READ MORE

answered Feb 28, 2019 in Others by Pratibha
• 3,690 points
475 views
0 votes
1 answer

How to run C# code on Ubuntu

Hey @Abha, you can create and run ...READ MORE

answered Mar 1, 2019 in Others by Anvi
• 14,170 points
5,716 views
+1 vote
2 answers

RPA C# - Process developments in C #

Hey Conell, you can use Visual Studio's ...READ MORE

answered May 24, 2019 in RPA by Abha
• 28,140 points
1,527 views
0 votes
1 answer
0 votes
1 answer

Why program working differently on every run when using async?

You can use the async Main method ...READ MORE

answered May 30, 2022 in C# by rajiv
• 1,620 points
193 views
0 votes
1 answer

Is a Library a project or a C# source code file in Visual Studio?

A library project is a collection of ...READ MORE

answered Jun 7, 2022 in C# by rajiv
• 1,620 points
168 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP