Rupert Rawnsley
Rupert Rawnsley

Reputation: 2659

Hide the console window when running mono applications on OS X

I'm writing a headless Mono application on OS X and would like to hide the (redundant) console terminal window when it runs. The closest option I could find was setting Compile Target from Executable to Executable with GUI, but that didn't help.

Upvotes: 2

Views: 1565

Answers (1)

Rupert Rawnsley
Rupert Rawnsley

Reputation: 2659

Found the answer accidentally when I created a project using the Empty Project template vs Console Project template: there's a project file setting called Externalconsole. Deleting it made the console go away, but I can't find any formal documentation for it or the equivalent switch in the Xamarin Studio GUI.

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG;TRACE;</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <Externalconsole>true</Externalconsole>
  </PropertyGroup>

Upvotes: 2

Related Questions