【发布时间】:2014-07-03 20:17:10
【问题描述】:
我正在 OS X 上编写一个无头 Mono 应用程序,并希望在它运行时隐藏(冗余)控制台终端窗口。我能找到的最接近的选项是将 Compile Target 从 Executable 设置为 Executable with GUI,但这没有帮助。
【问题讨论】:
我正在 OS X 上编写一个无头 Mono 应用程序,并希望在它运行时隐藏(冗余)控制台终端窗口。我能找到的最接近的选项是将 Compile Target 从 Executable 设置为 Executable with GUI,但这没有帮助。
【问题讨论】:
当我使用 Empty Project 模板 vs Console Project 模板创建项目时意外找到了答案:有一个名为 Externalconsole 的项目文件设置。删除它会使控制台消失,但我找不到任何正式文档或 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>
【讨论】: