console-application

Create "console" and "window" configurations in Visual Studio project

I have a project in Visual Studio 2008. I want to have two different ways of running it - either as a regular Windows application (so it gets a window and I can do graphics stuff) or as a console application (so that it doesn't have a window and doesn't do graphics). Is there a way to set it up so that I can use a command line option or ...

Is is possible to programmatically clear the console history?

When working with a console application, a history of everything that has been entered at a Console.ReadLine() is stored. When at a console prompt to enter something, pressing the up/down cursor will scroll through this history (and the whole history can be viewed by pressing F7). Using C#, is there are way to either disable this behavi...

calling wcf service without waiting for response from console application

I presume , such a mode should exist. Just triggering WCF service and exiting. Something else will check a log ( database/file ) produced by WCF service. My understanding it is different to asynchronous call where calling application allows to do something else, but still runs some code on completion event. ...

Is it possible to get the latest version in TFS using some console client?

Currently I found two ways to get the latest version - in Visual Studio using Team Explorer and in Windows Explorer using TFS Power Tools Shell Extensions. Because our TFS server is located vary far from developers working with it is very slow and very often hangs on an application (VS/Explorer). So I want to run Get in console to minim...

Embed a Console Window inside a WPF Window

Is it possible to embed a console window inside a WPF window? As a little background, at first I tried to implement a console window from scratch in WPF, which was successful except for one huge problem -- its extremely slow. See the question here: http://stackoverflow.com/questions/3219819/vt100-terminal-emulation-in-windows-wpf-or-sil...

How to write console data into a text file in C++?

Hi All, I'm working on a file sharing application in C++. I want to write console output into a separate file and at the same time I want to see the output in console also. Can anybody help me...Thanks in advance. ...

site column page (mngfield.aspx) displays unknown error

Site > Site Settings > Site Columns site column page (mngfield.aspx) displays unknown error I get an unknown error. This happens when I add custom columns from a console app using SPField. The columns are added with the given properties (verified by SharePoint manager). using System; using System.Collections.Generic; using System.Text...

Windows x64 C# x86 console application exe seems to work with "DLL any CPU" Any potential problem ?

My computer runs Windows 7 X64 Enterprise Edition. I need x86 mode for my executable as I use Visual Foxpro OLEDB driver. I thought it was required to compile library DLLs which are used by this exe as "X86". However, DLLs compiled with "Any CPU"seem to work which is quite convenient as they are used somewhere else and no need to main...

Weird error message when running my application

Guys I created a console application in Visual Studio 2010. It targets the .NET framework 2.0. When I run the application is Visual Studio, it works perfect. I then exited Visual Studio and copied the executable to my C:\Windows\System32 directory. When I open a command prompt window and try to execute my program, it comes up with a stan...

How do you incorporate "/x" option parameters into a .NET console application?

A lot of command line utilities use parameters, such as: gacutil /i MyDLL.dll or regasm /tlb:MyDll.tlb MyDll.dll How do I set up a .NET console application to take in command line arguments and, secondarily, how can you emulate handling "option" parameters like /i and /tlb: in the respective examples above? ...

How to close an "orphaned" console window that was opened from within visual studio?

When working on console applications in Visual Studio, I will run the application by pressing F5 to bring it into debug mode. Occasionally (and I'm not sure how this happens), I'll get back into "edit mode" in Visual Studio and the debugged console window will still be open. It will remain open but entirely unresponsive. I can't clo...

.Net library for console menu driven app

I was wondering if anyone knew of a library for .net console apps that handled all the menuing functionality. I know its not that complex and I can just use Console.WriteLine("..."); to write text then do Console.ReadLine();, but am just curious if anyone knows of something existing that would handle the menuing. I'm likely to need sub...

How to set a console application window to be the top most window (C#)?

How do i set a console application to be the top most window. I am building the console application in .NET (i am using C# and maybe even pinvokes to unmanaged code is ok). I thought that i could have my console application derive from Form class class MyConsoleApp : Form { public MyConsoleApp() { this.TopLevel = true; ...

What dev do I use to read a USB keyboard in an embedded Linux system?

gI've compiled the kernel to support USB HID and keyboard devices. When I plug in the USB keyboard, the kernel recognizes it, and goes so far as to latch/unlatch the NUMLOCK led when I press the same key. Is there a dev file entry I can create so I can read (cat /dev/input/...) data from the USB keyboard? I appreciate that I might be l...

Console application in C++ for smart devices (WinCE) ?

Hi, I am new in developing application for WinCE 5.0. I want to start from "Hello world" program or console application. But I couldn't find anything like that or any other sample applications to start from. I am using Visual Studio 2005. I created new project >> visual C++ >> Win32 smart device project >> console application >> finish....

Win32 API Console Programming in C.

I am stuck with the problems like, reading text from a specific location (x=10, y=5) on the console window. Where can I find a detail tutorial on Win32 API Console mode programming in C? ...

.net console app lifecycle - working around a pre-start initialization error from BuildManager.GetReferencedAssemblies

I'm trying to iterate through the referenced assemblies in my console app. I have been doing this with BuildManager.GetReferencedAssemblies in other projects, but in my console application, I get an InvalidOperationException: This method cannot be called during the application's pre-start initialization stage. To my knowledge, there is...

Convert Winform App to Console app

Is there a quick and dirty way (or a VS Macro) to convert a WinForms app to a Console App? I have a number of these apps that are no longer needed as Winforms apps. I suppose I could create a bunch of new projects and copy paste modules and classes over, but if it's just a matter of removing the single form that I have and editing/deleti...

How to enforce required command-line options with NDesk.Options?

I was just writing a console utility and decided to use NDesk.Options for command-line parsing. My question is, How do I enforce required command-line options? I see in the docs that: options with a required value (append '=' to the option name) or an optional value (append ':' to the option name). However, when I put a = at the ...

WCF client console application deploying

Assuming serviceUrl is read from exe.config ( app.config in IDE ) var binding = new WSHttpBinding(); ... client = new ContentServiceClient(binding, new EndpointAddress(serviceURL)); Do I just need exe itself ( given no dependencies ) and exe.config for this client to invoke service on other box. I generated service reference...