So, I was wondering how to compile C#. I have Windows 7 Enterprise. Is there a built-in program or do I have do download one?
If I have to download one, what do you recommend?
I have Googled this, and it told me about "csc.exe" but I can't find this.
For any real development, an IDE is preferable. Microsoft offers the Visual Studio Express edition for free, which has everything you need to get started with C#.
However, you can compile using just the command line compiler (csc.exe), which is included with the framework.
It should be located in the .NET installation dir; for instance on my machine for .NET 4, 64 bit version, I have a csc.exe in:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
Your choices are:
csc.exe (the command line compiler), which is in c:\Windows\Microsoft.Net\Framework\v4.0.30319\
Install Visual Studio Express, the free edition of VS, for Windows/Console Applications, Web Applications, or Windows Phone Applications
Purchase a license for Visual Studio 2010 or get an MSDN subscription
Use the command line compiler csc
C:\>csc file.cs
You can use Visual Studio Community edition which is a full featured free IDE from Microsoft that will compile C#.
Since you're starting fresh, why not use an IDE that does it for you?
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express
You can find the command-line compiler, csc.exe, in \Windows\Microsoft.Net\Framework\vX.Y.
However, you will probably want to use Visual Studio, Microsoft's world-class IDE.
You can download the free version.
For literally compiling C#: Native Image Generator
Otherwise get Visual Studio.
Using Visual Studio will be the easiest way. There are free editions available - see http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express for details.
You need Visual Studio to compile it once you have it installed. Once you have it installed you can go to Visual Studio Command Prompt and Use C# compiler csc.exe to compile it.
Look here for more information Command-Line Building
You need to have the framework installed (2.0, minimum). Then follow this old article for a simple how-to:
http://msdn.microsoft.com/en-us/library/ms379563(v=vs.80).aspx
NOTE: Microsoft IDEs like VS can do this for you also.
Not sure if you can do this by default with Windows 7 Enterprise. At very least you are likely going need visual studio.
You can get Visual C# here for free: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express
I would advice Visual Studio, the express edition is for free, you can find more information on the microsoft site over here.
I started using SharpDevelop as a portable text editor that understood ASPX files out-of-the-box (vs. Sublime, etc.), but I've build a couple of small (<10K lines) utilities using just that and CSC now. A portable copy of SharpDevelop is especially handy when you don't have the administrative permissions (or time) to install full Microsoft Visual Studio in an environment.
Download the "XCopyable" edition to get the portable edition of SharpDevelop from here:
http://www.icsharpcode.net/OpenSource/SD/Download/Default.aspx#SharpDevelop5x
Also consider the option of using Mono & MonoDevelop available for Mac, Linux and Windows. Not a bad choice for a serious beginner.
Related
I have developed a windows application (one type of CRM System) but now I want to create its setup file so it can be easily installed on client's machine. I have searched online and found out the way using InstallShield. But it is giving the free trial and then it is offering the paid version. Is there any other way to create Setup file without using InstallShield?
You can use the extension Visual Studio Installer Projects Extension: VSI_Bundle.
See the The Visual Studio Blog
It worked good for me.
See my answer in this post: https://stackoverflow.com/a/28029063/200824
You can use visual studio 2015 and install installer projects extension.
You should also take a look at https://wixtoolset.org. A lot of new, helpful elements (grammar is XML) were added to simplify development. So while it's not drag-and-drop design, it's fairly easy to use and 3.x builds MSIs that are still the mainstay on Windows. 4.x pre-releases can also build other formats such as AppX (though, that is only supported on Windows 10 to install).
After reading through a few tutorials and other questions I've had no luck in getting anything called csc.exe on my computer. I tried installing MonoDevelop, Mono, the .NET SDK, none of which installed csc.exe. Where is it? Do I need Visual C# 2008 Express or something?
It is in C:\windows\Microsoft.NET\Framework\v4.0.30319\csc.exe.
Of course, the path will be different for different framework versions.
Microsoft's C# compiler's acronym. It should get installed whenever a CLI-supporting development tool is installed, such as Visual Studio.
I need to setup a c# ide (free) on his laptop, do I need to download the sdk or does windows 7 come with a c# compiler? (it's been a while setting something up from scratch)
You can try Visual C# 2010 Express, it's a free version of Visual Studio for C# development, and IMHO more than enough for someone learning that you don't really need the full VS2010 package.
Download Visual C# 2010 Express edition. It's free, you can find further information here: http://www.microsoft.com/express/Windows/
Just use Microsoft Visual Studio Express.
http://www.microsoft.com/express/
The Microsoft Web Platform Installer can be used to install Visual Studio Express, and also easily install many of the other MS tools like WebMatrix.
The Microsoft Web Platform Installer
3.0 (Web PI) is a free tool that makes getting the latest components of the
Microsoft Web Platform, including
Internet Information Services (IIS),
SQL Server Express, .NET Framework and
Visual Web Developer easy.
Similarly Linqpad is a great tool for playing around and dynamic prototyping. I can't advocate it enough.
... LINQPad is more than just a LINQ
tool: it's an ergonomic C#/VB
scratchpad that instantly executes any
C#/VB expression, statement block or
program with rich output formatting –
the ultimate in dynamic development.
Put an end to those hundreds of Visual
Studio Console projects cluttering
your source folder!
Look for the free version of Visual Studio 2008. Not sure if there is one for 2010. It's at the Microsoft site. http://www.microsoft.com/express/downloads/#2008-Visual-CS
Framework is sufficient, IIRC.
I am looking for a tool that would allow me to use LINQ and build a .Net app rapidly.
If you must have an open-source .NET IDE, you have two choices that I'm aware of: MonoDevelop and SharpDevelop. However, there are also free versions of Visual Studio.
If you need open source IDEs
Check :
SharpDevelop
CSharp Studio
MonoDevelop
xacc
The tool is called Visual Studio. There's even a free version. Another tool might be hiring a developer that builds .NET applications rapidly.
I would like to develop Mono application for Win/Linux/Mac in C# on Windows. Is there any really good (Visual Studio comparable) IDE for that? The best would be if I could manage Visual C# Express to compile solutions using the Mono compiler.
I've found a #develop IDE, which looks very cool and has many features that Express edition of the Visual Studio hasn't (like plugins for TortoiseSVN, NUnit, etc). Hovewer the 3.* versions dropped support for Mono, so you are no longer able to compile solutions using the Mono compiler.
There is also a MonoDevelop. I've tried it and it sucks. Not comparable to Visual Studio at all. No WinForms designer, + tons of other missing features. I would just like if they would drop the development of MonoDevelop and build a plugin for #develop instead.
Is there any other good enough IDE, or is it possible to make the Visual C# Express or #develop compile the solutions with Mono compiler?
EDIT: Delphi Prism looks cool, but it isn't C#.
You can always develop your applications using Visual Studio Express Edition (since you don't want to pay for the Mono Tools). Monodevelop will support compilation of Visual Studio solutions now, so just develop in VS, and recompile occasionally in Monodevelop to guarantee support.
Since Mono now supports Windows Forms, you can develop a Windows Forms application entirely in Visual Studio, and just deploy it using Mono. Since C# compiles to IL, it doesn't matter which IDE you use to develop - you can still run it on Mono.
How about Mono Tools for Visual Studio?
Note that it's a commercial plugin.
Whilst SharpDevelop 3.2 does not support mono out of the box but if you download the source code for SharpDevelop you can find a code sample that contained the original code for mono support. If you build that sample then mono support will be re-enabled in SharpDevelop.
A decision was made to remove mono support from the main SharpDevelop application since only support for compiling with mono was provided and MonoDevelop can now run on Windows. Note that mono support in SharpDevelop does not provide any integrated debugging with mono's debugger and there is no GTK# designer compared with MonoDevelop.
You can use Mono Tools for Visual Studio. However, it's a paid product.
I think your best bet will be to do development with VS C# Express, and then use a virtual machine--such as VMWare, Virtual PC, VirtualBox, etc.--to access Linux (which is the primary platform for MonoDevelop, and on which it works really well, comparably to VS.)
There are even a number of downloads available that are primed for doing exactly this. You could even use a Live CD, and just reboot your machine to get into Linux (which can usually access Windows partitions with no problems.)