console-application

how can I embed an assembly into a console application without ILMerge?

不羁岁月 提交于 2019-12-10 11:40:31
问题 There are a lot of posts on here about this, I'm using this code from another SO post and placing a delegate assignation in my Main() method. None of the other posts have directly answered my question. I've got my third party assembly embedded as a resource but when I fire up the app: I'm getting a TypeInitializationException with an inner of FileNotFoundException. It's trying to find the assembly on the file system and failing. it's never getting to the Main method, where the event handler

Create folder inside debug or release con console application

僤鯓⒐⒋嵵緔 提交于 2019-12-10 11:29:01
问题 i have a console application in vs2010 (C#) and in the project, i have a Folder added by me (right click on project.. add->folder) and i want that when i compile the application (debug or release), then the folder will be created (if not exists) in the debug or release directory. Is that possible? The console application is a daemon that access to a database and send emails with templates allocated in that folder. I hope you can help me. Thanks! 回答1: There's no "automatic" way to get VS to

How to hide output (not the window) in a console application?

北战南征 提交于 2019-12-10 10:37:57
问题 Well, let me make it clear again. I have a console application with many classes, in each class there is at least one Console.WriteLine("text") line. I defined some arguments that when running the application, it output exactly what I wrote in classes. There, I want to define an argument that when I run the app with this argument, there will be no output on the console screen but the console window still appears. The argument maybe something like "-s". So is there any way I can do this

C/C++: is it possible to pass binary data through the console? [duplicate]

放肆的年华 提交于 2019-12-10 10:22:51
问题 This question already has answers here : What is the simplest way to write to stdout in binary mode? (2 answers) Closed 4 years ago . I would like to know if it is possible that an utility yields binary data (i.e. graphical images) and outputs them through IO console, while another application, instructed about the nature of those data and informed of the number of the incoming bytes, is able to read it from IO console. 回答1: Yes, it is possible. While it's true that often stdin / stdout are

Is there a way to force a console application to run at a certain window size (using Pdcurses)?

余生颓废 提交于 2019-12-09 23:49:39
问题 I'm trying my hand at throwing together a minor roguelike in C++, but I've run into a problem - in order to get the game to display correctly, the console window has to be a bit wide (around 45 rows, 115 cols). It's easy enough to change by right clicking on the menu bar and setting the defaults for windows with the same name, but is there a way I could set it automatically from the code so I don't have to ask potential users to mess with that? I'm using Pdcurses to handle output, if that

Error : the application was unable to start correctly [duplicate]

情到浓时终转凉″ 提交于 2019-12-09 23:02:47
问题 This question already has answers here : The application was unable to start correctly (0xc000007b) (17 answers) Closed 6 years ago . Can anyone tell me what causes this error: I don't know what other information about the project may be needed to be included! If you need more information, it would be appreciated to inform me. But please help me! I'm running the program on a Win7x64 ultimate and this is the configuration of my project: also these are the paths of include and library

How to upload file to OneDrive through console app?

隐身守侯 提交于 2019-12-09 20:56:07
问题 I am trying to upload a file to OneDrive from within console app. After digging a bit into Google I found Live SDK but I couldn't find any article demonstrating file upload step by step using Live SDK. Is there any good resource explaining how to it? Thanks. 回答1: The LiveSDK has a number of examples and template code that are hosted on Github, https://github.com/liveservices/LiveSDK-for-Windows. To see an example of how uploading is down you can explore the sample applications located at

Spawn processes, but only 5 at a time

百般思念 提交于 2019-12-09 18:11:49
问题 i'm working off a queue with filenames. Each file has to be processed by a external binary. This works fine, but it only processes one file at a time. Is it possible two spawn a number of processes parallel? Queue<string> queue = new Queue<string>(); queue.Enqueue("1.mp3"); queue.Enqueue("2.mp3"); queue.Enqueue("3.mp3"); ... queue.Enqueue("10000.mp3"); while (queue.Count > 0) { string file = queue.Dequeue(); Process p = new Process(); p.StartInfo.FileName = @"binary.exe"; p.StartInfo

Capture coloured console output into WPF application

老子叫甜甜 提交于 2019-12-09 16:45:47
问题 Similar to this question, except the console program being wrapped up in the WPF application produces coloured output, so it would be nice if I could capture the colour as well as the text. This is my first WPF program and I'm not sure how to go about finding/modifying the right control, currently I'm just using a TextBox which works but only captures plain text. Update: I tried using RichTextBox: richTextBox.Document.Blocks.Clear(); richTextBox.Document.Blocks.Add(new Paragraph(new Run

Yii2 - Getting unknown property: yii\console\Application::user

╄→гoц情女王★ 提交于 2019-12-09 16:43:25
问题 I am trying to run a console controller from the terminal, but i am getting this errors every time Error: Getting unknown property: yii\console\Application::user here is the controller class TestController extends \yii\console\Controller { public function actionIndex() { echo 'this is console action'; } } and this is the concole config return [ 'id' => 'app-console', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'controllerNamespace' => 'console\controllers', 'modules' => [],