|
6 | 6 | using System.Collections.Generic; |
7 | 7 | using System.Collections.Immutable; |
8 | 8 | using System.Linq; |
| 9 | +using System.Runtime.CompilerServices; |
9 | 10 | using Microsoft.Build.Collections; |
10 | 11 | using Microsoft.Build.Evaluation; |
11 | 12 | using Microsoft.Build.Experimental.BuildCheck; |
| 13 | +using Microsoft.Build.Framework; |
12 | 14 | using Microsoft.Build.Shared; |
13 | 15 |
|
14 | 16 | namespace Microsoft.Build.Execution |
15 | 17 | { |
16 | | - /// <summary> |
17 | | - /// Flags providing additional control over the build request |
18 | | - /// </summary> |
19 | | - [Flags] |
20 | | - public enum BuildRequestDataFlags |
21 | | - { |
22 | | - /// <summary> |
23 | | - /// No flags. |
24 | | - /// </summary> |
25 | | - None = 0, |
26 | | - |
27 | | - /// <summary> |
28 | | - /// When this flag is present, the existing ProjectInstance in the build will be replaced by this one. |
29 | | - /// </summary> |
30 | | - ReplaceExistingProjectInstance = 1 << 0, |
31 | | - |
32 | | - /// <summary> |
33 | | - /// When this flag is present, the <see cref="BuildResult"/> issued in response to this request will |
34 | | - /// include <see cref="BuildResult.ProjectStateAfterBuild"/>. |
35 | | - /// </summary> |
36 | | - ProvideProjectStateAfterBuild = 1 << 1, |
37 | | - |
38 | | - /// <summary> |
39 | | - /// When this flag is present and the project has previously been built on a node whose affinity is |
40 | | - /// incompatible with the affinity this request requires, we will ignore the project state (but not |
41 | | - /// target results) that were previously generated. |
42 | | - /// </summary> |
43 | | - /// <remarks> |
44 | | - /// This usually is not desired behavior. It is only provided for those cases where the client |
45 | | - /// knows that the new build request does not depend on project state generated by a previous request. Setting |
46 | | - /// this flag can provide a performance boost in the case of incompatible node affinities, as MSBuild would |
47 | | - /// otherwise have to serialize the project state from one node to another, which may be |
48 | | - /// expensive depending on how much data the project previously generated. |
49 | | - /// |
50 | | - /// This flag has no effect on target results, so if a previous request already built a target, the new |
51 | | - /// request will not re-build that target (nor will any of the project state mutations which previously |
52 | | - /// occurred as a consequence of building that target be re-applied.) |
53 | | - /// </remarks> |
54 | | - IgnoreExistingProjectState = 1 << 2, |
55 | | - |
56 | | - /// <summary> |
57 | | - /// When this flag is present, caches including the <see cref="ProjectRootElementCacheBase"/> will be cleared |
58 | | - /// after the build request completes. This is used when the build request is known to modify a lot of |
59 | | - /// state such as restoring packages or generating parts of the import graph. |
60 | | - /// </summary> |
61 | | - ClearCachesAfterBuild = 1 << 3, |
62 | | - |
63 | | - /// <summary> |
64 | | - /// When this flag is present, the top level target(s) in the build request will be skipped if those targets |
65 | | - /// are not defined in the Project to build. This only applies to this build request (if another target calls |
66 | | - /// the "missing target" at any other point this will still result in an error). |
67 | | - /// </summary> |
68 | | - SkipNonexistentTargets = 1 << 4, |
69 | | - |
70 | | - /// <summary> |
71 | | - /// When this flag is present, the <see cref="BuildResult"/> issued in response to this request will |
72 | | - /// include a <see cref="BuildResult.ProjectStateAfterBuild"/> that includes ONLY the |
73 | | - /// explicitly-requested properties, items, and metadata. |
74 | | - /// </summary> |
75 | | - ProvideSubsetOfStateAfterBuild = 1 << 5, |
76 | | - |
77 | | - /// <summary> |
78 | | - /// When this flag is present, projects loaded during build will ignore missing imports (<see cref="ProjectLoadSettings.IgnoreMissingImports"/> and <see cref="ProjectLoadSettings.IgnoreInvalidImports"/>). |
79 | | - /// This is especially useful during a restore since some imports might come from packages that haven't been restored yet. |
80 | | - /// </summary> |
81 | | - IgnoreMissingEmptyAndInvalidImports = 1 << 6, |
82 | | - |
83 | | - /// <summary> |
84 | | - /// When this flag is present, an unresolved MSBuild project SDK will fail the build. This flag is used to |
85 | | - /// change the <see cref="IgnoreMissingEmptyAndInvalidImports" /> behavior to still fail when an SDK is missing |
86 | | - /// because those are more fatal. |
87 | | - /// </summary> |
88 | | - FailOnUnresolvedSdk = 1 << 7, |
89 | | - } |
90 | | - |
91 | 18 | /// <summary> |
92 | 19 | /// BuildRequestData encapsulates all the data needed to submit a build request. |
93 | 20 | /// </summary> |
|
0 commit comments