console-application

How can I set up a configuation file for .NET console applications?

Is it possible to use a ".net configuration" file for a .NET console application? I'm looking for an equivalent to web.config, but specifically for console applications... I can certainly roll my own, but If I can use .NET's built in configuration reader then I would like to do that...I really just need to store a connection string......

What interface or method should my class implement to print what I want in Console.WriteLine?

I have an object of class F. I want to output the contents of the object using Console.WriteLine for quick and dirty status updates like this: Console.WriteLine(objectF); This prints out only the name of the class to the console: F I want to overload this somehow so that I can instead print out some useful information about the obj...

How to write to the console in a GUI application

Hi, Background: We develop win32 applications, and use the "Thompson Toolkit" on windows to give us a unix-like shell that we use as our command-line. We have a GUI program (with a WinMain and message loop) that we want to write to the console, but printf and so on don't work, even when we launch the program from the console. How can w...

C# Console Application still resident in memory after exit

Hi, I have an .net C# console application (not a service). it basically connects to a webservice, gets some xml files, copies those files to a few location on a drives, validates the xml, processes it and sends these objects to another web service. However, when the main method exists (and the console window closes) I can still see the...

Does TThread work differently in a Delphi 2006 console application?

We have a pretty mature COM dll, which we test using DUnit. One of our recent tests creates a few threads, and tests the object from those threads. This test works fine when running the test using the gui front-end, but hangs when running as a console application. Here's a quick pseudo view of what we have in the test SetupTest; fThread...

how to run a winform from console application?

How do I create, execute and control a winform from within a console application? ...

IOC for a Console Application?

Can anyone think of a good solution for getting IOC into a console application? At the moment we are just using a static class with the following method: public static T Resolve<T>() { return dependencyResolver.Resolve<T>(); } I would like the experience to be seamless but cannot think of a way of achieving this from a console ap...

Converting Console Application to Windows Application in Visual Studio 2008?

I found this solution which works, but I find it hard to believe there isn't a one-click solution to this problem. Do you know a better way? ...

Add Web Reference option missing in VS2008

I'm trying to add a Web Reference to a VS2008 .Net 3.5 Console Application but the option's not there. The options to "Add Reference" and "Add Service Reference" are there. ...

How to access win32 console App Data in VC++ MFC GUI.

I have two apps: Win32 Console App. MFC GUI App. I wanted to execute the console app in MFC GUI and I am want to get data from that Console app and display them in GUI. I get this error: "fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do ...

Console Application - Can't Catch Unhandled Exception

I have written a very simple C# Console Application which will open a Crystal Report, refresh it and save it as a PDF to a specified location. When running within VS2005 everything runs fine; the pdf file is generated as expected. When I copy the .exe to my root C: drive and run it from the command line I get a dialog box stating that "...

using curses with raw_input in python

Hey, In my python linux console application I use curses to handle displaying of data. At the same time I'd like to have an input line to enter commands, pretty much in good ol' irssi-style. With default curses getch() I'd have to do a lot of coding just to get the basic funcionality of raw_input function - arrow keys to move cursor / b...

C# console applications all 16bit?

Hi all, I was reading up about NTVDM.exe as I build a quick test console app and it crashed on a friends machine complaining about this EXE. As I understand it all DOS cmd windows (C# console apps included) run as 16bit not 32bit. Is this true? Does this mean all my works console app back office apps are running as 16bit rather than ...

Data Warehouse Management Command Line Application - PowerShell or C# Console App

I'll preface this question by saying this is for a Microsoft only shop. If you were to write a console app to manage a data warehouse what would you use: 1) Writing a custom environment for PowerShell (ala the latest flavors of Exchange / SQL Server) 2) Write it as a C# Console App If #2 are there any frameworks that offload writin...

c# console, Console.Clear problem

I am writing a console program in C#. Is there a way I can use a Console.Clear() to only clear certain things on the console screen? Here's my issue: I have a logo (I put it on screen using Console.WriteLine()) and a 2d array which I want to keep constant and clear everything below it. ...

How do I automate unit tests for a console application in TeamCity?

I've written a console application that has a number of unit tests and I'm wanting to include it in my nant build script so that it will be run on our TeamCity CIS. Unfortunately I'm not quite sure how to do that. The nant script has examples of current projects that have been added...they they all have to supply the assemblies that nee...

Submitting data from a web application to C# console application

I need to submit data from a web application to console application. The current plan calls for the web app to submit data to the database and the console app to poll the database then act on the data when it is inserted. Should I change the console app to include an http handler that the web app can submit data so it doesn't have to p...

Does Application.ApplicationExit event work to be notified of exit in non-Winforms apps?

Our code library needs to be notified when the application is exiting. So we have subscribed to the System.Window.Forms.Application.ApplicationExit event. This works nicely for Winforms apps, but does it also work for other types of applications such as console apps, services, and web apps (such as ASP.NET)? The namespace would suggest...

Is it possible to call an application selection window (Right click->Open With->Other) from the linux console?

On Gnome/KDE you can select in which application you want to open file (Right click on file -> Open With -> Other). Is it possible open file that way, but from console? For example: you print " file.ext" and instead of opening in concrete application, there are that application selection window forced and then users chooses - starts sel...

console.writeline >> redirectedoutput.txt garbled

I have a VB.NET 3.5 sp1 console application running on Windows XP sp3 from a batch file: "D:\Program Files\PartsDepotJob\PartsDepotJob.exe" >> "D:\Program Files\PartsDepotJob\partdepot.log.txt" The output looks like the following: 2/10/2009 9:03:19 AM Processing PO#: 2100 in 002 Created OE# 135 Processing...