简体   繁体   English

同时生成调试和发布

[英]Generate Debug & Release simultaneously

Here is my situation. 这是我的情况。 I've multiple projects / solutions that are linked. 我有多个链接的项目/解决方案。

  • Solution A.sln 解决方案
    • AA.csproj AA.csproj
    • AB.csproj AB.csproj
  • Solution B.sln 解决方案
    • BA.csproj references bin\\$(Configuration)\\AA.exe BA.csproj引用bin \\ $(Configuration)\\ AA.exe
    • BB.csproj references bin\\$(Configuration)\\AB.exe BB.csproj引用bin \\ $(Configuration)\\ AB.exe

(I modified the .csproj manually in order to reference the current configuration and not always Debug or Release). (我手动修改了.csproj,以引用当前配置,但并不总是调试或发布)。

I do that because I won't include all referenced projects I need directly in my solution to not polluate it. 之所以这样做,是因为我不会在解决方案中直接包含所有我引用的项目,以免造成污染。

So, in order to be always up-to-date, I want to generate both, Debug & Release configuration when building referenced projects. 因此,为了始终保持最新状态,我想在生成引用项目时生成调试和发布配置。 It's possible? 这是可能的?

Use Batch Build . 使用批处理构建

Open Build->Batch Build... in solution A , select all projects you need in all configurations (Debug, Release,...) you need and click Build button. 在解决方案A中打开Build-> Batch Build ...,在所需的所有配置(调试,发行版...)中选择所需的所有项目,然后单击Build按钮。

VS will remember your selection for next batch build. VS会记住您对下一批构建的选择。 So you just need to enter Alt+B, Alt+T, Enter for next build. 因此,您只需要输入Alt + B,Alt + T,Enter即可进行下一个构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM