编程定义:“构建"究竟是什么. [英] Programming Definitions: What exactly is 'Building'.

查看:26
本文介绍了编程定义:“构建"究竟是什么.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建解决方案/项目/程序是什么意思?我想确保我的定义是正确的(所以我在交谈时听起来不像个白痴).在 IDE 中,您可以(如果我错了,请纠正我)编译源代码/编程代码为计算机可读的机器代码.您可以调试一个程序,这基本上是单步调试程序并查找错误.

What does it mean to build a solution/project/program? I want to make sure I have my definitions correct (so I don't sound like a idiot when conversing). In IDE's, you can (correct me if I'm wrong) compile source-code/programming-code into computer-readable machine code. You can debug a program, which is basically stepping through the program and looking for errors.

但是构建一个程序到底做了什么?在 VS 中,我知道当您构建程序时,它会在调试文件夹中生成一个可执行文件.

But what exactly does building a program do? In VS I'm aware that when you build a program it produces an executable file in a debug folder.

对于构建程序意味着什么的任何核心技术定义?

Any hard-core tech definitions of what it means to build a program?

推荐答案

这不一定与人类对构建"的理解有关,但就 MSBuild 2.0 而言,Microsoft.Common.targets 中的代码对其进行了描述因此:

This does not necessarily bear on what humans mean about 'build', but as far as MSBuild 2.0 is concerned, the code in Microsoft.Common.targets describes it thusly:

...
<!--
============================================================
                                    Build

The main build entry point.
============================================================
-->
<PropertyGroup>
    <BuildDependsOn>
        BeforeBuild;
        CoreBuild;
        AfterBuild
    </BuildDependsOn>
</PropertyGroup>
<Target
    Name="Build"
    Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
    DependsOnTargets="$(BuildDependsOn)"
    Outputs="$(TargetPath)"/>

<!--
============================================================
                                    BeforeBuild

Redefine this target in your project in order to run tasks just before Build
============================================================
-->
<Target Name="BeforeBuild"/>

<!--
============================================================
                                    AfterBuild

Redefine this target in your project in order to run tasks just after Build 
============================================================
-->
<Target Name="AfterBuild"/>

<!--
============================================================
                                    CoreBuild

The core build step calls each of the build targets.
============================================================
-->
<PropertyGroup>
    <CoreBuildDependsOn>
          BuildOnlySettings;
          PrepareForBuild;
          PreBuildEvent;
          UnmanagedUnregistration;
          ResolveReferences;
          PrepareResources;
          ResolveKeySource;
          Compile;
          GenerateSerializationAssemblies;
          CreateSatelliteAssemblies;
          GenerateManifests;
          GetTargetPath;
          PrepareForRun;
          UnmanagedRegistration;
          IncrementalClean;
          PostBuildEvent
    </CoreBuildDependsOn>
</PropertyGroup>
<Target
    Name="CoreBuild"
    DependsOnTargets="$(CoreBuildDependsOn)">

    <OnError ExecuteTargets="_TimeStampAfterCompile;PostBuildEvent" Condition="'$(RunPostBuildEvent)'=='Always' or '$(RunPostBuildEvent)'=='OnOutputUpdated'"/>
    <OnError ExecuteTargets="_CleanRecordFileWrites"/>

</Target>
...

这表明构建"大致意思是编译加上所有相关的辅助事件,使您从代码工件到可部署的结果".

which suggests that 'build' mean roughly "compile plus all the associated auxiliary events that get you from code artifacts to a deployable result".

这篇关于编程定义:“构建"究竟是什么.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆