I am getting started on C# and installed Microsoft blend for visual studio and my newproject window looks like below.
I am looking for console application as shown in below screeshot,how do I get it?
EDIT1:
how do I launch visual studio IDE?
Use Visual Studio, not Blend, to create a new Console Application.
More info on Blend and it's uses.
Blend is an interface design tool and therefore can't be used to build console apps... Try Visual Studio Community instead.
Just going along with what everyone else is saying, Visual Studio 2015 COMMUNITY EDITION is free to download and fully featured. Great tool, if anything it has too many uses. I believe it may even have most of the Visual Basic features built in.
https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx
From the Microsoft Blend Website:
Microsoft Expression Blend is a full-featured professional design tool for creating engaging and sophisticated user interfaces for Microsoft Windows
Which a console application is not; is has basically no UI. You should keep on using Visual Studio for console application.
You can likely make the console window appear in almost any application simply by using Console.WriteLine you can also create an arbitrary console by launching one:
Is there a way to create a second console to output to in .NET when writing a console application?
Legacy Services were default are not User Interactive and thus have no console easily viewable..
Related
You can open the C# Interactive window in Visual Studio to use C# as a scripting an shell language. Unfortunately, this requires you to have Visual Studio open all the time.
I know I can run csi.exe itself, but this does not give me any syntax highlighting or auto completion features.
How can I run the C# Interactive Windows standalone?
I would suggest LINQPad (I don't use it myself but I know this can do that kind of things). I think it's pretty powerful
https://www.linqpad.net/
VSCode has built in support for .NET Interactive Notebooks - if you don't see it, you can install the '.NET Interactive Notebooks' extension
In my visual studio code project, I have generated an .exe file for the project and I'm trying create make my .exe as Windows Service.
From here and here, if I'm not mistaken, these solutions look like done by using Visual Studio instead of Visual Studio Code. Is it possible to create a Window Service through Visual Studio Code?
You cant,
Visual Studio Code is a code editor redefined and optimized for
building and debugging modern web and cloud applications. Visual
Studio Code is free and available on your favorite platform - Linux,
Mac OSX, and Windows.
It has no concept of an Windows Service
If you wish to create a Windows service you will have to use Visual Studio or something that can compile standard .net Windows application
Great comment from Ben Voigt
You're correct that Visual Studio Code doesn't have a concept of a
service, but that's because it is an editor not a compiler. The same
C# compiler installed as part of the .NET runtime, can build Windows
Services. And you can edit the windows service code in VS Code
I'm trying to do some treehouse tutorials on C#. Unfortunately, the instructor is teaching this course in an windows machine with a windows version of VS Community while I follow along VS Community for mac. Got to a point where she is trying to use the C# interactive (REPL) but I can't seem to find it on the mac version. Anyone know if its even possible to do this on the mac? Thanks.
You can't run it in Visual Studio. You can, however, use the terminal.
When you install mono the command csharp gets installed as well.
Simply type csharp and the terminal will become a C# interactive window.
If you have Mono installed you can also use: csi
No Interactive Window support in VS 2017 Mac.
Future versions may have this feature. If it is important you could use Parallels and run the Windows version.
Or work around it by doing the same sorts of things with a debugger and Immediate Window.
Use Xamarin Workbooks!
If you don't like Xamarin Workbooks for whatever reason, you can also use csi in the console, but it doesn't have code completions :/ I couldn't edit Sachin's answer above, but to be more clear, all you need to do is open the terminal and type csi to start the C# interactive tool. Of course this only works after you've installed Visual Studio (it should have installed Mono in the process).
Do you know if it's possible to use the Visual Studio editor in .NET outside the Visual Studio isolated shell, for example in a Windows Forms application?
Thanks.
Try the Visual Studio Isolated Shell from the Visual Studio SDK.
http://msdn.microsoft.com/en-us/library/bb685691.aspx
Short answer is, no. You will have to use a custom control that you make or that you get from a 3rd party. Here is a link to a good discussion on the topic: Free/open source code editor UI control for .Net
I am in the process of learning C#. I downloaded and installed Visual Studio 2010 Express with C#. The problem is it has all these templates that are a little overwhelming at the moment: ASP.NET website, Library, WCF, etc.
I just want to code something very simple that takes input from the Console and outputs to it. I am making do with WCF but that's really inconvenient. It is faster for me to load up ideone.com, type my code there and compile than doing it from own my machine.
Is it even possible to create simple programs like that in C# using VS2010 Express?
Thanks everyone who answered. I installed Visual C# and now I can create console applications. But now the command window closes immediately after it's done doing whatever it's doing. Can I have it output to the IDE like I would with Java on Eclipse or Netbeans?
You can create simple apps by choosing Windows Application (if you want a GUI) or Console Application (if you just want to take input from console as you describe in the question) as project types.
Regarding the question of the console window immediately closing, the quick-and-simple fix for this is to have
Console.ReadLine();
at the end of program execution -- it'll do all it needs to do, then wait for (any) keyboard input before closing the window.
"But now the command window closes immediately after it's done doing whatever it's doing. Can I have it output to the IDE like I would with Java on Eclipse or Netbeans?"
Try running without debug mode (Ctrl+F5 or Shift+F5 or some other binding depending on your keyboard setting). The program will wait for you to press a key to exit.
If you want to output it to the IDE, you could use System.Diagnostics.Trace.Write, which writes to the trace output in the bottom on the IDE. I do not believe there is a built in stdout view in Visual Studio... but it seems like a great idea for a feature...
Are you there, Microsoft?
Visual Studio can be extremely overwhelming. What you should remember is that it's a tool for professionals, ultimately. However, if you want to make a Console app, it's quite simple.
Open Visual Studio
File
New
Project
Other Languages
Visual C#
Windows
Console Application
Done.
Yes, Visual Studio Express is a very good free tool for creating applications. Of course it doesn't have all of the features of Visual Studio, but I use it at home for several reasons.
What you want is the "Console Project" template