I'm using Visual Studio 2017 and i want to have my compiled C# Solution executed on a console built in Visual Studio, as the "Output" window. Online i don't finded anything on the argument but at a conference i saw the speaker doing that.
-
5Its unclear what you are asking? Do you want your application to run outside of visual studio? – maccettura Jun 22 '17 at 18:52
2 Answers
If memory serves the console in Visual Studio will print things that are outputted to the debug stream. It's not strictly speaking your STDIO. Easiest way for this is that either your application directly prints to the correct place or that it uses a logging library (things like NLog or Log4net) and configure it with an appender that will append to the debugging console. If your application does neither then you will need to do some extra work for this to work like wrap it in another app that will forward stdio and stderr to the debuger.
But, this is not enough, you will still need to have a debugger attached for the print to work.
now the grain of salt... have not actively developed in VS for a little while now so runing on memory here, YMMV.
hope this helps

- 7,543
- 4
- 48
- 71
I am not certain if this is exactly what you are looking for, but:
In visual studio, you can set a pre-build or a post-build event command-line. In a module properties -> Build Events you can have your application run the desired .exe through a command-line command before or after one of three things(On Successful build, Always, or when there is an update to the existing application) happen. I am not sure if that still exists in 2017, but it is definitely in 2015.

- 159
- 1
- 10