热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

VisualStudio:如何在其他地方保存obj文件夹-VisualStudio:Howtosavetheobjfoldersomewhereelse

DoesanyoneknowhowtotellVS(2008)wheretosavetheobjfolderwhenbuildingthesolution?Weha

Does anyone know how to tell VS(2008) where to save the obj folder when building the solution? We have it save the bin folder to another path in order to keep the source file folders small (ie. emailable), but can't find any way to tell it to do the same with obj...

有谁知道如何告诉VS(2008)在构建解决方案时保存obj文件夹的位置?我们将bin文件夹保存到另一个路径以保持源文件文件夹较小(即可通过电子邮件发送),但无法找到任何方法告诉它使用obj执行相同操作...

4 个解决方案

#1


76  

Use the BaseIntermediateOutputPath property in the project file (.csproj, .vbproj, etc.), as explained at http://msdn.microsoft.com/en-us/library/bb629394.aspx. You'll have to manually edit the XML document using a text editor, then reload it in Visual Studio. It may still create the obj folder (that's a known bug), but will leave it empty and put the actual obj files in your specified folder.

使用项目文件(.csproj,.vbproj等)中的BaseIntermediateOutputPath属性,如http://msdn.microsoft.com/en-us/library/bb629394.aspx中所述。您必须使用文本编辑器手动编辑XML文档,然后在Visual Studio中重新加载它。它仍然可以创建obj文件夹(这是一个已知的bug),但会将其留空并将实际的obj文件放在指定的文件夹中。

#2


20  

  1. You add this to your project file below tag:

    您将其添加到 标记下的项目文件中:

    ..\Whatever\obj\
    
  2. VS will still create obj folder , so you have to delete it every time after a build. This can be done by putting the following script to the post-build part in VS :

    VS仍会创建obj文件夹,因此每次构建后都必须删除它。这可以通过将以下脚本放到VS中的post-build部分来完成:

    rd "$(ProjectDir)obj" /S /Q
    

#3


5  

Do you use version control? If you do, there's an alternative:

你使用版本控制吗?如果你这样做,还有另一种选择:

You can exclude bin/ and obj/ from version control and check out your project instead of e-mailing. If you use Subversion, you could also Export your project and e-mail the exported and zipped folder.

您可以从版本控制中排除bin /和obj /并检查项目而不是电子邮件。如果您使用Subversion,您还可以导出项目并通过电子邮件发送导出和压缩文件夹。

#4


1  

It's the Output Directory under Properties > General of the project settings.

它是项目设置的Properties> General下的Output Directory。

Edit: it seems like there is a difference between the project settings for native C++ projects (which I'm using) and CLR based projects (which might be what the OP is referring to).

编辑:似乎本机C ++项目(我正在使用)和基于CLR的项目(可能是OP所指的项目)的项目设置之间存在差异。


推荐阅读
author-avatar
zhj808008
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有