naspy971
naspy971

Reputation: 1381

Unable to run integrated console Visual Studio Community 2017

I just installed Visual Studio Community 2017 on my mac, created a console C# project and trying to run the hello world string, but it keeps on opening the mac console when running the script, and moreover, it looks like it crashes somehow

    bash -c 'clear; cd "/Users/gb/C#_Projects/TestProject/TestProject/bin/Debug"; "/Library/Frameworks/Mono.framework/Versions/5.8.0/bin/mono32"  --debug --debugger-agent=transport=dt_socket,address=127.0.0.1:51188  "/Users/gb/C#_Projects/TestProject/TestProject/bin/Debug/TestProject.exe" ; echo $? > /var/folders/s_/sljf42_d01bdxlb5s_rwgsj80000gn/T/tmp231b1334.tmp; echo; read -p "Press any key to continue..." -n1; exit'; exit
macbook-pro-de-gb:~ gb$ bash -c 'clear; cd "/Users/gb/C#_Projects/TestProject/TestProject/bin/Debug"; "/Library/Frameworks/Mono.framework/Versions/5.8.0/bin/mono32"  --debug --debugger-agent=transport=dt_socket,address=127.0.0.1:51188  "/Users/gb/C#_Projects/TestProject/TestProject/bin/Debug/TestProject.exe" ; echo $? > /var/folders/s_/sljf42_d01bdxlb5s_rwgsj80000gn/T/tmp231b1334.tmp; echo; read -p "Press any key to continue..." -n1; exit'; exit
logout
Saving session...
...copying shared history...
...saving history...truncating history files...

I tried to change the configuration in the build option by unchecking "Build with external console" but each time I build this is checked again...

Upvotes: 2

Views: 151

Answers (1)

phillima
phillima

Reputation: 72

To prevent the external Mac console form opening, you have to right click your project (not the solution) and click "Options". Under the Run option, click on "Default". Uncheck the box "Run on external console". In my case I had to restart visual studio to have that working.

If you don't see the "Hello" output, go to View->Pads->Application Output, then you can pin that, or dock it.

But if you need to insert text, such as with Console.ReadLine(), you'll have to use the external console anyway.

Upvotes: 2

Related Questions