【问题标题】:Why is my .exe deposited in both \bin\Debug and \obj\Debug?为什么我的 .exe 同时存放在 \bin\Debug 和 \obj\Debug 中?
【发布时间】:2015-11-20 00:13:33
【问题描述】:

在我的 VS 2013 C# Windows 窗体应用程序中,它的“问题”(.exe)同时出现在 \bin\Debug 文件夹和 \obj\Debug 文件夹中。相同的日期,相同的大小。为什么输出到这两个地方?为什么有必要?

【问题讨论】:

标签: c# visual-studio-2013 exe bin


【解决方案1】:

obj\Debug 是用于输出csc.exe(.NET 编译器)的“工作”文件夹。编译文件后,它会被复制到“输出目录”,默认为bin\Debugbin\Release

您可以通过编辑项目属性来更改输出文件夹,据我所知,您不能更改编译器工作目录(但这并不意味着不能这样做)。

【讨论】:

    【解决方案2】:

    Msbuild 具有输出文件夹(bin/debug)以及 IntermediateOutputPath(和 BaseIntermediateOutputPath)的参数

    输出通常是您的 bin 文件夹,而 IntermediateOutputPath 指向您的 obj 文件夹,该文件夹用于在生成最终二进制文件之前进行临时存储。更多信息请查看common ms build properties

    【讨论】:

      猜你喜欢
      • 2013-03-22
      • 1970-01-01
      • 2011-02-23
      • 1970-01-01
      • 2018-03-22
      • 1970-01-01
      • 1970-01-01
      • 2016-08-11
      • 1970-01-01
      相关资源
      最近更新 更多