diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Bcl.AsyncInterfaces.dll b/msvc/MSBuild/Current/Bin/Microsoft.Bcl.AsyncInterfaces.dll
new file mode 100644
index 0000000000000000000000000000000000000000..6031ba1e94835abd1d276b9700394dbafeb2b46c
Binary files /dev/null and b/msvc/MSBuild/Current/Bin/Microsoft.Bcl.AsyncInterfaces.dll differ
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Bcl.AsyncInterfaces.xml b/msvc/MSBuild/Current/Bin/Microsoft.Bcl.AsyncInterfaces.xml
new file mode 100644
index 0000000000000000000000000000000000000000..650a6b978da8531aae2c8b755f0ba6fc69deed27
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Bcl.AsyncInterfaces.xml
@@ -0,0 +1,417 @@
+
+
+
+ Microsoft.Bcl.AsyncInterfaces
+
+
+
+ Provides the core logic for implementing a manual-reset or .
+
+
+
+
+ The callback to invoke when the operation completes if was called before the operation completed,
+ or if the operation completed before a callback was supplied,
+ or null if a callback hasn't yet been provided and the operation hasn't yet completed.
+
+
+
+ State to pass to .
+
+
+ to flow to the callback, or null if no flowing is required.
+
+
+
+ A "captured" or with which to invoke the callback,
+ or null if no special context is required.
+
+
+
+ Whether the current operation has completed.
+
+
+ The result with which the operation succeeded, or the default value if it hasn't yet completed or failed.
+
+
+ The exception with which the operation failed, or null if it hasn't yet completed or completed successfully.
+
+
+ The current version of this value, used to help prevent misuse.
+
+
+ Gets or sets whether to force continuations to run asynchronously.
+ Continuations may run asynchronously if this is false, but they'll never run synchronously if this is true.
+
+
+ Resets to prepare for the next operation.
+
+
+ Completes with a successful result.
+ The result.
+
+
+ Complets with an error.
+
+
+
+ Gets the operation version.
+
+
+ Gets the status of the operation.
+ Opaque value that was provided to the 's constructor.
+
+
+ Gets the result of the operation.
+ Opaque value that was provided to the 's constructor.
+
+
+ Schedules the continuation action for this operation.
+ The continuation to invoke when the operation has completed.
+ The state object to pass to when it's invoked.
+ Opaque value that was provided to the 's constructor.
+ The flags describing the behavior of the continuation.
+
+
+ Ensures that the specified token matches the current version.
+ The token supplied by .
+
+
+ Signals that the operation has completed. Invoked after the result or error has been set.
+
+
+
+ Invokes the continuation with the appropriate captured context / scheduler.
+ This assumes that if is not null we're already
+ running within that .
+
+
+
+ Provides a set of static methods for configuring -related behaviors on asynchronous enumerables and disposables.
+
+
+ Configures how awaits on the tasks returned from an async disposable will be performed.
+ The source async disposable.
+ Whether to capture and marshal back to the current context.
+ The configured async disposable.
+
+
+ Configures how awaits on the tasks returned from an async iteration will be performed.
+ The type of the objects being iterated.
+ The source enumerable being iterated.
+ Whether to capture and marshal back to the current context.
+ The configured enumerable.
+
+
+ Sets the to be passed to when iterating.
+ The type of the objects being iterated.
+ The source enumerable being iterated.
+ The to use.
+ The configured enumerable.
+
+
+ Represents a builder for asynchronous iterators.
+
+
+ Creates an instance of the struct.
+ The initialized instance.
+
+
+ Invokes on the state machine while guarding the .
+ The type of the state machine.
+ The state machine instance, passed by reference.
+
+
+ Schedules the state machine to proceed to the next action when the specified awaiter completes.
+ The type of the awaiter.
+ The type of the state machine.
+ The awaiter.
+ The state machine.
+
+
+ Schedules the state machine to proceed to the next action when the specified awaiter completes.
+ The type of the awaiter.
+ The type of the state machine.
+ The awaiter.
+ The state machine.
+
+
+ Marks iteration as being completed, whether successfully or otherwise.
+
+
+ Gets an object that may be used to uniquely identify this builder to the debugger.
+
+
+ Indicates whether a method is an asynchronous iterator.
+
+
+ Initializes a new instance of the class.
+ The type object for the underlying state machine type that's used to implement a state machine method.
+
+
+ Provides a type that can be used to configure how awaits on an are performed.
+
+
+ Asynchronously releases the unmanaged resources used by the .
+ A task that represents the asynchronous dispose operation.
+
+
+ Provides an awaitable async enumerable that enables cancelable iteration and configured awaits.
+
+
+ Configures how awaits on the tasks returned from an async iteration will be performed.
+ Whether to capture and marshal back to the current context.
+ The configured enumerable.
+ This will replace any previous value set by for this iteration.
+
+
+ Sets the to be passed to when iterating.
+ The to use.
+ The configured enumerable.
+ This will replace any previous set by for this iteration.
+
+
+ Returns an enumerator that iterates asynchronously through collections that enables cancelable iteration and configured awaits.
+ An enumerator for the class.
+
+
+ Provides an awaitable async enumerator that enables cancelable iteration and configured awaits.
+
+
+ Advances the enumerator asynchronously to the next element of the collection.
+
+ A that will complete with a result of true
+ if the enumerator was successfully advanced to the next element, or false if the enumerator has
+ passed the end of the collection.
+
+
+
+ Gets the element in the collection at the current position of the enumerator.
+
+
+
+ Performs application-defined tasks associated with freeing, releasing, or
+ resetting unmanaged resources asynchronously.
+
+
+
+ Allows users of async-enumerable methods to mark the parameter that should receive the cancellation token value from .
+
+
+ Initializes a new instance of the class.
+
+
+
+ Attribute used to indicate a source generator should create a function for marshalling
+ arguments instead of relying on the runtime to generate an equivalent marshalling function at run-time.
+
+
+ This attribute is meaningless if the source generator associated with it is not enabled.
+ The current built-in source generator only supports C# and only supplies an implementation when
+ applied to static, partial, non-generic methods.
+
+
+
+
+ Initializes a new instance of the .
+
+ Name of the library containing the import.
+
+
+
+ Gets the name of the library containing the import.
+
+
+
+
+ Gets or sets the name of the entry point to be called.
+
+
+
+
+ Gets or sets how to marshal string arguments to the method.
+
+
+ If this field is set to a value other than ,
+ must not be specified.
+
+
+
+
+ Gets or sets the used to control how string arguments to the method are marshalled.
+
+
+ If this field is specified, must not be specified
+ or must be set to .
+
+
+
+
+ Gets or sets whether the callee sets an error (SetLastError on Windows or errno
+ on other platforms) before returning from the attributed method.
+
+
+
+
+ Specifies how strings should be marshalled for generated p/invokes
+
+
+
+
+ Indicates the user is suppling a specific marshaller in .
+
+
+
+
+ Use the platform-provided UTF-8 marshaller.
+
+
+
+
+ Use the platform-provided UTF-16 marshaller.
+
+
+
+ Exposes an enumerator that provides asynchronous iteration over values of a specified type.
+ The type of values to enumerate.
+
+
+ Returns an enumerator that iterates asynchronously through the collection.
+ A that may be used to cancel the asynchronous iteration.
+ An enumerator that can be used to iterate asynchronously through the collection.
+
+
+ Supports a simple asynchronous iteration over a generic collection.
+ The type of objects to enumerate.
+
+
+ Advances the enumerator asynchronously to the next element of the collection.
+
+ A that will complete with a result of true if the enumerator
+ was successfully advanced to the next element, or false if the enumerator has passed the end
+ of the collection.
+
+
+
+ Gets the element in the collection at the current position of the enumerator.
+
+
+ Provides a mechanism for releasing unmanaged resources asynchronously.
+
+
+
+ Performs application-defined tasks associated with freeing, releasing, or
+ resetting unmanaged resources asynchronously.
+
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+ Specifies that null is disallowed as an input even if the corresponding type allows it.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns.
+
+
+ Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter may be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that the output will be non-null if the named parameter is non-null.
+
+
+ Initializes the attribute with the associated parameter name.
+
+ The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
+
+
+
+ Gets the associated parameter name.
+
+
+ Applied to a method that will never return under any circumstance.
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+ Initializes the attribute with the specified parameter value.
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+ Specifies that the method or property will ensure that the listed field and property members have not-null values.
+
+
+ Initializes the attribute with a field or property member.
+
+ The field or property member that is promised to be not-null.
+
+
+
+ Initializes the attribute with the list of field and property members.
+
+ The list of field and property members that are promised to be not-null.
+
+
+
+ Gets field or property member names.
+
+
+ Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
+
+
+ Initializes the attribute with the specified return value condition and a field or property member.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+ The field or property member that is promised to be not-null.
+
+
+
+ Initializes the attribute with the specified return value condition and list of field and property members.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+ The list of field and property members that are promised to be not-null.
+
+
+
+ Gets the return value condition.
+
+
+ Gets field or property member names.
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Build.Framework.xml b/msvc/MSBuild/Current/Bin/Microsoft.Build.Framework.xml
new file mode 100644
index 0000000000000000000000000000000000000000..aea6969e317cafe8b5f112ba87fef28d81bb0ba7
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Build.Framework.xml
@@ -0,0 +1,9906 @@
+
+
+
+ Microsoft.Build.Framework
+
+
+
+
+ Provides methods for creating a segmented dictionary that is immutable; meaning it cannot be changed once it is
+ created.
+
+
+
+
+ Represents a segmented dictionary that is immutable; meaning it cannot be changed once it is created.
+
+
+ There are different scenarios best for and others
+ best for .
+
+ In general, is applicable in scenarios most like
+ the scenarios where is applicable, and
+ is applicable in scenarios most like the scenarios where
+ is applicable.
+
+ The following table summarizes the performance characteristics of
+ :
+
+
+ -
+ Operation
+ Complexity
+ Complexity
+ Comments
+
+ -
+ Item
+ O(1)
+ O(log n)
+ Directly index into the underlying segmented dictionary
+
+ -
+ Add()
+ O(n)
+ O(log n)
+ Requires creating a new segmented dictionary
+
+
+
+ This type is backed by segmented arrays to avoid using the Large Object Heap without impacting algorithmic
+ complexity.
+
+ The type of the keys in the dictionary.
+ The type of the values in the dictionary.
+
+ This type has a documented contract of being exactly one reference-type field in size. Our own
+ class depends on it, as well as others externally.
+
+ IMPORTANT NOTICE FOR MAINTAINERS AND REVIEWERS:
+
+ This type should be thread-safe. As a struct, it cannot protect its own fields from being changed from one
+ thread while its members are executing on other threads because structs can change in place simply by
+ reassigning the field containing this struct. Therefore it is extremely important that ⚠⚠ Every member
+ should only dereference this ONCE ⚠⚠. If a member needs to reference the
+ field, that counts as a dereference of this. Calling other instance members
+ (properties or methods) also counts as dereferencing this. Any member that needs to use this more
+ than once must instead assign this to a local variable and use that for the rest of the code instead.
+ This effectively copies the one field in the struct to a local variable so that it is insulated from other
+ threads.
+
+
+
+
+ The immutable collection this builder is based on.
+
+
+
+
+ The current mutable collection this builder is operating on. This field is initialized to a copy of
+ the first time a change is made.
+
+
+
+
+ The return value from the implementation of is
+ . This is the return value for most instances of this
+ enumerator.
+
+
+
+
+ The return value from the implementation of is
+ . This is the return value for instances of this
+ enumerator created by the implementation in
+ .
+
+
+
+
+ Private helper class for use only by .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Represents a segmented list that is immutable; meaning it cannot be changed once it is created.
+
+
+ There are different scenarios best for and others
+ best for .
+
+ The following table summarizes the performance characteristics of
+ :
+
+
+ -
+ Operation
+ Complexity
+ Complexity
+ Comments
+
+ -
+ Item
+ O(1)
+ O(log n)
+ Directly index into the underlying segmented list
+
+ -
+ Add()
+ Currently O(n), but could be O(1) with a relatively large constant
+ O(log n)
+ Currently requires creating a new segmented list, but could be modified to only clone the segments with changes
+
+ -
+ Insert()
+ O(n)
+ O(log n)
+ Requires creating a new segmented list and cloning all impacted segments
+
+
+
+ This type is backed by segmented arrays to avoid using the Large Object Heap without impacting algorithmic
+ complexity.
+
+ The type of the value in the list.
+
+ This type has a documented contract of being exactly one reference-type field in size. Our own
+ class depends on it, as well as others externally.
+
+ IMPORTANT NOTICE FOR MAINTAINERS AND REVIEWERS:
+
+ This type should be thread-safe. As a struct, it cannot protect its own fields from being changed from one
+ thread while its members are executing on other threads because structs can change in place simply by
+ reassigning the field containing this struct. Therefore it is extremely important that ⚠⚠ Every member
+ should only dereference this ONCE ⚠⚠. If a member needs to reference the
+ field, that counts as a dereference of this. Calling other instance members
+ (properties or methods) also counts as dereferencing this. Any member that needs to use this more
+ than once must instead assign this to a local variable and use that for the rest of the code instead.
+ This effectively copies the one field in the struct to a local variable so that it is insulated from other
+ threads.
+
+
+
+
+ The immutable collection this builder is based on.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Private helper class for use only by .
+
+
+
+
+ The immutable collection this builder is based on.
+
+
+
+
+ The current mutable collection this builder is operating on. This field is initialized to a copy of
+ the first time a change is made.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Swaps the values in the two references if the first is greater than the second.
+
+
+ Swaps the values in the two references, regardless of whether the two references are the same.
+
+
+ Helper methods for use in array/span sorting routines.
+
+
+
+ Returns the integer (floor) log of the specified value, base 2.
+ Note that by convention, input value 0 returns 0 since Log(0) is undefined.
+ Does not directly use any hardware intrinsics, nor does it incur branching.
+
+ The value.
+
+
+ Returns approximate reciprocal of the divisor: ceil(2**64 / divisor).
+ This should only be used on 64-bit.
+
+
+ Performs a mod operation using the multiplier pre-computed with .
+
+ PERF: This improves performance in 64-bit scenarios at the expense of performance in 32-bit scenarios. Since
+ we only build a single AnyCPU binary, we opt for improved performance in the 64-bit scenario.
+
+
+
+
+ Provides static methods to invoke members on value types that explicitly implement the
+ member.
+
+
+ Normally, invocation of explicit interface members requires boxing or copying the value type, which is
+ especially problematic for operations that mutate the value. Invocation through these helpers behaves like a
+ normal call to an implicitly implemented member.
+
+
+
+
+ Provides static methods to invoke members on value types that explicitly implement
+ the member.
+
+
+ Normally, invocation of explicit interface members requires boxing or copying the value type, which is
+ especially problematic for operations that mutate the value. Invocation through these helpers behaves like a
+ normal call to an implicitly implemented member.
+
+
+
+
+ Provides static methods to invoke members on value types that explicitly implement the
+ member.
+
+
+ Normally, invocation of explicit interface members requires boxing or copying the value type, which is
+ especially problematic for operations that mutate the value. Invocation through these helpers behaves like a
+ normal call to an implicitly implemented member.
+
+
+
+
+ Provides static methods to invoke members on value types that explicitly implement
+ the member.
+
+
+ Normally, invocation of explicit interface members requires boxing or copying the value type, which is
+ especially problematic for operations that mutate the value. Invocation through these helpers behaves like a
+ normal call to an implicitly implemented member.
+
+
+
+
+ Provides static methods to invoke members on value types that explicitly implement the
+ member.
+
+
+ Normally, invocation of explicit interface members requires boxing or copying the value type, which is
+ especially problematic for operations that mutate the value. Invocation through these helpers behaves like a
+ normal call to an implicitly implemented member.
+
+
+
+
+ Used internally to control behavior of insertion into a or .
+
+
+
+
+ The default insertion behavior.
+
+
+
+
+ Specifies that an existing entry with the same key should be overwritten if encountered.
+
+
+
+
+ Specifies that if an existing entry with the same key is encountered, an exception should be thrown.
+
+
+
+
+ Returns a by-ref to type that is a null reference.
+
+
+
+
+ Returns if a given by-ref to type is a null reference.
+
+
+ This check is conceptually similar to (void*)(&source) == nullptr.
+
+
+
+
+ A combination of and
+ .
+
+
+
+
+ Calculates the maximum number of elements of size which can fit into an array
+ which has the following characteristics:
+
+ - The array can be allocated in the small object heap.
+ - The array length is a power of 2.
+
+
+ The size of the elements in the array.
+ The segment size to use for small object heap segmented arrays.
+
+
+
+ Calculates a shift which can be applied to an absolute index to get the page index within a segmented array.
+
+ The number of elements in each page of the segmented array. Must be a power of 2.
+ The shift to apply to the absolute index to get the page index within a segmented array.
+
+
+
+ Calculates a mask, which can be applied to an absolute index to get the index within a page of a segmented
+ array.
+
+ The number of elements in each page of the segmented array. Must be a power of 2.
+ The bit mask to obtain the index within a page from an absolute index within a segmented array.
+
+
+
+ Mutates a value in-place with optimistic locking transaction semantics via a specified transformation
+ function. The transformation is retried as many times as necessary to win the optimistic locking race.
+
+ The type of value stored by the list.
+
+ The variable or field to be changed, which may be accessed by multiple threads.
+
+
+ A function that mutates the value. This function should be side-effect free,
+ as it may run multiple times when races occur with other threads.
+
+ if the location's value is changed by applying the result of the
+ function; otherwise, if the location's value remained
+ the same because the last invocation of returned the existing value.
+
+
+
+
+ Mutates a value in-place with optimistic locking transaction semantics via a specified transformation
+ function. The transformation is retried as many times as necessary to win the optimistic locking race.
+
+ The type of value stored by the list.
+ The type of argument passed to the .
+
+ The variable or field to be changed, which may be accessed by multiple threads.
+
+
+ A function that mutates the value. This function should be side-effect free, as it may run multiple times
+ when races occur with other threads.
+ The argument to pass to .
+
+ if the location's value is changed by applying the result of the
+ function; otherwise, if the location's value remained
+ the same because the last invocation of returned the existing value.
+
+
+
+
+ Assigns a field or variable containing an immutable list to the specified value and returns the previous
+ value.
+
+ The type of value stored by the list.
+ The field or local variable to change.
+ The new value to assign.
+ The prior value at the specified .
+
+
+
+ Assigns a field or variable containing an immutable list to the specified value if it is currently equal to
+ another specified value. Returns the previous value.
+
+ The type of value stored by the list.
+ The field or local variable to change.
+ The new value to assign.
+ The value to check equality for before assigning.
+ The prior value at the specified .
+
+
+
+ Assigns a field or variable containing an immutable list to the specified value if it is has not yet been
+ initialized.
+
+ The type of value stored by the list.
+ The field or local variable to change.
+ The new value to assign.
+ if the field was assigned the specified value; otherwise,
+ if it was previously initialized.
+
+
+
+ Mutates a value in-place with optimistic locking transaction semantics via a specified transformation
+ function. The transformation is retried as many times as necessary to win the optimistic locking race.
+
+ The type of key stored by the dictionary.
+ The type of value stored by the dictionary.
+
+ The variable or field to be changed, which may be accessed by multiple threads.
+
+
+ A function that mutates the value. This function should be side-effect free,
+ as it may run multiple times when races occur with other threads.
+
+ if the location's value is changed by applying the result of the
+ function; otherwise, if the location's value remained
+ the same because the last invocation of returned the existing value.
+
+
+
+
+ Mutates a value in-place with optimistic locking transaction semantics via a specified transformation
+ function. The transformation is retried as many times as necessary to win the optimistic locking race.
+
+ The type of key stored by the dictionary.
+ The type of value stored by the dictionary.
+ The type of argument passed to the .
+
+ The variable or field to be changed, which may be accessed by multiple threads.
+
+
+ A function that mutates the value. This function should be side-effect free, as it may run multiple times
+ when races occur with other threads.
+ The argument to pass to .
+
+ if the location's value is changed by applying the result of the
+ function; otherwise, if the location's value remained
+ the same because the last invocation of returned the existing value.
+
+
+
+
+ Assigns a field or variable containing an immutable dictionary to the specified value and returns the
+ previous value.
+
+ The type of key stored by the dictionary.
+ The type of value stored by the dictionary.
+ The field or local variable to change.
+ The new value to assign.
+ The prior value at the specified .
+
+
+
+ Assigns a field or variable containing an immutable dictionary to the specified value if it is currently
+ equal to another specified value. Returns the previous value.
+
+ The type of key stored by the dictionary.
+ The type of value stored by the dictionary.
+ The field or local variable to change.
+ The new value to assign.
+ The value to check equality for before assigning.
+ The prior value at the specified .
+
+
+
+ Assigns a field or variable containing an immutable dictionary to the specified value if it is has not yet
+ been initialized.
+
+ The type of key stored by the dictionary.
+ The type of value stored by the dictionary.
+ The field or local variable to change.
+ The new value to assign.
+ if the field was assigned the specified value; otherwise,
+ if it was previously initialized.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defines a fixed-size collection with the same API surface and behavior as an "SZArray", which is a
+ single-dimensional zero-based array commonly represented in C# as T[]. The implementation of this
+ collection uses segmented arrays to avoid placing objects on the Large Object Heap.
+
+ The type of elements stored in the array.
+
+
+
+ The number of elements in each page of the segmented array of type .
+
+
+ The segment size is calculated according to , performs the IL operation
+ defined by . ECMA-335 defines this operation with the following note:
+
+ sizeof returns the total size that would be occupied by each element in an array of this type –
+ including any padding the implementation chooses to add. Specifically, array elements lie sizeof
+ bytes apart.
+
+
+
+
+ The bit shift to apply to an array index to get the page index within .
+
+
+
+
+ The bit mask to apply to an array index to get the index within a page of .
+
+
+
+
+ Represents a collection of keys and values.
+
+
+ This collection has the same performance characteristics as , but
+ uses segmented arrays to avoid allocations in the Large Object Heap.
+
+ The type of the keys in the dictionary.
+ The type of the values in the dictionary.
+
+
+
+ doesn't devirtualize on .NET Framework, so we always ensure
+ is initialized to a non- value.
+
+
+
+
+ Ensures that the dictionary can hold up to 'capacity' entries without any further expansion of its backing storage
+
+
+
+
+ Sets the capacity of this dictionary to what it would be if it had been originally initialized with all its entries
+
+
+ This method can be used to minimize the memory overhead
+ once it is known that no new elements will be added.
+
+ To allocate minimum size storage array, execute the following statements:
+
+ dictionary.Clear();
+ dictionary.TrimExcess();
+
+
+
+
+ Sets the capacity of this dictionary to hold up 'capacity' entries without any further expansion of its backing storage
+
+
+ This method can be used to minimize the memory overhead
+ once it is known that no new elements will be added.
+
+
+
+
+ 0-based index of next entry in chain: -1 means end of chain
+ also encodes whether this entry _itself_ is part of the free list by changing sign and subtracting 3,
+ so -2 means end of free list, -3 means index 0 but on free list, -4 means index 1 but on free list, etc.
+
+
+
+
+ Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and
+ manipulate lists.
+
+
+ This collection has the same performance characteristics as , but uses segmented
+ arrays to avoid allocations in the Large Object Heap.
+
+ The type of elements in the list.
+
+
+ Destination array is not long enough to copy all the items in the collection. Check array index and length.
+
+
+ Hashtable's capacity overflowed and went negative. Check load factor, capacity and the current size of the table.
+
+
+ The given key '{0}' was not present in the dictionary.
+
+
+ Destination array was not long enough. Check the destination index, length, and the array's lower bounds.
+
+
+ Source array was not long enough. Check the source index, length, and the array's lower bounds.
+
+
+ The lower bound of target array must be zero.
+
+
+ Only single dimensional arrays are supported for the requested action.
+
+
+ The value "{0}" is not of type "{1}" and cannot be used in this generic collection.
+
+
+ An item with the same key has already been added. Key: {0}
+
+
+ Target array type is not compatible with the type of items in the collection.
+
+
+ Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
+
+
+ Number was less than the array's lower bound in the first dimension.
+
+
+ Larger than collection size.
+
+
+ Count must be positive and count must refer to a location within the string/array/collection.
+
+
+ Index was out of range. Must be non-negative and less than the size of the collection.
+
+
+ Index must be within the bounds of the List.
+
+
+ Non-negative number required.
+
+
+ capacity was less than the current size.
+
+
+ Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
+
+
+ Collection was modified; enumeration operation may not execute.
+
+
+ Enumeration has either not started or has already finished.
+
+
+ Failed to compare two elements in the array.
+
+
+ Mutating a key collection derived from a dictionary is not allowed.
+
+
+ Mutating a value collection derived from a dictionary is not allowed.
+
+
+ The specified arrays must have the same number of dimensions.
+
+
+ Collection was of a fixed size.
+
+
+ Object is not a array with the same number of elements as the array to compare it to.
+
+
+ Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: '{0}'.
+
+
+ Cannot find the old value
+
+
+
+ This structure is used to return the result of the build and the target outputs.
+
+
+
+
+ Did the build pass or fail
+
+
+
+
+ Target outputs by project
+
+
+
+
+ The constructor takes the result of the build and a list of the target outputs per project
+
+
+
+
+ Did the build pass or fail. True means the build succeeded, False means the build failed.
+
+
+
+
+ Outputs of the targets per project.
+
+
+
+
+ Class to encapsulate state that was stored in BuildEnvironmentHelper.
+
+
+ This should be deleted when BuildEnvironmentHelper can be moved into Framework.
+
+
+
+
+ Arguments for error events
+
+
+
+
+ Subcategory of the error
+
+
+
+
+ Error code
+
+
+
+
+ File name
+
+
+
+
+ The project which issued the event
+
+
+
+
+ Line number
+
+
+
+
+ Column number
+
+
+
+
+ End line number
+
+
+
+
+ End column number
+
+
+
+
+ A link pointing to more information about the error
+
+
+
+
+ This constructor allows all event data to be initialized
+
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+
+
+
+ This constructor which allows a timestamp to be set
+
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ Timestamp when event was created
+
+
+
+ This constructor which allows a timestamp to be set
+
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ Timestamp when event was created
+ message arguments
+
+
+
+ This constructor which allows a timestamp to be set
+
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ A link pointing to more information about the error
+ name of event sender
+ Timestamp when event was created
+ message arguments
+
+
+
+ Default constructor
+
+
+
+
+ The custom sub-type of the event.
+
+
+
+
+ Code associated with event.
+
+
+
+
+ File associated with event.
+
+
+
+
+ The project file which issued this event.
+
+
+
+
+ Line number of interest in associated file.
+
+
+
+
+ Column number of interest in associated file.
+
+
+
+
+ Ending line number of interest in associated file.
+
+
+
+
+ Ending column number of interest in associated file.
+
+
+
+
+ A link pointing to more information about the error.
+
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes to a stream through a binary writer
+
+ Binary reader which the object will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ This class encapsulates the default data associated with build events.
+ It is intended to be extended/sub-classed.
+
+
+
+
+ Message. Volatile because it may be updated lock-free after construction.
+
+
+
+
+ Help keyword
+
+
+
+
+ Sender name
+
+
+
+
+ Timestamp
+
+
+
+
+ Thread id
+
+
+
+
+ Build event context
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows all event data to be initialized
+
+ text message
+ help keyword
+ name of event sender
+
+
+
+ This constructor allows all event data to be initialized while providing a custom timestamp.
+
+ text message
+ help keyword
+ name of event sender
+ TimeStamp of when the event was created
+
+
+
+ The time when event was raised.
+
+
+
+
+ Exposes the private field to derived types.
+ Used for serialization. Avoids the side effects of calling the
+ getter.
+
+
+
+
+ The thread that raised event.
+
+
+
+
+ Text of event.
+
+
+
+
+ Exposes the underlying message field without side-effects.
+ Used for serialization.
+
+
+
+
+ Like but returns a formatted message string if available.
+ Used for serialization.
+
+
+
+
+ Custom help keyword associated with event.
+
+
+
+
+ Name of the object sending this event.
+
+
+
+
+ Event contextual information for the build event argument
+
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+ The message to write to the stream.
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ Run before the object has been deserialized
+ UNDONE (Logging.) Can this and the next function go away, and instead return a BuildEventContext.Invalid from
+ the property if the buildEventContext field is null?
+
+
+
+
+ Run after the object has been deserialized
+
+
+
+
+ This is the default stub implementation, only here as a safeguard.
+ Actual logic is injected from Microsoft.Build.dll to replace this.
+ This is used by the Message property overrides to reconstruct the
+ message lazily on demand.
+
+
+
+
+ Shortcut method to mimic the original logic of creating the formatted strings.
+
+ Name of the resource string.
+ Optional list of arguments to pass to the formatted string.
+ The concatenated formatted string.
+
+
+
+ Will provide location information for an event, this is especially
+ needed in a multi processor environment
+
+
+
+
+ Node event was in
+
+
+
+
+ Target event was in
+
+
+
+
+ The node-unique project request context the event was in
+
+
+
+
+ Id of the task the event was caused from
+
+
+
+
+ The id of the project instance to which this event refers.
+
+
+
+
+ The id of the submission.
+
+
+
+
+ The id of the evaluation
+
+
+
+
+ This is the original constructor. No one should ever use this except internally for backward compatibility.
+
+
+
+
+ Constructs a BuildEventContext with a specified project instance id.
+
+
+
+
+ Constructs a BuildEventContext with a specific submission id
+
+
+
+
+ Constructs a BuildEventContext
+
+
+
+
+ Returns a default invalid BuildEventContext
+
+
+
+
+ Retrieves the Evaluation id.
+
+
+
+
+ NodeId where event took place
+
+
+
+
+ Id of the target the event was in when the event was fired
+
+
+
+
+ Retrieves the Project Context id.
+
+
+
+
+ Retrieves the task id.
+
+
+
+
+ Retrieves the project instance id.
+
+
+
+
+ Retrieves the Submission id.
+
+
+
+
+ Retrieves the BuildRequest id. Note that this is not the same as the global request id on a BuildRequest or BuildResult.
+
+
+
+
+ Indicates an invalid project context identifier.
+
+
+
+
+ Indicates an invalid task identifier.
+
+
+
+
+ Indicates an invalid target identifier.
+
+
+
+
+ Indicates an invalid node identifier.
+
+
+
+
+ Indicates an invalid project instance identifier.
+
+
+
+
+ Indicates an invalid submission identifier.
+
+
+
+
+ Indicates an invalid evaluation identifier.
+
+
+
+
+ Retrieves a hash code for this BuildEventContext.
+
+
+
+
+
+ Compare a BuildEventContext with this BuildEventContext.
+ A build event context is compared in the following way.
+
+ 1. If the object references are the same the contexts are equivalent
+ 2. If the object type is the same and the Id values in the context are the same, the contexts are equivalent
+
+
+
+
+
+
+ Override == so the equals comparison using this operator will be the same as
+ .Equals
+
+ Left hand side operand
+ Right hand side operand
+ True if the object values are identical, false if they are not identical
+
+
+
+ Override != so the equals comparison using this operator will be the same as
+ ! Equals
+
+ Left hand side operand
+ Right hand side operand
+ True if the object values are not identical, false if they are identical
+
+
+
+ Verify the fields are identical
+
+ BuildEventContext to compare to this instance
+ True if the value fields are the same, false if otherwise
+
+
+
+ Override this method to recover subtype-specific state from the remote exception.
+
+
+
+
+ Override this method to provide subtype-specific state to be serialized.
+
+
+
+
+
+ Remote exception internal data serving as the source for the exception deserialization.
+
+
+
+
+ A catch-all type for remote exceptions that we don't know how to deserialize.
+
+
+
+
+ This class represents the event arguments for build finished events.
+
+
+
+
+ Whether the build succeeded
+
+
+
+
+ Default constructor
+
+
+
+
+ Constructor to initialize all parameters.
+ Sender field cannot be set here and is assumed to be "MSBuild"
+
+ text message
+ help keyword
+ True indicates a successful build
+
+
+
+ Constructor which allows the timestamp to be set
+
+ text message
+ help keyword
+ True indicates a successful build
+ Timestamp when the event was created
+
+
+
+ Constructor which allows the timestamp to be set
+
+ text message
+ help keyword
+ True indicates a successful build
+ Timestamp when the event was created
+ message arguments
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ Succeeded is true if the build succeeded; false otherwise.
+
+
+
+
+ This enumeration provides three levels of importance for messages.
+
+
+
+
+ High importance, appears in less verbose logs
+
+
+
+
+ Normal importance
+
+
+
+
+ Low importance, appears in more verbose logs
+
+
+
+
+ Arguments for message events
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows all event data to be initialized
+
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+
+
+
+ This constructor allows a timestamp to be set
+
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+ Timestamp when event was created
+
+
+
+ This constructor allows a timestamp to be set
+
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+ Timestamp when event was created
+ message arguments
+
+
+
+ This constructor allows all event data to be initialized
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+
+
+
+ This constructor allows timestamp to be set
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+ custom timestamp for the event
+
+
+
+ This constructor allows timestamp to be set
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+ custom timestamp for the event
+ message arguments
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ Importance of the message
+
+
+
+
+ The custom sub-type of the event.
+
+
+
+
+ Code associated with event.
+
+
+
+
+ File associated with event.
+
+
+
+
+ Line number of interest in associated file.
+
+
+
+
+ Column number of interest in associated file.
+
+
+
+
+ Ending line number of interest in associated file.
+
+
+
+
+ Ending column number of interest in associated file.
+
+
+
+
+ The project which was building when the message was issued.
+
+
+
+
+ Arguments for build started events.
+
+
+
+
+ Default constructor
+
+
+
+
+ Constructor to initialize all parameters.
+ Sender field cannot be set here and is assumed to be "MSBuild"
+
+ text message
+ help keyword
+
+
+
+ Constructor to initialize all parameters.
+ Sender field cannot be set here and is assumed to be "MSBuild"
+
+ text message
+ help keyword
+ A dictionary which lists the environment of the build when the build is started.
+
+
+
+ Constructor to allow timestamp to be set
+
+ text message
+ help keyword
+ Timestamp when the event was created
+
+
+
+ Constructor to allow timestamp to be set
+
+ text message
+ help keyword
+ Timestamp when the event was created
+ message args
+
+
+
+ The environment which is used at the start of the build
+
+
+
+
+ Base class for build status events. This class is meant
+ to be extended.
+
+
+ WARNING: marking a type [Serializable] without implementing
+ ISerializable imposes a serialization contract -- it is a
+ promise to never change the type's fields i.e. the type is
+ immutable; adding new fields in the next version of the type
+ without following certain special FX guidelines, can break both
+ forward and backward compatibility
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows event data to be initialized.
+
+ text message
+ help keyword
+ name of event sender
+
+
+
+ This constructor allows timestamp to be set
+
+ text message
+ help keyword
+ name of event sender
+ Timestamp when event was created
+
+
+
+ This constructor allows timestamp to be set
+
+ text message
+ help keyword
+ name of event sender
+ Timestamp when event was created
+ Optional arguments for formatting the message string.
+
+
+
+ Arguments for warning events
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows all event data to be initialized
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+
+
+
+ This constructor allows timestamp to be set
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ custom timestamp for the event
+
+
+
+ This constructor allows timestamp to be set
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ custom timestamp for the event
+ message arguments
+
+
+
+ This constructor allows timestamp to be set
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ A link pointing to more information about the warning
+ name of event sender
+ custom timestamp for the event
+ message arguments
+
+
+
+ Serializes the Errorevent to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ The custom sub-type of the event.
+
+
+
+
+ Code associated with event.
+
+
+
+
+ File associated with event.
+
+
+
+
+ Line number of interest in associated file.
+
+
+
+
+ Column number of interest in associated file.
+
+
+
+
+ Ending line number of interest in associated file.
+
+
+
+
+ Ending column number of interest in associated file.
+
+
+
+
+ The project which was building when the message was issued.
+
+
+
+
+ A link pointing to more information about the warning.
+
+
+
+
+ Coupled together with the MSBUILDDISABLEFEATURESFROMVERSION environment variable,
+ this class acts as a way to make risky changes while giving customers an opt-out.
+
+ See docs here: https://github.com/dotnet/msbuild/blob/main/documentation/wiki/ChangeWaves.md
+ For dev docs: https://github.com/dotnet/msbuild/blob/main/documentation/wiki/ChangeWaves-Dev.md
+
+
+
+ Special value indicating that all features behind all Change Waves should be enabled.
+
+
+
+
+ The lowest wave in the current rotation of Change Waves.
+
+
+
+
+ The highest wave in the current rotation of Change Waves.
+
+
+
+
+ Checks the conditions for whether or not we want ApplyChangeWave to be called again.
+
+
+
+
+ The current disabled wave.
+
+
+
+
+ The status of how the disabled wave was set.
+
+
+
+
+ Read from environment variable `MSBUILDDISABLEFEATURESFROMVERSION`, correct it if required, cache it and its ConversionState.
+
+
+
+
+ Determines whether features behind the given wave are enabled.
+
+ The version to compare.
+ A bool indicating whether the change wave is enabled.
+
+
+
+ Resets the state and value of the currently disabled version.
+ Used for testing only.
+
+
+
+
+ Arguments for critical message events. These always have High importance.
+
+
+
+
+ This constructor allows all event data to be initialized
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+
+
+
+ This constructor allows timestamp to be set
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ custom timestamp for the event
+
+
+
+ This constructor allows timestamp to be set
+
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ custom timestamp for the event
+ message arguments
+
+
+
+ Default constructor
+
+
+
+
+ Arguments for custom build events.
+
+
+ [!CAUTION]
+ In .NET 8 and later and Visual Studio 17.8 and later, this type is deprecated; instead use .
+ For more information, see
+ For recommended replacement, see .
+ ]]>
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows event data to be initialized.
+
+ text message
+ help keyword
+ name of sender
+
+
+
+ This constructor allows event data to be initialized including timestamp.
+
+ text message
+ help keyword
+ name of sender
+ Timestamp when event was created
+
+
+
+ This constructor allows event data to be initialized including timestamp.
+
+ text message
+ help keyword
+ name of sender
+ Timestamp when event was created
+ Message arguments
+
+
+
+ Exposes build engine functionality that was made available in newer versions of MSBuild.
+
+
+ Make all members virtual but not abstract, ensuring that implementations can override them and external implementations
+ won't break when the class is extended with new members. This base implementation should be throwing .
+
+
+
+
+ Initial version with LogsMessagesOfImportance() and IsTaskInputLoggingEnabled as the only exposed members.
+
+
+
+
+ Gets an explicit version of this class.
+
+
+ Must be incremented whenever new members are added. Derived classes should override
+ the property to return the version actually being implemented.
+
+
+
+
+ Returns if the given message importance is not guaranteed to be ignored by registered loggers.
+
+ The importance to check.
+ True if messages of the given importance should be logged, false if it's guaranteed that such messages would be ignored.
+
+ Example: If we know that no logger is interested in , this method returns
+ for and , and returns
+ for .
+
+
+
+
+ Returns if the build is configured to log all task inputs.
+
+
+ This is a performance optimization allowing tasks to skip expensive double-logging.
+
+
+
+
+ Arguments for the environment variable read event.
+
+
+
+
+ Initializes an instance of the EnvironmentVariableReadEventArgs class.
+
+
+
+
+ Initializes an instance of the EnvironmentVariableReadEventArgs class.
+
+ The name of the environment variable that was read.
+ The value of the environment variable that was read.
+ Help keyword.
+ The name of the sender of the event.
+ The importance of the message.
+
+
+
+ The name of the environment variable that was read.
+
+
+
+
+ This method should be used in places where one would normally put
+ an "assert". It should be used to validate that our assumptions are
+ true, where false would indicate that there must be a bug in our
+ code somewhere. This should not be used to throw errors based on bad
+ user input or anything that the user did wrong.
+
+
+
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is null.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The value of the argument.
+ Parameter that should not be null.
+
+
+
+ Throws InternalErrorException.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Generic custom error events including extended data for event enriching.
+ Extended data are implemented by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default constructor. Used for deserialization.
+
+
+
+
+ This constructor specifies only type of extended data.
+
+ Type of .
+
+
+
+ This constructor allows all event data to be initialized
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+
+
+
+ This constructor which allows a timestamp to be set
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ Timestamp when event was created
+
+
+
+ This constructor which allows a timestamp to be set
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ Timestamp when event was created
+ message arguments
+
+
+
+ This constructor which allows a timestamp to be set
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ A link pointing to more information about the error
+ name of event sender
+ Timestamp when event was created
+ message arguments
+
+
+
+ Generic custom build events including extended data for event enriching.
+ Extended data are implemented by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default constructor. Used for deserialization.
+
+
+
+
+ This constructor specifies only type of extended data.
+
+ Type of .
+
+
+
+ This constructor allows all event data to be initialized
+
+ Type of .
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+
+
+
+ This constructor allows a timestamp to be set
+
+ Type of .
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+ Timestamp when event was created
+
+
+
+ This constructor allows a timestamp to be set
+
+ Type of .
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+ Timestamp when event was created
+ message arguments
+
+
+
+ This constructor allows all event data to be initialized
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+
+
+
+ This constructor which allows a timestamp to be set
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+ Timestamp when event was created
+
+
+
+ This constructor which allows a timestamp to be set
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ importance of the message
+ Timestamp when event was created
+ message arguments
+
+
+
+ Generic custom warning events including extended data for event enriching.
+ Extended data are implemented by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default constructor. Used for deserialization.
+
+
+
+
+ This constructor specifies only type of extended data.
+
+ Type of .
+
+
+
+ This constructor allows all event data to be initialized
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+
+
+
+ This constructor which allows a timestamp to be set
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ Timestamp when event was created
+
+
+
+ This constructor which allows a timestamp to be set
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ Timestamp when event was created
+ message arguments
+
+
+
+ This constructor which allows a timestamp to be set
+
+ Type of .
+ event sub-category
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ A link pointing to more information about the error
+ name of event sender
+ Timestamp when event was created
+ message arguments
+
+
+
+ Critical message events arguments including extended data for event enriching.
+ Extended data are implemented by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This constructor allows all event data to be initialized
+
+ Type of .
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+
+
+
+ This constructor allows timestamp to be set
+
+ Type of .
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ custom timestamp for the event
+
+
+
+ This constructor allows timestamp to be set
+
+ Type of .
+ event subcategory
+ event code
+ file associated with the event
+ line number (0 if not applicable)
+ column number (0 if not applicable)
+ end line number (0 if not applicable)
+ end column number (0 if not applicable)
+ text message
+ help keyword
+ name of event sender
+ custom timestamp for the event
+ message arguments
+
+
+
+ Default constructor. Used for deserialization.
+
+
+
+
+ This constructor specifies only type of extended data.
+
+ Type of .
+
+
+
+ Generic custom event.
+ Extended data are implemented by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This constructor allows event data to be initialized.
+
+
+
+
+
+ This constructor allows event data to be initialized.
+
+ Type of .
+
+
+
+
+ This constructor allows event data to be initialized.
+
+ Type of .
+ text message
+ help keyword
+ name of sender
+
+
+
+ This constructor allows event data to be initialized including timestamp.
+
+ Type of .
+ text message
+ help keyword
+ name of sender
+ Timestamp when event was created
+
+
+
+ This constructor allows event data to be initialized including timestamp.
+
+ Type of .
+ text message
+ help keyword
+ name of sender
+ Timestamp when event was created
+ Message arguments
+
+
+
+ Arguments for external project finished events
+
+
+
+
+ Default constructor
+
+
+
+
+ Useful constructor
+
+ text message
+ help keyword
+ name of the object sending this event
+ project name
+ true indicates project built successfully
+
+
+
+ Useful constructor including the ability to set the timestamp
+
+ text message
+ help keyword
+ name of the object sending this event
+ project name
+ true indicates project built successfully
+ Timestamp when event was created
+
+
+
+ Project name
+
+
+
+
+ True if project built successfully, false otherwise
+
+
+
+
+ Arguments for external project started events
+
+
+
+
+ Default constructor
+
+
+
+
+ Useful constructor
+
+ text message
+ help keyword
+ name of the object sending this event
+ project name
+ targets we are going to build (empty indicates default targets)
+
+
+
+ Useful constructor, including the ability to set the timestamp of the event
+
+ text message
+ help keyword
+ name of the object sending this event
+ project name
+ targets we are going to build (empty indicates default targets)
+ Timestamp when the event was created
+
+
+
+ Project name
+
+
+
+
+ Targets that we will build in the project. This may mean different things for different project types,
+ our tasks will put something like Rebuild, Clean, etc. here. This may be null if the project is being
+ built with the default target.
+
+
+
+
+ The status of a feature.
+
+
+
+
+ The feature availability is not determined.
+
+
+
+
+ The feature is available.
+
+
+
+
+ The feature is not available.
+
+
+
+
+ The feature is in preview, subject to change API or behavior between releases.
+
+
+
+
+ This class is used to manage features.
+
+
+
+
+ Checks if a feature is available or not.
+
+ The name of the feature.
+ A feature status .
+
+
+
+ Attempts to classify project files for various purposes such as safety and performance.
+
+
+ Callers of this class are responsible to respect current OS path string comparison.
+
+ The term "project files" refers to the root project file (e.g. MyProject.csproj) and
+ any other .props and .targets files it imports.
+
+
+ Classifications provided are:
+
+ -
+ which indicates the file is not expected to change over time,
+ other than when it is first created. This is a subset of non-user-editable files and
+ generally excludes generated files which can be regenerated in response to user actions.
+
+
+
+
+
+
+
+ StringComparison used for comparing paths on current OS.
+
+
+ TODO: Replace RuntimeInformation.IsOSPlatform(OSPlatform.Linux) by NativeMethodsShared.OSUsesCaseSensitivePaths once it is moved out from Shared
+
+
+
+
+ Single, static instance of shared file FileClassifier for member.
+
+
+
+
+ Serves purpose of thread safe set of known immutable directories.
+
+
+ Although is not optimal memory-wise, in this particular case it does not matter
+ much as the expected size of this set is ~5 and in very extreme cases less then 100.
+
+
+
+
+ Copy on write snapshot of .
+
+
+
+
+ Creates default FileClassifier which following immutable folders:
+ Classifications provided are:
+
+ - Program Files\Reference Assemblies\Microsoft
+ - Program Files (x86)\Reference Assemblies\Microsoft
+ - Visual Studio installation root
+
+
+
+ Individual projects NuGet folders are added during project build by calling
+
+
+
+
+
+ Shared singleton instance.
+
+
+
+
+ Try add path into set of known immutable paths.
+ Files under any of these folders are considered non-modifiable.
+
+
+ This value is used by .
+ Files in the NuGet package cache are not expected to change over time, once they are created.
+
+
+
+
+ Gets whether a file is expected to not be modified in place on disk once it has been created.
+
+ The path to the file to test.
+ if the file is non-modifiable, otherwise .
+
+
+
+ Arguments for the generated file used event
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+ The file path relative to the current project.
+
+
+
+
+ The content of the file.
+
+
+
+
+ This interface exposes functionality on the build engine
+ that is required for task authoring.
+
+
+
+
+ Allows tasks to raise error events to all registered loggers.
+ The build engine may perform some filtering or
+ pre-processing on the events, before dispatching them.
+
+ Details of event to raise.
+
+
+
+ Allows tasks to raise warning events to all registered loggers.
+ The build engine may perform some filtering or
+ pre-processing on the events, before dispatching them.
+
+ Details of event to raise.
+
+
+
+ Allows tasks to raise message events to all registered loggers.
+ The build engine may perform some filtering or
+ pre-processing on the events, before dispatching them.
+
+ Details of event to raise.
+
+
+
+ Allows tasks to raise custom events to all registered loggers.
+ The build engine may perform some filtering or
+ pre-processing on the events, before dispatching them.
+
+ Details of event to raise.
+
+
+
+ Returns true if the ContinueOnError flag was set to true for this particular task
+ in the project file.
+
+
+
+
+ Retrieves the line number of the task node within the project file that called it.
+
+
+
+
+ Retrieves the line number of the task node within the project file that called it.
+
+
+
+
+ Returns the full path to the project file that contained the call to this task.
+
+
+
+
+ This method allows tasks to initiate a build on a
+ particular project file. If the build is successful, the outputs
+ (if any) of the specified targets are returned.
+
+
+ 1) it is acceptable to pass null for both targetNames and targetOutputs
+ 2) if no targets are specified, the default targets are built
+ 3) target outputs are returned as ITaskItem arrays indexed by target name
+
+ The project to build.
+ The targets in the project to build (can be null).
+ A hash table of additional global properties to apply
+ to the child project (can be null). The key and value should both be strings.
+ The outputs of each specified target (can be null).
+ true, if build was successful
+
+
+
+ This interface extends to provide a reference to the class.
+ Future engine API should be added to the class as opposed to introducing yet another version of the IBuildEngine interface.
+
+
+
+
+ Returns the new build engine interface.
+
+
+
+
+ This interface extends IBuildEngine to provide a method allowing building
+ project files in parallel.
+
+
+
+
+ This property allows a task to query whether or not the system is running in single process mode or multi process mode.
+ Single process mode (IsRunningMultipleNodes = false) is where the engine is initialized with the number of cpus = 1 and the engine is not a child engine.
+ The engine is in multi process mode (IsRunningMultipleNodes = true) when the engine is initialized with a number of cpus > 1 or the engine is a child engine.
+
+
+
+
+ This method allows tasks to initiate a build on a
+ particular project file. If the build is successful, the outputs
+ (if any) of the specified targets are returned.
+
+
+ 1) it is acceptable to pass null for both targetNames and targetOutputs
+ 2) if no targets are specified, the default targets are built
+ 3) target outputs are returned as ITaskItem arrays indexed by target name
+
+ The project to build.
+ The targets in the project to build (can be null).
+ A hash table of additional global properties to apply
+ to the child project (can be null). The key and value should both be strings.
+ The outputs of each specified target (can be null).
+ A tools version recognized by the Engine that will be used during this build (can be null).
+ true, if build was successful
+
+
+
+ This method allows tasks to initiate a build on a
+ particular project file. If the build is successful, the outputs
+ (if any) of the specified targets are returned.
+
+
+ 1) it is acceptable to pass null for both targetNames and targetOutputs
+ 2) if no targets are specified, the default targets are built
+ 3) target outputs are returned as ITaskItem arrays indexed by target name
+
+ The project to build.
+ The targets in the project to build (can be null).
+ An array of hashtables of additional global properties to apply
+ to the child project (array entries can be null).
+ The key and value in the hashtable should both be strings.
+ The outputs of each specified target (can be null).
+ A tools version recognized by the Engine that will be used during this build (can be null).
+ If true the operation will only be run if the cache doesn't
+ already contain the result. After the operation the result is
+ stored in the cache
+ If true the project will be unloaded once the
+ operation is completed
+ true, if build was successful
+
+
+
+ This interface extends IBuildEngine to provide a method allowing building
+ project files in parallel.
+
+
+
+
+ This method allows tasks to initiate a build on a
+ particular project file. If the build is successful, the outputs
+ (if any) of the specified targets are returned.
+
+
+ 1) it is acceptable to pass null for both targetNames and targetOutputs
+ 2) if no targets are specified, the default targets are built
+
+
+ The project to build.
+ The targets in the project to build (can be null).
+ An array of hashtables of additional global properties to apply
+ to the child project (array entries can be null).
+ The key and value in the hashtable should both be strings.
+ A list of global properties which should be removed.
+ A tools version recognized by the Engine that will be used during this build (can be null).
+ Should the target outputs be returned in the BuildEngineResult
+ Returns a structure containing the success or failure of the build and the target outputs by project.
+
+
+
+ Informs the system that this task has a long-running out-of-process component and other work can be done in the
+ build while that work completes.
+
+
+
+
+ Waits to reacquire control after yielding.
+
+
+
+
+ Defines the lifetime of a registered task object.
+
+
+
+
+ The registered object will be disposed when the build ends.
+
+
+
+
+ The registered object will be disposed when the AppDomain is unloaded.
+
+
+ The AppDomain to which this refers is the one in which MSBuild was launched,
+ not the one in which the Task was launched.
+
+
+
+
+ This interface extends IBuildEngine to provide a mechanism allowing tasks to
+ share data between task invocations.
+
+
+
+
+ Registers an object with the system that will be disposed of at some specified time
+ in the future.
+
+ The key used to retrieve the object.
+ The object to be held for later disposal.
+ The lifetime of the object.
+ The object may be disposed earlier that the requested time if
+ MSBuild needs to reclaim memory.
+
+
+ This method may be called by tasks which need to maintain state across task invocations,
+ such as to cache data which may be expensive to generate but which is known not to change during the
+ build. It is strongly recommended that be set to true if the
+ object will retain any significant amount of data, as this gives MSBuild the most flexibility to
+ manage limited process memory resources.
+
+
+ The thread on which the object is disposed may be arbitrary - however it is guaranteed not to
+ be disposed while the task is executing, even if is set
+ to true.
+
+
+ If the object implements IDisposable, IDisposable.Dispose will be invoked on the object before
+ discarding it.
+
+
+
+
+
+ Retrieves a previously registered task object stored with the specified key.
+
+ The key used to retrieve the object.
+ The lifetime of the object.
+
+ The registered object, or null is there is no object registered under that key or the object
+ has been discarded through early collection.
+
+
+
+
+ Unregisters a previously-registered task object.
+
+ The key used to retrieve the object.
+ The lifetime of the object.
+
+ The registered object, or null is there is no object registered under that key or the object
+ has been discarded through early collection.
+
+
+
+
+ This interface extends IBuildEngine to log telemetry.
+
+
+
+
+ Logs telemetry.
+
+ The event name.
+ The event properties.
+
+
+
+ This interface extends to allow tasks to get the current project's global properties.
+
+
+
+
+ Gets the global properties for the current project.
+
+ An containing the global properties of the current project.
+
+
+
+ This interface extends to allow tasks to set whether they want to
+ log an error when a task returns without logging an error.
+
+
+
+
+ This interface extends to let tasks know if a warning
+ they are about to log will be converted into an error.
+
+
+
+
+ Determines whether the logging service will convert the specified
+ warning code into an error.
+
+ The warning code to check.
+ A boolean to determine whether the warning should be treated as an error.
+
+
+
+ This interface extends to provide resource management API to tasks.
+
+
+
+
+ If a task launches multiple parallel processes, it should ask how many cores it can use.
+
+ The number of cores a task can potentially use.
+ The number of cores a task is allowed to use.
+
+
+
+ A task should notify the build manager when all or some of the requested cores are not used anymore.
+ When task is finished, the cores it requested are automatically released.
+
+ Number of cores no longer in use.
+
+
+
+ Interface for tasks which can be cancelled.
+
+
+
+
+ Instructs the task to exit as soon as possible, or to immediately exit if Execute is invoked after this method.
+
+
+ Cancel() may be called at any time after the task has been instantiated, even before is called.
+ Cancel calls may come in from any thread. The implementation of this method should not block indefinitely.
+
+
+
+
+ This interface is used to forward events to another loggers
+
+
+
+
+ This method is called by the node loggers to forward the events to central logger
+
+
+
+
+ Type of handler for MessageRaised events
+
+
+
+
+ Type of handler for ErrorRaised events
+
+
+
+
+ Type of handler for WarningRaised events
+
+
+
+
+ Type of handler for CustomEventRaised events
+
+
+
+
+ Type of handler for BuildStartedEvent events
+
+
+
+
+ Type of handler for BuildFinishedEvent events
+
+
+
+
+ Type of handler for ProjectStarted events
+
+
+
+
+ Type of handler for ProjectFinished events
+
+
+
+
+ Type of handler for TargetStarted events
+
+
+
+
+ Type of handler for TargetFinished events
+
+
+
+
+ Type of handler for TaskStarted events
+
+
+
+
+ Type of handler for TaskFinished events
+
+
+
+
+ Type of handler for BuildStatus events
+
+
+
+
+ Type of handler for AnyEventRaised events
+
+
+
+
+ This interface defines the events raised by the build engine.
+ Loggers use this interface to subscribe to the events they
+ are interested in receiving.
+
+
+
+
+ this event is raised to log a message
+
+
+
+
+ this event is raised to log an error
+
+
+
+
+ this event is raised to log a warning
+
+
+
+
+ this event is raised to log the start of a build
+
+
+
+
+ this event is raised to log the end of a build
+
+
+
+
+ this event is raised to log the start of a project build
+
+
+
+
+ this event is raised to log the end of a project build
+
+
+
+
+ this event is raised to log the start of a target build
+
+
+
+
+ this event is raised to log the end of a target build
+
+
+
+
+ this event is raised to log the start of task execution
+
+
+
+
+ this event is raised to log the end of task execution
+
+
+
+
+ this event is raised to log custom events
+
+
+
+
+ this event is raised to log any build status event
+
+
+
+
+ this event is raised to log any build event. These events do not include telemetry. To receive telemetry, you must attach to the event.
+
+
+
+
+ Helper methods for interface.
+
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Helper method ensuring single deduplicated subscription to the event.
+
+
+ Handler to the event. If this handler is already subscribed, single subscription will be ensured.
+
+
+
+ Type of handler for TelemetryLogged events
+
+
+
+
+ This interface defines the events raised by the build engine.
+ Loggers use this interface to subscribe to the events they
+ are interested in receiving.
+
+
+
+
+ this event is raised to when telemetry is logged.
+
+
+
+
+ This interface defines the events raised by the build engine.
+ Loggers use this interface to subscribe to the events they
+ are interested in receiving.
+
+
+
+
+ Should evaluation events include generated metaprojects?
+
+
+
+
+ Should evaluation events include profiling information?
+
+
+
+
+ Should task events include task inputs?
+
+
+
+
+ This interface defines the events raised by the build engine.
+ Loggers use this interface to subscribe to the events they
+ are interested in receiving.
+
+
+
+
+ Determines whether properties and items should be logged on
+ instead of .
+
+
+
+
+ Interface for Extended EventArgs to allow enriching particular events with extended data.
+ Deriving from EventArgs will be deprecated soon and using Extended EventArgs is recommended for custom Event Args.
+
+
+
+
+ Unique string identifying type of extended data so receiver side knows how to interpret, deserialize and handle .
+
+
+
+
+ Metadata of .
+ Example usage:
+ - data which needed in custom code to properly routing this message without interpreting/deserializing .
+ - simple extended data can be transferred in form of dictionary key-value per one extended property.
+
+
+
+
+ Transparent data as string.
+ Custom code is responsible to serialize and deserialize this string to structured data - if needed.
+ Custom code can use any serialization they deem safe - e.g. json for textual data, base64 for binary data...
+
+
+
+
+ This interface extends the ILogger interface to provide a property which can be used to forward events
+ to a logger running in a different process. It can also be used to create filtering loggers.
+
+
+
+
+ This property is set by the build engine to allow a node loggers to forward messages to the
+ central logger
+
+
+
+
+ This property is set by the build engine or node to inform the forwarding logger which node it is running on
+
+
+
+
+ An interface implemented by tasks that are generated by ITaskFactory instances.
+
+
+
+
+ Sets a value on a property of this task instance.
+
+ The property to set.
+ The value to set. The caller is responsible to type-coerce this value to match the property's .
+
+ All exceptions from this method will be caught in the taskExecution host and logged as a fatal task error
+
+
+
+
+ Gets the property value.
+
+ The property to get.
+
+ The value of the property, the value's type will match the type given by .
+
+
+ MSBuild calls this method after executing the task to get output parameters.
+ All exceptions from this method will be caught in the taskExecution host and logged as a fatal task error
+
+
+
+
+ Interface for tasks which is supports incrementality.
+
+ The tasks implementing this interface should return false to stop the build when in is true and task is not fully incremental. Try to provide helpful information to diagnose incremental behavior.
+
+
+
+ Set by MSBuild when Question flag is used.
+
+
+
+
+ Enumeration of the levels of detail of an event log.
+
+
+ The level of detail (i.e. verbosity) of an event log is entirely controlled by the logger generating the log -- a logger
+ will be directed to keep its verbosity at a certain level, based on user preferences, but a logger is free to choose the
+ events it logs for each verbosity level.
+
+ LOGGING GUIDELINES FOR EACH VERBOSITY LEVEL:
+ 1) Quiet -- only display a summary at the end of build
+ 2) Minimal -- only display errors, warnings, high importance events and a build summary
+ 3) Normal -- display all errors, warnings, high importance events, some status events, and a build summary
+ 4) Detailed -- display all errors, warnings, high and normal importance events, all status events, and a build summary
+ 5) Diagnostic -- display all events, and a build summary
+
+
+
+
+ The most minimal output
+
+
+
+
+ Relatively little output
+
+
+
+
+ Standard output. This should be the default if verbosity level is not set
+
+
+
+
+ Relatively verbose, but not exhaustive
+
+
+
+
+ The most verbose and informative verbosity
+
+
+
+
+ This interface defines a "logger" in the build system. A logger subscribes to build system events. All logger classes must
+ implement this interface to be recognized by the build engine.
+
+
+
+
+ The verbosity level directs the amount of detail that appears in a logger's event log. Though this is only a
+ recommendation based on user preferences, and a logger is free to choose the exact events it logs, it is still
+ important that the guidelines for each level be followed, for a good user experience.
+
+ The verbosity level.
+
+
+
+ This property holds the user-specified parameters to the logger. If parameters are not provided, a logger should revert
+ to defaults. If a logger does not take parameters, it can ignore this property.
+
+ The parameter string (can be null).
+
+
+
+ Called by the build engine to allow loggers to subscribe to the events they desire.
+
+ The events available to loggers.
+
+
+
+ Called by the build engine to allow loggers to release any resources they may have allocated at initialization time,
+ or during the build.
+
+
+
+
+ Provides a way to efficiently enumerate item metadata
+
+
+
+
+ Returns a list of metadata names and unescaped values, including
+ metadata from item definition groups, but not including built-in
+ metadata. Implementations should be low-overhead as the method
+ is used for serialization (in node packet translator) as well as
+ in the binary logger.
+
+
+
+
+ Sets the given metadata. The operation is equivalent to calling
+ on all metadata, but takes
+ advantage of a faster bulk-set operation where applicable. The
+ implementation may not perform the same parameter validation
+ as SetMetadata.
+
+ The metadata to set. The keys are assumed
+ to be unique and values are assumed to be escaped.
+
+
+
+
+ Caching 'Last Write File Utc' times for Immutable files .
+
+
+ Cache is add only. It does not updates already existing cached items.
+
+
+
+
+ Shared singleton instance
+
+
+
+
+ Try get 'Last Write File Utc' time of particular file.
+
+ if record exists
+
+
+
+ Try Add 'Last Write File Utc' time of particular file into cache.
+
+
+
+
+ This interface defines a "parallel aware logger" in the build system. A parallel aware logger
+ will accept a cpu count and be aware that any cpu count greater than 1 means the events will
+ be received from the logger from each cpu as the events are logged.
+
+
+
+
+ Initializes the current instance.
+
+
+
+
+
+
+ This exception is to be thrown whenever an assumption we have made in the code turns out to be false. Thus, if this
+ exception ever gets thrown, it is because of a bug in our own code, not because of something the user or project author
+ did wrong.
+
+
+
+
+ Default constructor.
+ SHOULD ONLY BE CALLED BY DESERIALIZER.
+ SUPPLY A MESSAGE INSTEAD.
+
+
+
+
+ Creates an instance of this exception using the given message.
+
+
+
+
+ Creates an instance of this exception using the given message and inner exception.
+ Adds the inner exception's details to the exception message because most bug reporters don't bother
+ to provide the inner exception details which is typically what we care about.
+
+
+
+
+ Private constructor used for (de)serialization. The constructor is private as this class is sealed
+ If we ever add new members to this class, we'll need to update this.
+
+
+
+
+ A fatal internal error due to a bug has occurred. Give the dev a chance to debug it, if possible.
+
+ Will in all cases launch the debugger, if the environment variable "MSBUILDLAUNCHDEBUGGER" is set.
+
+ In DEBUG build, will always launch the debugger, unless we are in razzle (_NTROOT is set) or in NUnit,
+ or MSBUILDDONOTLAUNCHDEBUGGER is set (that could be useful in suite runs).
+ We don't launch in retail or LKG so builds don't jam; they get a callstack, and continue or send a mail, etc.
+ We don't launch in NUnit as tests often intentionally cause InternalErrorExceptions.
+
+ Because we only call this method from this class, just before throwing an InternalErrorException, there is
+ no danger that this suppression will cause a bug to only manifest itself outside NUnit
+ (which would be most unfortunate!). Do not make this non-private.
+
+ Unfortunately NUnit can't handle unhandled exceptions like InternalErrorException on anything other than
+ the main test thread. However, there's still a callstack displayed before it quits.
+
+ If it is going to launch the debugger, it first does a Debug.Fail to give information about what needs to
+ be debugged -- the exception hasn't been thrown yet. This automatically displays the current callstack.
+
+
+
+
+ Interface for exposing a ProjectElement to the appropriate loggers
+
+
+
+
+ Gets the name of the associated element.
+ Useful for display in some circumstances.
+
+
+
+
+ The outer markup associated with this project element
+
+
+
+
+ Provider of instances.
+ Main design goal is for reusable String Builders and string builder pools.
+
+
+ It is up to particular implementations to decide how to handle unbalanced releases.
+
+
+
+
+ Get a of at least the specified capacity.
+
+ The suggested starting size of this instance.
+ A that may or may not be reused.
+
+ It can be called any number of times; if a is in the cache then
+ it will be returned and the cache emptied. Subsequent calls will return a new .
+
+
+
+
+ Get a string and return its builder to the cache.
+
+ Builder to cache (if it's not too big).
+ The equivalent to 's contents.
+
+ The StringBuilder should not be used after it has been released.
+
+
+
+
+ This interface defines a "task" in the build system. A task is an atomic unit of build operation. All task classes must
+ implement this interface to be recognized by the build engine.
+
+
+
+
+ This property is set by the build engine to allow a task to call back into it.
+
+ The interface on the build engine available to tasks.
+
+
+
+ The build engine sets this property if the host IDE has associated a host object with this particular task.
+
+ The host object instance (can be null).
+
+
+
+ This method is called by the build engine to begin task execution. A task uses the return value to indicate
+ whether it was successful. If a task throws an exception out of this method, the engine will automatically
+ assume that the task has failed.
+
+ true, if successful
+
+
+
+ Interface that a task factory Instance should implement
+
+
+
+
+ Gets the name of the factory.
+
+ The name of the factory.
+
+
+
+ Gets the type of the task this factory will instantiate. Implementations must return a value for this property.
+
+
+
+
+ Initializes this factory for instantiating tasks with a particular inline task block.
+
+ Name of the task.
+ The parameter group.
+ The task body.
+ The task factory logging host.
+ A value indicating whether initialization was successful.
+
+ MSBuild engine will call this to initialize the factory. This should initialize the factory enough so that the factory can be asked
+ whether or not task names can be created by the factory.
+
+ The taskFactoryLoggingHost will log messages in the context of the target where the task is first used.
+
+
+
+
+
+ Get the descriptions for all the task's parameters.
+
+ A non-null array of property descriptions.
+
+
+
+ Create an instance of the task to be used.
+
+
+ The task factory logging host will log messages in the context of the task.
+
+
+ The generated task, or null if the task failed to be created.
+
+
+
+
+ Cleans up any context or state that may have been built up for a given task.
+
+ The task to clean up.
+
+ For many factories, this method is a no-op. But some factories may have built up
+ an AppDomain as part of an individual task instance, and this is their opportunity
+ to shutdown the AppDomain.
+
+
+
+
+ Interface that a task factory Instance should implement if it wants to be able to
+ use new UsingTask parameters such as Runtime and Architecture.
+
+
+
+
+ Initializes this factory for instantiating tasks with a particular inline task block and a set of UsingTask parameters. MSBuild
+ provides an implementation of this interface, TaskHostFactory, that uses "Runtime", with values "CLR2", "CLR4", "CurrentRuntime",
+ and "*" (Any); and "Architecture", with values "x86", "x64", "CurrentArchitecture", and "*" (Any). An implementer of ITaskFactory2
+ can choose to use these pre-defined Runtime and Architecture values, or can specify new values for these parameters.
+
+ Name of the task.
+ Special parameters that the task factory can use to modify how it executes tasks,
+ such as Runtime and Architecture. The key is the name of the parameter and the value is the parameter's value. This
+ is the set of parameters that was set on the UsingTask using e.g. the UsingTask Runtime and Architecture parameters.
+ The parameter group.
+ The task body.
+ The task factory logging host.
+ A value indicating whether initialization was successful.
+
+ MSBuild engine will call this to initialize the factory. This should initialize the factory enough so that the
+ factory can be asked whether or not task names can be created by the factory. If a task factory implements ITaskFactory2,
+ this Initialize method will be called in place of ITaskFactory.Initialize.
+
+ The taskFactoryLoggingHost will log messages in the context of the target where the task is first used.
+
+
+
+
+
+ Create an instance of the task to be used, with an optional set of "special" parameters set on the individual task invocation using
+ the MSBuildRuntime and MSBuildArchitecture default task parameters. MSBuild provides an implementation of this interface,
+ TaskHostFactory, that uses "MSBuildRuntime", with values "CLR2", "CLR4", "CurrentRuntime", and "*" (Any); and "MSBuildArchitecture",
+ with values "x86", "x64", "CurrentArchitecture", and "*" (Any). An implementer of ITaskFactory2 can choose to use these pre-defined
+ MSBuildRuntime and MSBuildArchitecture values, or can specify new values for these parameters.
+
+
+ The task factory logging host will log messages in the context of the task.
+
+
+ Special parameters that the task factory can use to modify how it executes tasks, such as Runtime and Architecture.
+ The key is the name of the parameter and the value is the parameter's value. This is the set of parameters that was
+ set to the task invocation itself, via e.g. the special MSBuildRuntime and MSBuildArchitecture parameters.
+
+
+ If a task factory implements ITaskFactory2, MSBuild will call this method instead of ITaskFactory.CreateTask.
+
+
+ The generated task, or null if the task failed to be created.
+
+
+
+
+ This empty interface is used to pass host objects from an IDE to individual
+ tasks. Depending on the task itself and what kinds parameters and functionality
+ it exposes, the task should define its own interface that inherits from this one,
+ and then use that interface to communicate with the host.
+
+
+
+
+ This interface defines a project item that can be consumed and emitted by tasks.
+
+
+
+
+ Gets or sets the item "specification" e.g. for disk-based items this would be the file path.
+
+
+ This should be named "EvaluatedInclude" but that would be a breaking change to this interface.
+
+ The item-spec string.
+
+
+
+ Gets the names of all the metadata on the item.
+ Includes the built-in metadata like "FullPath".
+
+ The list of metadata names.
+
+
+
+ Gets the number of pieces of metadata on the item. Includes
+ both custom and built-in metadata.
+
+ Count of pieces of metadata.
+
+
+
+ Allows the values of metadata on the item to be queried.
+
+ The name of the metadata to retrieve.
+ The value of the specified metadata.
+
+
+
+ Allows a piece of custom metadata to be set on the item.
+
+ The name of the metadata to set.
+ The metadata value.
+
+
+
+ Allows the removal of custom metadata set on the item.
+
+ The name of the metadata to remove.
+
+
+
+ Allows custom metadata on the item to be copied to another item.
+
+
+ RECOMMENDED GUIDELINES FOR METHOD IMPLEMENTATIONS:
+ 1) this method should NOT copy over the item-spec
+ 2) if a particular piece of metadata already exists on the destination item, it should NOT be overwritten
+ 3) if there are pieces of metadata on the item that make no semantic sense on the destination item, they should NOT be copied
+
+ The item to copy metadata to.
+
+
+
+ Get the collection of custom metadata. This does not include built-in metadata.
+
+
+ RECOMMENDED GUIDELINES FOR METHOD IMPLEMENTATIONS:
+ 1) this method should return a clone of the metadata
+ 2) writing to this dictionary should not be reflected in the underlying item.
+
+ Dictionary of cloned metadata
+
+
+
+ This interface adds escaping support to the ITaskItem interface.
+
+
+
+
+ Gets or sets the item include value e.g. for disk-based items this would be the file path.
+
+
+ Taking the opportunity to fix the property name, although this doesn't
+ make it obvious it's an improvement on ItemSpec.
+
+
+
+
+ Allows the values of metadata on the item to be queried.
+
+
+ Taking the opportunity to fix the property name, although this doesn't
+ make it obvious it's an improvement on GetMetadata.
+
+
+
+
+ Allows a piece of custom metadata to be set on the item. Assumes that the value passed
+ in is unescaped, and escapes the value as necessary in order to maintain its value.
+
+
+ Taking the opportunity to fix the property name, although this doesn't
+ make it obvious it's an improvement on SetMetadata.
+
+
+
+
+ ITaskItem2 implementation which returns a clone of the metadata on this object.
+ Values returned are in their original escaped form.
+
+ The cloned metadata, with values' escaping preserved.
+
+
+
+ Provides a way to efficiently enumerate custom metadata of an item, without built-in metadata.
+
+ TaskItem implementation to return metadata from
+ WARNING: do NOT use List`1.AddRange to iterate over this collection.
+ CopyOnWriteDictionary from Microsoft.Build.Utilities.v4.0.dll is broken.
+ A non-null (but possibly empty) enumerable of item metadata.
+
+
+
+ Stores strings for parts of a message delaying the formatting until it needs to be shown
+
+
+
+
+ Stores the message arguments.
+
+
+
+
+ Exposes the underlying arguments field to serializers.
+
+
+
+
+ Exposes the formatted message string to serializers.
+
+
+
+
+ This constructor allows all event data to be initialized.
+
+ text message.
+ help keyword.
+ name of event sender.
+
+
+
+ This constructor that allows message arguments that are lazily formatted.
+
+ text message.
+ help keyword.
+ name of event sender.
+ Timestamp when event was created.
+ Message arguments.
+
+
+
+ Default constructor.
+
+
+
+
+ Gets the formatted message.
+
+
+
+
+ Serializes to a stream through a binary writer.
+
+ Binary writer which is attached to the stream the event will be serialized into.
+
+
+
+ Deserializes from a stream through a binary reader.
+
+ Binary reader which is attached to the stream the event will be deserialized from.
+ The version of the runtime the message packet was created from
+
+
+
+ Formats the given string using the variable arguments passed in.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ This method is thread-safe.
+ The string to format.
+ Optional arguments for formatting the given string.
+ The formatted string.
+
+
+
+ This attribute is used to mark tasks that need to be run in their own app domains. The build engine will create a new app
+ domain each time it needs to run such a task, and immediately unload it when the task is finished.
+
+
+
+
+ Default constructor.
+
+
+
+
+ Exception that should be thrown by a logger when it cannot continue.
+ Allows a logger to force the build to stop in an explicit way, when, for example, it
+ receives invalid parameters, or cannot write to disk.
+
+
+
+
+ Default constructor.
+
+
+ This constructor only exists to satisfy .NET coding guidelines. Use the rich constructor instead.
+
+
+
+
+ Creates an instance of this exception using the specified error message.
+
+ Message string
+
+
+
+ Creates an instance of this exception using the specified error message and inner exception.
+
+ Message string
+ Inner exception. Can be null
+
+
+
+ Creates an instance of this exception using rich error information.
+
+ Message string
+ Inner exception. Can be null
+ Error code
+ Help keyword for host IDE. Can be null
+
+
+
+ Protected constructor used for (de)serialization.
+ If we ever add new members to this class, we'll need to update this.
+
+ Serialization info
+ Streaming context
+
+
+
+ ISerializable method which we must override since Exception implements this interface
+ If we ever add new members to this class, we'll need to update this.
+
+ Serialization info
+ Streaming context
+
+
+
+ Gets the error code associated with this exception's message (not the inner exception).
+
+ The error code string.
+
+
+
+ Gets the F1-help keyword associated with this error, for the host IDE.
+
+ The keyword string.
+
+
+
+ Arguments for the metaproject generated event.
+
+
+
+
+ Raw xml representing the metaproject.
+
+
+
+
+ Initializes a new instance of the MetaprojectGeneratedEventArgs class.
+
+
+
+
+ Default buffer size to use when dealing with the Windows API.
+
+
+
+
+ Flags for CoWaitForMultipleHandles
+
+
+
+
+ Exit when a handle is signaled.
+
+
+
+
+ Exit when all handles are signaled AND a message is received.
+
+
+
+
+ Exit when an RPC call is serviced.
+
+
+
+
+ Processor architecture values
+
+
+
+
+ Structure that contain information about the system on which we are running
+
+
+
+
+ Wrap the intptr returned by OpenProcess in a safe handle.
+
+
+
+
+ Contains information about the current state of both physical and virtual memory, including extended memory
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Size of the structure, in bytes. You must set this member before calling GlobalMemoryStatusEx.
+
+
+
+
+ Number between 0 and 100 that specifies the approximate percentage of physical
+ memory that is in use (0 indicates no memory use and 100 indicates full memory use).
+
+
+
+
+ Total size of physical memory, in bytes.
+
+
+
+
+ Size of physical memory available, in bytes.
+
+
+
+
+ Size of the committed memory limit, in bytes. This is physical memory plus the
+ size of the page file, minus a small overhead.
+
+
+
+
+ Size of available memory to commit, in bytes. The limit is ullTotalPageFile.
+
+
+
+
+ Total size of the user mode portion of the virtual address space of the calling process, in bytes.
+
+
+
+
+ Size of unreserved and uncommitted memory in the user mode portion of the virtual
+ address space of the calling process, in bytes.
+
+
+
+
+ Size of unreserved and uncommitted memory in the extended portion of the virtual
+ address space of the calling process, in bytes.
+
+
+
+
+ Contains information about a file or directory; used by GetFileAttributesEx.
+
+
+
+
+ Contains the security descriptor for an object and specifies whether
+ the handle retrieved by specifying this structure is inheritable.
+
+
+
+
+ Architecture as far as the current process is concerned.
+ It's x86 in wow64 (native architecture is x64 in that case).
+ Otherwise it's the same as the native architecture.
+
+
+
+
+ Actual architecture of the system.
+
+
+
+
+ Convert SYSTEM_INFO architecture values to the internal enum
+
+
+
+
+
+
+ Read system info values
+
+
+
+
+ Get the exact physical core count on Windows
+ Useful for getting the exact core count in 32 bits processes,
+ as Environment.ProcessorCount has a 32-core limit in that case.
+ https://github.com/dotnet/runtime/blob/221ad5b728f93489655df290c1ea52956ad8f51c/src/libraries/System.Runtime.Extensions/src/System/Environment.Windows.cs#L171-L210
+
+
+
+
+ Gets the max path limit of the current OS.
+
+
+
+
+ Cached value for MaxPath.
+
+
+
+
+ Cached value for IsUnixLike (this method is called frequently during evaluation).
+
+
+
+
+ Gets a flag indicating if we are running under a Unix-like system (Mac, Linux, etc.)
+
+
+
+
+ Gets a flag indicating if we are running under Linux
+
+
+
+
+ Gets a flag indicating if we are running under flavor of BSD (NetBSD, OpenBSD, FreeBSD)
+
+
+
+
+ Gets a flag indicating if we are running under some version of Windows
+
+
+
+
+ Gets a flag indicating if we are running under Mac OSX
+
+
+
+
+ Gets a string for the current OS. This matches the OS env variable
+ for Windows (Windows_NT).
+
+
+
+
+ Framework named as presented to users (for example in version info).
+
+
+
+
+ OS name that can be used for the msbuildExtensionsPathSearchPaths element
+ for a toolset
+
+
+
+
+ The base directory for all framework paths in Mono
+
+
+
+
+ The directory of the current framework
+
+
+
+
+ Gets the currently running framework path
+
+
+
+
+ Gets the base directory of all Mono frameworks
+
+
+
+
+ System information, initialized when required.
+
+
+ Initially implemented as , but
+ that's .NET 4+, and this is used in MSBuildTaskHost.
+
+
+
+
+ Architecture getter
+
+
+
+
+ Native architecture getter
+
+
+
+
+ Get the last write time of the fullpath to a directory. If the pointed path is not a directory, or
+ if the directory does not exist, then false is returned and fileModifiedTimeUtc is set DateTime.MinValue.
+
+ Full path to the file in the filesystem
+ The UTC last write time for the directory
+
+
+
+ Takes the path and returns the short path
+
+
+
+
+ Takes the path and returns a full path
+
+
+
+
+
+
+ Retrieves the current global memory status.
+
+
+
+
+ Get the last write time of the fullpath to the file.
+
+ Full path to the file in the filesystem
+ The last write time of the file, or DateTime.MinValue if the file does not exist.
+
+ This method should be accurate for regular files and symlinks, but can report incorrect data
+ if the file's content was modified by writing to it through a different link, unless
+ MSBUILDALWAYSCHECKCONTENTTIMESTAMP=1.
+
+
+
+
+ Get the SafeFileHandle for a file, while skipping reparse points (going directly to target file).
+
+ Full path to the file in the filesystem
+ the SafeFileHandle for a file (target file in case of symlinks)
+
+
+
+ Get the last write time of the content pointed to by a file path.
+
+ Full path to the file in the filesystem
+ The last write time of the file, or DateTime.MinValue if the file does not exist.
+
+ This is the most accurate timestamp-extraction mechanism, but it is too slow to use all the time.
+ See https://github.com/dotnet/msbuild/issues/2052.
+
+
+
+
+ Did the HRESULT succeed
+
+
+
+
+ Did the HRESULT Fail
+
+
+
+
+ Given an error code, converts it to an HRESULT and throws the appropriate exception.
+
+
+
+
+
+ Kills the specified process by id and all of its children recursively.
+
+
+
+
+ Returns the parent process id for the specified process.
+ Returns zero if it cannot be gotten for some reason.
+
+
+
+
+ Returns an array of all the immediate child processes by id.
+ NOTE: The IntPtr in the tuple is the handle of the child process. CloseHandle MUST be called on this.
+
+
+
+
+ Internal, optimized GetCurrentDirectory implementation that simply delegates to the native method
+
+
+
+
+
+ Compare an unsafe char buffer with a to see if their contents are identical.
+
+ The beginning of the char buffer.
+ The length of the buffer.
+ The string.
+ True only if the contents of and the first characters in are identical.
+
+
+
+ Gets the current OEM code page which is used by console apps
+ (as opposed to the Windows/ANSI code page)
+ Basically for each ANSI code page (set in Regional settings) there's a corresponding OEM code page
+ that needs to be used for instance when writing to batch files
+
+
+
+
+ Gets the fully qualified filename of the currently executing .exe.
+
+ of the module for which we are finding the file name.
+ The character buffer used to return the file name.
+ The length of the buffer.
+
+
+
+ CoWaitForMultipleHandles allows us to wait in an STA apartment and still service RPC requests from other threads.
+ VS needs this in order to allow the in-proc compilers to properly initialize, since they will make calls from the
+ build thread which the main thread (blocked on BuildSubmission.Execute) must service.
+
+
+
+
+ System.OperatingSystem static methods were added in net5.0.
+ This class creates stand-in methods for net472 builds.
+ Assumes only Windows is supported.
+
+
+
+
+ This attribute is used by task writers to designate certain task parameters as "outputs". The build engine will only allow
+ task parameters (i.e. the task class' .NET properties) that are marked with this attribute to output data from a task. Project
+ authors can only use parameters marked with this attribute in a task's <Output> tag. All task parameters, including those
+ marked with this attribute, may be treated as inputs to a task by the build engine.
+
+
+
+
+ Default constructor.
+
+
+
+
+ Assigns unique evaluation ids. Thread safe.
+
+
+
+
+ Returns a unique evaluation id
+
+
+ The id is guaranteed to be unique across all running processes.
+ Additionally, it is monotonically increasing for callers on the same process id
+
+
+
+
+ Evaluation main phases used by the profiler
+
+
+ Order matters since the profiler pretty printer orders profiled items from top to bottom using
+ the pass they belong to
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The kind of the evaluated location being tracked
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Represents a location for different evaluation elements tracked by the EvaluationProfiler.
+
+
+
+
+ Default descriptions for locations that are used in case a description is not provided
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructs a generic evaluation location
+
+
+ Used by serialization/deserialization purposes
+
+
+
+
+ Constructs a generic evaluation location based on a (possibly null) parent Id.
+
+
+ A unique Id gets assigned automatically
+ Used by serialization/deserialization purposes
+
+
+
+
+ Constructs a generic evaluation location with no parent.
+
+
+ A unique Id gets assigned automatically
+ Used by serialization/deserialization purposes
+
+
+
+
+ An empty location, used as the starting instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Result of profiling an evaluation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Result of timing the evaluation of a given element at a given location
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Arguments for the project evaluation finished event.
+
+
+
+
+ Initializes a new instance of the ProjectEvaluationFinishedEventArgs class.
+
+
+
+
+ Initializes a new instance of the ProjectEvaluationFinishedEventArgs class.
+
+
+
+
+ Gets or sets the full path of the project that started evaluation.
+
+
+
+
+ Global properties used during this evaluation.
+
+
+
+
+ Final set of properties produced by this evaluation.
+
+
+
+
+ Final set of items produced by this evaluation.
+
+
+
+
+ The result of profiling a project.
+
+
+ Null if profiling is not turned on
+
+
+
+
+ Arguments for the project evaluation started event.
+
+
+
+
+ Initializes a new instance of the ProjectEvaluationStartedEventArgs class.
+
+
+
+
+ Initializes a new instance of the ProjectEvaluationStartedEventArgs class.
+
+
+
+
+ Gets or sets the full path of the project that started evaluation.
+
+
+
+
+ Arguments for project finished events
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ name of the project
+ true indicates project built successfully
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild". This constructor allows the timestamp to be set as well
+
+ text message
+ help keyword
+ name of the project
+ true indicates project built successfully
+ Timestamp when the event was created
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ Project name
+
+
+
+
+ True if project built successfully, false otherwise
+
+
+
+
+ Arguments for the project imported event.
+
+
+
+
+ Initializes a new instance of the ProjectImportedEventArgs class.
+
+
+
+
+ Initializes a new instance of the ProjectImportedEventArgs class.
+
+
+
+
+ Gets or sets the original value of the Project attribute.
+
+
+
+
+ Gets or sets the full path to the project file that was imported. Will be null
+ if the import statement was a glob and no files matched, or the condition (if any) evaluated
+ to false.
+
+
+
+
+ Gets or sets if this import was ignored. Ignoring imports is controlled by
+ ProjectLoadSettings. This is only set when an import would have been included
+ but was ignored to due being invalid. This does not include when a globbed import returned
+ no matches, or a conditioned import that evaluated to false.
+
+
+
+
+ Arguments for project started events
+
+
+
+
+ Indicates an invalid project identifier.
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ project name
+ targets we are going to build (empty indicates default targets)
+ list of properties
+ list of items
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ project id
+ text message
+ help keyword
+ project name
+ targets we are going to build (empty indicates default targets)
+ list of properties
+ list of items
+ event context info for the parent project
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ project id
+ text message
+ help keyword
+ project name
+ targets we are going to build (empty indicates default targets)
+ list of properties
+ list of items
+ event context info for the parent project
+ An containing global properties.
+ The tools version.
+
+
+
+ This constructor allows event data to be initialized. Also the timestamp can be set
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ project name
+ targets we are going to build (empty indicates default targets)
+ list of properties
+ list of items
+ The of the event.
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ project id
+ text message
+ help keyword
+ project name
+ targets we are going to build (empty indicates default targets)
+ list of properties
+ list of items
+ event context info for the parent project
+ The of the event.
+
+
+
+ Gets the identifier of the project.
+
+
+
+
+ Event context information, where the event was fired from in terms of the build location
+
+
+
+
+ The name of the project file
+
+
+
+
+ Project name
+
+
+
+
+ Targets that we will build in the project
+
+
+
+
+ Targets that we will build in the project
+
+
+
+
+ Gets the set of global properties used to evaluate this project.
+
+
+
+
+ Gets the set of global properties used to evaluate this project.
+
+
+
+
+ Gets the tools version used to evaluate this project.
+
+
+
+
+ List of properties in this project. This is a live, read-only list.
+
+
+
+
+ List of items in this project. This is a live, read-only list.
+
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ The argument for a property initial value set event.
+
+
+
+
+ Creates an instance of the class.
+
+
+
+
+ Creates an instance of the class.
+
+ The name of the property.
+ The value of the property.
+ The source of the property.
+ The message of the property.
+ The help keyword.
+ The sender name of the event.
+ The importance of the message.
+
+
+
+ The name of the property.
+
+
+
+
+ The value of the property.
+
+
+
+
+ The source of the property.
+
+
+
+
+ The argument for a property reassignment event.
+
+
+
+
+ Creates an instance of the PropertyReassignmentEventArgs class.
+
+
+
+
+ Creates an instance of the PropertyReassignmentEventArgs class.
+
+ The name of the property whose value was reassigned.
+ The previous value of the reassigned property.
+ The new value of the reassigned property.
+ The location of the reassignment.
+ The message of the reassignment event.
+ The help keyword of the reassignment.
+ The sender name of the reassignment event.
+ The importance of the message.
+
+
+
+ The name of the property whose value was reassigned.
+
+
+
+
+ The previous value of the reassigned property.
+
+
+
+
+ The new value of the reassigned property.
+
+
+
+
+ The location of the reassignment.
+
+
+
+
+ This class defines the attribute that a task writer can apply to a task's property to declare the property to be a
+ required property.
+
+
+
+
+ Default constructor.
+
+
+
+
+ When marked with the RequiredRuntimeAttribute, a task indicates that it has stricter
+ runtime requirements than a regular task - this tells MSBuild that it will need to potentially
+ launch a separate process for that task if the current runtime does not match the version requirement.
+ This attribute is currently non-functional since there is only one version of the CLR that is
+ capable of running MSBuild v2.0 or v3.5 - the runtime v2.0
+
+
+
+
+ Constructor taking a version, such as "v2.0".
+
+
+
+
+ Returns the runtime version the attribute was constructed with,
+ e.g., "v2.0"
+
+
+
+
+ Arguments for the response file used event
+
+
+
+
+ Initialize a new instance of the ResponseFileUsedEventArgs class.
+
+
+
+
+ A StringBuilder lookalike that reuses its internal storage.
+
+
+ This class is being deprecated in favor of SpanBasedStringBuilder in StringTools. Avoid adding more uses.
+
+
+
+
+ Captured string builder.
+
+
+
+
+ Capacity of borrowed string builder at the time of borrowing.
+
+
+
+
+ Capacity to initialize the builder with.
+
+
+
+
+ Create a new builder, under the covers wrapping a reused one.
+
+
+
+
+ The length of the target.
+
+
+
+
+ Convert to a string.
+
+
+
+
+ Dispose, indicating you are done with this builder.
+
+
+
+
+ Append a character.
+
+
+
+
+ Append a string.
+
+
+
+
+ Append a substring.
+
+
+
+
+
+
+
+
+
+
+ Remove a substring.
+
+
+
+
+ Grab a backing builder if necessary.
+
+
+
+
+ A utility class that mediates access to a shared string builder.
+
+
+ If this shared builder is highly contended, this class could add
+ a second one and try both in turn.
+
+
+
+
+ Made up limit beyond which we won't share the builder
+ because we could otherwise hold a huge builder indefinitely.
+ This was picked empirically to save at least 95% of allocated data size.
+ This constant has to be exactly 2^n (power of 2) where n = 4 ... 32 as GC is optimized to work with such block sizes.
+ Same approach is used in ArrayPool or RecyclableMemoryStream so having same uniform allocation sizes will
+ reduce likelihood of heaps fragmentation.
+
+
+ In order to collect and analyze ETW ReusableStringBuilderFactory events developer could follow these steps:
+ - With compiled as Debug capture events by perfview; example: "perfview collect /NoGui /OnlyProviders=*Microsoft-Build"
+ - Open Events view and filter for ReusableStringBuilderFactory and pick ReusableStringBuilderFactory/Stop
+ - Display columns: returning length, type
+ - Set MaxRet limit to 1_000_000
+ - Right click and Open View in Excel
+ - Use Excel data analytic tools to extract required data from it. I recommend to use
+ Pivot Table/Chart with
+ filter: type=[return-se,discarder];
+ rows: returningLength grouped (right click and Group... into sufficient size bins)
+ value: sum of returningLength
+
+
+ This constant might looks huge, but rather than lowering this constant,
+ we shall focus on eliminating code which requires creating such huge strings.
+
+
+
+
+ The shared builder.
+
+
+
+
+ Obtains a string builder which may or may not already
+ have been used.
+ Never returns null.
+
+
+
+
+ Returns the shared builder for the next caller to use.
+ ** CALLERS, DO NOT USE THE BUILDER AFTER RELEASING IT HERE! **
+
+
+
+
+ This attribute is used to mark a task class as explicitly not being required to run in the STA for COM.
+
+
+
+
+ Default constructor.
+
+
+
+
+ This attribute is used to mark a task class as being required to run in a Single Threaded Apartment for COM.
+
+
+
+
+ Default constructor.
+
+
+
+
+ An abstract interface class to providing real-time logging and status while resolving
+ an SDK.
+
+
+
+
+ Log a build message to MSBuild.
+
+ Message string.
+ Optional message importances. Default to low.
+
+
+
+ Represents a software development kit (SDK) that is referenced in a <Project /> or <Import /> element.
+
+
+
+
+ Initializes a new instance of the SdkReference class.
+
+ The name of the SDK.
+ The version of the SDK.
+ Minimum SDK version required by the project.
+
+
+
+ Gets the name of the SDK.
+
+
+
+
+ Gets the version of the SDK.
+
+
+
+
+ Gets the minimum version required. This value is specified by the project to indicate the minimum version of the
+ SDK that is required in order to build. This is useful in order to produce an error message if a name match can
+ be found but no acceptable version could be resolved.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+ An object to compare with this object.
+
+ if the current object is equal to the parameter; otherwise, .
+
+
+
+
+ Attempts to parse the specified string as a . The expected format is:
+ SDK, SDK/Version, or SDK/min=MinimumVersion
+ Values are not required to specify a version or MinimumVersion.
+
+ An SDK name and version to parse in the format "SDK/Version,min=MinimumVersion".
+ A parsed if the specified value is a valid SDK name.
+ true if the SDK name was successfully parsed, otherwise false.
+
+
+
+
+
+
+
+
+
+
+
+
+ An abstract interface for classes that can resolve a Software Development Kit (SDK).
+
+
+
+
+ Gets the name of the to be displayed in build output log.
+
+
+
+
+ Gets the self-described resolution priority order. MSBuild will sort resolvers
+ by this value.
+
+
+
+
+ Resolves the specified SDK reference.
+
+ A containing the referenced SDKs be resolved.
+ Context for resolving the SDK.
+ Factory class to create an
+
+ An containing the resolved SDKs or associated error / reason
+ the SDK could not be resolved. Return if the resolver is not
+ applicable for a particular .
+
+
+ Note: You must use to return a result.
+
+
+
+
+
+ Context used by an to resolve an SDK.
+
+
+
+
+ Gets a value indicating if the resolver is allowed to be interactive.
+
+
+
+
+ Gets a value indicating if the resolver is running in Visual Studio.
+
+
+
+
+ Logger to log real-time messages back to MSBuild.
+
+
+
+
+ Path to the project file being built.
+
+
+
+
+ Path to the solution file being built, if known. May be null.
+
+
+
+
+ Version of MSBuild currently running.
+
+
+
+
+
+
+
+ Gets or sets any custom state for current build. This allows resolvers to maintain state between resolutions.
+ This property is not thread-safe.
+
+
+
+
+ An abstract interface class to indicate SDK resolver success or failure.
+
+
+ [!NOTE]
+ > Use to create instances of this class. Do not inherit from this class.
+ ]]>
+
+
+
+
+ Indicates the resolution was successful.
+
+
+
+
+ Resolved path to the SDK.
+
+ Null if == false
+
+
+
+
+ Resolved version of the SDK.
+ Can be null or empty if the resolver did not provide a version (e.g. a path based resolver)
+
+ Null if == false
+
+
+
+
+ Additional resolved SDK paths beyond the one specified in
+
+
+ This allows an SDK resolver to return multiple SDK paths, which will all be imported.
+
+
+
+
+ Properties that should be added to the evaluation. This allows an SDK resolver to provide information to the build
+
+
+
+
+ Items that should be added to the evaluation. This allows an SDK resolver to provide information to the build
+
+
+
+
+ The Sdk reference
+
+
+
+
+ An abstract interface class provided to to create an
+ object indicating success / failure.
+
+
+
+
+ Create an object indicating success resolving the SDK.
+
+ Path to the SDK.
+ Version of the SDK that was resolved.
+ Optional warnings to display during resolution.
+
+
+
+
+ Create an object indicating success resolving the SDK.
+
+ Path to the SDK.
+ Version of the SDK that was resolved.
+ Properties to set in the evaluation
+ Items to add to the evaluation
+ Optional warnings to display during resolution.
+
+
+
+
+ Create an object indicating success.
+
+
+ This overload allows any number (zero, one, or many) of SDK paths to be returned. This means a "successful" result
+ may not resolve to any SDKs. The resolver can also supply properties or items to communicate information to the build. This
+ can allow resolvers to report SDKs that could not be resolved without hard-failing the evaluation, which can allow other
+ components to take more appropriate action (for example installing optional workloads or downloading NuGet SDKs).
+
+ SDK paths which should be imported
+ SDK version which should be imported
+ Properties to set in the evaluation
+ Items to add to the evaluation
+ Optional warnings to display during resolution.
+
+
+
+
+ Create an object indicating failure resolving the SDK.
+
+
+ Errors / reasons the SDK could not be resolved. Will be logged as a
+ build error if no other SdkResolvers were able to indicate success.
+
+
+
+
+
+
+ The value of an item and any associated metadata to be added by an SDK resolver. See
+
+
+
+
+ Creates an
+
+ The value (itemspec) for the item
+ A dictionary of item metadata. This should be created with for the comparer.
+
+
+
+ A cached reusable instance of StringBuilder.
+
+
+ An optimization that reduces the number of instances of constructed and collected.
+
+
+
+
+ Get a of at least the specified capacity.
+
+ The suggested starting size of this instance.
+ A that may or may not be reused.
+
+ It can be called any number of times; if a is in the cache then
+ it will be returned and the cache emptied. Subsequent calls will return a new .
+
+ The instance is cached in Thread Local Storage and so there is one per thread.
+
+
+
+
+ Place the specified builder in the cache if it is not too big. Unbalanced Releases are acceptable.
+ The StringBuilder should not be used after it has
+ been released.
+ Unbalanced Releases are perfectly acceptable.It
+ will merely cause the runtime to create a new
+ StringBuilder next time Acquire is called.
+
+ The to cache. Likely returned from .
+
+ The StringBuilder should not be used after it has been released.
+
+
+ Unbalanced Releases are perfectly acceptable.It
+ will merely cause the runtime to create a new
+ StringBuilder next time Acquire is called.
+
+
+
+
+
+ Get a string and return its builder to the cache.
+
+ Builder to cache (if it's not too big).
+ The equivalent to 's contents.
+
+ Convenience method equivalent to calling followed by .
+
+
+
+
+ The reason that a target was built by its parent target.
+
+
+
+
+ This wasn't built on because of a parent.
+
+
+
+
+ The target was part of the parent's BeforeTargets list.
+
+
+
+
+ The target was part of the parent's DependsOn list.
+
+
+
+
+ The target was part of the parent's AfterTargets list.
+
+
+
+
+ Arguments for target finished events
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ target name
+ project file
+ file in which the target is defined
+ true if target built successfully
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ target name
+ project file
+ file in which the target is defined
+ true if target built successfully
+ Target output items for the target. If batching will be null for everything except for the last target in the batch
+
+
+
+ This constructor allows event data to be initialized including the timestamp when the event was created.
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ target name
+ project file
+ file in which the target is defined
+ true if target built successfully
+ Timestamp when the event was created
+ An containing the outputs of the target.
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ Target name
+
+
+
+
+ True if target built successfully, false otherwise
+
+
+
+
+ Project file associated with event.
+
+
+
+
+ File where this target was declared.
+
+
+
+
+ Target outputs
+
+
+
+
+ A reason why a target was skipped.
+
+
+
+
+ The target was not skipped or the skip reason was unknown.
+
+
+
+
+ The target previously built successfully.
+
+
+
+
+ The target previously built unsuccessfully.
+
+
+
+
+ All the target outputs were up-to-date with respect to their inputs.
+
+
+
+
+ The condition on the target was evaluated as false.
+
+
+
+
+ Arguments for the target skipped event.
+
+
+
+
+ Initializes a new instance of the TargetSkippedEventArgs class.
+
+
+
+
+ Initializes a new instance of the TargetSkippedEventArgs class.
+
+
+
+
+ The reason why the target was skipped.
+
+
+
+
+ Gets or sets the name of the target being skipped.
+
+
+
+
+ Gets or sets the parent target of the target being skipped.
+
+
+
+
+ File where this target was declared.
+
+
+
+
+ Why the parent target built this target.
+
+
+
+
+ Whether the target succeeded originally.
+
+
+
+
+ describing the original build of the target, or null if not available.
+
+
+
+
+ The condition expression on the target declaration.
+
+
+
+
+ The value of the condition expression as it was evaluated.
+
+
+
+
+ Arguments for target started events
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ target name
+ project file
+ file in which the target is defined
+
+
+
+ This constructor allows event data to be initialized including the timestamp when the event was created.
+
+ text message
+ help keyword
+ target name
+ project file
+ file in which the target is defined
+ The part of the target.
+ Timestamp when the event was created
+
+
+
+ This constructor allows event data to be initialized.
+
+ text message
+ help keyword
+ target name
+ project file
+ file in which the target is defined
+ The part of the target.
+ The reason the parent built this target.
+ Timestamp when the event was created
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ target name
+
+
+
+
+ Target which caused this target to build
+
+
+
+
+ Project file associated with event.
+
+
+
+
+ File where this target was declared.
+
+
+
+
+ Why this target was built by its parent.
+
+
+
+
+ This class is used by tasks to log their command lines. This class extends
+ so that command lines can be logged as
+ messages. Logging a command line is only relevant for tasks that wrap an
+ underlying executable/tool, or emulate a shell command. Tasks that have
+ no command line equivalent should not raise this extended message event.
+
+
+ WARNING: marking a type [Serializable] without implementing ISerializable
+ imposes a serialization contract -- it is a promise to never change the
+ type's fields i.e. the type is immutable; adding new fields in the next
+ version of the type without following certain special FX guidelines, can
+ break both forward and backward compatibility
+
+
+
+
+ Default (family) constructor.
+
+
+
+
+ Creates an instance of this class for the given task command line.
+
+ The command line used by a task to launch
+ its underlying tool/executable.
+ The name of the task raising this event.
+ Importance of command line -- controls whether
+ the command line will be displayed by less verbose loggers.
+
+
+
+ Creates an instance of this class for the given task command line. This constructor allows the timestamp to be set
+
+ The command line used by a task to launch
+ its underlying tool/executable.
+ The name of the task raising this event.
+ Importance of command line -- controls whether
+ the command line will be displayed by less verbose loggers.
+ Timestamp when the event was created
+
+
+
+ Gets the task command line associated with this event.
+
+
+
+
+ Gets the name of the task that raised this event.
+
+
+
+
+ Arguments for task finished events
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ project file
+ file in which the task is defined
+ task name
+ true indicates task succeed
+
+
+
+ This constructor allows event data to be initialized and the timestamp to be set
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ project file
+ file in which the task is defined
+ task name
+ true indicates task succeed
+ Timestamp when event was created
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes the Errorevent from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ Task Name
+
+
+
+
+ True if target built successfully, false otherwise
+
+
+
+
+ Project file associated with event.
+
+
+
+
+ MSBuild file where this task was defined.
+
+
+
+
+ Lightweight specialized implementation of only used for deserializing items.
+ The goal is to minimize overhead when representing deserialized items.
+ Used by node packet translator and binary logger.
+
+
+
+
+ Clone the task item and all metadata to create a snapshot
+
+ An to clone
+
+
+
+ This class is used by tasks to log their parameters (input, output).
+ The intrinsic ItemGroupIntrinsicTask to add or remove items also
+ uses this class.
+
+
+
+
+ Creates an instance of this class for the given task parameter.
+
+
+
+
+ The type is declared in Microsoft.Build.Framework.dll
+ which is a declarations assembly. The logic to realize the Message is in Microsoft.Build.dll
+ which is an implementations assembly. This seems like the easiest way to inject the
+ implementation for realizing the Message.
+
+
+ Note that the current implementation never runs and is provided merely
+ as a safeguard in case MessageGetter isn't set for some reason.
+
+
+
+
+ Provides a way for Microsoft.Build.dll to provide a more efficient dictionary factory
+ (using ArrayDictionary`2). Since that is an implementation detail, it is not included
+ in Microsoft.Build.Framework.dll so we need this extensibility point here.
+
+
+
+
+ Class which represents the parameter information from the using task as a strongly typed class.
+
+
+
+
+ Encapsulates a list of parameters declared in the UsingTask
+
+ Name of the parameter
+ The actual type of the parameter
+ True if the parameter is both an output and input parameter. False if the parameter is only an input parameter
+ True if the parameter must be supplied to each invocation of the task.
+
+
+
+ The type of the property
+
+
+
+
+ Name of the property
+
+
+
+
+ This task parameter is an output parameter (analogous to [Output] attribute)
+
+
+
+
+ This task parameter is required (analogous to the [Required] attribute)
+
+
+
+
+ This task parameter should be logged when LogTaskInputs is set. Defaults to true.
+
+
+
+
+ When this task parameter is an item list, determines whether to log item metadata. Defaults to true.
+
+
+
+
+ Whether the Log and LogItemMetadata properties have been assigned already.
+
+
+
+
+ Arguments for task started events
+
+
+
+
+ Default constructor
+
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ project file
+ file in which the task is defined
+ task name
+
+
+
+ This constructor allows event data to be initialized.
+ Sender is assumed to be "MSBuild".
+
+ text message
+ help keyword
+ project file
+ file in which the task is defined
+ task name
+ Timestamp when event was created
+
+
+
+ Serializes to a stream through a binary writer
+
+ Binary writer which is attached to the stream the event will be serialized into
+
+
+
+ Deserializes the Errorevent from a stream through a binary reader
+
+ Binary reader which is attached to the stream the event will be deserialized from
+ The version of the runtime the message packet was created from
+
+
+
+ Task name.
+
+
+
+
+ Project file associated with event.
+
+
+
+
+ MSBuild file where this task was defined.
+
+
+
+
+ Line number of the task invocation in the project file
+
+
+
+
+ Column number of the task invocation in the project file
+
+
+
+
+ Arguments for telemetry events.
+
+
+
+
+ Gets or sets the name of the event.
+
+
+
+
+ Gets or sets a list of properties associated with the event.
+
+
+
+
+ Telemetry of build.
+
+
+
+
+ Time at which build have started.
+
+
+ It is time when build started, not when BuildManager start executing build.
+ For example in case of MSBuild Server it is time before we connected or launched MSBuild Server.
+
+
+
+
+ Time at which inner build have started.
+
+
+ It is time when build internally started, i.e. when BuildManager starts it.
+ In case of MSBuild Server it is time when Server starts build.
+
+
+
+
+ Time at which build have finished.
+
+
+
+
+ Overall build success.
+
+
+
+
+ Build Target.
+
+
+
+
+ MSBuild server fallback reason.
+ Either "ServerBusy", "ConnectionError" or null (no fallback).
+
+
+
+
+ Version of MSBuild.
+
+
+
+
+ Display version of the Engine suitable for display to a user.
+
+
+
+
+ Path to project file.
+
+
+
+
+ Host in which MSBuild build was executed.
+ For example: "VS", "VSCode", "Azure DevOps", "GitHub Action", "CLI", ...
+
+
+
+
+ State of MSBuild server process before this build.
+ One of 'cold', 'hot', null (if not run as server)
+
+
+
+
+ Framework name suitable for display to a user.
+
+
+
+
+ Static class to help access and modify known telemetries.
+
+
+
+
+ Partial Telemetry for build.
+ This could be optionally initialized with some values from early in call stack, for example in Main method.
+ After this instance is acquired by a particular build, this is set to null.
+ Null means there are no prior collected build telemetry data, new clean instance shall be created for particular build.
+
+
+
+
+ Describes how logging was configured.
+
+
+
+
+ True if terminal logger was used.
+
+
+
+
+ What was user intent:
+ on | true -> user intent to enable logging
+ off | false -> user intent to disable logging
+ auto -> user intent to use logging if terminal allows it
+ null -> no user intent, using default
+
+
+
+
+ How was user intent signaled:
+ arg -> from command line argument or rsp file
+ MSBUILDTERMINALLOGGER -> from environment variable
+ MSBUILDLIVELOGGER -> from environment variable
+ null -> no user intent
+
+
+
+
+ The default behavior of terminal logger if user intent is not specified:
+ on | true -> enable logging
+ off | false -> disable logging
+ auto -> use logging if terminal allows it
+ null -> unspecified
+
+
+
+
+ How was default behavior signaled:
+ sdk -> from SDK
+ DOTNET_CLI_CONFIGURE_MSBUILD_TERMINAL_LOGGER -> from environment variable
+ msbuild -> MSBuild hardcoded default
+ null -> unspecified
+
+
+
+
+ True if console logger was used.
+
+
+
+
+ Type of console logger: serial | parallel
+
+
+
+
+ Verbosity of console logger: quiet | minimal | normal | detailed | diagnostic
+
+
+
+
+ True if file logger was used.
+
+
+
+
+ Type of file logger: serial | parallel
+
+
+
+
+ Number of file loggers.
+
+
+
+
+ Verbosity of file logger: quiet | minimal | normal | detailed | diagnostic
+
+
+
+
+ True if binary logger was used.
+
+
+
+
+ True if binary logger used default name i.e. no LogFile was specified.
+
+
+
+
+ Gets or sets the name of the event.
+
+
+
+
+ Fetches all derived type members wrapped in Dictionary which will be used to build .
+
+
+
+
+ Represents toggleable features of the MSBuild engine
+
+
+
+
+ Do not expand wildcards that match a certain pattern
+
+
+
+
+ Cache file existence for the entire process
+
+
+
+
+ Cache wildcard expansions for the entire process
+
+
+
+
+ Enable restore first functionality in MSBuild.exe
+
+
+
+
+ Allow the user to specify that two processes should not be communicating via an environment variable.
+
+
+
+
+ Override property "MSBuildRuntimeType" to "Full", ignoring the actual runtime type of MSBuild.
+
+
+
+
+ Setting the associated environment variable to 1 restores the pre-15.8 single
+ threaded (slower) copy behavior. Zero implies Int32.MaxValue, less than zero
+ (default) uses the empirical default in Copy.cs, greater than zero can allow
+ perf tuning beyond the defaults chosen.
+
+
+
+
+ Instruct MSBuild to write out the generated "metaproj" file to disk when building a solution file.
+
+
+
+
+ Modifies Solution Generator to generate a metaproj that batches multiple Targets into one MSBuild task invoke.
+
+
+ For example, a run of Clean;Build target will first run Clean on all projects,
+ then run Build on all projects. When enabled, it will run Clean;Build on all
+ Projects at the back to back. Allowing the second target to start sooner than before.
+
+
+
+
+ Log statistics about property functions which require reflection
+
+
+
+
+ Log all environment variables whether or not they are used in a build in the binary log.
+
+
+
+
+ Log all environment variables whether or not they are used in a build in the binary log.
+
+
+
+
+ Log property tracking information.
+
+
+
+
+ When evaluating items, this is the minimum number of items on the running list to use a dictionary-based remove optimization.
+
+
+
+
+ Name of environment variables used to enable MSBuild server.
+
+
+
+
+ Do not log command line information to build loggers. Useful to unbreak people who parse the msbuild log and who are unwilling to change their code.
+
+
+
+
+ https://github.com/dotnet/msbuild/pull/4975 started expanding qualified metadata in Update operations. Before they'd expand to empty strings.
+ This escape hatch turns back the old empty string behavior.
+
+
+
+
+ Force whether Project based evaluations should evaluate elements with false conditions.
+
+
+
+
+ Always use the accurate-but-slow CreateFile approach to timestamp extraction.
+
+
+
+
+ Truncate task inputs when logging them. This can reduce memory pressure
+ at the expense of log usefulness.
+
+
+
+
+ Disables truncation of Condition messages in Tasks/Targets via ExpanderOptions.Truncate.
+
+
+
+
+ Disables skipping full drive/filesystem globs that are behind a false condition.
+
+
+
+
+ Disables skipping full up to date check for immutable files. See FileClassifier class.
+
+
+
+
+ When copying over an existing file, copy directly into the existing file rather than deleting and recreating.
+
+
+
+
+ Emit events for project imports.
+
+
+
+
+ Emit events for project imports.
+
+
+
+
+ Read information only once per file per ResolveAssemblyReference invocation.
+
+
+
+
+ Never use the slow (but more accurate) CreateFile approach to timestamp extraction.
+
+
+
+
+ Allow node reuse of TaskHost nodes. This results in task assemblies locked past the build lifetime, preventing them from being rebuilt if custom tasks change, but may improve performance.
+
+
+
+
+ Whether or not to ignore imports that are considered empty. See ProjectRootElement.IsEmptyXmlFile() for more info.
+
+
+
+
+ Whether to respect the TreatAsLocalProperty parameter on the Project tag.
+
+
+
+
+ Whether to write information about why we evaluate to debug output.
+
+
+
+
+ Whether to warn when we set a property for the first time, after it was previously used.
+
+
+
+
+ MSBUILDUSECASESENSITIVEITEMNAMES is an escape hatch for the fix
+ for https://github.com/dotnet/msbuild/issues/1751. It should
+ be removed (permanently set to false) after establishing that
+ it's unneeded (at least by the 16.0 timeframe).
+
+
+
+
+ Disable the use of paths longer than Windows MAX_PATH limits (260 characters) when running on a long path enabled OS.
+
+
+
+
+ Disable the use of any caching when resolving SDKs.
+
+
+
+
+ Don't delete TargetPath metadata from associated files found by RAR.
+
+
+
+
+ Disable AssemblyLoadContext isolation for plugins.
+
+
+
+
+ Enables the user of autorun functionality in CMD.exe on Windows which is disabled by default in MSBuild.
+
+
+
+
+ Disables switching codepage to UTF-8 after detection of characters that can't be represented in the current codepage.
+
+
+
+
+ Workaround for https://github.com/Microsoft/vstest/issues/1503.
+
+
+
+
+ Use the original, string-only resx parsing in .NET Core scenarios.
+
+
+ Escape hatch for problems arising from https://github.com/dotnet/msbuild/pull/4420.
+
+
+
+
+ Overrides the default behavior of property expansion on evaluation of a .
+
+
+ Escape hatch for problems arising from https://github.com/dotnet/msbuild/pull/5552.
+
+
+
+
+ Allows displaying the deprecation warning for BinaryFormatter in your current environment.
+
+
+
+
+ Throws InternalErrorException.
+
+
+ Clone of ErrorUtilities.ThrowInternalError which isn't available in Framework.
+
+
+
+
+ Throws InternalErrorException.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+ Clone from ErrorUtilities which isn't available in Framework.
+
+
+
+
+ Formats the given string using the variable arguments passed in.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ Thread safe.
+
+ The string to format.
+ Optional arguments for formatting the given string.
+ The formatted string.
+
+ Clone from ResourceUtilities which isn't available in Framework.
+
+
+
+
+ The arguments for an uninitialized property read event.
+
+
+
+
+ UninitializedPropertyReadEventArgs
+
+
+
+
+ Creates an instance of the UninitializedPropertyReadEventArgs class
+
+ The name of the uninitialized property that was read.
+ The message of the uninitialized property that was read.
+ The helpKeyword of the uninitialized property that was read.
+ The sender name of the event.
+ The message importance of the event.
+
+
+
+ The name of the uninitialized property that was read.
+
+
+
+
+ Represents an argument to a .
+
+
+ Functionally, it is simply a reference to another . Those who manually
+ instantiate this class should remember to call before setting the first
+ property and after setting the last property of the object.
+
+
+
+
+ Default constructor needed for XAML deserialization.
+
+
+
+
+ Name of the this argument refers to.
+
+
+ Its value must point to a valid . This field is mandatory and culture invariant.
+
+
+
+
+ Tells if the pointed to by must be defined for the definition
+ of the owning this argument to make sense.
+
+
+ This field is optional and is set to false by default.
+
+
+
+
+ The string used to separate this argument value from the parent switch in the command line.
+
+
+ This field is optional and culture invariant.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ Represents a property.
+
+
+ This represents schema information (name, allowed values, etc) of a property.
+ Since this is just schema information, there is no field like "Value" used to get/set the value of this
+ property.
+ Those who manually instantiate this class should remember to call before
+ setting the first property and after setting the last property of the object.
+
+
+ This partial class contains all properties which are public and hence settable in XAML. Those properties that
+ are internal are defined in another partial class below.
+
+
+ Represents a property.
+
+
+ This represents schema information (name, allowed values, etc) of a property.
+ Since this is just schema information, there is no field like "Value" used to get/set the value of this
+ property.
+ Those who manually instantiate this class should remember to call before
+ setting the first property and after setting the last property of the object.
+
+
+ This partial class contains members that are auto-generated, internal, etc. Whereas the
+ other partial class contains public properties that can be set in XAML.
+
+
+
+
+ See DisplayName property.
+
+
+
+
+ Default constructor. Needed for deserializtion from a persisted format.
+
+
+
+
+ The name of this .
+
+
+ This field is mandatory and culture invariant. The value of this field cannot be set to the empty string.
+
+
+
+
+ The name that could be used by a prospective UI client to display this .
+
+
+ This field is optional and is culture sensitive. When this property is not set, it is assigned the same
+ value as the property (and hence, would not be localized).
+
+
+
+
+ Description of this for use by a prospective UI client.
+
+
+ This field is optional and is culture sensitive.
+
+
+
+
+ The keyword that is used to open the help page for this property.
+
+
+ This form of specifying help takes precedence over
+ and + .
+ This field is optional and is culture insensitive.
+
+
+
+
+ The URL of the help page for this property that will be opened when the user hits F1.
+
+
+ This property is higher in priority that +
+ (i.e., these two properties are ignored if
+ is specified), but lower in priority than .
+ This field is optional and is culture insensitive.
+
+ ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vstoc/html/06ddebea-2c83-4a45-bb48-6264c797ed93.htm
+
+
+
+ The help file to use when the user hits F1. Must specify along with this.
+
+
+ This property goes along with . . This
+ form of specifying the help page for a property takes lower precedence than both
+ and .
+ This field is optional and is culture insensitive.
+
+
+
+
+ The help context to use when the user hits F1. Must specify along with this.
+
+
+ This property uses the property to display the help context of the specified
+ help file. This field is optional. This
+ form of specifying the help page for a property takes lower precedence than both
+ and .
+
+
+
+
+ The name of the category to which this property belongs to.
+
+
+
+ If the value of this field does not correspond to the Name
+ property of a element defined in
+ the containing , a default with this name
+ is auto-generated and added to the containing class.
+
+
+ This field is optional and is culture invariant.
+
+
+ When this field is not specified, this property is added to a
+ auto-generated category called General (localized). This field cannot be set to the
+ empty string.
+
+
+
+
+
+ The sub category to which this property belongs to.
+
+
+
+
+ Tells if this property is a read-only property.
+
+
+ This field is optional and its default value is "false".
+
+
+
+
+ A value indicating whether this property allows multiple values to be supplied/selected simultaneously.
+
+
+
+
+ The switch representation of this property for the case when this property represents a tool parameter.
+
+
+ This field is optional and culture invariant.
+
+
+ For the VC++ CL task, WholeProgramOptimization is a boolean parameter. It's switch is GL.
+
+
+
+
+ The prefix for the switch representation of this property for the case when this property represents a tool parameter.
+
+
+ The value specified here overrides the value specified for the parent 's .
+ This field is optional and culture invariant.
+
+
+ For the VC++ CL task, WholeProgramOptimization is a boolean parameter. It's switch is GL and its
+ switch prefix (inherited from the parent since it is not overridden by WholeProgramOptimization)
+ is /. Thus the complete switch in the command line for this property would be /GL
+
+
+
+
+ The token used to separate a switch from its value.
+
+
+ The value specified here overrides the value specified for the parent 's .
+ This field is optional and culture invariant.
+
+
+ Example: Consider /D:WIN32. In this switch and value representation, ":" is the separator since its separates the switch D
+ from its value WIN32.
+
+
+
+
+ A hint to the UI client telling it whether to display this property or not.
+
+
+ This field is optional and has the default value of "true".
+
+
+
+
+ A hint to the command line constructor whether to include this property in the command line or not.
+
+
+ Some properties are used only by the targets and don't want to be included in the command line.
+ Others (like task parameters) are included in the command line in the form of the switch/value they emit.
+ This field is optional and has the default value of true.
+
+
+
+
+ Indicates whether this property is required to have a value set.
+
+
+
+
+ Specifies the default value for this property.
+
+
+ This field is optional and whether, for a ,
+ it is culture sensitive or not depends on the semantics of it.
+
+
+
+
+ The data source where the current value of this property is stored.
+
+
+ If defined, it overrides the
+ property on the containing . This field is mandatory only if the parent
+ does not have the data source initialized. The getter for this property returns
+ only the set directly on this instance.
+
+
+
+
+ Additional attributes of this .
+
+
+ This can be used as a grab bag of additional metadata of this property that are not
+ captured by the primary fields. You will need a custom UI to interpret the additional
+ metadata since the shipped UI formats can't obviously know about it.
+ This field is optional.
+
+
+
+
+ List of arguments for this property.
+
+
+ This field is optional.
+
+
+
+
+ List of value editors for this property.
+
+
+ This field is optional.
+
+
+
+
+ The containing this .
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ Represents the schame of a boolean property.
+
+
+
+
+ Represents the logical negation of a boolean switch.
+
+
+
+ For the VC++ CL task, WholeProgramOptimization is a boolean parameter. It's switch is GL. To
+ disable whole program optimization, you need to pass the ReverseSwitch, which is GL-.
+
+
+ This field is optional.
+
+
+
+
+
+ Represents a category to which a can belong to.
+
+
+ Those who manually
+ instantiate this class should remember to call before setting the first
+ property and after setting the last property of the object.
+
+
+ This partial class contains all properties which are public and hence settable in XAML. Those properties that
+ are internal are defined in another partial class below.
+
+
+ Represents a category to which a can belong to.
+
+
+ Those who manually
+ instantiate this class should remember to call before setting the first
+ property and after setting the last property of the object.
+
+
+ This partial class contains members that are auto-generated, internal, etc. Whereas the
+ other partial class contains public properties that can be set in XAML.
+
+
+
+
+ See DisplayName property.
+
+
+
+
+ The name of this .
+
+
+ This field is mandatory and culture invariant.
+ This field cannot be set to the empty string.
+
+
+
+
+ The name that could be used by a prospective UI client to display this .
+
+
+ This field is optional and is culture sensitive. When this property is not set, it is assigned the same
+ value as the property (and hence, would not be localized).
+
+
+
+
+ Description of this .
+
+
+ This field is optional and is culture sensitive.
+
+
+
+
+ Subtype of this . Is either Grid (default) or CommandLine.
+
+
+ It helps the UI display this category in an appropriate form. E.g. non command line category
+ properties are normally displayed in the form of a property grid.
+
+
+
+
+ Help information for this .
+
+
+ Maybe used to specify a help URL. This field
+ is optional and is culture sensitive.
+
+
+
+
+ Default constructor. Called during deserialization.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ The CategorySchema provides a strongly typed identity handle to the underlying schema data model.
+
+
+
+
+ Used to deserialize the content type information
+
+
+
+
+ metadata hash
+
+
+
+
+ Constructor
+
+
+
+
+ serializes IContentType.Name
+
+
+
+
+ serializes IContentType.DisplayName
+
+
+
+
+ serializes IContentType.ItemType
+
+
+
+
+ serializes IContentType.DefaultContentTypeForItemType
+
+
+
+
+ This property was never used for anything. It should have been removed before we shipped MSBuild 4.0.
+
+
+
+
+ serializes content type's metadata. Accessible via IContentType.GetMetadata()
+
+
+
+
+ Access metadata in convenient way
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ Lazily initializes the metadata dictionary.
+
+ The new dictionary.
+
+ This is a destructive operation. It clears the NameValuePair list field.
+
+
+
+
+ Indicates where the default value for some property may be found.
+
+
+
+
+ The default value for a property is set at the top of the project file (usually via an import of a .props file).
+
+
+
+
+ The default value for a property is set at the bottom of the project file (usually via an import of a .targets file,
+ where the property definition is conditional on whether the property has not already been defined.)
+
+
+
+
+ Represents the location and grouping for a .
+
+
+ Those who manually
+ instantiate this class should remember to call before setting the first
+ property and after setting the last property of the object.
+
+
+
+
+ Default constructor. Needed for proper XAML deserialization.
+
+
+
+
+ The storage location for this data source.
+
+
+ This field is mandatory unless is set. In that case, the parent
+ will be used with the specified style. Example values are ProjectFile and
+ UserFile. ProjectFile causes the property value to be written to and read from the project
+ manifest file or the property sheet (depending on which node in the solution explorer/property manager window
+ is used to spawn the property pages UI). UserFile causes the property value to be written to and read
+ from the .user file.
+
+
+
+
+ The storage style for this data source.
+
+
+ For example, with of ProjectFile, this field can be Element (default) to
+ save as a child XML Element, or Attribute to save properties as an XML attribute.
+
+
+
+
+ Gets or sets the actual MSBuild property name used to read/write the value of this property.
+ Applicable only to objects attached to properties.
+
+ The MSBuild property name to use; or null to use the as the MSBuild property name.
+
+ The persisted name will usually be the same as the property name as it appears in the
+ and the value of this property can therefore be left at is default of null.
+ Since property names must be unique but need not be unique in the persisted store (due to other differences
+ in the data source such as item type) there may be times when Rule property names must be changed to be
+ unique in the XAML file, but without changing how the property is persisted in the MSBuild file.
+ It is in those cases where this property becomes useful.
+ It may also be useful in specialized build environments where property names must differ from the
+ normally used name in order to maintain compatibility with the project system.
+
+
+
+
+ The label of the MSBuild property group/item definition group to which
+ a property/item definition metadata belongs to. Default value is the
+ empty string.
+
+ A VC++ property that exists in the project manifest
+ in the MSBuild property group with label Globals would have this
+ same value for this field.
+
+
+
+ If a is an item definition metadata or item metadata, this field
+ specified the item type of the item definition or the item, respectively. For common properties
+ this field must not be set.
+
+
+
+
+ Indicates if a property is configuration-dependent as indicated by the presence of a configuration
+ condition attached to the property definition at its persistence location.
+
+
+ This field is optional and has the default value of true.
+
+
+
+
+ The data type of the source. Generally one of Item, ItemDefinition, Property,
+ or TargetResults (when is non-empty).
+ Among other things this governs how the data is treated during build.
+
+
+ A value of Item for this property indicates that this property is actually
+ an item array - the list of all items with the item type specified by .
+
+
+
+
+ Gets or sets the semicolon-delimited list of MSBuild targets that must be executed before reading
+ the read-only properties or items described by this .
+
+
+
+
+ Gets or sets a value indicating where the default value for this property can be found.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ Represents the schema of an enumeration property.
+
+ This class inherits the property from the class.
+ That property does not make sense for this property. Use the property on the
+ instead to mark the default value for this property.
+
+
+
+ constructor
+
+
+
+
+ The provider that produces the list of possible values for this property. Must be set.
+
+
+
+
+ A provider-specific set of options to pass to the provider.
+
+
+
+
+ Represents the schema of an enumeration property.
+
+ This class inherits the property from the class.
+ That property does not make sense for this property. Use the property on the
+ instead to mark the default value for this property.
+
+
+
+ constructor
+
+
+
+
+ The list of possible values for this property. Must have at least one value.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ Represents an admissible value of an .
+
+
+
+
+ See DisplayName property.
+
+
+
+
+ Default constructor needed for XAML deserialization.
+
+
+
+
+ The name of this .
+
+
+ This field is mandatory and culture invariant.
+
+
+
+
+ The name that could be used by a prospective UI client to display this .
+
+
+ This field is optional and is culture sensitive. When this property is not set, it is assigned the same
+ value as the property (and hence, would not be localized).
+
+
+
+
+ Description of this for use by a prospective UI client.
+
+
+ This field is optional and is culture sensitive.
+
+
+
+
+ Help information for this .
+
+
+ Maybe used to specify a help URL. This field
+ is optional and is culture sensitive.
+
+
+
+
+ The switch representation of this property for the case when the parent represents a tool parameter.
+
+
+ This field is optional and culture invariant.
+
+ The VC compiler has an named Optimizationused to specify the desired optimization type. All the
+ admissible values for this property have switches, e.g. Disabled (switch = Od), "MinimumSize" (switch = O1),
+ etc.
+
+
+
+ The prefix for the switch representation of this value for the case when the parent represents a tool parameter.
+
+
+ This field is optional and culture invariant.
+
+
+
+
+ Tells if this is the default value for the associated
+ .
+
+
+ This field is optional and the default value for this
+ field is "false".
+
+
+
+
+ Additional attributes of this .
+
+
+ This can be used as a grab bag of additional metadata of this value that are not
+ captured by the primary fields. You will need a custom UI to interpret the additional
+ metadata since the shipped UI formats can't obviously know about it.
+ This field is optional.
+
+
+
+
+ List of arguments for this .
+
+
+ This field is optional.
+
+
+
+
+ simple class that deserialize extension to content type data
+
+
+
+
+ Constructor
+
+
+
+
+ file extension
+
+
+
+
+ corresponding content type
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ Represent the schema of an integer property.
+
+
+
+
+ Minimum allowed value for this property.
+
+
+ This field is optional.
+ It returns null when this property is not set. The value of this
+ property must be less than or equal to the
+ property (assuming that the latter is defined).
+
+
+
+
+ Maximum allowed value for this property.
+
+
+ This field is optional.
+ It returns null when this property is not set. The value of this
+ property must be greater than or equal to the
+ property (assuming that the latter is defined).
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ Interface that we expect all root classes from project schema XAML files to implement
+
+
+
+
+ Return all types of static data for data driven features this node contains
+
+
+
+
+ Returns all instances of static data with Type "type". Null or Empty list if there is no objects from asked type provided by this node
+
+
+
+
+ Used to deserialize the item type information
+
+
+
+
+ Constructor
+
+
+
+
+ serializes IItemType.Name
+
+
+
+
+ serializes IItemType.DisplayName
+
+
+
+
+ serializes IItemType.ItemType
+
+
+
+
+ serializes IItemType.UpToDateCheckInput
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ Represents a name-value pair. The name cannot be null or empty.
+
+
+
+
+ Default constructor needed for
+
+
+
+
+ The name.
+
+
+
+
+ The value.
+
+
+
+
+ Serialization class for node for the Data driven project schema XAML
+
+
+
+
+ Constructor
+
+
+
+
+ Collection of any schema node
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ Methods for overriding one rule with another.
+
+
+
+
+ A subsequent definition for a rule (with the same name) entirely overrides a previous definition.
+
+
+
+
+ A subsequent definition for a rule (with the same name) adds properties to a previous definition.
+
+
+
+
+ Used to represent the schema information for a Tool, a Custom Build Rule, a PropertyPage, etc.
+
+
+
+ Normally represented on disk as XAML, only one instance of this class is maintained per XAML
+ file per project engine (solution).
+
+ Those who manually instantiate this class should remember to call before
+ setting the first property and after setting the last property of the object.
+
+
+
+ This partial class contains all properties which are public and hence settable in XAML. Those properties that
+ are internal are defined in another partial class below.
+
+
+ Used to represent the schema information for a Tool, a Custom Build Rule, a PropertyPage, etc.
+
+
+
+ Normally represented on disk as XAML, only one instance of this class is maintained per XAML
+ file per project engine (solution).
+
+ Those who manually instantiate this class should remember to call before
+ setting the first property and after setting the last property of the object.
+
+
+
+ This partial class contains members that are auto-generated, internal, etc. Whereas the
+ other partial class contains public properties that can be set in XAML.
+
+
+
+
+ See DisplayName property.
+
+
+
+
+ Default constructor. Needed for deserialization from a persisted format.
+
+
+
+
+ The name of this .
+
+
+ This field is mandatory and culture invariant. The value of this field cannot be set to the empty string.
+
+
+
+
+ The name that could be used by a prospective UI client to display this .
+
+
+ This field is optional and is culture sensitive. When this property is not set, it is assigned the same
+ value as the property (and hence, would not be localized).
+
+
+
+
+ The name of the tool executable when this rule represents a tool.
+
+
+
+
+ Description of this for use by a prospective UI client.
+
+
+ This field is optional and is culture sensitive.
+
+
+
+
+ Help information for this .
+
+
+ Maybe used to specify a help URL. This field
+ is optional and is culture sensitive.
+
+
+
+
+ The prefix to use for all property switches in this for the case when this property represent a tool.
+
+
+ The value specified can be overridden by the value specified by a child 's .
+ This field is optional and culture invariant.
+
+
+ For the VC++ CL task, WholeProgramOptimization is a boolean parameter. It's switch is GL and its
+ switch prefix (inherited from the parent since it is not overridden by WholeProgramOptimization)
+ is /. Thus the complete switch in the command line for this property would be /GL
+
+
+
+
+ The token used to separate a property switch from its value.
+
+
+ The value specified here is overridden by the value specified by the child 's .
+ This field is optional and culture invariant.
+
+
+ Example: Consider /D:WIN32. In this switch and value representation, ":" is the separator since its separates the switch D
+ from its value WIN32.
+
+
+
+
+ The UI renderer template used to display this Rule.
+
+
+ The value used to set
+ this field can be anything as long as it is recognized by the intended renderer.
+ This field is required only if this Rule is meant to be displayed as a property page.
+
+
+
+
+ The for all the properties in this . This is overriden by any
+ data source defined locally for a property.
+
+
+ This field need not be specified only if all individual properties have data source defined locally.
+
+
+
+
+ This is a suggestion to a prospective UI client on the relative location of this compared to all other Rules in the system.
+
+
+
+
+ This is used to specify whether multiple files need to be batched on one command line invocation.
+
+
+ This field is optional.
+
+
+
+
+ Indicates whether to hide the command line category or not. Default value is true.
+
+
+ This field is optional.
+
+
+
+
+ When this represents a Build Customization, this field represents the file extension to associate.
+
+
+ This field is optional.
+
+
+
+
+ When this represents a Build Customization, this field represents the message to be displayed before executing a Build Customization during the build.
+
+
+ This field is optional.
+
+
+
+
+ When this represents a Build Customization, this field represents the command line template that is going to be used by a Build Customization task to invoke the tool.
+
+
+ This field is optional.
+
+
+
+
+ When this represents a Build Customization, this field defines the semicolon separated list of additional inputs that are going to be evaluated
+ for the Build Customization target.
+
+
+ This field is optional.
+
+
+
+
+ When this represents a Build Customization, this field defines the semicolon separated list of outputs that are going to be evaluated
+ for the Build Customization target.
+
+
+ This field is optional.
+
+
+
+
+ Gets or sets the method to use when multiple rules with the same name appear in the project
+ to reconcile the rules into one instance.
+
+
+
+
+ This list of properties in this . Atleast one property should be specified.
+
+ The list returned by this property should not be modified.
+
+
+
+ The list of s that properties in this belong to.
+
+
+ This field is optional. Note that this field returns only the categories that were explicitly defined and do
+ not contain any auto-generated categories. When a contained in this
+ declares its category to be something that is not present in this list, then we auto-generate a
+ with that name and add it to the internal list of categories. That auto-generated category will not be returned
+ by this field.
+
+
+
+
+ Gets or sets arbitrary metadata that may be set on a rule.
+
+
+
+
+ Gets or sets a value indicating if property pages for this rule should be hidden or not.
+
+
+
+
+ Thread synchronization.
+
+
+
+
+ See the property.
+
+
+
+
+ Ordered dictionary of category names and the properties contained in them.
+ The order of the categories is exactly the same as that specified in the XAML file.
+
+
+
+
+ A lookup cache of property names to properties.
+
+
+
+
+ This property returns the union of XAML specified s and auto-generated
+ s. The latter are created from the missing categories that are being referred to by the
+ properties in this Rule. The auto-generated s only have their name set.
+
+
+
+
+ Returns all properties partitioned into categories. The return value is never
+ null.
+ The returned list may contain auto-generated categories. Note that if a
+ (or its derived classes) refer to a property that is not specified, then an new
+ Category is generated for the same. If not category is specified for the property, then
+ the property is placed in the "General" category.
+ The list of categories is exactly as specified in the Xaml file. The auto-generated
+ categories come (in no strict order) after the specified categories.
+
+ A dictionary whose keys are the names and
+ the value is the list of properties in that category.
+
+
+
+ Returns the list of properties in a . Returns null if this
+ doesn't contain this category.
+
+
+
+
+ Returns a property with a given name.
+
+ The property, or null if one with a matching name could not be found.
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ Initializes this class after Xaml loading is done.
+
+
+
+
+ Creates a map containing all the evaluated category names and the list of
+ properties belonging to that category.
+
+
+
+
+ This is a simple container for instances.
+
+
+ Note that we only deal in terms of s
+ as far as property pages are concerned. The is only used as a
+ container for more than one . The containing s are
+ immediately stripped off after loading of the xaml file.
+
+
+
+
+ Default constructor needed for XAML deserialization.
+
+
+
+
+ The collection of instances this instance contains.
+ Must have at least one .
+
+
+
+
+ See ISupportInitialize Members.
+
+
+
+
+ See ISupportInitialize Members.
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ see IProjectSchemaNode
+
+
+
+
+ The RuleSchema provides a strongly typed identity handle to the underlying schema data model.
+
+
+
+
+ Represents the schema of a list-of-strings property.
+
+
+ Note, this represents
+ a list of strings, not a list of s.
+
+
+
+
+ Default constructor. Needed for property XAML deserialization.
+
+
+
+
+ The separator to use in delineating individual values of this string list property
+
+
+ For Val1;Val2;Val3, if CommandLineValueSeparator is specified as, say ,,
+ the command line looks like this: /p:val1,val2,val3
+ If not specified, the command line looks like this: /p:val1 /p:val2 /p:val3
+ This field is optional.
+
+
+
+
+ Please don't use. This is planned to be deprecated.
+
+
+
+
+ Qualifies this string property to give it a more specific classification.
+
+
+ Similar to the property.
+
+
+
+
+ Represents the schema of a string property.
+
+
+
+
+ Qualifies this string property to give it a more specific classification.
+
+
+ The value this field is set to, must be understood by the consumer of this field
+ (normally a UI renderer).
+
+ The value of this property can be set to, say, "File", "Folder", "CarModel" etc. to specify
+ if this is a file path, folder path, car model name etc.
+
+
+
+ Represents a value editor
+
+
+
+
+ See DisplayName property.
+
+
+
+
+ Default constructor needed for XAML deserialization.
+
+
+
+
+ The name of this . This field is mandatory and culture invariant.
+
+
+
+
+ The UI display name for the editor
+
+
+
+
+ Additional attributes of the editor that are not generic enough to be made
+ properties on this class. This field is optional.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ See ISupportInitialize.
+
+
+
+
+ This class contains common reflection tasks
+
+
+
+
+ This class contains utility methods for dealing with encoding.
+
+
+
+
+ Get the current system locale code page, OEM version. OEM code pages are used for console-based input/output
+ for historical reasons.
+
+
+
+
+ Checks two encoding types to determine if they are similar to each other (equal or if
+ the Encoding Name is the same).
+
+
+
+ True if the two Encoding objects are equal or similar.
+
+
+
+ Check if an encoding type is UTF8 (with or without BOM).
+
+
+ True if the encoding is UTF8.
+
+
+
+ Check the first 3 bytes of a stream to determine if it matches the UTF8 preamble.
+
+ Steam to check.
+ True when the first 3 bytes of the Stream are equal to the UTF8 preamble (BOM).
+
+
+
+ Check the first 3 bytes of a stream to determine if it matches the given preamble.
+
+ Steam to check.
+ Preamble to look for.
+ True when the first 3 bytes of the Stream are equal to the preamble.
+
+
+
+ Check the first 3 bytes of a file to determine if it matches the 3-byte UTF8 preamble (BOM).
+
+ Path to file to check.
+ True when the first 3 bytes of the file are equal to the UTF8 BOM.
+
+
+
+ Checks to see if a string can be encoded in a specified code page.
+
+ Internal for testing purposes.
+ Code page for encoding.
+ String to encode.
+ True if the string can be encoded in the specified code page.
+
+
+
+ Find the encoding for the batch file.
+
+
+ The "best" encoding is the current OEM encoding, unless it's not capable of representing
+ the characters we plan to put in the file. If it isn't, we can fall back to UTF-8.
+
+ Why not always UTF-8? Because tools don't always handle it well. See
+ https://github.com/dotnet/msbuild/issues/397
+
+
+
+
+ The .NET SDK and Visual Studio both have environment variables that set a custom language. MSBuild should respect the SDK variable.
+ To use the corresponding UI culture, in certain cases the console encoding must be changed. This function will change the encoding in these cases.
+ This code introduces a breaking change in .NET 8 due to the encoding of the console being changed.
+ If the environment variables are undefined, this function should be a no-op.
+
+
+ The custom language that was set by the user for an 'external' tool besides MSBuild.
+ Returns if none are set.
+
+
+
+
+ Look at UI language overrides that can be set by known external invokers. (DOTNET_CLI_UI_LANGUAGE.)
+ Does NOT check System Locale or OS Display Language.
+ Ported from the .NET SDK: https://github.com/dotnet/sdk/blob/bcea1face15458814b8e53e8785b52ba464f6538/src/Cli/Microsoft.DotNet.Cli.Utils/UILanguageOverride.cs
+
+ The custom language that was set by the user for an 'external' tool besides MSBuild.
+ Returns null if none are set.
+
+
+
+ Helper class to wrap the Microsoft.VisualStudio.Setup.Configuration.Interop API to query
+ Visual Studio setup for instances installed on the machine.
+ Code derived from sample: https://code.msdn.microsoft.com/Visual-Studio-Setup-0cedd331
+
+
+
+
+ Query the Visual Studio setup API to get instances of Visual Studio installed
+ on the machine. Will not include anything before Visual Studio "15".
+
+ Enumerable list of Visual Studio instances
+
+
+
+ Wrapper class to represent an installed instance of Visual Studio.
+
+
+
+
+ Version of the Visual Studio Instance
+
+
+
+
+ Path to the Visual Studio installation
+
+
+
+
+ Full name of the Visual Studio instance with SKU name
+
+
+
+
+ Constants that we want to be shareable across all our assemblies.
+
+
+
+
+ The name of the property that indicates the tools path
+
+
+
+
+ Name of the property that indicates the X64 tools path
+
+
+
+
+ Name of the property that indicates the root of the SDKs folder
+
+
+
+
+ Name of the property that indicates that all warnings should be treated as errors.
+
+
+
+
+ Name of the property that indicates a list of warnings to treat as errors.
+
+
+
+
+ Name of the property that indicates a list of warnings to not treat as errors.
+
+
+
+
+ Name of the property that indicates the list of warnings to treat as messages.
+
+
+
+
+ The name of the environment variable that users can specify to override where NuGet assemblies are loaded from in the NuGetSdkResolver.
+
+
+
+
+ The name of the target to run when a user specifies the /restore command-line argument.
+
+
+
+
+ The most current Visual Studio Version known to this version of MSBuild.
+
+
+
+
+ The most current ToolsVersion known to this version of MSBuild.
+
+
+
+
+ A property set during an implicit restore (/restore) or explicit restore (/t:restore) to ensure that the evaluations are not re-used during build
+
+
+
+
+ A property set during an implicit restore (/restore) or explicit restore (/t:restore) to indicate that a restore is executing.
+
+
+
+
+ The most current VSGeneralAssemblyVersion known to this version of MSBuild.
+
+
+
+
+ Current version of this MSBuild Engine assembly in the form, e.g, "12.0"
+
+
+
+
+ Symbol used in ProjectReferenceTarget items to represent default targets
+
+
+
+
+ Framework version against which our test projects should be built.
+
+
+ The targeting pack for this version of .NET Framework must be installed
+ on any machine that wants to run tests successfully, so this can be
+ periodically updated.
+
+
+
+
+ Symbol used in ProjectReferenceTarget items to represent targets specified on the ProjectReference item
+ with fallback to default targets if the ProjectReference item has no targets specified.
+
+
+
+
+ Specifies whether the current evaluation / build is happening during a graph build
+
+
+
+
+ References to other msbuild projects
+
+
+
+
+ Statically specifies what targets a project calls on its references
+
+
+
+
+ Declares a project cache plugin and its configuration.
+
+
+
+
+ Embed specified files in the binary log
+
+
+
+
+ Constants naming well-known item metadata.
+
+
+
+
+ The output path for a given item.
+
+
+
+
+ Opaque holder of shared buffer.
+
+
+
+
+ This class is responsible for serializing and deserializing simple types to and
+ from the byte streams used to communicate INodePacket-implementing classes.
+ Each class implements a Translate method on INodePacket which takes this class
+ as a parameter, and uses it to store and retrieve fields to the stream.
+
+
+
+
+ Returns a read-only serializer.
+
+ The serializer.
+
+
+
+ Returns a write-only serializer.
+
+ The stream containing data to serialize.
+ The serializer.
+
+
+
+ Implementation of ITranslator for reading from a stream.
+
+
+
+
+ The stream used as a source or destination for data.
+
+
+
+
+ The binary reader used in read mode.
+
+
+
+
+ Constructs a serializer from the specified stream, operating in the designated mode.
+
+
+
+
+ Delegates the Dispose call the to the underlying BinaryReader.
+
+
+
+
+ Gets the reader, if any.
+
+
+
+
+ Gets the writer, if any.
+
+
+
+
+ Returns the current serialization mode.
+
+
+
+
+ Translates a boolean.
+
+ The value to be translated.
+
+
+
+ Translates an array.
+
+ The array to be translated.
+
+
+
+ Translates a byte.
+
+ The value to be translated.
+
+
+
+ Translates a short.
+
+ The value to be translated.
+
+
+
+ Translates an unsigned short.
+
+ The value to be translated.
+
+
+
+ Translates an integer.
+
+ The value to be translated.
+
+
+
+
+
+
+ Translates an array.
+
+ The array to be translated.
+
+
+
+ Translates a long.
+
+ The value to be translated.
+
+
+
+ Translates a double.
+
+ The value to be translated.
+
+
+
+ Translates a string.
+
+ The value to be translated.
+
+
+
+ Translates a byte array
+
+ The array to be translated
+
+
+
+ Translates a byte array
+
+ The array to be translated.
+ The length of array which will be used in translation. This parameter is not used when reading
+
+
+
+ Translates a string array.
+
+ The array to be translated.
+
+
+
+
+
+
+ Translates a list of strings
+
+ The list to be translated.
+
+
+
+ Translates a list of T using an
+
+ The list to be translated.
+ The translator to use for the items in the list
+ TaskItem type
+
+
+
+ Translates a collection of T into the specified type using an and
+
+ The collection to be translated.
+ The translator to use for the values in the collection.
+ The factory to create the ICollection.
+ The type contained in the collection.
+ The type of collection to be created.
+
+
+
+ Translates a DateTime.
+
+ The value to be translated.
+
+
+
+ Translates a TimeSpan.
+
+ The value to be translated.
+
+
+
+ Translates a BuildEventContext
+
+
+ This method exists only because there is no serialization method built into the BuildEventContext
+ class, and it lives in Framework and we don't want to add a public method to it.
+
+ The context to be translated.
+
+
+
+ Translates a CultureInfo
+
+ The CultureInfo to translate
+
+
+
+ Translates an enumeration.
+
+ The enumeration type.
+ The enumeration instance to be translated.
+ The enumeration value as an integer.
+ This is a bit ugly, but it doesn't seem like a nice method signature is possible because
+ you can't pass the enum type as a reference and constrain the generic parameter to Enum. Nor
+ can you simply pass as ref Enum, because an enum instance doesn't match that function signature.
+ Finally, converting the enum to an int assumes that we always want to transport enums as ints. This
+ works in all of our current cases, but certainly isn't perfectly generic.
+
+
+
+ Translates a value using the .Net binary formatter.
+
+ The reference type.
+ The value to be translated.
+
+
+
+ Translates an object implementing INodePacketTranslatable.
+
+ The reference type.
+ The value to be translated.
+
+
+
+ Translates an array of objects implementing INodePacketTranslatable.
+
+ The reference type.
+ The array to be translated.
+
+
+
+ Translates an array of objects using an
+
+ The reference type.
+ The array to be translated.
+ The translator to use for the elements in the array
+
+
+
+ Translates a dictionary of { string, string }.
+
+ The dictionary to be translated.
+ The comparer used to instantiate the dictionary.
+
+
+
+ Translates a dictionary of { string, T }.
+
+ The reference type for the values
+ The dictionary to be translated.
+ The comparer used to instantiate the dictionary.
+ The translator to use for the values in the dictionary
+
+
+
+ Translates a dictionary of { string, T } for dictionaries with public parameterless constructors.
+
+ The reference type for the dictionary.
+ The reference type for values in the dictionary.
+ The dictionary to be translated.
+ The translator to use for the values in the dictionary
+
+
+
+ Translates a dictionary of { string, T } for dictionaries with public parameterless constructors.
+
+ The reference type for the dictionary.
+ The reference type for values in the dictionary.
+ The dictionary to be translated.
+ The translator to use for the values in the dictionary
+ The delegate used to instantiate the dictionary.
+
+
+
+ Reads in the boolean which says if this object is null or not.
+
+ The type of object to test.
+ True if the object should be read, false otherwise.
+
+
+
+ Implementation of ITranslator for writing to a stream.
+
+
+
+
+ The stream used as a source or destination for data.
+
+
+
+
+ The binary writer used in write mode.
+
+
+
+
+ Constructs a serializer from the specified stream, operating in the designated mode.
+
+ The stream serving as the source or destination of data.
+
+
+
+ Delegates the Dispose call the to the underlying BinaryWriter.
+
+
+
+
+ Gets the reader, if any.
+
+
+
+
+ Gets the writer, if any.
+
+
+
+
+ Returns the current serialization mode.
+
+
+
+
+ Translates a boolean.
+
+ The value to be translated.
+
+
+
+ Translates an array.
+
+ The array to be translated.
+
+
+
+ Translates a byte.
+
+ The value to be translated.
+
+
+
+ Translates a short.
+
+ The value to be translated.
+
+
+
+ Translates an unsigned short.
+
+ The value to be translated.
+
+
+
+ Translates an integer.
+
+ The value to be translated.
+
+
+
+
+
+
+ Translates an array.
+
+ The array to be translated.
+
+
+
+ Translates a long.
+
+ The value to be translated.
+
+
+
+ Translates a double.
+
+ The value to be translated.
+
+
+
+ Translates a string.
+
+ The value to be translated.
+
+
+
+ Translates a string array.
+
+ The array to be translated.
+
+
+
+ Translates a list of strings
+
+ The list to be translated.
+
+
+
+
+
+
+ Translates a list of T using an
+
+ The list to be translated.
+ The translator to use for the items in the list
+ A TaskItemType
+
+
+
+ Translates a list of T using an
+
+ The list to be translated.
+ The translator to use for the items in the list
+ factory to create the IList
+ A TaskItemType
+ IList subtype
+
+
+
+ Translates a collection of T into the specified type using an and
+
+ The collection to be translated.
+ The translator to use for the values in the collection.
+ The factory to create the ICollection.
+ The type contained in the collection.
+ The type of collection to be created.
+
+
+
+ Translates a DateTime.
+
+ The value to be translated.
+
+
+
+ Translates a TimeSpan.
+
+ The value to be translated.
+
+
+
+ Translates a BuildEventContext
+
+
+ This method exists only because there is no serialization method built into the BuildEventContext
+ class, and it lives in Framework and we don't want to add a public method to it.
+
+ The context to be translated.
+
+
+
+ Translates a CultureInfo
+
+ The CultureInfo
+
+
+
+ Translates an enumeration.
+
+ The enumeration type.
+ The enumeration instance to be translated.
+ The enumeration value as an integer.
+ This is a bit ugly, but it doesn't seem like a nice method signature is possible because
+ you can't pass the enum type as a reference and constrain the generic parameter to Enum. Nor
+ can you simply pass as ref Enum, because an enum instance doesn't match that function signature.
+ Finally, converting the enum to an int assumes that we always want to transport enums as ints. This
+ works in all of our current cases, but certainly isn't perfectly generic.
+
+
+
+ Translates a value using the .Net binary formatter.
+
+ The reference type.
+ The value to be translated.
+
+
+
+ Translates an object implementing INodePacketTranslatable.
+
+ The reference type.
+ The value to be translated.
+
+
+
+ Translates a byte array
+
+ The byte array to be translated
+
+
+
+ Translates a byte array
+
+ The array to be translated.
+ The length of array which will be used in translation
+
+
+
+ Translates an array of objects implementing INodePacketTranslatable.
+
+ The reference type.
+ The array to be translated.
+
+
+
+ Translates an array of objects using an
+
+ The reference type.
+ The array to be translated.
+ The translator to use for the elements in the array
+
+
+
+ Translates a dictionary of { string, string }.
+
+ The dictionary to be translated.
+ The comparer used to instantiate the dictionary.
+
+
+
+ Translates a dictionary of { string, T }.
+
+ The reference type for the values, which implements INodePacketTranslatable.
+ The dictionary to be translated.
+ The comparer used to instantiate the dictionary.
+ The translator to use for the values in the dictionary
+
+
+
+ Translates a dictionary of { string, T } for dictionaries with public parameterless constructors.
+
+ The reference type for the dictionary.
+ The reference type for values in the dictionary.
+ The dictionary to be translated.
+ The translator to use for the values in the dictionary
+
+
+
+ Translates a dictionary of { string, T } for dictionaries with public parameterless constructors.
+
+ The reference type for the dictionary.
+ The reference type for values in the dictionary.
+ The dictionary to be translated.
+ The translator to use for the values in the dictionary
+ The delegate used to instantiate the dictionary.
+
+
+
+ Translates a dictionary of { string, DateTime }.
+
+ The dictionary to be translated.
+ Key comparer
+
+
+
+ Writes out the boolean which says if this object is null or not.
+
+ The object to test.
+ The type of object to test.
+ True if the object should be written, false otherwise.
+
+
+
+ An interface representing an object which may be serialized by the node packet serializer.
+
+
+
+
+ Reads or writes the packet to the serializer.
+
+
+
+
+ This delegate is used for objects which do not have public parameterless constructors and must be constructed using
+ another method. When invoked, this delegate should return a new object which has been translated appropriately.
+
+ The type to be translated.
+
+
+
+ Delegate for users that want to translate an arbitrary structure that doesn't implement (e.g. translating a complex collection)
+
+ the translator
+ the object to translate
+
+
+
+ This delegate is used to create arbitrary collection types for serialization.
+
+ The type of dictionary to be created.
+
+
+
+ The serialization mode.
+
+
+
+
+ Indicates the serializer is operating in write mode.
+
+
+
+
+ Indicates the serializer is operating in read mode.
+
+
+
+
+ This interface represents an object which aids objects in serializing and
+ deserializing INodePackets.
+
+
+ The reason we bother with a custom serialization mechanism at all is two fold:
+ 1. The .Net serialization mechanism is inefficient, even if you implement ISerializable
+ with your own custom mechanism. This is because the serializer uses a bag called
+ SerializationInfo into which you are expected to drop all your data. This adds
+ an unnecessary level of indirection to the serialization routines and prevents direct,
+ efficient access to the byte-stream.
+ 2. You have to implement both a reader and writer part, which introduces the potential for
+ error should the classes be later modified. If the reader and writer methods are not
+ kept in perfect sync, serialization errors will occur. Our custom serializer eliminates
+ that by ensuring a single Translate method on a given object can handle both reads and
+ writes without referencing any field more than once.
+
+
+
+
+ Returns the current serialization mode.
+
+
+
+
+ Returns the binary reader.
+
+
+ This should ONLY be used when absolutely necessary for translation. It is generally unnecessary for the
+ translating object to know the direction of translation. Use one of the Translate methods instead.
+
+
+
+
+ Returns the binary writer.
+
+
+ This should ONLY be used when absolutely necessary for translation. It is generally unnecessary for the
+ translating object to know the direction of translation. Use one of the Translate methods instead.
+
+
+
+
+ Translates a boolean.
+
+ The value to be translated.
+
+
+
+ Translates an array.
+
+ The array to be translated.
+
+
+
+ Translates a byte.
+
+ The value to be translated.
+
+
+
+ Translates a short.
+
+ The value to be translated.
+
+
+
+ Translates a unsigned short.
+
+ The value to be translated.
+
+
+
+ Translates an integer.
+
+ The value to be translated.
+
+
+
+ Translates an unsigned integer.
+
+ The unsigned integer to translate.
+
+
+
+ Translates an array.
+
+ The array to be translated.
+
+
+
+ Translates a long.
+
+ The value to be translated.
+
+
+
+ Translates a string.
+
+ The value to be translated.
+
+
+
+ Translates a double.
+
+ The value to be translated.
+
+
+
+ Translates a string array.
+
+ The array to be translated.
+
+
+
+ Translates a list of strings
+
+ The list to be translated.
+
+
+
+ Translates a set of strings
+
+ The set to be translated.
+
+
+
+ Translates a list of T using an
+
+ The list to be translated.
+ The translator to use for the items in the list
+ A TaskItemType
+
+
+
+ Translates a list of T using an anda collection factory
+
+ The list to be translated.
+ The translator to use for the items in the list
+ An ITranslatable subtype
+ An IList subtype
+ factory to create a collection
+
+
+
+ Translates a collection of T into the specified type using an and
+
+ The collection to be translated.
+ The translator to use for the values in the collection.
+ The factory to create the ICollection.
+ The type contained in the collection.
+ The type of collection to be created.
+
+
+
+ Translates a DateTime.
+
+ The value to be translated.
+
+
+
+ Translates a TimeSpan.
+
+ The value to be translated.
+
+
+
+ Translates a BuildEventContext
+
+
+ This method exists only because there is no serialization method built into the BuildEventContext
+ class, and it lives in Framework and we don't want to add a public method to it.
+
+ The context to be translated.
+
+
+
+ Translates an enumeration.
+
+ The enumeration type.
+ The enumeration instance to be translated.
+ The enumeration value as an integer.
+ This is a bit ugly, but it doesn't seem like a nice method signature is possible because
+ you can't pass the enum type as a reference and constrain the generic parameter to Enum. Nor
+ can you simply pass as ref Enum, because an enum instance doesn't match that function signature.
+ Finally, converting the enum to an int assumes that we always want to transport enums as ints. This
+ works in all of our current cases, but certainly isn't perfectly generic.
+
+
+
+ Translates a value using the .Net binary formatter.
+
+ The reference type.
+ The value to be translated.
+
+ The primary purpose of this method is to support serialization of Exceptions and
+ custom build logging events, since these do not support our custom serialization
+ methods.
+
+
+
+
+ Translates an object implementing INodePacketTranslatable.
+
+ The reference type.
+ The value to be translated.
+
+
+
+ Translates a culture
+
+ The culture
+
+
+
+ Translates a byte array
+
+ The array to be translated.
+
+
+
+ Translates a byte array
+
+ The array to be translated.
+ The length of array which will be used in translation
+
+
+
+ Translates an array of objects implementing INodePacketTranslatable.
+
+ The reference type.
+ The array to be translated.
+
+
+
+ Translates an array of objects using an .
+
+ The reference type.
+ The array to be translated.
+ The translator to use for the elements in the array.
+
+
+
+ Translates a dictionary of { string, string }.
+
+ The dictionary to be translated.
+ The comparer used to instantiate the dictionary.
+
+
+
+ Translates a dictionary of { string, T }.
+
+ The reference type for the values, which implements INodePacketTranslatable.
+ The dictionary to be translated.
+ The comparer used to instantiate the dictionary.
+ The translator to use for the values in the dictionary
+
+
+
+ Translates a dictionary of { string, T } for dictionaries with public parameterless constructors.
+
+ The reference type for the dictionary.
+ The reference type for values in the dictionary.
+ The dictionary to be translated.
+ The translator to use for the values in the dictionary.
+
+
+
+ Translates a dictionary of { string, T } for dictionaries with public parameterless constructors.
+
+ The reference type for the dictionary.
+ The reference type for values in the dictionary.
+ The dictionary to be translated.
+ The translator to use for the values in the dictionary
+ A factory used to create the dictionary.
+
+
+
+ Translates the boolean that says whether this value is null or not
+
+ The object to test.
+ The type of object to test.
+ True if the object should be written, false otherwise.
+
+
+
+ A collection of standard ANSI/VT100 control codes.
+
+
+
+
+ The control sequence introducer.
+
+
+
+
+ Select graphic rendition.
+
+
+ Print color-code to change text color.
+
+
+
+
+ Select graphic rendition - set bold mode.
+
+
+ Print to change text to bold.
+
+
+
+
+ A shortcut to reset color back to normal.
+
+
+
+
+ Non-xterm extension to render a hyperlink.
+
+
+ Print urltext to render a hyperlink.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Moves up the specified number of lines and puts cursor at the beginning of the line.
+
+
+ Print N to move N lines up.
+
+
+
+
+ Moves forward (to the right) the specified number of characters.
+
+
+ Print N to move N characters forward.
+
+
+
+
+ Moves backward (to the left) the specified number of characters.
+
+
+ Print N to move N characters backward.
+
+
+
+
+ Clears everything from cursor to end of screen.
+
+
+ Print to clear.
+
+
+
+
+ Clears everything from cursor to the end of the current line.
+
+
+ Print to clear.
+
+
+
+
+ Hides the cursor.
+
+
+
+
+ Shows/restores the cursor.
+
+
+
+
+ Set progress state to a busy spinner.
+ Note: this code works only on ConEmu terminals, and conflicts with push a notification code on iTerm2.
+
+
+ ConEmu specific OSC codes.
+ iTerm2 proprietary escape codes.
+
+
+
+
+ Remove progress state, restoring taskbar status to normal.
+ Note: this code works only on ConEmu terminals, and conflicts with push a notification code on iTerm2.
+
+
+ ConEmu specific OSC codes.
+ iTerm2 proprietary escape codes.
+
+
+
+
+ Moves cursor to the specified column, or the rightmost column if is greater than the width of the terminal.
+
+ Column index.
+ Control codes to set the desired position.
+
+
+
+ Enumerates the text colors supported by VT100 terminal.
+
+
+
+
+ This captures information of how various key methods of building with MSBuild ran.
+
+
+ Changes to existing event method signatures will not be reflected unless you update the property or assign a new event ID.
+
+
+
+
+ Keyword applied to all MSBuild events.
+
+
+ Literally every event should define this.
+
+
+
+
+ Keyword for events that should go in the text performance log when turned on.
+
+
+ This keyword should be applied only to events that are low-volume
+ and likely to be useful to diagnose perf issues using the
+ text perf log.
+
+
+
+
+ define the singleton instance of the event source
+
+
+
+
+ Call this method to notify listeners of information relevant to collecting a set of items, mutating them in a specified way, and saving the results.
+
+ The type of the item being mutated.
+
+
+ The type of the item being mutated.
+
+
+
+ Call this method to notify listeners of information relevant to the setup for a BuildManager to receive build requests.
+
+
+
+
+ Call this method to notify listeners of information of how a project file built.
+ Filename of the project being built.
+
+
+
+ Filename of the project being built.
+ Names of the targets that built.
+
+
+ The condition being evaluated.
+
+
+ The condition being evaluated.
+ The result of evaluating the condition.
+
+
+
+ Call this method to notify listeners of how the project data was evaluated.
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+
+ Call this method to notify listeners of information relevant to identifying a list of files that correspond to an item with a wildcard.
+
+ Source of files to glob.
+ Pattern, possibly with wildcard(s) to be expanded.
+ Patterns not to expand.
+
+
+ Source of files to glob.
+ Pattern, possibly with wildcard(s) to be expanded.
+ Patterns not to expand.
+
+
+
+ Call this method to notify listeners of timing related to loading an XmlDocumentWithLocation from a path.
+ Path to the document to load.
+
+
+
+ Path to the document to load.
+
+
+
+ Call this method to notify listeners of profiling for the function that parses an XML document into a ProjectRootElement.
+
+ Filename of the project being evaluated.
+
+
+ Filename of the project being evaluated.
+
+
+
+ Call this method to notify listeners of profiling for the method that removes denylisted references from the reference table. It puts primary and dependency references in invalid file lists.
+
+
+
+ Project file's location.
+
+
+ Project file's location.
+
+
+ The name of the target being executed.
+
+
+ The name of the target being executed.
+
+
+
+ Call this method to notify listeners of the start of a build as called from the command line.
+
+ The command line used to run MSBuild.
+
+
+ The command line used to run MSBuild.
+
+
+
+ This events are quite frequent so they are collected by Debug binaries only.
+
+
+
+
+ This events are quite frequent so they are collected by Debug binaries only.
+
+
+
+
+ As oppose to other ReusableStringBuilderFactory events this one is expected to happens very un-frequently
+ and if it is seen more than 100x per build it might indicates wrong usage patterns resulting into degrading
+ efficiency of ReusableStringBuilderFactory. Hence it is collected in release build as well.
+
+
+
+
+ SupportedOSPlatform is a net5.0+ Attribute.
+ Create the same type only in full-framework and netstandard2.0 builds
+ to prevent many #if RUNTIME_TYPE_NETCORE checks.
+
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+ Specifies that null is disallowed as an input even if the corresponding type allows it.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter may be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that the output will be non-null if the named parameter is non-null.
+
+
+ Initializes the attribute with the associated parameter name.
+
+ The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
+
+
+
+ Gets the associated parameter name.
+
+
+ Applied to a method that will never return under any circumstance.
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+ Initializes the attribute with the specified parameter value.
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+ Specifies that the method or property will ensure that the listed field and property members have not-null values.
+
+
+ Initializes the attribute with a field or property member.
+
+ The field or property member that is promised to be not-null.
+
+
+
+ Initializes the attribute with the list of field and property members.
+
+ The list of field and property members that are promised to be not-null.
+
+
+
+ Gets field or property member names.
+
+
+ Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
+
+
+ Initializes the attribute with the specified return value condition and a field or property member.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+ The field or property member that is promised to be not-null.
+
+
+
+ Initializes the attribute with the specified return value condition and list of field and property members.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+ The list of field and property members that are promised to be not-null.
+
+
+
+ Gets the return value condition.
+
+
+ Gets field or property member names.
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Build.Tasks.Core.xml b/msvc/MSBuild/Current/Bin/Microsoft.Build.Tasks.Core.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b4a16dceace070e5826d57452a2fb43dfb9d7bd6
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Build.Tasks.Core.xml
@@ -0,0 +1,20436 @@
+
+
+
+ Microsoft.Build.Tasks.Core
+
+
+
+
+ Factory for
+
+
+
+
+ Implementation of file system operations directly over the dot net managed layer
+
+
+
+
+ Implementation of file system operations on windows. Combination of native and managed implementations.
+ TODO Remove this class and replace with WindowsFileSystem. Test perf to ensure no regressions.
+
+
+
+
+ A possibly-recoverable exception wrapping a failed native call. The captures the
+ associated recent error code (). The
+ accounts for the native code as well as a human readable portion.
+
+
+ This is much like , but the message field contains the caller-provided part in addition
+ to the system-provided message (rather than replacing the system provided message).
+
+
+
+
+ Creates an exception representing a native failure (with a corresponding Win32 error code).
+ The exception's includes the error code, a system-provided message describing it,
+ and the provided application-specific message prefix (e.g. "Unable to open log file").
+
+
+
+
+ Creates an exception representing a native failure (with a corresponding Win32 error code).
+ The exception's includes the error code and a system-provided message describing it.
+
+
+
+
+ Returns a human readable error string for a native error code, like Native: Can't access the log file (0x5: Access is denied).
+ The message prefix (e.g. "Can't access the log file") is optional.
+
+
+
+
+ Converts a Win32 error code to HResult
+
+
+
+
+ Handle for a volume iteration as returned by WindowsNative.FindFirstVolumeW />
+
+
+
+
+ Private constructor for the PInvoke marshaller.
+
+
+
+
+
+
+
+ The type of file artifact to search for
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Windows-specific implementation of file system operations using Windows native invocations.
+ TODO For potential extra perf gains, provide native implementations for all IFileSystem methods and stop inheriting from ManagedFileSystem
+
+
+
+
+ Native implementation of file system operations
+
+
+
+
+ Maximum path length.
+
+
+
+
+ ERROR_SUCCESS
+
+
+
+
+ ERROR_FILE_NOT_FOUND
+
+
+
+
+ ERROR_PATH_NOT_FOUND
+
+
+
+
+ ERROR_DIRECTORY
+
+
+
+
+ ERROR_ACCESS_DENIED
+
+
+
+
+ ERROR_NO_MORE_FILES
+
+
+
+
+ Modifies the search condition of PathMatchSpecEx
+
+
+
+
+
+
+
+ The pszSpec parameter points to a single file name pattern to be matched.
+
+
+
+
+ The pszSpec parameter points to a semicolon-delimited list of file name patterns to be matched.
+
+
+
+
+ If PMSF_NORMAL is used, ignore leading spaces in the string pointed to by pszSpec. If PMSF_MULTIPLE is used,
+ ignore leading spaces in each file type contained in the string pointed to by pszSpec. This flag can be combined with PMSF_NORMAL and PMSF_MULTIPLE.
+
+
+
+
+ Status of attempting to enumerate a directory.
+
+
+
+
+ Enumeration of an existent directory succeeded.
+
+
+
+
+ One or more path components did not exist, so the search directory could not be opened.
+
+
+
+
+ A path component in the search path refers to a file. Only directories can be enumerated.
+
+
+
+
+ Directory enumeration could not complete due to denied access to the search directory or a file inside.
+
+
+
+
+ Directory enumeration failed without a well-known status (see ).
+
+
+
+
+ Represents the result of attempting to enumerate a directory.
+
+
+
+
+ Enumerated directory.
+
+
+
+
+ Overall status indication.
+
+
+
+
+ Native error code. Note that an error code other than ERROR_SUCCESS may be present even on success.
+
+
+
+
+
+
+
+ Indicates if enumeration succeeded.
+
+
+
+
+ Throws an exception if the native error code could not be canonicalized (a fairly exceptional circumstance).
+ This is allowed when is .
+
+
+ This is a good default: case when switching on every possible
+
+
+
+
+ Throws an exception if the native error code was corresponds to a known
+ (and enumeration was not successful).
+
+
+
+
+ Creates (but does not throw) an exception for this result. The result must not be successful.
+
+
+
+
+ Win32FindData
+
+
+
+
+ The file attributes of a file
+
+
+
+
+ Specified when a file or directory was created
+
+
+
+
+ Specifies when the file was last read from, written to, or for executable files, run.
+
+
+
+
+ For a file, the structure specifies when the file was last written to, truncated, or overwritten.
+ For a directory, the structure specifies when the directory is created.
+
+
+
+
+ The high-order DWORD value of the file size, in bytes.
+
+
+
+
+ The low-order DWORD value of the file size, in bytes.
+
+
+
+
+ If the dwFileAttributes member includes the FILE_ATTRIBUTE_REPARSE_POINT attribute, this member specifies the reparse point tag.
+
+
+
+
+ Reserved for future use.
+
+
+
+
+ The name of the file.
+
+
+
+
+ An alternative name for the file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A class to help with printline debugging in difficult environments like CI, or when debugging msbuild through other
+ tools like VS or CLI.
+ See example usages in PrintLineDebugger_Tests
+
+
+
+
+ A collection of useful writers
+
+
+
+
+ Implements the rules for finding component directories using the AssemblyFoldersEx scheme.
+
+ This is the normal schema:
+
+ [HKLM | HKCU]\SOFTWARE\MICROSOFT\.NetFramework\
+ v1.0.3705
+ AssemblyFoldersEx
+ Infragistics.GridControl.1.0:
+ @Default = c:\program files\infragistics\grid control\1.0\bin
+ @Description = Infragistics Grid Control for .NET version 1.0
+ 9466
+ @Default = c:\program files\infragistics\grid control\1.0sp1\bin
+ @Description = SP1 for Infragistics Grid Control for .NET version 1.0
+
+
+ The root registry path is the following:
+
+ [HKLM | HKCU]\{AssemblyFoldersBase}\{RuntimeVersion}\{AssemblyFoldersSuffix}
+
+ Where:
+
+ {AssemblyFoldersBase} = Software\Microsoft\[.NetFramework | .NetCompactFramework]
+ {RuntimeVersion} = the runtime version property from the project file
+ {AssemblyFoldersSuffix} = [ PocketPC | SmartPhone | WindowsCE]\AssemblyFoldersEx
+
+
+
+
+
+ The list of directory names found from the registry.
+
+
+
+
+ Set of unique paths to directories found from the registry
+
+
+
+
+ Construct.
+
+ Like Software\Microsoft\[.NetFramework | .NetCompactFramework]
+ The runtime version property from the project file.
+ Like [ PocketPC | SmartPhone | WindowsCE]\AssemblyFoldersEx
+ Operating system version
+ Current platform
+ Used to find registry subkey names.
+ Used to find registry key default values.
+ Architecture to seek.
+ Key object to open.
+
+
+
+ Finds directories for a specific registry key.
+
+ The registry view to examine.
+ The registry hive to examine.
+ Like Software\Microsoft\[.NetFramework | .NetCompactFramework]
+ The runtime version property from the project file.
+ Like [ PocketPC | SmartPhone | WindowsCE]\AssemblyFoldersEx
+ Operating system version
+ Current platform
+ Used to find registry subkey names.
+ Used to find registry key default values.
+ Key object to open.
+
+
+
+ The algorithm for gathering versions from the registry is as follows:
+ 1) targetRuntimeVersion is the target framework version you are targeting
+ 2) versions is a string list from reading the registry, this list is in what ever order the registry returns
+ the keys to us in, this is usually alphabetical.
+
+ We will go through each version string and do the following:
+ 1) Check to see if the string is a version
+ If the string is not a version we will check to see if the string starts with the framework we are targeting,
+ if it does we will add it to a list which will be added at the end
+ of the versions list, if not it gets ignored. We do this to stay compatible to what we have been doing since whidbey.
+
+ If the string is a version
+ We check to see if the version is a valid target framework version. Meaning. It has a Maj.Minor version and may have
+ build, Build is less than or equal to 255 and there is no revision. The reason the build number needs to be less than 255 is because
+ 255 is the largest build number for a target framework version that visual studio 2010 supports. The build number is supposed to
+ represent a service pack on the 4.0 framework.
+
+ If the string is a valid target framework version we check to see we already have a dictionary entry and if not we
+ add one.
+ If the string is not a valid target framework then we will ignore the part of the version which makes it invalid
+ (either the build or the revision, or both) and see where that version would fit in the dictionary as a key and
+ then put the original version string into the list for that entry.
+
+ Since the dictionary is sorted in reverse order to generate the list to return we do the following:
+ Go through the list of dictionary entries
+ For each entry sort the list in reverse alphabetical order and add the entries in their internal list to the listToreturn.
+
+ This way we have a reverse sorted list of all of the version keys.
+
+
+
+
+ Given a candidate version we need to add it to the dictionary of targetFrameworkToRegistry versions. This involves determining if we need to add it to
+ an existing entry or create a new one.
+
+
+
+
+ Get Enumerator
+
+
+
+
+ Get enumerator
+
+
+
+
+ Deserialize the file into an AssemblyFolderCollection.
+
+ Path to the AssemblyFolder.config file.
+ New deserialized collection instance.
+
+
+
+ Name of the Visual Studio (and Blend) process.
+ VS ASP intellisense server fails without Microsoft.VisualStudio.Web.Host. Remove when issue fixed: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/574986
+
+
+
+
+ Name of the MSBuild process(es)
+
+
+
+
+ Name of MSBuild executable files.
+
+
+
+
+ Gets the cached Build Environment instance.
+
+
+
+
+ Find the location of MSBuild.exe based on the current environment.
+
+
+ This defines the order and precedence for various methods of discovering MSBuild and associated toolsets.
+ At a high level, an install under Visual Studio is preferred as the user may have SDKs installed to a
+ specific instance of Visual Studio and build will only succeed if we can discover those. See
+ https://github.com/dotnet/msbuild/issues/1461 for details.
+
+ Build environment.
+
+
+
+ Returns true if processName appears in the processList
+
+ Name of the process
+ List of processes to check
+
+
+
+
+ Resets the current singleton instance (for testing).
+
+
+
+
+ Resets the current singleton instance (for testing).
+
+
+
+
+ Enum which defines which environment / mode MSBuild is currently running.
+
+
+
+
+ Running from Visual Studio directly or from MSBuild installed under an instance of Visual Studio.
+ Toolsets and extensions will be loaded from the Visual Studio instance.
+
+
+
+
+ Running in a standalone toolset mode. All toolsets and extensions paths are relative to the app
+ running and not dependent on Visual Studio. (e.g. dotnet CLI, open source clone of our repo)
+
+
+
+
+ Running without any defined toolsets. Most functionality limited. Likely will not be able to
+ build or evaluate a project. (e.g. reference to Microsoft.*.dll without a toolset definition
+ or Visual Studio instance installed).
+
+
+
+
+ Defines the current environment for build tools.
+
+
+
+
+ Gets the flag that indicates if we are running in a test harness.
+
+
+
+
+ Returns true when the entry point application is MSBuild.exe.
+
+
+
+
+ Returns true when the entry point application is Visual Studio.
+
+
+
+
+ Path to the root of the MSBuild folder (in VS scenarios, MSBuild\Current\bin).
+
+
+
+
+ Path to the MSBuild 32-bit tools directory.
+
+
+
+
+ Path to the MSBuild 64-bit (AMD64) tools directory.
+
+
+
+
+ Path to the ARM64 tools directory.
+ if ARM64 tools are not installed.
+
+
+
+
+ Path to the Sdks folder for this MSBuild instance.
+
+
+
+
+ Full path to the current MSBuild configuration file.
+
+
+
+
+ Full path to current MSBuild.exe.
+
+ This path is likely not the current running process. We may be inside
+ Visual Studio or a test harness. In that case this will point to the
+ version of MSBuild found to be associated with the current environment.
+
+
+
+
+
+ Full path to the current MSBuild tools directory. This will be 32-bit unless
+ we're executing from the 'AMD64' folder.
+
+
+
+
+ Path to the root Visual Studio install directory
+ (e.g. 'C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise')
+
+
+
+
+ MSBuild extensions path. On Standalone this defaults to the MSBuild folder. In
+ VisualStudio mode this folder will be %VSINSTALLDIR%\MSBuild.
+
+
+
+
+ IKeyComparer implementation that compares AssemblyNames for using in Hashtables.
+
+
+
+
+ Comparer for two assembly name extensions
+
+
+
+
+ Comparer for two assembly name extensions
+
+
+
+
+ Comparer for two assembly name extensions
+
+
+
+
+ Comparer for two assembly name extensions
+
+
+
+
+ Should the comparer consider the retargetable flag when doing comparisons
+
+
+
+
+ Private construct so there's only one instance.
+
+
+
+
+ Compare o1 and o2 as AssemblyNames.
+
+
+
+
+ Treat o1 and o2 as AssemblyNames. Are they equal?
+
+
+
+
+ Get a hashcode for AssemblyName.
+
+
+
+
+ Determine if the assembly name extensions are equal
+
+
+
+
+ Get a hashcode for AssemblyName.
+
+
+
+
+ Compare the version numbers only for an AssemblyNameExtension and make sure they are in reverse order. This assumes the names are the same.
+
+
+
+
+ A static instance of the comparer for use in a sort method
+
+
+
+
+ Compare x and y by version only.
+
+ Change the return value to sort the values in reverse order.
+
+ If x is greater than y return -1 indicating x is less than y.
+ If x is less than y return 1 indicating x is greater than y.
+ If x and y are equal return 0.
+
+
+
+
+ Functions for dealing with the specially formatted errors returned by
+ build tools.
+
+
+ Various tools produce and consume CanonicalErrors in various formats.
+
+ DEVENV Format When Clicking on Items in the Output Window
+ (taken from env\msenv\core\findutil.cpp ParseLocation function)
+
+ v:\dir\file.ext (loc) : msg
+ \\server\share\dir\file.ext(loc):msg
+ url
+
+ loc:
+ (line)
+ (line-line)
+ (line,col)
+ (line,col-col)
+ (line,col,len)
+ (line,col,line,col)
+
+ DevDiv Build Process
+ (taken from tools\devdiv2.def)
+
+ To echo warnings and errors to the build console, the
+ "description block" must be recognized by build. To do this,
+ add a $(ECHO_COMPILING_COMMAND) or $(ECHO_PROCESSING_COMMAND)
+ to the first line of the description block, e.g.
+
+ $(ECHO_COMPILING_CMD) Resgen_$<
+
+ Errors must have the format:
+
+ <text> : error [num]: <msg>
+
+ Warnings must have the format:
+
+ <text> : warning [num]: <msg>
+
+
+
+
+ Represents the parts of a decomposed canonical message.
+
+
+
+
+ Defines the error category\severity level.
+
+
+
+
+ Value used for unspecified line and column numbers, which are 1-relative.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Name of the file or tool (not localized)
+
+
+
+
+ The line number.
+
+
+
+
+ The column number.
+
+
+
+
+ The ending line number.
+
+
+
+
+ The ending column number.
+
+
+
+
+ The category/severity level
+
+
+
+
+ The sub category (localized)
+
+
+
+
+ The error code (not localized)
+
+
+
+
+ The error message text (localized)
+
+
+
+
+ A small custom int conversion method that treats invalid entries as missing (0). This is done to work around tools
+ that don't fully conform to the canonical message format - we still want to salvage what we can from the message.
+
+
+ 'value' converted to int or 0 if it can't be parsed or is negative
+
+
+
+ Decompose an error or warning message into constituent parts. If the message isn't in the canonical form, return null.
+
+ This method is thread-safe, because the Regex class is thread-safe (per MSDN).
+
+ Decomposed canonical message, or null.
+
+
+
+ Contains information about entries in the AssemblyFoldersEx registry keys.
+
+
+
+
+ Constructor
+
+
+
+
+ The registry key to the component
+
+
+
+
+ Target framework version for the registry key
+
+
+
+
+ delegate for System.IO.Directory.GetFiles, used for testing
+
+ Directory path to start search for files in
+ pattern of files to match
+ string array of files which match search pattern
+
+
+
+ delegate for Directory.GetDirectories.
+
+ The path to get directories for.
+ The pattern to search for.
+ An array of directories.
+
+
+
+ Delegate for System.IO.Directory.Exists
+
+ Directory path to check if it exists
+ true if directory exists
+
+
+
+ File exists delegate
+
+ The path to check for existence.
+ 'true' if the file exists.
+
+
+
+ File.Copy delegate
+
+
+
+
+
+
+ File.Delete delegate
+
+
+
+
+
+ File create delegate
+
+ The path to create.
+
+
+
+ Given a registry hive and a request view open the base key for that registry location.
+
+
+
+
+ Simplified registry access delegate. Given a baseKey and a subKey, get all of the subkey
+ names.
+
+ The base registry key.
+ The subkey
+ An enumeration of strings.
+
+
+
+ Simplified registry access delegate. Given a baseKey and subKey, get the default value
+ of the subKey.
+
+ The base registry key.
+ The subkey
+ A string containing the default value.
+
+
+
+ Helper methods that simplify registry access.
+
+
+
+
+ Given a baseKey and a subKey, get all of the subkeys names.
+
+ The base registry key.
+ The subkey
+ An enumeration of strings.
+
+
+
+ Given a baseKey and subKey, get the default value of the subKey.
+
+ The base registry key.
+ The subkey
+ A string containing the default value.
+
+
+
+ Given a hive and a hive view open the base key
+ RegistryKey baseKey = RegistryKey.OpenBaseKey(hive, view);
+
+ The hive.
+ The hive view
+ A registry Key for the given baseKey and view
+
+
+
+ This class contains utility methods for file IO.
+ It is in a separate file so that it can be selectively included into an assembly.
+
+
+ This class contains utility methods for file IO.
+ PERF\COVERAGE NOTE: Try to keep classes in 'shared' as granular as possible. All the methods in
+ each class get pulled into the resulting assembly.
+
+
+ This class contains utility methods for file IO.
+
+
+ Partial class in order to reduce the amount of sharing into different assemblies
+
+
+
+
+ Generates a unique directory name in the temporary folder.
+ Caller must delete when finished.
+
+
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ File will NOT be created.
+ May throw IOException.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ File will NOT be created.
+ May throw IOException.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ If no extension is provided, uses ".tmp".
+ File is guaranteed to be unique.
+ Caller must delete it when finished.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Caller must delete it when finished.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ Caller must delete it when finished.
+ May throw IOException.
+
+
+
+
+ Creates a file with unique temporary file name with a given extension in the specified folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ If folder is null, the temporary folder will be used.
+ Caller must delete it when finished.
+ May throw IOException.
+
+
+
+
+ The directory where MSBuild stores cache information used during the build.
+
+
+
+
+ FOR UNIT TESTS ONLY
+ Clear out the static variable used for the cache directory so that tests that
+ modify it can validate their modifications.
+
+
+
+
+ Determines whether the file system is case sensitive.
+ Copied from https://github.com/dotnet/runtime/blob/73ba11f3015216b39cb866d9fb7d3d25e93489f2/src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs#L41-L59
+
+
+
+
+ Copied from https://github.com/dotnet/corefx/blob/056715ff70e14712419d82d51c8c50c54b9ea795/src/Common/src/System/IO/PathInternal.Windows.cs#L61
+ MSBuild should support the union of invalid path chars across the supported OSes, so builds can have the same behaviour crossplatform: https://github.com/dotnet/msbuild/issues/781#issuecomment-243942514
+
+
+
+
+ Copied from https://github.com/dotnet/corefx/blob/387cf98c410bdca8fd195b28cbe53af578698f94/src/System.Runtime.Extensions/src/System/IO/Path.Windows.cs#L18
+ MSBuild should support the union of invalid path chars across the supported OSes, so builds can have the same behaviour crossplatform: https://github.com/dotnet/msbuild/issues/781#issuecomment-243942514
+
+
+
+
+ Retrieves the MSBuild runtime cache directory
+
+
+
+
+ Get the hex hash string for the string
+
+
+
+
+ Get the hash for the assemblyPaths
+
+
+
+
+ Returns whether MSBuild can write to the given directory. Throws for PathTooLongExceptions
+ but not other exceptions.
+
+
+
+
+ Clears the MSBuild runtime cache
+
+
+
+
+ If the given path doesn't have a trailing slash then add one.
+ If the path is an empty string, does not modify it.
+
+ The path to check.
+ A path with a slash.
+
+
+
+ Ensures the path does not have a leading or trailing slash after removing the first 'start' characters.
+
+
+
+
+ Ensures the path does not have a leading slash after removing the first 'start' characters but does end in a slash.
+
+
+
+
+ Ensures the path does not have a trailing slash.
+
+
+
+
+ Ensures the path is enclosed within single quotes.
+
+ The path to check.
+ The path enclosed by quotes.
+
+
+
+ Ensures the path is enclosed within double quotes.
+
+ The path to check.
+ The path enclosed by quotes.
+
+
+
+ Ensures the path is enclosed within quotes.
+
+ The path to check.
+ Indicates if single or double quotes should be used
+ The path enclosed by quotes.
+
+
+
+ Indicates if the given file-spec ends with a slash.
+
+ The file spec.
+ true, if file-spec has trailing slash
+
+
+
+ Indicates if the given character is a slash.
+
+
+ true, if slash
+
+
+
+ Trims the string and removes any double quotes around it.
+
+
+
+
+ Get the directory name of a rooted full path
+
+
+
+
+
+
+ Gets the canonicalized full path of the provided path.
+ Guidance for use: call this on all paths accepted through public entry
+ points that need normalization. After that point, only verify the path
+ is rooted, using ErrorUtilities.VerifyThrowPathRooted.
+ ASSUMES INPUT IS ALREADY UNESCAPED.
+
+
+
+
+ If on Unix, convert backslashes to slashes for strings that resemble paths.
+ The heuristic is if something resembles paths (contains slashes) check if the
+ first segment exists and is a directory.
+ Use a native shared method to massage file path. If the file is adjusted,
+ that qualifies is as a path.
+
+ @baseDirectory is just passed to LooksLikeUnixFilePath, to help with the check
+
+
+
+
+ If on Unix, convert backslashes to slashes for strings that resemble paths.
+ This overload takes and returns ReadOnlyMemory of characters.
+
+
+
+
+ If on Unix, check if the string looks like a file path.
+ The heuristic is if something resembles paths (contains slashes) check if the
+ first segment exists and is a directory.
+
+ If @baseDirectory is not null, then look for the first segment exists under
+ that
+
+
+
+
+ Extracts the directory from the given file-spec.
+
+ The filespec.
+ directory path
+
+
+
+ Determines whether the given assembly file name has one of the listed extensions.
+
+ The name of the file
+ Array of extensions to consider.
+
+
+
+
+ Get the currently executing assembly path
+
+
+
+
+ Determines the full path for the given file-spec.
+ ASSUMES INPUT IS STILL ESCAPED
+
+ The file spec to get the full path of.
+
+ full path
+
+
+
+ A variation of Path.GetFullPath that will return the input value
+ instead of throwing any IO exception.
+ Useful to get a better path for an error message, without the risk of throwing
+ if the error message was itself caused by the path being invalid!
+
+
+
+
+ Compare if two paths, relative to the given currentDirectory are equal.
+ Does not throw IO exceptions. See
+
+
+
+
+
+
+
+
+
+ Normalizes a path for path comparison
+ Does not throw IO exceptions. See
+
+
+
+
+
+ A variation on File.Delete that will throw ExceptionHandling.NotExpectedException exceptions
+
+
+
+
+ A variation on Directory.Delete that will throw ExceptionHandling.NotExpectedException exceptions
+
+
+
+
+ Deletes a directory, ensuring that Directory.Delete does not get a path ending in a slash.
+
+
+ This is a workaround for https://github.com/dotnet/corefx/issues/3780, which clashed with a common
+ pattern in our tests.
+
+
+
+
+ Gets a file info object for the specified file path. If the file path
+ is invalid, or is a directory, or cannot be accessed, or does not exist,
+ it returns null rather than throwing or returning a FileInfo around a non-existent file.
+ This allows it to be called where File.Exists() (which never throws, and returns false
+ for directories) was called - but with the advantage that a FileInfo object is returned
+ that can be queried (e.g., for LastWriteTime) without hitting the disk again.
+
+
+ FileInfo around path if it is an existing /file/, else null
+
+
+
+ Returns if the directory exists
+
+ Full path to the directory in the filesystem
+ The file system
+
+
+
+
+ Returns if the directory exists
+
+ Full path to the file in the filesystem
+ The file system
+
+
+
+
+ If there is a directory or file at the specified path, returns true.
+ Otherwise, returns false.
+ Does not throw IO exceptions, to match Directory.Exists and File.Exists.
+ Unlike calling each of those in turn it only accesses the disk once, which is faster.
+
+
+
+
+ This method returns true if the specified filename is a solution file (.sln) or
+ solution filter file (.slnf); otherwise, it returns false.
+
+
+ Solution filters are included because they are a thin veneer over solutions, just
+ with a more limited set of projects to build, and should be treated the same way.
+
+
+
+
+ Returns true if the specified filename is a VC++ project file, otherwise returns false
+
+
+
+
+ Returns true if the specified filename is a metaproject file (.metaproj), otherwise false.
+
+
+
+
+ Given the absolute location of a file, and a disc location, returns relative file path to that disk location.
+ Throws UriFormatException.
+
+
+ The base path we want to be relative to. Must be absolute.
+ Should not include a filename as the last segment will be interpreted as a directory.
+
+
+ The path we need to make relative to basePath. The path can be either absolute path or a relative path in which case it is relative to the base path.
+ If the path cannot be made relative to the base path (for example, it is on another drive), it is returned verbatim.
+ If the basePath is an empty string, returns the path.
+
+ relative path (can be the full path)
+
+
+
+ Normalizes the path if and only if it is longer than max path,
+ or would be if rooted by the current directory.
+ This may make it shorter by removing ".."'s.
+
+
+
+
+ A variation of Path.IsRooted that not throw any IO exception.
+
+
+
+
+ Get the folder N levels above the given. Will stop and return current path when rooted.
+
+ Path to get the folder above.
+ Number of levels up to walk.
+ Full path to the folder N levels above the path.
+
+
+
+ Combine multiple paths. Should only be used when compiling against .NET 2.0.
+
+ Only use in .NET 2.0. Otherwise, use System.IO.Path.Combine(...)
+
+
+ Root path.
+ Paths to concatenate.
+ Combined path.
+
+
+
+ Replace all backward slashes to forward slashes
+
+
+
+
+ Ensure all slashes are the current platform's slash
+
+
+
+
+
+
+ Locate a file in either the directory specified or a location in the
+ directory structure above that directory.
+
+
+
+
+ Searches for a file based on the specified starting directory.
+
+ The file to search for.
+ An optional directory to start the search in. The default location is the directory
+ of the file containing the property function.
+ The filesystem
+ The full path of the file if it is found, otherwise an empty string.
+
+
+
+ Clears the file existence cache.
+
+
+
+
+ Encapsulates the definitions of the item-spec modifiers a.k.a. reserved item metadata.
+
+
+
+
+ Indicates if the given name is reserved for an item-spec modifier.
+
+
+
+
+ Indicates if the given name is reserved for one of the specific subset of itemspec
+ modifiers to do with the defining project of the item.
+
+
+
+
+ Indicates if the given name is reserved for a derivable item-spec modifier.
+ Derivable means it can be computed given a file name.
+
+ Name to check.
+ true, if name of a derivable modifier
+
+
+
+ Performs path manipulations on the given item-spec as directed.
+ Does not cache the result.
+
+
+
+
+ Performs path manipulations on the given item-spec as directed.
+
+ Supported modifiers:
+ %(FullPath) = full path of item
+ %(RootDir) = root directory of item
+ %(Filename) = item filename without extension
+ %(Extension) = item filename extension
+ %(RelativeDir) = item directory as given in item-spec
+ %(Directory) = full path of item directory relative to root
+ %(RecursiveDir) = portion of item path that matched a recursive wildcard
+ %(Identity) = item-spec as given
+ %(ModifiedTime) = last write time of item
+ %(CreatedTime) = creation time of item
+ %(AccessedTime) = last access time of item
+
+ NOTES:
+ 1) This method always returns an empty string for the %(RecursiveDir) modifier because it does not have enough
+ information to compute it -- only the BuildItem class can compute this modifier.
+ 2) All but the file time modifiers could be cached, but it's not worth the space. Only full path is cached, as the others are just string manipulations.
+
+
+ Methods of the Path class "normalize" slashes and periods. For example:
+ 1) successive slashes are combined into 1 slash
+ 2) trailing periods are discarded
+ 3) forward slashes are changed to back-slashes
+
+ As a result, we cannot rely on any file-spec that has passed through a Path method to remain the same. We will
+ therefore not bother preserving slashes and periods when file-specs are transformed.
+
+ Never returns null.
+
+ The root directory for relative item-specs. When called on the Engine thread, this is the project directory. When called as part of building a task, it is null, indicating that the current directory should be used.
+ The item-spec to modify.
+ The path to the project that defined this item (may be null).
+ The modifier to apply to the item-spec.
+ Full path if any was previously computed, to cache.
+ The modified item-spec (can be empty string, but will never be null).
+ Thrown when the item-spec is not a path.
+
+
+
+ Indicates whether the given path is a UNC or drive pattern root directory.
+ Note: This function mimics the behavior of checking if Path.GetDirectoryName(path) == null.
+
+
+
+
+
+
+ Temporary check for something like http://foo which will end up like c:\foo\bar\http://foo
+ We should either have no colon, or exactly one colon.
+ UNDONE: This is a minimal safe change for Dev10. The correct fix should be to make GetFullPath/NormalizePath throw for this.
+
+
+
+
+ This class contains only static methods, which are useful throughout many
+ of the XMake classes and don't really belong in any specific class.
+
+
+
+
+ Convert a task item metadata to bool. Throw an exception if the string is badly formed and can't
+ be converted.
+
+ If the metadata is not found, then set metadataFound to false and then return false.
+
+ The item that contains the metadata.
+ The name of the metadata.
+ Receives true if the metadata was found, false otherwise.
+ The resulting boolean value.
+
+
+
+ Convert a task item metadata to bool. Throw an exception if the string is badly formed and can't
+ be converted.
+
+ If the attribute is not found, then return false.
+
+ The item that contains the metadata.
+ The name of the metadata.
+ The resulting boolean value.
+
+
+
+ A class with string-like semantics mapped over a Stream.
+
+
+
+
+ The raw binary stream that's being read.
+
+
+
+
+ The reader on top of binaryStream. This is what interprets the encoding.
+
+
+
+
+ When false, try to guess the encoding of binaryStream. When true, force the
+ encoding to ANSI.
+
+
+
+
+ The page number that 'currentPage' is pointing to.
+
+
+
+
+ The final page number of the whole stream.
+
+
+
+
+ The number of characters read into currentPage.
+
+
+
+
+ The page before currentPage.
+
+
+
+
+ The most recently read page.
+
+
+
+
+ Count of the total number of pages allocated.
+
+
+
+
+ Size of pages to use for reading from source file.
+
+
+
+
+ Construct.
+
+ The raw binary stream that's being read.
+ When false, try to guess the encoding of binaryStream. When true, force the encoding to ANSI.
+
+
+
+ Construct.
+
+ The raw binary stream that's being read.
+ When false, try to guess the encoding of binaryStream. When true, force the encoding to ANSI.
+ Size of pages to use for reading from source file.
+
+
+
+ Restart the stream reader at the beginning.
+
+
+
+
+ Get the total number of pages allocated.
+
+
+
+
+ The pagesize in characters that will be used if not specified.
+
+
+
+
+ Return a particular character within the file.
+
+
+
+
+
+
+ Get the page that contains offset. Otherwise, null.
+
+
+
+
+
+
+ Read the next page.
+
+
+
+
+
+ Read characters from the file, and strip out any 1A characters.
+
+
+
+
+ Add one character to the end of the stream.
+
+
+
+
+
+ Retrieve the last character in the stream.
+
+
+
+
+
+ Swap the current page for the last page.
+
+
+
+
+ True if this stream is zero length.
+
+
+
+
+
+ COnvert from absolute offset to relative offset within a particular page.
+
+
+
+
+
+
+ Convert from offset to page number.
+
+
+
+
+
+
+ Returns true of the given position is passed the end of the file.
+
+
+
+
+
+
+ Extract a substring.
+
+
+
+
+
+
+
+ Returns the number of characters on the page given by offset.
+
+
+
+
+
+
+ Utility functions for classifying characters that might be found in a sources file.
+
+
+
+
+ Determine whether a given character is a newline character
+
+
+
+
+
+
+ Determine whether a given character is a letter character
+
+
+
+
+
+
+ Determine whether a given character is a decimal digit character
+
+
+
+
+
+
+ Determine whether a given character is a connecting character
+
+
+
+
+
+
+ Determine whether a given character is a combining character
+
+
+
+
+
+
+ Determine whether a given character is a C# formatting character
+
+
+
+
+
+
+ Determine whether a given character is a hex digit character
+
+
+
+
+
+
+ Determine whether a given character is an octal digit character
+
+
+
+
+
+
+ See if the next characters match the given string. If they do, sink this string.
+
+
+
+
+
+
+
+ Construct.
+
+
+
+
+
+
+ Utility methods for classifying and handling exceptions.
+
+
+
+
+ Gets the location of the directory used for diagnostic log files.
+
+
+
+
+
+ The directory used for diagnostic log files.
+
+
+
+
+ The filename that exceptions will be dumped to
+
+
+
+
+ If the given exception is "ignorable under some circumstances" return false.
+ Otherwise it's "really bad", and return true.
+ This makes it possible to catch(Exception ex) without catching disasters.
+
+ The exception to check.
+ True if exception is critical.
+
+
+
+ If the given exception is file IO related or expected return false.
+ Otherwise, return true.
+
+ The exception to check.
+ True if exception is not IO related or expected otherwise false.
+
+
+
+ Determine whether the exception is file-IO related.
+
+ The exception to check.
+ True if exception is IO related.
+
+
+ Checks if the exception is an XML one.
+ Exception to check.
+ True if exception is related to XML parsing.
+
+
+ Extracts line and column numbers from the exception if it is XML-related one.
+ XML-related exception.
+ Line and column numbers if available, (0,0) if not.
+ This function works around the fact that XmlException and XmlSchemaException are not directly related.
+
+
+
+ If the given exception is file IO related or Xml related return false.
+ Otherwise, return true.
+
+ The exception to check.
+
+
+
+ If the given exception is reflection-related return false.
+ Otherwise, return true.
+
+ The exception to check.
+
+
+
+ Serialization has been observed to throw TypeLoadException as
+ well as SerializationException and IO exceptions. (Obviously
+ it has to do reflection but it ought to be wrapping the exceptions.)
+
+
+
+
+ Returns false if this is a known exception thrown by the registry API.
+
+
+
+
+ Returns false if this is a known exception thrown by function evaluation
+
+
+
+
+ Dump any unhandled exceptions to a file so they can be diagnosed
+
+
+
+
+ Dump the exception information to a file
+
+
+
+
+ Returns the content of any exception dump files modified
+ since the provided time, otherwise returns an empty string.
+
+
+
+ Line and column pair.
+
+
+ Gets or sets line number.
+
+
+ Gets or sets column position.
+
+
+
+ This class implements static methods to assist with unescaping of %XX codes
+ in the MSBuild file format.
+
+
+ PERF: since we escape and unescape relatively frequently, it may be worth caching
+ the last N strings that were (un)escaped
+
+
+
+
+ Optional cache of escaped strings for use when needing to escape in performance-critical scenarios with significant
+ expected string reuse.
+
+
+
+
+ Replaces all instances of %XX in the input string with the character represented
+ by the hexadecimal number XX.
+
+ The string to unescape.
+ If the string should be trimmed before being unescaped.
+ unescaped string
+
+
+
+ Adds instances of %XX in the input string where the char to be escaped appears
+ XX is the hex value of the ASCII code for the char. Interns and caches the result.
+
+
+ NOTE: Only recommended for use in scenarios where there's expected to be significant
+ repetition of the escaped string. Cache currently grows unbounded.
+
+
+
+
+ Adds instances of %XX in the input string where the char to be escaped appears
+ XX is the hex value of the ASCII code for the char.
+
+ The string to escape.
+ escaped string
+
+
+
+ Adds instances of %XX in the input string where the char to be escaped appears
+ XX is the hex value of the ASCII code for the char. Caches if requested.
+
+ The string to escape.
+
+ True if the cache should be checked, and if the resultant string
+ should be cached.
+
+
+
+
+ Before trying to actually escape the string, it can be useful to call this method to determine
+ if escaping is necessary at all. This can save lots of calls to copy around item metadata
+ that is really the same whether escaped or not.
+
+
+
+
+
+
+ Determines whether the string contains the escaped form of '*' or '?'.
+
+
+
+
+
+
+ Convert the given integer into its hexadecimal representation.
+
+ The number to convert, which must be non-negative and less than 16
+ The character which is the hexadecimal representation of .
+
+
+
+ Append the escaped version of the given character to a .
+
+ The to which to append.
+ The character to escape.
+
+
+
+ Append the escaped version of the given string to a .
+
+ The to which to append.
+ The unescaped string.
+
+
+
+ Special characters that need escaping.
+ It's VERY important that the percent character is the FIRST on the list - since it's both a character
+ we escape and use in escape sequences, we can unintentionally escape other escape sequences if we
+ don't process it first. Of course we'll have a similar problem if we ever decide to escape hex digits
+ (that would require rewriting the algorithm) but since it seems unlikely that we ever do, this should
+ be good enough to avoid complicating the algorithm at this point.
+
+
+
+
+ Functions for matching file names with patterns.
+
+
+
+
+ Cache of the list of invalid path characters, because this method returns a clone (for security reasons)
+ which can cause significant transient allocations
+
+
+
+
+ The Default FileMatcher does not cache directory enumeration.
+
+
+
+
+ The type of entity that GetFileSystemEntries should return.
+
+
+
+
+ Delegate defines the GetFileSystemEntries signature that GetLongPathName uses
+ to enumerate directories on the file system.
+
+ Files, Directories, or Files and Directories
+ The path to search.
+ The file pattern.
+
+
+ An enumerable of filesystem entries.
+
+
+
+ Determines whether the given path has any wild card characters.
+
+
+
+
+ Determines whether the given path has any wild card characters, any semicolons or any property references.
+
+
+
+
+ Determines whether the given path has any property references.
+
+
+
+
+ Get the files and\or folders specified by the given path and pattern.
+
+ Whether Files, Directories or both.
+ The path to search.
+ The pattern to search.
+ The directory for the project within which the call is made
+ If true the project directory should be stripped
+ The file system abstraction to use that implements file system operations
+
+
+
+
+ Returns an enumerable of file system entries matching the specified search criteria. Inaccessible or non-existent file
+ system entries are skipped.
+
+
+
+ The file system abstraction to use that implements file system operations
+ An enumerable of matching file system entries (can be empty).
+
+
+
+ Determine if the given search pattern will match loosely on Windows
+
+ The search pattern to check
+
+
+
+
+ Same as Directory.EnumerateFiles(...) except that files that
+ aren't accessible are skipped instead of throwing an exception.
+
+ Other exceptions are passed through.
+
+ The path.
+ The pattern.
+ The project directory
+
+ The file system abstraction to use that implements file system operations
+ Files that can be accessed.
+
+
+
+ Same as Directory.EnumerateDirectories(...) except that files that
+ aren't accessible are skipped instead of throwing an exception.
+
+ Other exceptions are passed through.
+
+ The path.
+ Pattern to match
+ The file system abstraction to use that implements file system operations
+ Accessible directories.
+
+
+
+ Given a path name, get its long version.
+
+ The short path.
+ The long path.
+
+
+
+ Given a path name, get its long version.
+
+ The short path.
+ Delegate.
+ The long path.
+
+
+
+ Given a filespec, split it into left-most 'fixed' dir part, middle 'wildcard' dir part, and filename part.
+ The filename part may have wildcard characters in it.
+
+ The filespec to be decomposed.
+ Receives the fixed directory part.
+ The wildcard directory part.
+ The filename part.
+
+
+
+ Do most of the grunt work of splitting the filespec into parts.
+ Does not handle post-processing common to the different matching
+ paths.
+
+ The filespec to be decomposed.
+ Receives the fixed directory part.
+ The wildcard directory part.
+ The filename part.
+
+
+
+ Removes the leading ".\" from all of the paths in the array.
+
+ Paths to remove .\ from.
+
+
+
+ Checks if the char is a DirectorySeparatorChar or a AltDirectorySeparatorChar
+
+
+
+
+
+
+ Removes the current directory converting the file back to relative path
+
+ Paths to remove current directory from.
+
+
+
+
+ The filespec.
+
+
+
+
+ Holds the directory pattern for globs like **/{pattern}/**, i.e. when we're looking for a matching directory name
+ regardless of where on the path it is. This field is used only if the wildcard directory part has this shape. In
+ other cases such as **/{pattern1}/**/{pattern2}/**, we don't use this optimization and instead rely on
+ to test if a file path matches the glob or not.
+
+
+
+
+ Wild-card matching.
+
+
+
+
+ If true, then recursion is required.
+
+
+
+
+ The directory to search in
+
+
+
+
+ The remaining, wildcard part of the directory.
+
+
+
+
+ True if SearchData.DirectoryPattern is non-null and we have descended into a directory that matches the pattern.
+
+
+
+
+ Data about a search that does not change as the search recursively traverses directories
+
+
+
+
+ True if a SearchData.DirectoryPattern is specified but we have not descended into a matching directory.
+
+
+
+
+ Get all files that match either the file-spec or the regular expression.
+
+ List of files that gets populated.
+ Information about the search
+
+
+ Patterns to exclude from the results
+ exclude patterns that might activate farther down the directory tree. Keys assume paths are normalized with forward slashes and no trailing slashes
+ Options for tuning the parallelization of subdirectories
+
+
+
+ Given a split file spec consisting of a directory without wildcard characters,
+ a sub-directory containing wildcard characters,
+ and a filename which may contain wildcard characters,
+ create a regular expression that will match that file spec.
+
+ PERF WARNING: this method is called in performance-critical
+ scenarios, so keep it fast and cheap
+
+ The fixed directory part.
+ The wildcard directory part.
+ The filename part.
+ The regular expression string.
+
+
+
+ Determine if the filespec is legal according to the following conditions:
+
+ (1) It is not legal for there to be a ".." after a wildcard.
+
+ (2) By definition, "**" must appear alone between directory slashes.If there is any remaining "**" then this is not
+ a valid filespec.
+
+ True if both parts meet all conditions for a legal filespec.
+
+
+
+ Append the regex equivalents for character sequences in the fixed directory part of a filespec:
+
+ (1) The leading \\ in UNC paths, so that the doubled slash isn't reduced in the last step
+
+ (2) Common filespec characters
+
+
+
+
+ Append the regex equivalents for character sequences in the wildcard directory part of a filespec:
+
+ (1) The leading **\ if existing
+
+ (2) Each occurrence of recursive wildcard \**\
+
+ (3) Common filespec characters
+
+
+
+
+ Append the regex equivalents for character sequences in the filename part of a filespec:
+
+ (1) Trailing dots in file names have to be treated specially.
+ We want:
+
+ *. to match foo
+
+ but 'foo' doesn't have a trailing '.' so we need to handle this while still being careful
+ not to match 'foo.txt' by modifying the generated regex for wildcard characters * and ?
+
+ (2) Common filespec characters
+
+ (3) Ignore the .* portion of any *.* sequence when no trailing dot exists
+
+
+
+
+ Append the regex equivalents for characters common to all filespec parts.
+
+
+
+
+ Given an index at a directory separator,
+ iteratively skip to the end of two sequences:
+
+ (1) \.\ -> \
+ This is an identity, so for example, these two are equivalent,
+
+ dir1\.\dir2 == dir1\dir2
+
+ (2) \\ -> \
+ Double directory separators are treated as a single directory separator,
+ so, for example, this is an identity:
+
+ f:\dir1\\dir2 == f:\dir1\dir2
+
+ The single exemption is for UNC path names, like this:
+
+ \\server\share != \server\share
+
+ This case is handled by isUncPath in
+ a prior step.
+
+
+ The last index of a directory sequence.
+
+
+
+ Given an index at a directory separator or start of a recursive operator,
+ iteratively skip to the end of three sequences:
+
+ (1), (2) Both sequences handled by IndexOfNextNonCollapsibleChar
+
+ (3) \**\**\ -> \**\
+ This is an identity, so for example, these two are equivalent,
+
+ dir1\**\**\ == dir1\**\
+
+ ]
+ If starting at a recursive operator, the last index of a recursive sequence.
+ Otherwise, the last index of a directory sequence.
+
+
+
+
+ Given a filespec, get the information needed for file matching.
+
+ The filespec.
+ Receives the regular expression.
+ Receives the flag that is true if recursion is required.
+ Receives the flag that is true if the filespec is legal.
+
+
+
+ Given a filespec, parse it and construct the regular expression string.
+
+ The filespec.
+ Receives the fixed directory part.
+ Receives the wildcard directory part.
+ Receives the filename part.
+ Receives the flag that is true if recursion is required.
+ Receives the flag that is true if the filespec is legal.
+ hook method to further change the parts
+
+
+
+ The results of a match between a filespec and a file name.
+
+
+
+
+ Default constructor.
+
+
+
+
+ A wildcard (* and ?) matching algorithm that tests whether the input path file name matches against the pattern.
+
+ The path whose file name is matched against the pattern.
+ The pattern.
+
+
+
+ A wildcard (* and ?) matching algorithm that tests whether the input string matches against the pattern.
+
+ String which is matched against the pattern.
+ Pattern against which string is matched.
+
+
+
+ A wildcard (* and ?) matching algorithm that tests whether the input string matches against the pattern.
+
+ String which is matched against the pattern.
+ Pattern against which string is matched.
+
+
+
+ Given a pattern (filespec) and a candidate filename (fileToMatch)
+ return matching information.
+
+ The filespec.
+ The candidate to match against.
+ The result class.
+
+
+
+ The maximum number of tasks that are allowed to run concurrently
+
+
+
+
+ The number of currently available tasks
+
+
+
+
+ The maximum number of tasks that Parallel.ForEach may use
+
+
+
+
+ Given a filespec, find the files that match.
+ Will never throw IO exceptions: if there is no match, returns the input verbatim.
+
+ The project directory.
+ Get files that match the given file spec.
+ Exclude files that match this file spec.
+ The search action, array of files, and Exclude file spec (if applicable).
+
+
+
+ Replace all slashes to the OS slash, collapse multiple slashes into one, trim trailing slashes
+
+ A string
+ The normalized string
+
+
+
+ Returns true if drive enumerating wildcard patterns are detected using the directory and wildcard parts.
+
+ Fixed directory string, portion of file spec info.
+ Wildcard string, portion of file spec info.
+
+
+
+ Returns true if given characters follow a drive pattern without the slash (ex: C:).
+
+ First char from directory part of file spec string.
+ Second char from directory part of file spec string.
+
+
+
+ Returns true if selected characters from the fixed directory and wildcard pattern make up the "{any number of slashes}**" pattern.
+
+ Starting index to begin detecting slashes in directory part of file spec string.
+ Length of directory part of file spec string.
+ Fixed directory string, portion of file spec info.
+ Wildcard string, portion of file spec info.
+
+
+
+ Returns true if the given character is a valid drive letter.
+
+
+ Copied from https://github.com/dotnet/corefx/blob/b8b81a66738bb10ef0790023598396861d92b2c4/src/Common/src/System/IO/PathInternal.Windows.cs#L53-L59
+
+
+
+
+ Skips slash characters in a string.
+
+ The working string
+ Offset in string to start the search in
+ First index that is not a slash. Returns the string's length if end of string is reached
+
+
+
+ Given a filespec, find the files that match.
+ Will never throw IO exceptions: if there is no match, returns the input verbatim.
+
+ The project directory.
+ Get files that match the given file spec.
+ Exclude files that match this file spec.
+ The search action, array of files, and Exclude file spec (if applicable).
+
+
+
+ Returns true if the last component of the given directory path (assumed to not have any trailing slashes)
+ matches the given pattern.
+
+ The path to test.
+ The pattern to test against.
+ True in case of a match (e.g. directoryPath = "dir/subdir" and pattern = "s*"), false otherwise.
+
+
+
+ Returns true if is * or *.*.
+
+ The filename pattern to check.
+
+
+
+ Set of methods to deal with versions in the tasks
+
+
+
+
+ Convert a version number like 0.0.0.0 to a Version instance.
+ The method will return null if the string is not a valid value
+
+ Version string to convert to a version object
+
+
+
+ Go though an enumeration and create a sorted list of strings which can be parsed as versions. Keep around the original
+ string because it may contain a v and this would be required to create the correct path on disk if the string was part of a path.
+
+
+
+
+ Convert a version number like 0.0.0.0 to a Version instance.
+
+
+ Should we use Parse to TryParse (parse means we throw an exception, tryparse means we will not).
+
+
+
+ Static accessor for a ReverseVersionGenericComparer
+
+
+
+
+ The Compare implements a reverse comparison
+
+
+
+
+ Static accessor for a ReverseVersionGenericComparer
+
+
+
+
+ The Compare implements a reverse comparison
+
+
+
+
+ Shared Visual Studio related constants
+
+
+
+
+ This is the version number of the most recent solution file format
+ we will read. It will be the version number used in solution files
+ by the latest version of Visual Studio.
+
+
+
+
+ This is the version number of the latest version of Visual Studio.
+
+
+ We use it for the version of the VC PIA we try to load and to find
+ Visual Studio registry hive that we use to find where vcbuild.exe might be.
+
+
+
+
+ Specifies the parts of the assembly name to partially match
+
+
+
+
+ Compare SimpleName A.PartialCompare(B,SimpleName) match the simple name on A and B if the simple name on A is not null.
+
+
+
+
+ Compare Version A.PartialCompare(B, Version) match the Version on A and B if the Version on A is not null.
+
+
+
+
+ Compare Culture A.PartialCompare(B, Culture) match the Culture on A and B if the Culture on A is not null.
+
+
+
+
+ Compare PublicKeyToken A.PartialCompare(B, PublicKeyToken) match the PublicKeyToken on A and B if the PublicKeyToken on A is not null.
+
+
+
+
+ When doing a comparison A.PartialCompare(B, Default) compare all fields of A which are not null with B.
+
+
+
+
+ A replacement for AssemblyName that optimizes calls to FullName which is expensive.
+ The assembly name is represented internally by an AssemblyName and a string, conversion
+ between the two is done lazily on demand.
+
+
+
+
+ Set of assemblyNameExtensions that THIS assemblyname was remapped from.
+
+
+
+
+ Construct an unnamed assembly.
+ Private because we want only one of these.
+
+
+
+
+ Construct with AssemblyName.
+
+
+
+
+
+ Construct with string.
+
+
+
+
+
+ Construct from a string, but immediately construct a real AssemblyName.
+ This will cause an exception to be thrown up front if the assembly name
+ isn't well formed.
+
+
+ The string version of the assembly name.
+
+
+ Used when the assembly name comes from a user-controlled source like a project file or config file.
+ Does extra checking on the assembly name and will throw exceptions if something is invalid.
+
+
+
+
+ Ctor for deserializing from state file (binary serialization).
+ This is required because AssemblyName is not Serializable on .NET Core.
+
+
+
+
+
+
+ Ctor for deserializing from state file (custom binary serialization) using translator.
+
+
+
+
+ To be used as a delegate. Gets the AssemblyName of the given file.
+
+
+
+
+
+
+ Run after the object has been deserialized
+
+
+
+
+ Initialize the remapped from structure.
+
+
+
+
+ Create remappedFrom HashSet. Used by deserialization as well.
+
+
+
+
+ Assume there is a string version, create the AssemblyName version.
+
+
+
+
+ Assume there is a string version, create the AssemblyName version.
+
+
+
+
+ The base name of the assembly.
+
+
+
+
+
+ Gets the backing AssemblyName, this can be None.
+
+
+
+
+ The assembly's version number.
+
+
+
+
+
+ Is the assembly a complex name or a simple name. A simple name is where only the name is set
+ a complex name is where the version, culture or publickeytoken is also set
+
+
+
+
+ Does the fullName have the processor architecture defined
+
+
+
+
+ Replace the current version with a new version.
+
+
+
+
+
+ The assembly's Culture
+
+
+
+
+
+ The assembly's retargetable bit
+
+
+
+
+
+ The full name of the original extension we were before being remapped.
+
+
+
+
+ Add an assemblyNameExtension which represents an assembly name which was mapped to THIS assemblyName.
+
+
+
+
+ As an AssemblyName
+
+
+
+
+
+ The assembly's full name.
+
+
+
+
+
+ Get the assembly's public key token.
+
+
+
+
+
+ A special "unnamed" instance of AssemblyNameExtension.
+
+
+
+
+
+ Compare one assembly name to another.
+
+
+
+
+
+
+ Compare one assembly name to another.
+
+
+
+
+ Get a hash code for this assembly name.
+
+
+
+
+
+ Compare two base names as quickly as possible.
+
+
+
+
+
+
+ An implementation of compare that compares two base
+ names as quickly as possible.
+
+
+
+
+
+
+ Compare two basenames.
+
+
+
+
+
+
+
+ Clone this assemblyNameExtension
+
+
+
+
+ Clone the object but mark and mark the cloned object as immutable
+
+
+
+
+
+ Is this object immutable
+
+
+
+
+ Mark this object as immutable
+
+
+
+
+ Compare two assembly names for equality.
+
+
+
+
+
+
+ Interface method for IEquatable<AssemblyNameExtension>
+
+
+
+
+
+
+ Compare two assembly names for equality ignoring version.
+
+
+
+
+
+
+ Compare two assembly names and consider the retargetable flag during the comparison
+
+
+
+
+ Compare two assembly names for equality.
+
+
+
+
+ Allows the comparison of the culture.
+
+
+
+
+ Allows the comparison of just the PublicKeyToken
+
+
+
+
+ Compare two public key tokens.
+
+
+
+
+ Only the unnamed assembly has both null assemblyname and null string.
+
+
+
+
+
+ Given a display name, construct an assembly name.
+
+ The display name.
+ The assembly name.
+
+
+
+ Return a string that has AssemblyName special characters escaped.
+ Those characters are Equals(=), Comma(,), Quote("), Apostrophe('), Backslash(\).
+
+
+ WARNING! This method is not meant as a general purpose escaping method for assembly names.
+ Use only if you really know that this does what you need.
+
+
+
+
+
+
+ Convert to a string for display.
+
+
+
+
+
+ Compare the fields of this with that if they are not null.
+
+
+
+
+ Compare the fields of this with that if they are not null.
+
+
+
+
+ Do a partial comparison between two assembly name extensions.
+ Compare the fields of A and B on the following conditions:
+ 1) A.Field has a non null value
+ 2) The field has been selected in the comparison flags or the default comparison flags are passed in.
+
+ If A.Field is null then we will not compare A.Field and B.Field even when the comparison flag is set for that field unless skipNullFields is false.
+
+
+
+
+ Do a partial comparison between two assembly name extensions.
+ Compare the fields of A and B on the following conditions:
+ 1) A.Field has a non null value
+ 2) The field has been selected in the comparison flags or the default comparison flags are passed in.
+
+ If A.Field is null then we will not compare A.Field and B.Field even when the comparison flag is set for that field unless skipNullFields is false.
+
+
+
+
+ Reads/writes this class
+
+
+
+
+
+ This class contains methods that are useful for error checking and validation.
+
+
+
+
+ Throws InternalErrorException.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ Indicates the code path followed should not have been possible.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ Indicates the code path followed should not have been possible.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ Indicates the code path followed should not have been possible.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is null.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The value of the argument.
+ Parameter that should not be null
+
+
+
+ Helper to throw an InternalErrorException when a lock on the specified object is not already held.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The object that should already have been used as a lock.
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is null or zero length.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The value of the argument.
+ Parameter that should not be null or zero length
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is not a rooted path.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ Parameter that should be a rooted path.
+
+
+
+ This method should be used in places where one would normally put
+ an "assert". It should be used to validate that our assumptions are
+ true, where false would indicate that there must be a bug in our
+ code somewhere. This should not be used to throw errors based on bad
+ user input or anything that the user did wrong.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an InvalidOperationException with the specified resource string
+
+ Resource to use in the exception
+ Formatting args.
+
+
+
+ Throws an InvalidOperationException if the given condition is false.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an ArgumentException that can include an inner exception.
+
+ PERF WARNING: calling a method that takes a variable number of arguments
+ is expensive, because memory is allocated for the array of arguments -- do
+ not call this method repeatedly in performance-critical scenarios
+
+
+
+
+ Throws an ArgumentException that can include an inner exception.
+
+ PERF WARNING: calling a method that takes a variable number of arguments
+ is expensive, because memory is allocated for the array of arguments -- do
+ not call this method repeatedly in performance-critical scenarios
+
+
+ This method is thread-safe.
+
+ Can be null.
+
+
+
+
+
+ Throws an ArgumentException if the given condition is false.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an ArgumentException that includes an inner exception, if
+ the given condition is false.
+
+
+ Can be null.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an argument out of range exception.
+
+
+
+
+ Throws an ArgumentOutOfRangeException using the given parameter name
+ if the condition is false.
+
+
+
+
+ Throws an ArgumentNullException if the given string parameter is null
+ and ArgumentException if it has zero length.
+
+
+
+
+ Throws an ArgumentNullException if the given collection is null
+ and ArgumentException if it has zero length.
+
+
+
+
+ Throws an ArgumentException if the given collection is not null but of zero length.
+
+
+
+
+ Throws an ArgumentNullException if the given string parameter is null
+ and ArgumentException if it has zero length.
+
+
+
+
+ Throws an ArgumentException if the string has zero length, unless it is
+ null, in which case no exception is thrown.
+
+
+
+
+ Throws an ArgumentNullException if the given parameter is null.
+
+
+
+
+ Throws an ArgumentNullException if the given parameter is null.
+
+
+
+
+ Verifies the given arrays are not null and have the same length
+
+
+
+
+ A utility that verifies the parameters provided to a standard ICollection.CopyTo call.
+
+ If is null.
+ If falls outside of the bounds .
+ If there is insufficient capacity to copy the collection contents into
+ when starting at .
+
+
+
+ This class contains only static methods, which are useful throughout many
+ of the MSBuild classes and don't really belong in any specific class.
+
+
+
+
+ Converts a string to a bool. We consider "true/false", "on/off", and
+ "yes/no" to be valid boolean representations in the XML.
+
+ The string to convert.
+ Boolean true or false, corresponding to the string.
+
+
+
+ Returns a hex representation of a byte array.
+
+ The bytes to convert
+ A string byte types formated as X2.
+
+
+
+ Returns true if the string can be successfully converted to a bool,
+ such as "on" or "yes"
+
+
+
+
+ Returns true if the string represents a valid MSBuild boolean true value,
+ such as "on", "!false", "yes"
+
+
+
+
+ Returns true if the string represents a valid MSBuild boolean false value,
+ such as "!on" "off" "no" "!true"
+
+
+
+
+ Converts a string like "123.456" into a double. Leading sign is allowed.
+
+
+
+
+ Converts a hex string like "0xABC" into a double.
+
+
+
+
+ Converts a string like "123.456" or "0xABC" into a double.
+ Tries decimal conversion first.
+
+
+
+
+ Returns true if the string is a valid hex number, like "0xABC"
+
+
+
+
+ Returns true if the string is a valid decimal number, like "-123.456"
+
+
+
+
+ Returns true if the string is a valid decimal or hex number
+
+
+
+
+ This class contains utility methods for file IO.
+ Separate from FileUtilities because some assemblies may only need the patterns.
+ PERF\COVERAGE NOTE: Try to keep classes in 'shared' as granular as possible. All the methods in
+ each class get pulled into the resulting assembly.
+
+
+
+
+ Indicates whether the specified string follows the pattern drive pattern (for example "C:", "D:").
+
+ Input to check for drive pattern.
+ true if follows the drive pattern, false otherwise.
+
+
+
+ Indicates whether the specified string follows the pattern drive pattern (for example "C:/" or "C:\").
+
+ Input to check for drive pattern with slash.
+ true if follows the drive pattern with slash, false otherwise.
+
+
+
+ Indicates whether the specified string starts with the drive pattern (for example "C:").
+
+ Input to check for drive pattern.
+ true if starts with drive pattern, false otherwise.
+
+
+
+ Indicates whether the specified string starts with the drive pattern (for example "C:/" or "C:\").
+
+ Input to check for drive pattern.
+ true if starts with drive pattern with slash, false otherwise.
+
+
+
+ Indicates whether the specified file-spec comprises exactly "\\server\share" (with no trailing characters).
+
+ Input to check for UNC pattern.
+ true if comprises UNC pattern.
+
+
+
+ Indicates whether the specified file-spec begins with "\\server\share".
+
+ Input to check for UNC pattern.
+ true if starts with UNC pattern.
+
+
+
+ Indicates whether the file-spec begins with a UNC pattern and how long the match is.
+
+ Input to check for UNC pattern.
+ length of the match, -1 if no match.
+
+
+
+ Indicates whether or not the file-spec meets the minimum requirements of a UNC pattern.
+
+ Input to check for UNC pattern minimum requirements.
+ true if the UNC pattern is a minimum length of 5 and the first two characters are be a slash, false otherwise.
+
+
+
+ This class contains utility methods for dealing with resources.
+
+
+
+
+ Extracts the message code (if any) prefixed to the given string.
+ MSB\d\d\d\d):\s*(?.*)$"
+ Arbitrary codes match "^\s*(?[A-Za-z]+\d+):\s*(?.*)$"
+ ]]>
+ Thread safe.
+
+ Whether to match only MSBuild error codes, or any error code.
+ The string to parse.
+ [out] The message code, or null if there was no code.
+ The string without its message code prefix, if any.
+
+
+
+ Retrieves the MSBuild F1-help keyword for the given resource string. Help keywords are used to index help topics in
+ host IDEs.
+
+ Resource string to get the MSBuild F1-keyword for.
+ The MSBuild F1-help keyword string.
+
+
+
+ Retrieves the contents of the named resource string.
+
+ Resource string name.
+ Resource string contents.
+
+
+
+ Loads the specified string resource and formats it with the arguments passed in. If the string resource has an MSBuild
+ message code and help keyword associated with it, they too are returned.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ This method is thread-safe.
+ [out] The MSBuild message code, or null.
+ [out] The MSBuild F1-help keyword for the host IDE, or null.
+ Resource string to load.
+ Optional arguments for formatting the resource string.
+ The formatted resource string.
+
+
+
+ Looks up a string in the resources, and formats it with the arguments passed in. If the string resource has an MSBuild
+ message code and help keyword associated with it, they are discarded.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ This method is thread-safe.
+ Resource string to load.
+ Optional arguments for formatting the resource string.
+ The formatted resource string.
+
+
+
+ Formats the resource string with the given arguments.
+ Ignores error codes and keywords
+
+
+
+
+
+
+
+ Formats the given string using the variable arguments passed in.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ Thread safe.
+
+ The string to format.
+ Optional arguments for formatting the given string.
+ The formatted string.
+
+
+
+ Verifies that a particular resource string actually exists in the string table. This will only be called in debug
+ builds. It helps catch situations where a dev calls VerifyThrowXXX with a new resource string, but forgets to add the
+ resource string to the string table, or misspells it!
+
+ This method is thread-safe.
+ Resource string to check.
+
+
+
+ This class contains only static methods, which are used in both the
+ tasks and graph projects in order for two projects to negotiate which platform a projectreference
+ should be built as.
+
+
+
+
+ Contains the names of the known attributes in the XML project file.
+
+
+
+
+ Returns true if and only if the specified attribute is one of the attributes that the engine specifically recognizes
+ on a task and treats in a special way.
+
+
+ true, if given attribute is a reserved task attribute
+
+
+
+ Checks if the specified attribute is a reserved task attribute with incorrect casing.
+
+
+ true, if the given attribute is reserved and badly cased
+
+
+
+ Indicates if the specified attribute cannot be used for batching targets.
+
+
+ true, if a target cannot batch on the given attribute
+
+
+
+ Returns true if the given string is a valid member of the MSBuildRuntimeValues set
+
+
+
+
+ Returns true if the given string is a valid member of the MSBuildArchitectureValues set
+
+
+
+
+ Compares two members of MSBuildRuntimeValues, returning true if they count as a match, and false otherwise.
+
+
+
+
+ Given two MSBuildRuntime values, returns the concrete result of merging the two. If the merge fails, the merged runtime
+ string is returned null, and the return value of the method is false. Otherwise, if the merge succeeds, the method returns
+ true with the merged runtime value. E.g.:
+ "CLR4" + "CLR2" = null (false)
+ "CLR2" + "don't care" = "CLR2" (true)
+ "current runtime" + "CLR4" = "CLR4" (true)
+ "current runtime" + "don't care" = "CLR4" (true)
+ If both specify "don't care", then defaults to the current runtime -- CLR4.
+ A null or empty string is interpreted as "don't care".
+
+
+
+
+ Compares two members of MSBuildArchitectureValues, returning true if they count as a match, and false otherwise.
+
+
+
+
+ Given an MSBuildRuntime value that may be non-explicit -- e.g. "CurrentRuntime" or "Any" --
+ return the specific MSBuildRuntime value that it would map to in this case. If it does not map
+ to any known runtime, just return it as is -- maybe someone else knows what to do with it; if
+ not, they'll certainly have more context on logging or throwing the error.
+
+
+
+
+ Given two MSBuildArchitecture values, returns the concrete result of merging the two. If the merge fails, the merged architecture
+ string is returned null, and the return value of the method is false. Otherwise, if the merge succeeds, the method returns
+ true with the merged architecture value. E.g.:
+ "x86" + "x64" = null (false)
+ "x86" + "don't care" = "x86" (true)
+ "current architecture" + "x86" = "x86" (true) on a 32-bit process, and null (false) on a 64-bit process
+ "current architecture" + "don't care" = "x86" (true) on a 32-bit process, and "x64" (true) on a 64-bit process
+ A null or empty string is interpreted as "don't care".
+ If both specify "don't care", then defaults to whatever the current process architecture is.
+
+
+
+
+ Returns the MSBuildArchitecture value corresponding to the current process' architecture.
+
+
+ Revisit if we ever run on something other than Intel.
+
+
+
+
+ Returns the MSBuildRuntime value corresponding to the current process' runtime.
+
+
+
+
+ Given an MSBuildArchitecture value that may be non-explicit -- e.g. "CurrentArchitecture" or "Any" --
+ return the specific MSBuildArchitecture value that it would map to in this case. If it does not map
+ to any known architecture, just return it as is -- maybe someone else knows what to do with it; if
+ not, they'll certainly have more context on logging or throwing the error.
+
+
+
+
+ Contains the names of the known elements in the XML project file.
+
+
+
+
+ This class provides access to the assembly's resources.
+
+
+
+
+ Loads the specified resource string, either from the assembly's primary resources, or its shared resources.
+
+ This method is thread-safe.
+ The resource string, or null if not found.
+
+
+
+ Gets the assembly's primary resources i.e. the resources exclusively owned by this assembly.
+
+ This property is thread-safe.
+ ResourceManager for primary resources.
+
+
+
+ Gets the assembly's shared resources i.e. the resources this assembly shares with other assemblies.
+
+ This property is thread-safe.
+ ResourceManager for shared resources.
+
+
+
+ Replacement for BinaryReader which attempts to intern the strings read by ReadString.
+
+
+
+
+ The maximum size, in bytes, to read at once.
+
+
+
+
+ A cache of recently used buffers. This is a pool of size 1 to avoid allocating moderately sized
+ objects repeatedly. Used in scenarios that don't have a good context to attach
+ a shared buffer to.
+
+
+
+
+ Shared buffer saves allocating these arrays many times.
+
+
+
+
+ True if is owned by this instance, false if it was passed by the caller.
+
+
+
+
+ The decoder used to translate from UTF8 (or whatever).
+
+
+
+
+ Comment about constructing.
+
+
+
+
+ Read a string while checking the string precursor for intern opportunities.
+ Taken from ndp\clr\src\bcl\system\io\binaryreader.cs-ReadString()
+
+
+
+
+ A shared buffer to avoid extra allocations in InterningBinaryReader.
+
+
+ The caller is responsible for managing the lifetime of the returned buffer and for passing it to .
+
+
+
+
+ A placeholder instructing InterningBinaryReader to use pooled buffer (to avoid extra allocations).
+
+
+ Lifetime of the pooled buffer is managed by InterningBinaryReader (tied to BinaryReader lifetime wrapping the buffer)
+
+
+
+
+ Gets a buffer from the pool or creates a new one.
+
+ The . Should be returned to the pool after we're done with it.
+
+
+
+ Returns our buffer to the pool if we were not passed one by the caller.
+
+
+
+
+ Create a BinaryReader. It will either be an interning reader or standard binary reader
+ depending on whether the interning reader is possible given the buffer and stream.
+
+
+
+
+ Holds thepreallocated buffer.
+
+
+
+
+ Yes, we are constructing.
+
+
+
+
+ The char buffer.
+
+
+
+
+ The byte buffer.
+
+
+
+
+ This class provides helper methods to adapt from to
+ .
+
+
+
+
+ Translates an object implementing which does not expose a
+ public parameterless constructor.
+
+ The reference type.
+ The translator
+ The value to be translated.
+ The factory method used to instantiate values of type T.
+
+
+
+ The list of directory names found from the config file.
+
+
+
+
+ Construct.
+
+ The path to the config file.
+ The runtime version property from the project file.
+ The to target.
+
+
+
+ Get Enumerator
+
+
+
+
+ Get enumerator
+
+
+
+
+ Contains information about entries in the AssemblyFoldersEx registry keys.
+
+
+
+
+ Set of files in ALL AssemblyFolderFromConfig directories
+
+
+
+
+ File exists delegate we are replacing
+
+
+
+
+ Should we use the original on or use our own
+
+
+
+
+ Constructor
+
+
+
+
+ AssemblyfoldersEx object which contains the set of directories in assmblyfoldersFromConfig
+
+
+
+
+ Fast file exists for AssemblyFoldersFromConfig.
+
+
+
+
+ Resolve search path type {AssemblyFolderFromConfig: *}
+
+
+
+
+ Regex for breaking up the search path pieces.
+
+
+
+
+ Whether or not the search path could be cracked.
+
+
+
+
+ From the search path.
+
+
+
+
+ Whether regex initialization has happened.
+
+
+
+
+ List of assembly folders to search for keys in.
+
+
+
+
+ BuildEngine
+
+
+
+
+ Task log context.
+
+
+
+
+ Path to the assembly folder config file.
+
+
+
+
+ If it is not initialized then just return the null object, that would mean the resolver was not called.
+
+
+
+
+ Construct.
+
+
+
+
+ Initialize this class if it hasn't been initialized yet.
+
+
+
+
+
+
+
+ Collection of assembly attributes.
+
+
+
+
+ Information about a managed assembly.
+
+
+ After initial construction, this object is readonly and data-only,
+ allowing it to be safely cached.
+
+
+
+
+ Combines items that represent properties and values into an XML representation.
+
+
+
+
+ The root element name to use for the generated XML string
+
+
+
+
+ Items to include in the XML. The ItemSpec should be the property name, and it should have Value metadata for its value.
+
+
+
+
+ Opts into or out of using the new schema with Property Name=... rather than just specifying the RootElementName.
+
+
+
+
+ The generated XML representation of the properties and values.
+
+
+
+
+ Combines multiple XML elements
+
+
+
+
+ The root element name to use for the generated XML string
+
+
+
+
+ The XML elements to include as children of the root element
+
+
+
+
+ The generated XML
+
+
+
+
+ Task to call Path.GetFullPath
+
+
+
+
+ The list of paths to convert to absolute paths.
+
+
+
+
+ This is the output of the task, a list of absolute paths for the items passed in
+
+
+
+
+ Calls Path.GetFullPath for each of the inputs. Preserves metadata.
+
+ true on success, false on failure
+
+
+
+ Given a string of semi-colon delimited name=value pairs, this method parses it and creates
+ a hash table containing the property names as keys and the property values as values.
+
+ true on success, false on failure.
+
+
+
+ Given a string of semi-colon delimited name=value pairs, this method parses it and creates
+ a hash table containing the property names as keys and the property values as values.
+ This method escapes any special characters found in the property values, in case they
+ are going to be passed to a method (such as that expects the appropriate escaping to have happened
+ already.
+
+ true on success, false on failure.
+
+
+
+ A very simple class that holds two strings, a property name and property value.
+
+
+
+
+ Property name
+
+
+
+
+ Property value fragments. Join with semicolon to get the final value.
+
+
+
+
+ Helper logging class for tasks, used for dealing with two resource streams.
+
+
+
+
+ public constructor
+
+
+
+
+ Used to load culture-specific resources. Derived classes should register their resources either during construction, or
+ via this property, if they have localized strings.
+
+
+
+
+ Loads the specified resource string and optionally formats it using the given arguments. The current thread's culture
+ is used for formatting.
+
+
+ 1) This method requires the owner task to have registered its resources either via the Task (or TaskMarshalByRef) base
+ class constructor, or the "Task.TaskResources" (or "AppDomainIsolatedTask.TaskResources") property.
+ 2) This method is thread-safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ The formatted string.
+ Thrown when resourceName is null.
+ Thrown when the string resource indicated by resourceName does not exist.
+ Thrown when the TaskResources property of the owner task is not set.
+
+
+
+ Read information from application .config files.
+
+
+
+
+ Read the .config from a file.
+
+
+
+
+
+ Read the .config from an XmlReader
+
+
+
+
+
+ Access the Runtime section of the application .config file.
+
+
+
+
+ App.config files seem to come with mixed casing for element and attribute names.
+ If the fusion loader can handle this then this code should too.
+
+
+
+
+
+
+
+ An exception thrown while parsing through an app.config.
+
+
+
+
+ The name of the app.config file.
+
+
+
+
+ The line number with the error. Is initialized to zero
+
+
+
+
+ The column with the error. Is initialized to zero
+
+
+
+
+ Construct the exception.
+
+
+
+
+ Construct the exception.
+
+
+
+
+ Represents a single <bindingRedirect> from the app.config file.
+
+
+
+
+ The low end of the old version range.
+
+
+
+
+ The high end of the old version range.
+
+
+
+
+ The new version number.
+
+
+
+
+ The reader is positioned on a <bindingRedirect> element--read it.
+
+
+
+
+ Represents a single <dependentassembly> from the app.config file.
+
+
+
+
+ The partial , there should be no version.
+ Setter and Getter clone the incoming / outgoing assembly
+
+
+
+
+ The full . It is not cloned. Callers should not mutate this object.
+
+
+
+
+ The reader is positioned on a <dependentassembly> element--read it.
+
+
+
+
+ The binding redirects.
+
+
+
+
+ Wraps the <runtime> section of the .config file.
+
+
+
+
+ The reader is positioned on a <runtime> element--read it.
+
+
+
+
+ Return the collection of dependent assemblies for this runtime element.
+
+
+
+
+ Resolve searchpath type {Registry: *}
+
+
+
+
+ Regex for breaking up the searchpath pieces.
+
+
+
+
+ Delegate.
+
+
+
+
+ Delegate
+
+
+
+
+ Open the base registry key given a hive and a view
+
+
+
+
+ Whether or not the search path could be cracked.
+
+
+
+
+ From the search path.
+
+
+
+
+ From the search path.
+
+
+
+
+ From the search path.
+
+
+
+
+ From the search path.
+
+
+
+
+ From the search path.
+
+
+
+
+ Whether regex initialization has happened.
+
+
+
+
+ List of assembly folders to search for keys in.
+
+
+
+
+ BuildEngine
+
+
+
+
+ If it is not initialized then just return the null object, that would mean the resolver was not called.
+
+
+
+
+ Construct.
+
+
+
+
+ Initialize this class if it hasn't been initialized yet.
+
+
+
+
+
+
+
+ Contains information about entries in the AssemblyFoldersEx registry keys.
+
+
+
+
+ Set of files in ALL assemblyfoldersEx directories
+
+
+
+
+ File exists delegate we are replacing
+
+
+
+
+ Should we use the original on or use our own
+
+
+
+
+ Constructor
+
+
+
+
+ AssemblyfoldersEx object which contains the set of directories in assmblyfoldersex
+
+
+
+
+ Fast file exists for assemblyfoldersex.
+
+
+
+
+ Resolve searchpath type {AssemblyFolders}
+
+
+
+
+ Construct.
+
+ The corresponding element from the search path.
+ Delegate that gets the assembly name.
+ Delegate that returns if the file exists.
+ Delegate that returns the clr runtime version for the file.
+ The targeted runtime version.
+
+
+
+
+
+
+ Collection of methods used to discover assembly metadata.
+ Primarily stolen from manifestutility.cs AssemblyMetaDataImport class.
+
+
+
+
+ Construct an instance for a source file.
+
+ The assembly.
+
+
+
+ Get the dependencies.
+
+
+
+
+
+ Get the scatter files from the assembly metadata.
+
+
+
+
+ What was the framework name that the assembly was built against.
+
+
+
+
+ Given an assembly name, crack it open and retrieve the list of dependent
+ assemblies and the list of scatter files.
+
+ Path to the assembly.
+ Cache of pre-extracted assembly metadata.
+ Receives the list of dependencies.
+ Receives the list of associated scatter files.
+ Gets the assembly name.
+
+
+
+ Given an assembly name, crack it open and retrieve the TargetFrameworkAttribute
+ assemblies and the list of scatter files.
+
+
+
+
+ Determine if an file is a winmd file or not.
+
+
+
+
+ Collects the metadata and attributes for specified assembly.
+ The requested properties are used by legacy project system.
+
+
+
+
+ Get the framework name from the assembly.
+
+
+
+
+ Release interface pointers on Dispose().
+
+
+
+
+ Given a path get the CLR runtime version of the file
+
+ path to the file
+ The CLR runtime version or empty if the path does not exist.
+
+
+
+ Import assembly dependencies.
+
+ The array of assembly dependencies.
+
+
+
+ Import extra files. These are usually consituent members of a scatter assembly.
+
+ The extra files of assembly dependencies.
+
+
+
+ Allocate assembly metadata structure buffer.
+
+ Pointer to structure
+
+
+
+ Construct assembly name.
+
+ Assembly metadata structure
+ Buffer containing the name
+ Length of that buffer
+ Pointer to public key
+ Count of bytes in public key.
+ Extra flags
+ The assembly name.
+
+
+
+ Free the assembly metadata structure.
+
+ The pointer.
+
+
+
+ Free the assembly metadata structure.
+
+ The pointer.
+ Marshaled assembly metadata to the managed type.
+
+
+
+ Managed implementation of a reader for getting the runtime version of an assembly
+
+
+
+
+ Given a path get the CLR runtime version of the file.
+
+ path to the file
+ The CLR runtime version or empty if the path does not exist or the file is not an assembly.
+
+
+
+ Given a get the CLR runtime version of the underlying file.
+
+ A positioned at the first byte of the file.
+ The CLR runtime version or empty if the data does not represent an assembly.
+
+
+
+ An assembly name coupled with reference information.
+
+
+
+
+ Display as string.
+
+
+
+
+ Compare by assembly name.
+
+
+
+
+ Construct a new AssemblyNameReference.
+
+
+
+
+ Compare the two AssemblyNameReferences by version number.
+
+
+
+
+ Private construct so there's only one instance.
+
+
+
+
+ Compare the two AssemblyNameReferences by version number.
+
+
+
+
+ Utility class encapsulates steps to resolve assembly references.
+ For example, this class has the code that will take:
+
+ System.Xml
+
+ and turn it into:
+
+ [path-to-frameworks]\System.Xml.dll
+
+
+
+
+
+
+ Implementation guts for ResolveReference.
+
+ The array of resolvers to search with.
+ The assembly name to look up.
+
+ The file name to match if {RawFileName} is seen. (May be null).
+ True if this is a primary reference directly from the project file.
+ True if is immutable and guaranteed to exist.
+
+ The filename extension of the assembly. Must be this or its no match.
+ This reference's hintpath
+ Like "hklm\Vendor RegKey" as provided to a reference by the <AssemblyFolderKey> on the reference in the project.
+ Receives the list of locations that this function tried to find the assembly. May be "null".
+ Receives the searchPath that the reference was resolved at. Empty if not resolved.
+ This will be true if the user requested a specific file.
+ The resolved path
+
+
+
+ Compile search paths into an array of resolvers.
+
+
+
+ Paths to assembly files mentioned in the project.
+ Like x86 or IA64\AMD64, the processor architecture being targetted.
+ Paths to FX folders.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Build a resolver array from a set of directories to resolve directly from.
+
+
+
+
+ Constants used for assembly resolution.
+
+
+
+
+ Special hintpath indicator. May be passed in where SearchPaths are taken.
+
+
+
+
+ Special AssemblyFolders indicator. May be passed in where SearchPaths are taken.
+
+
+
+
+ Special CandidateAssemblyFiles indicator. May be passed in where SearchPaths are taken.
+
+
+
+
+ Special GAC indicator. May be passed in where SearchPaths are taken.
+
+
+
+
+ Special Framework directory indicator. May be passed in where SearchPaths are taken.
+
+
+
+
+ Special SearchPath indicator that means: match against the assembly item's Include as
+ if it were a file.
+
+
+
+
+ Special AssemblyFoldersEx indicator. May be passed in where SearchPaths are taken.
+
+
+
+
+ Special AssemblyFoldersFromConfig indicator. May be passed in where SearchPaths are taken.
+
+
+
+
+ The reference points to a bad image.
+
+
+
+
+ Construct
+
+
+
+
+ Construct
+
+
+
+
+ Gets a message that describes the exception.
+
+
+
+
+ Resolve searchpath type {CandidateAssemblyFiles}
+
+
+
+
+ The candidate assembly files.
+
+
+
+
+ Construct.
+
+ List of literal assembly file names to be considered when SearchPaths has {CandidateAssemblyFiles}.
+ The corresponding element from the search path.
+ Delegate that gets the assembly name.
+ Delegate that returns if the file exists.
+ Delegate that returns the clr runtime version for the file.
+ The targeted runtime version.
+
+
+
+
+
+
+ If this reference lost in a conflict with another reference, this reason explains
+ why.
+
+
+
+
+ This reference didn't lose a conflict.
+
+
+
+
+ This reference matched another assembly that had a higher version number.
+
+
+
+
+ The two assemblies cannot be reconciled.
+
+
+
+
+ In this case, this reference was a dependency and the other reference was
+ primary (specified in the project file).
+
+
+
+
+ The two references were equivalent according to fusion and also have the same version.
+ Its hard to see how this could happen, but handle it.
+
+
+
+
+ The value of the copyLocal flag and why it was set that way.
+
+
+
+
+ The copy local state is undecided right now.
+
+
+
+
+ The Reference should be CopyLocal='true' because it wasn't 'no' for any reason.
+
+
+
+
+ The Reference should be CopyLocal='true' because its source item has Private='true'
+
+
+
+
+ The Reference should be CopyLocal='false' because it is a framework file.
+
+
+
+
+ The Reference should be CopyLocal='false' because it is a prerequisite file.
+
+
+
+
+ The Reference should be CopyLocal='false' because the Private attribute is set to 'false' in the project.
+
+
+
+
+ The Reference should be CopyLocal='false' because it was resolved from the GAC.
+
+
+
+
+ Legacy behavior, CopyLocal='false' when the assembly is found in the GAC (even when it was resolved elsewhere).
+
+
+
+
+ The Reference should be CopyLocal='false' because it lost a conflict between an same-named assembly file.
+
+
+
+
+ The reference was unresolved. It can't be copied to the bin directory because it wasn't found.
+
+
+
+
+ The reference was embedded. It shouldn't be copied to the bin directory because it won't be loaded at runtime.
+
+
+
+
+ The property copyLocalDependenciesWhenParentReferenceInGac is set to false and all the parent source items were found in the GAC.
+
+
+
+
+ The "assembly" should not be copied because it is a bad image—possibly not managed, possibly not an assembly at all.
+
+
+
+
+ Helper methods for dealing with CopyLocalState enumeration.
+
+
+
+
+ Returns the true or false from a CopyLocalState.
+
+
+
+
+ Exception indicates a problem finding dependencies of a reference.
+
+
+
+
+ Construct
+
+
+
+
+ Construct
+
+
+
+
+ Resolve when the searchpath type is a simple directory name.
+
+
+
+
+ The parent assembly that was used for the SearchPath.
+
+
+
+
+ Construct.
+
+
+
+
+
+
+
+ Resolve searchpath type {TargetFrameworkDirectory}
+
+
+
+
+ Construct.
+
+
+
+
+
+
+
+ If the version is not set for an assembly reference, go through the redist list and find the highest version for that assembly.
+ Make sure when matching the assembly in the redist that we take into account the publicKeyToken and the Culture.
+
+
+
+
+ Take suggested redirects (from the ResolveAssemblyReference and GenerateOutOfBandAssemblyTables tasks)
+ and add them to an intermediate copy of the App.config file.
+
+
+
+
+ Sugested redirects as output from the ResolveAssemblyReference task.
+
+
+
+
+ Path to the app.config source file.
+
+
+
+
+ Name of the output application config file: $(TargetFileName).config
+
+
+
+
+ Path to an intermediate file where we can write the input app.config plus the generated binding redirects.
+
+
+
+
+ Execute the task.
+
+
+
+
+ Determins whether the name, culture, and public key token of the given assembly name "suggestedRedirect"
+ matches the name, culture, and publicKeyToken strings.
+
+
+
+
+ Determines whether string "s" is the hexdecimal representation of the byte array "a".
+
+
+
+
+ Going through all the binding redirects in the runtime node, if anyone overlaps with a RAR suggested redirect,
+ we update the existing redirect and output warning.
+
+
+
+
+ Load or create App.Config
+
+
+
+
+ Parse the suggested redirects from RAR and return a dictionary containing all those suggested redirects
+ in the form of AssemblyName-MaxVersion pairs.
+
+
+
+
+ Resolve searchpath type {HintPathFromItem}
+
+
+
+
+ Construct.
+
+
+
+
+
+
+
+ Utility methods that encapsulate well-known assemblies.
+
+
+
+
+ Construct.
+
+
+
+
+ Unify an assembly name according to the fx retarget rules.
+
+ The unify-from assembly name.
+ The new version number.
+ Whether this assembly will be available on target machines.
+ May be true, false or null. Null means there was no IsRedistRoot in the redist list.
+ Name of the corresponding Resist specified in the redist list.
+
+
+
+ We need to check to see if an assembly name is in our remapping list, if it is we should return a new assemblyNameExtension which has been remapped.
+ Remapping is usually used for portable libraries where we need to turn one assemblyName that is retargetable to another assemblyname.
+
+
+
+
+ Find the highest version of the assemblyName in the redist list for framework assemblies taking into account the simplename, culture and public key.
+
+ The name of the assembly we would like to find the highest version for
+ Key value pair, K: Assembly entry of highest value in the redist list. V: AssemblyNameExtension with the version information or null if the name could not be found
+
+
+
+ Given an assemblyNameExtension, is that assembly name in the redist list and does that redist name start with Microsoft-Windows-CLRCoreComp which indicates
+ the redist entry is a framework redist list rather than a 3rd part redist list.
+
+
+
+
+ Find every assembly full name in the redist list that matches the given simple name.
+
+ The array of assembly names.
+
+
+
+ There reference is not a well-formed fusion name *and* its not a file
+ that exists on disk.
+
+
+
+
+ Construct
+
+
+
+
+ Construct
+
+
+
+
+ The item spec of the item that is the source fo the problem.
+
+
+
+
+ Reasons why a resolution might fail.
+
+
+
+
+ The default state.
+
+
+
+
+ There was no file found.
+
+
+
+
+ The file was found, but its fusion name didn't match.
+
+
+
+
+ The file was found, but it didn't have a fusion name.
+
+
+
+
+ The file is not in the GAC.
+
+
+
+
+ If treated as a filename, the file doesn't exist on disk.
+
+
+
+
+ The processor architecture does not match the targeted processor architecture.
+
+
+
+
+ Resolve searchpath type {RawFileName}
+
+
+
+
+ Construct.
+
+
+
+
+
+
+
+ A reference to an assembly along with information about resolution.
+
+
+
+
+ dictionary where ITaskItem.ItemSpec (a string) is the key and ITaskItem is the value.
+ A hash table is used to remove duplicates.
+ All source items that inspired this reference (possibly indirectly through a dependency chain).
+
+
+
+
+ A list of unique dependencies.
+
+
+
+
+ Hashset of Reference which depend on this reference
+ A list of unique dependencies.
+
+
+
+
+ Scatter files associated with this reference.
+
+
+
+
+ Any errors that occurred while resolving or finding dependencies on this item.
+
+
+
+
+ Contains any file extension that are related to this file. Pdbs and xmls are related.
+ This is an extension string starting with "."
+
+
+
+
+ Contains satellite files for this reference.
+ This file path is relative to the location of the reference.
+
+
+
+
+ Contains serialization assembly files for this reference.
+ This file path is relative to the location of the reference.
+
+
+
+
+ AssemblyNames of references that lost collision conflicts with this reference.
+
+
+
+
+ These are the versions (type UnificationVersion) that were unified from.
+
+
+
+
+ The original source item, as passed into the task that is directly associated
+ with this reference. This only applies to "primary" references.
+
+
+
+
+ The full path to the assembly. If this is "", then that means that this reference
+ has not been resolved.
+
+
+
+
+ The directory that this reference lives in.
+
+
+
+
+ The reference's filename without extension.
+
+
+
+
+ The full path to the file name but without the extension.
+
+
+
+
+ The list of expected extensions.
+
+
+
+
+ Is the file a managed winmd file. That means it has both windows runtime and CLR in the imageruntime string.
+
+
+
+
+ The imageruntime version for this reference.
+
+
+
+
+ Set containing the names the reference was remapped from
+
+
+
+
+ Delegate to determine if the file is a winmd file or not
+
+
+
+
+ Delegate to check to see if the file exists on disk
+
+
+
+
+ Delegate to get the imageruntime version from a file.
+
+
+
+
+ Add items that caused (possibly indirectly through a dependency chain) this Reference.
+
+
+
+
+ Add items that caused (possibly indirectly through a dependency chain) this Reference.
+
+
+
+
+ We have had our source item list updated, we need to propagate this change to any of our dependencies so they have the new information.
+
+
+
+
+ Get the source items for this reference.
+ This is collection of ITaskItems.
+
+
+
+
+ Add a reference which this reference depends on
+
+
+
+
+ Add a reference that caused (possibly indirectly through a dependency chain) this Reference.
+
+
+
+
+ A dependee may be removed because it or its dependee's are in the deny list
+
+
+
+
+ A dependency may be removed because it may not be referenced any more due this reference being in the deny list or being removed due to it depending on something in the deny list
+
+
+
+
+ Get the dependee references for this reference.
+ This is collection of References.
+
+
+
+
+ Scatter files associated with this assembly.
+
+
+
+
+
+ Scatter files associated with this assembly.
+
+
+
+
+
+ Set one expected extension for this reference.
+
+
+
+
+ Get the list of expected extensions.
+
+
+
+
+ Whether the name needs to match exactly or just the simple name part needs to match.
+
+
+
+
+
+ Whether types need to be embedded into the target assembly
+
+
+
+
+
+ This will be true if the user requested a specific file. We know this when the file was resolved
+ by hintpath or if it was resolve as a raw file name for example.
+
+
+
+
+ The version number of this reference
+
+
+
+
+ True if the assembly was found to be in the GAC.
+
+
+
+
+ True if the assembly was resolved through the GAC. Otherwise, false.
+
+
+
+
+ Set of properties for this reference used to log why this reference could not be resolved.
+
+
+
+
+ Determines if a given reference or its parent primary references have specific version metadata set to true.
+ If anyParentHasMetadata is set to true then we will return true if any parent primary reference has the specific version metadata set to true,
+ if the value is false we will return true ONLY if all parent primary references have the metadata set to true.
+
+
+
+
+ Add a dependency or resolution error to this reference's list of errors.
+
+ The error.
+
+
+
+ Return the list of dependency or resolution errors for this item.
+
+ The collection of resolution errors.
+
+
+
+ Add a new related file to this reference.
+ Related files always live in the same directory as the reference.
+ Examples include, MyAssembly.pdb and MyAssembly.xml
+
+ This is the filename extension.
+
+
+
+ Return the list of related files for this item.
+
+ The collection of related file extensions.
+
+
+
+ Add a new satellite file
+
+ This is the filename relative the this reference.
+
+
+
+ Add a new serialization assembly file.
+
+ This is the filename relative the this reference.
+
+
+
+ Return the list of satellite files for this item.
+
+ The collection of satellit files.
+
+
+
+ Return the list of serialization assembly files for this item.
+
+ The collection of serialization assembly files.
+
+
+
+ The full path to the assembly. If this is "", then that means that this reference
+ has not been resolved.
+
+ The full path to this assembly.
+
+
+
+ The directory that this assembly lives in.
+
+
+
+
+ The file name without extension.
+
+
+
+
+
+ The full path to the assembly but without an extension on the file namee
+
+
+
+
+ This is the HintPath from the source item. This is used to resolve the assembly.
+
+ The hint path to this assembly.
+
+
+
+ This is the key that was passed in to the reference through the <AssemblyFolderKey> metadata.
+
+ The <AssemblyFolderKey> value.
+
+
+
+ Whether this assembly came from the project. If 'false' then this reference was deduced
+ through the reference resolution process.
+
+ 'true' if this reference is a primary assembly.
+
+
+
+ Whether or not this reference will be installed on the target machine.
+
+
+
+
+ Whether or not this reference is a redist root.
+
+
+
+
+ The redist name for this reference (if any)
+
+
+
+
+ The original source item, as passed into the task that is directly associated
+ with this reference. This only applies to "primary" references.
+
+
+
+
+ If 'true' then the path that this item points to is known to be a bad image.
+ This item shouldn't be passed to compilers and so forth.
+
+ 'true' if this reference points to a bad image.
+
+
+
+ If true, then this item conflicted with another item and lost.
+
+
+
+
+ Add a conflict victim to this reference
+
+
+
+
+ Return the list of conflict victims.
+
+
+
+
+ The name of the assembly that won over this reference.
+
+
+
+
+ The reason why this reference lost to another reference.
+
+
+
+
+ Is the file a WinMDFile.
+
+
+
+
+ Is the file a Managed.
+
+
+
+
+ For winmd files there may be an implementation file sitting beside the winmd called the assemblyName.dll
+ We need to attach a piece of metadata to if this is the case.
+
+
+
+
+ ImageRuntime Information
+
+
+
+
+ Return the list of versions that this reference is unified from.
+
+
+
+
+ Return the list of versions that this reference is unified from.
+
+
+
+
+ Add a new version number for a version of this reference
+
+
+
+
+ Add the AssemblyNames name we were remapped from
+
+
+
+
+ Whether or not this reference is unified from a different version or versions.
+
+
+
+
+ Whether this reference should be copied to the local 'bin' dir or not and the reason this flag
+ was set that way.
+
+ The current copy-local state.
+
+
+
+ Whether the reference should be CopyLocal. For the reason, see CopyLocalState.
+
+ 'true' if this reference should be copied.
+
+
+
+ Whether this reference has already been resolved.
+ Resolved means that the actual filename of the assembly has been found.
+
+ 'true' if this reference has been resolved.
+
+
+
+ Whether this reference can't be resolve.
+ References are usually unresolvable because they weren't found anywhere in the defined search paths.
+
+ 'true' if this reference is unresolvable.
+
+
+
+ Whether or not we still need to find dependencies for this reference.
+
+
+
+
+ If the reference has an SDK name metadata this will contain that string.
+
+
+
+
+ Add some records to the table of assemblies that were considered and then rejected.
+
+
+
+
+ Returns a collection of strings. Each string is the full path to an assembly that was
+ considered for resolution but then rejected because it wasn't a complete match.
+
+
+
+
+ The searchpath location that the reference was found at.
+
+
+
+
+ FrameworkName attribute on this reference
+
+
+
+
+ Indicates that the reference is primary and has ExternallyResolved=true metadata to denote that
+ it was resolved by an external system (commonly from nuget). Such a system has already provided a
+ resolved closure as primary references and therefore we can skip the expensive closure walk.
+
+
+
+
+ Make this reference an assembly that is a dependency of 'sourceReference'
+
+ For example, if 'sourceReference' is MyAssembly.dll then a dependent assembly file
+ might be en\MyAssembly.resources.dll
+
+ Assembly references do not have their own dependencies, therefore they are
+
+ The source reference that this reference will be dependent on
+
+
+
+ Make this reference a primary assembly reference.
+ This is a refrence that is an assembly and is primary.
+
+ The source item.
+ Whether the version needs to match exactly or loosely.
+ The filename extension that the resulting assembly must have.
+
+
+
+ Determine whether the given assembly is an FX assembly.
+
+ The full path to the assembly.
+ The path to the frameworks.
+ True if this is a frameworks assembly.
+
+
+
+ Figure out the what the CopyLocal state of given assembly should be.
+
+ The name of the assembly.
+ The framework paths.
+ Like x86 or IA64\AMD64.
+ Delegate to get runtime version.
+ The targeted runtime version.
+ Delegate to check if a file exists.
+ Delegate to get the path to an assembly in the system GAC.
+ if set to true, copy local dependencies when only parent reference in gac.
+ If set to true, do not copy local a reference that exists in the GAC (legacy behavior).
+ The reference table.
+
+
+
+ Produce a string representation.
+
+
+
+
+ There are a number of properties which are set when we generate exclusion lists and it is useful to have this information on the references so that
+ the correct reasons can be logged for these references being in the deny list.
+
+
+
+
+ Is this reference in an exclusion list
+
+
+
+
+ What is the highest version of this assembly in the current redist list
+
+
+
+
+ What is the highest versioned redist list on the machine
+
+
+
+
+ Delegate which logs the reason for not resolving a reference
+
+
+
+
+ There was a problem resolving this reference into a full file name.
+
+
+
+
+ Construct
+
+
+
+
+ Implement required constructors for serialization
+
+
+
+
+ A table of references.
+
+
+
+ version 4.0
+
+
+
+ A mapping of a framework identifier to the most current redist list on the system based on the target framework identifier on the moniker.
+ This is used to determine if an assembly is in a redist list for the framework targeted by the moniker.
+
+
+
+
+ Reference simple names that were resolved by an external entity to RAR.
+
+
+
+
+ The keys are normalized full paths of primary references resolved by an external entity to RAR and considered immutable, the values are assembly names or null if not known.
+
+
+
+ The table of remapped assemblies. Used for Unification.
+
+
+ If true, then search for dependencies.
+
+
+
+ Should version be ignored for framework primary references
+
+
+
+ If true, then search for satellite files.
+
+
+ If true, then search for serialization assembly files.
+
+
+ If true, then search for related files.
+
+
+
+ If true, then force framework assembly version check against the target framework version
+ If false, the default behavior is to disable version checks for target framework versions 4.5 and above.
+
+
+
+ Path to the FX.
+
+
+ The allowed assembly extensions.
+
+
+ These are companion files that typically travel with assemblies
+
+
+
+ Locations where sdks are installed. K:SDKName v: Resolved Reference item
+
+
+
+ Path to installed assembly XML tables.
+
+
+ Like x86 or IA64\AMD64, the processor architecture being targetted.
+
+
+ Delegate used for checking for the existence of a file.
+
+
+ Delegate used for checking for the existence of a directory.
+
+
+ Delegate used for getting directories.
+
+
+ Delegate used for getting assembly names.
+
+
+ Delegate used for finding dependencies of a file.
+
+
+ Delegate used to get the image runtime version of a file
+
+
+ Delegate to get the base registry key for AssemblyFoldersEx
+
+
+ Version of the runtime we are targeting
+
+
+
+ Delegate used to get the machineType from the PE header of the dll.
+
+
+
+
+ Is the file a winMD file
+
+
+
+ Version of the framework targeted by this project.
+
+
+
+ Target framework moniker we are targeting.
+
+
+
+
+ Logging helper to allow the logging of meessages from the Reference Table.
+
+
+
+
+ List of framework directories which are the highest on the machine
+
+
+
+
+ Should dependencies be set to copy local if the parent reference is in the GAC
+
+
+
+
+ Shoould the framework attribute version mismatch be ignored.
+
+
+
+
+ Delegate to determine if an assembly name is in the GAC.
+
+
+
+
+ Should a warning or error be emitted on architecture mismatch
+
+
+
+
+ When we exclude an assembly from resolution because it is part of out exclusion list we need to let the user know why this is.
+ There can be a number of reasons each for un-resolving a reference, these reasons are encapsulated by a different deny list. We need to log a specific message
+ depending on which deny list we have found the offending assembly in. This delegate allows one to tie a set of logging messages to a deny list so that when we
+ discover an assembly in the deny list we can log the correct message.
+
+
+
+
+ Construct.
+
+
+ If true, then search for dependencies.
+ If true, then search for satellite files.
+ If true, then search for serialization assembly files.
+ If true, then search for related files.
+ Paths to search for dependent assemblies on.
+
+ List of literal assembly file names to be considered when SearchPaths has {CandidateAssemblyFiles}.
+ Resolved sdk items
+ Path to the FX.
+ Installed assembly XML tables.
+ Like x86 or IA64\AMD64, the processor architecture being targetted.
+ Delegate used for checking for the existence of a file.
+ Delegate used for files.
+ Delegate used for getting directories.
+ Delegate used for getting assembly names.
+ Delegate used for finding dependencies of a file.
+ Used to get registry subkey names.
+ Used to get registry default values.
+
+
+ Cache of metadata already read from paths.
+
+
+ Version of the runtime to target.
+ Version of the framework targeted by the project.
+ Target framework moniker we are targeting.
+ Logging helper to allow the logging of meessages from the Reference Table.
+
+
+
+
+
+
+
+
+
+
+
+
+ Set of resolvers the reference table uses.
+
+
+
+
+ Get a table of all vertices.
+
+
+
+
+ If assemblies have been marked for exclusion this contains the list of their full names
+ This may be null
+
+
+
+
+ Indicates that at least one reference was and
+ we skipped finding its dependencies as a result.
+
+
+ This is currently used to perform a shallow search for System.Runtime/netstandard usage
+ within the externally resolved graph.
+
+
+
+
+ Force dependencies to be walked even when a reference is marked with ExternallyResolved=true
+ metadata.
+
+
+ This is currently used to ensure that we suggest appropriate binding redirects for
+ assembly version conflicts within an externally resolved graph.
+
+
+
+
+ Adds a reference to the table.
+
+ The assembly name to be used as a key.
+ The reference to add.
+
+
+
+ Find the reference that corresponds to the given path.
+
+ The assembly name to find the reference for.
+ 'null' if no reference existed.
+
+
+
+ Give an assembly file name, adjust a Reference to match it.
+
+ The reference to work on
+ The path to the assembly file.
+ The AssemblyName of assemblyFileName
+
+
+
+ Given a list of task items, add them all to this table and make them the only primary items.
+
+ The task items which contain file names to add.
+ The task items which contain fusion names to add.
+ Exceptions encountered while setting primary items. Exceptions are logged, but it doesn't stop the resolution process.
+
+
+
+ Given an item that refers to a assembly name, make it a primary reference.
+
+ The task item which contain fusion names to add.
+ Resulting exception containing resolution failure details, if any: too costly to throw it.
+
+
+
+ Attempts to convert an itemSpec and fusionName into an assembly name.
+ AssemblyName is left unchanged if conversion wasn't possible.
+
+
+
+
+ Given a string that may be a fusion name, try to gather the four essential properties:
+ Name
+ Version
+ PublicKeyToken
+ Culture
+
+
+
+
+
+
+ Attempt to get one field out of an assembly name.
+
+
+
+
+ Tries to create an out of a primary reference metadata.
+
+
+
+
+ Given an item that refers to a file name, make it a primary reference.
+
+
+
+
+ Find related files like .pdbs and .xmls
+
+ The reference to the parent assembly.
+
+
+
+ Find satellite assemblies.
+
+ The reference to the parent assembly.
+
+
+
+ Find serialization assemblies.
+
+ The reference to the parent assembly.
+
+
+
+ Get unified dependencies and scatter files for a reference.
+
+
+
+
+ Given an enumerator of pre-unified assembly names, return an enumerator of unified
+ assembly names.
+
+
+
+
+ Find references and scatter files defined for the given assembly.
+
+ The reference to the parent assembly.
+ New references are added to this list.
+
+
+
+ Mscorlib is not a real managed assembly. It is seen both with and without metadata.
+ We assume that the correct mscorlib is on the target platform.
+
+
+
+
+
+
+ Based on the set of parent assemblies we want to add their directories to the list of resolvers so that
+ if the dependency is sitting beside the assembly which requires it then we will resolve the assembly from that location first.
+
+ The only time we do not want to do this is if the parent assembly came from the GAC or AssemblyFoldersEx then we want the assembly
+ to be found using those resolvers so that our GAC and AssemblyFolders checks later on will work on those assemblies.
+
+
+
+
+ Given an unresolved reference (one that we don't know the full name for yet), figure out the
+ full name. Should only be called on references that haven't been resolved yet--otherwise, its
+ a perf problem.
+
+ The fusion name for this reference.
+ The file name to match if {RawFileName} is seen. (May be null).
+ The reference object.
+
+
+
+ This method will remove references from the reference table which are contained in the denylist.
+ References which are primary references but are in the deny list will be placed in the invalidResolvedFiles list.
+ References which are dependency references but are in the deny list will be placed in the invalidResolvedDependencyFiles list.
+
+
+
+
+ References usually only contains who they depend on, they do not know who depends on them. Given a reference
+ A we cannot inspect A to find out that B,C,D depend on it. This method will traverse the references and build up this other direction of the graph,
+ therefore we will be able to know given reference A, that B,C,D depend on it.
+
+
+
+
+ We have determined the given assembly reference is in the deny list, we now need to find the primary references which caused it and make sure those are removed from the list of references.
+
+
+
+
+ A primary references has been determined to be in the deny list, it needs to be removed from the list of references by not being added to the list of good references
+ and added to the list of removed references.
+
+
+
+
+ Get the primary reference based on the Itemspec
+
+
+
+
+ Go through the dependency graph and make sure that for a reference to remove that we get rid of all dependency assemblies which are not referenced by any other
+ assembly. The remove reference list should contain ALL primary references which should be removed because they, or one of their dependencies is in the deny list.
+
+ Reference to remove dependencies for
+ Reference list which contains reference to be used in unification and returned as resolved items
+ A dictionary (Key: Reference Value: List of dependencies and their assembly name)
+
+
+
+ Searches the table for references that haven't been resolved to their full file names and
+ for dependencies that haven't yet been found.
+
+ If any are found, they're resolved and then dependencies are found. Then the process is repeated
+ until nothing is left unresolved.
+
+ The table of remapped assemblies.
+ The task items which contain file names to add.
+ The task items which contain fusion names to add.
+ Errors encountered while computing closure.
+
+
+
+ Implementation of ComputeClosure.
+
+
+
+
+ Find associates for references that we haven't found associates for before.
+ Returns true if new dependent assemblies were found.
+
+
+
+
+ Resolve all references that have not been resolved yet to real files on disk.
+
+
+
+
+ This methods looks for conflicts between assemblies and attempts to
+ resolve them.
+
+
+
+
+ Based on the closure, get a table of ideal remappings needed to
+ produce zero conflicts.
+
+
+
+
+ If a reference is a higher version than what exists in the redist list of the target framework then
+ this reference needs to be marked as excluded so that it is not allowed to be referenced.
+
+ If the user needs this reference then they need to set specific version to true.
+
+
+
+
+ Is the assembly in the latest framework redist list as either passed into RAR on the lastestFrameworkDirectories property or determined by inspecting the file system.
+
+
+
+
+ Get the redist list which corresponds to the highest target framework for a given target framework moniker.
+
+ This is done in two ways:
+ First, if the latestTargetFrameworkDirectories parameter is passed into RAR those directories will be used to get the redist list
+ regardless of the target framework moniker.
+
+ Second, if latest Target Framework Directories is not passed in then we ask the ToollocationHelper for the highest target framework which has
+ a TargetFrameworkIdentifier which matches the passed in TargetFrameworkMoniker.
+
+
+
+
+ Based on a target framework moniker, get the set of reference assembly directories which
+ correspond to the highest version of the target framework identifier property on the target framework moniker.
+
+
+
+
+ Is the assemblyName in the current redist list and does it have a version number which is higher than what is in the current redist list.
+ This may happen if someone passes in a p2p reference whcih is a framework assembly which is a higher version than what is in the redist list.
+
+
+
+
+ Is the assemblyName in the current redist list and does it have a version number which is higher than what is in the current redist list.
+ This may happen if someone passes in a p2p reference whcih is a framework assembly which is a higher version than what is in the redist list.
+
+
+
+
+ Does the assembly have a targetFrameworkAttribute which has a higher framework version than what the project is currently targeting.
+ This may happen for example if a p2p is done between two projects with built against different target frameworks.
+
+
+
+
+ Build a table of simple names mapped to assemblyname+reference.
+
+
+
+
+ Compares two assembly identities to determine whether or not they are equivalent.
+
+ Textual identity of the first assembly to be compared.
+ Flag to indicate user-specified unification for assemblyIdentity1.
+ Textual identity of the second assembly to be compared.
+ Flag to indicate user-specified unification for assemblyIdentity2.
+
+ Boolean indicating whether the identities are equivalent.
+
+
+
+
+ Given two references along with their fusion names, resolve the filename conflict that they
+ would have if both assemblies need to be copied to the same directory.
+
+
+
+
+ Returns true if an assembly has been removed from the .NET framework
+
+
+
+
+ Get unification information for the given assembly name.
+
+ The assembly name.
+ The new version of the assembly to use.
+ The reason this reference was unified.
+ True if this is a prereq assembly.
+ May be true, false or null. Null means there was no IsRedistRoot in the redist list.
+ Name of the corresponding Resist specified in the redist list.
+ True if there was a unification.
+
+
+
+ Used to avoid extra allocations from cloning AssemblyNameExtension and AssemblyName
+
+
+
+
+ Return the resulting reference items, dependencies and other files.
+
+ Primary references fully resolved.
+ Dependent references fully resolved.
+ Related files like .xmls and .pdbs.
+ Satellite files.
+ Serialization assembly files.
+ Receives the list of associated scatter files.
+ All copy-local files out of primaryFiles+dependencyFiles+relatedFiles+satelliteFiles.
+
+
+
+ Set metadata on the items which will be output from RAR.
+
+
+
+
+ Verify that the implementation dll has a matching architecture to what the project is targeting.
+
+
+
+
+ Read the PE header to get the machine type
+
+
+
+
+ Some metadata should not be forwarded between the parent and child items.
+
+ The metadata that were removed.
+
+
+
+ Given a list of items, find all that have CopyLocal==true and add it to the list.
+
+
+
+
+ The reference was determined to have a version which is higher than what is in the currently targeted redist list.
+
+
+
+
+ The reference was determined to have a version which is higher than what is in the currently targeted using the framework attribute.
+
+
+
+
+ The reference was determined to not be in the current redist list but in fact are from another framework.
+
+
+
+
+ The reference was found to be resolved from a full framework while we are actually targeting a profile.
+
+
+
+
+ Provide a class which has a key value pair for references and their assemblyNameExtensions.
+ This is used to prevent JIT'ing when using a generic list.
+
+
+
+
+ Rather than have exclusion lists float around, we may as well just mark the reference themselves. This allows us to attach to a reference
+ whether or not it is excluded and why. This method will do a number of checks in a specific order and mark the reference as being excluded or not.
+
+
+
+
+ Returns true if the full path passed in represents a file that came from an external trusted
+ entity and is guaranteed to be immutable.
+
+ The path to check.
+ True if known to be immutable, false otherwise.
+
+
+
+ Returns the assembly name of a file if the file came from an external trusted entity and is considered immutable.
+
+ The file path.
+ Assembly name or null if not known.
+
+
+
+ A place the resolver tried to look for an assembly along with some information
+ that can be used to provide a good error message.
+
+
+
+
+ The name of the file that was attempted to match.
+
+
+
+
+ The literal searchpath element that was used to discover this location.
+
+
+
+
+ The parent assembly that was used for the SearchPath.
+
+
+
+
+ The name of the assembly found at that location. Will be null if there was no assembly there.
+
+
+
+
+ The reason there was no macth.
+
+
+
+
+ Base class for all resolver types.
+
+
+
+
+ The corresponding element from the search path.
+
+
+
+
+ Delegate.
+
+
+
+
+ Delegate.
+
+
+
+
+ Delegate
+
+
+
+
+ Runtime we are targeting
+
+
+
+
+ Processor architecture we are targeting.
+
+
+
+
+ Should the processor architecture we are targeting match the assembly we resolve from disk.
+
+
+
+
+ Construct.
+
+
+
+
+ Resolve a reference to a specific file name.
+
+ The assemblyname of the reference.
+ The name of the sdk to resolve.
+ The reference's 'include' treated as a raw file name.
+ Whether or not this reference was directly from the project file (and therefore not a dependency)
+ True if is guaranteed to exist on disk and never change.
+ Whether an exact version match is requested.
+ Allowed executable extensions.
+ The item's hintpath value.
+ Like "hklm\Vendor RegKey" as provided to a reference by the <AssemblyFolderKey> on the reference in the project.
+ Receives the list of locations that this function tried to find the assembly. May be "null".
+ The path where the file was found.
+ Whether or not the user wanted a specific file (for example, HintPath is a request for a specific file)
+ True if the file was resolved.
+
+
+
+ The search path element that this resolver is based on.
+
+
+
+
+ Resolve a single file.
+
+ True if the file was a match, false otherwise.
+
+
+
+ Determines whether an assembly name matches the assembly pointed to by pathToCandidateAssembly
+
+ The assembly name to look up.
+ True if this is a primary reference directly from the project file.
+ Whether the version needs to match exactly or loosely.
+ Whether to allow naming mismatch.
+ Path to a possible file.
+ Information about why the candidate file didn't match
+
+
+
+ Given a strong name, which may optionally have Name, Version and Public Key,
+ return a fully qualified directory name.
+
+ The assembly name to look up.
+ True if this is a primary reference directly from the project file.
+ Whether an exact version match is requested.
+ The possible filename extensions of the assembly. Must be one of these or its no match.
+ the directory to look in
+ Receives the list of locations that this function tried to find the assembly. May be "null".
+ 'null' if the assembly wasn't found.
+
+
+
+ Given a list of assemblyFiles, determine the closure of all assemblyFiles that
+ depend on those assemblyFiles including second and nth-order dependencies too.
+
+
+
+
+ key assembly used to trigger inclusion of facade references.
+
+
+
+
+ additional key assembly used to trigger inclusion of facade references.
+
+
+
+
+ The well-known CLR 4.0 metadata version used in all managed assemblies.
+
+
+
+
+ Delegate to a method that takes a targetFrameworkDirectory and returns an array of redist or subset list paths
+
+ TargetFramework directory to search for redist or subset list
+ String array of redist or subset lists
+
+
+
+ Cache of system state information, used to optimize performance.
+
+
+
+
+ Construct
+
+
+
+
+ If set to true, it forces to unresolve framework assemblies with versions higher or equal the version of the target framework, regardless of the target framework
+
+
+
+
+ If there is a mismatch between the targetprocessor architecture and the architecture of a primary reference.
+
+ When this is error, an error will be logged.
+
+ When this is warn, if there is a mismatch between the targetprocessor architecture and the architecture of a primary reference a warning will be logged.
+
+ When this is none, no error or warning will be logged.
+
+
+
+
+ A list of fully qualified paths-to-assemblyFiles to find dependencies for.
+
+ Optional attributes are:
+ bool Private [default=true] -- means 'CopyLocal'
+ string FusionName -- the simple or strong fusion name for this item. If this
+ attribute is present it can save time since the assembly file won't need
+ to be opened to get the fusion name.
+ bool ExternallyResolved [default=false] -- indicates that the reference and its
+ dependencies are resolved by an external system (commonly from nuget assets) and
+ so several steps can be skipped as an optimization: finding dependencies,
+ satellite assemblies, etc.
+
+
+
+
+ The list of directories which contain the redist lists for the most current
+ framework which can be targeted on the machine. If this is not set
+ Then we will looks for the highest framework installed on the machine
+ for a given target framework identifier and use that.
+
+
+
+
+ Should the framework attribute be ignored when checking to see if an assembly is compatible with the targeted framework.
+
+
+
+
+ Force dependencies to be walked even when a reference is marked with ExternallyResolved=true
+ metadata.
+
+
+ This is used to ensure that we suggest appropriate binding redirects for assembly version
+ conflicts within an externally resolved graph.
+
+
+
+
+ If true, outputs any unresolved assembly conflicts (MSB3277) in UnresolvedAssemblyConflicts.
+
+
+
+
+ List of target framework subset names which will be searched for in the target framework directories
+
+
+
+
+ These can either be simple fusion names like:
+
+ System
+
+ or strong names like
+
+ System, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ These names will be resolved into full paths and all dependencies will be found.
+
+ Optional attributes are:
+ bool Private [default=true] -- means 'CopyLocal'
+ string HintPath [default=''] -- location of file name to consider as a reference,
+ used when {HintPathFromItem} is one of the paths in SearchPaths.
+ bool SpecificVersion [default=absent] --
+ when true, the exact fusionname in the Include must be matched.
+ when false, any assembly with the same simple name will be a match.
+ when absent, then look at the value in Include.
+ If its a simple name then behave as if specific version=false.
+ If its a strong name then behave as if specific version=true.
+ string ExecutableExtension [default=absent] --
+ when present, the resolved assembly must have this extension.
+ when absent, .dll is considered and then .exe for each directory looked at.
+ string SubType -- only items with empty SubTypes will be considered. Items
+ with non-empty subtypes will be ignored.
+ string AssemblyFolderKey [default=absent] -- supported for legacy AssemblyFolder
+ resolution. This key can have a value like 'hklm\vendor folder'. When set, only
+ this particular assembly folder key will be used.
+ This is to support the scenario in VSWhidey#357946 in which there are multiple
+ side-by-side libraries installed and the user wants to pick an exact version.
+ bool EmbedInteropTyeps [default=absent] --
+ when true, we should treat this assembly as if it has no dependencies and should
+ be completely embedded into the target assembly.
+
+
+
+
+ A list of assembly files that can be part of the search and resolution process.
+ These must be absolute filenames, or project-relative filenames.
+
+ Assembly files in this list will be considered when SearchPaths contains
+ {CandidateAssemblyFiles} as one of the paths to consider.
+
+
+
+
+ A list of resolved SDK references which contain the sdk name, sdk location and the targeted configuration.
+ These locations will only be searched if the reference has the SDKName metadata attached to it.
+
+
+
+
+ Path to the target frameworks directory. Required to figure out CopyLocal status
+ for resulting items.
+ If not present, then no resulting items will be deemed CopyLocal='true' unless they explicity
+ have a Private='true' attribute on their source item.
+
+
+
+
+ A list of XML files that contain assemblies that are expected to be installed on the target machine.
+
+ Format of the file is like:
+
+
+
+ etc.
+
+
+ When present, assemblies from this list will be candidates to automatically "unify" from prior versions up to
+ the version listed in the XML. Also, assemblies with InGAC='true' will be considered prerequisites and will be CopyLocal='false'
+ unless explicitly overridden.
+ Items in this list may optionally specify the "FrameworkDirectory" metadata to associate an InstalledAssemblyTable
+ with a particular framework directory. However, this setting will be ignored unless the Redist name begins with
+ "Microsoft-Windows-CLRCoreComp".
+ If there is only a single TargetFrameworkDirectories element, then any items in this list missing the
+ "FrameworkDirectory" metadata will be treated as though this metadata is set to the lone (unique) value passed
+ to TargetFrameworkDirectories.
+
+
+
+
+ A list of XML files that contain assemblies that are expected to be in the target subset
+
+ Format of the file is like:
+
+
+
+ etc.
+
+
+ Items in this list may optionally specify the "FrameworkDirectory" metadata to associate an InstalledAssemblySubsetTable
+ with a particular framework directory.
+ If there is only a single TargetFrameworkDirectories element, then any items in this list missing the
+ "FrameworkDirectory" metadata will be treated as though this metadata is set to the lone (unique) value passed
+ to TargetFrameworkDirectories.
+
+
+
+
+ A list of XML files that contain the full framework for the profile.
+
+ Normally nothing is passed in here, this is for the cases where the location of the xml file for the full framework
+ is not under a RedistList folder.
+
+ Format of the file is like:
+
+
+
+ etc.
+
+
+ Items in this list must specify the "FrameworkDirectory" metadata to associate an redist list
+ with a particular framework directory. If the association is not made an error will be logged. The reason is,
+ The logic in rar assumes if a FrameworkDirectory is not set it will use the target framework directory.
+
+
+
+
+ [default=false]
+ Boolean property to control whether or not the task should look for and use additional installed
+ assembly tables (a.k.a Redist Lists) found in the RedistList directory underneath the provided
+ TargetFrameworkDirectories.
+
+
+
+
+ [default=false]
+ Boolean property to control whether or not the task should look for and use additional installed
+ assembly subset tables (a.k.a Subset Lists) found in the SubsetList directory underneath the provided
+ TargetFrameworkDirectories.
+
+
+
+
+ If the primary reference is a framework assembly ignore its version information and actually resolve the framework assembly from the currently targeted framework.
+
+
+
+
+ The preferred target processor architecture. Used for resolving {GAC} references.
+ Should be like x86, IA64 or AMD64.
+
+ This is the order of preference:
+ (1) Assemblies in the GAC that match the supplied ProcessorArchitecture.
+ (2) Assemblies in the GAC that have ProcessorArchitecture=MSIL
+ (3) Assemblies in the GAC that have no ProcessorArchitecture.
+
+ If absent, then only consider assemblies in the GAC that have ProcessorArchitecture==MSIL or
+ no ProcessorArchitecture (these are pre-Whidbey assemblies).
+
+
+
+
+ What is the runtime we are targeting, is it 2.0.57027 or anotherone, It can have a v or not prefixed onto it.
+
+
+
+
+ If not null, serializes information about inputs to the named file.
+ This overrides the usual outputs, so do not use this unless you are building an SDK with many references.
+
+
+
+
+ If not null, uses this set of caches as inputs if RAR cannot find the usual cache in the obj folder. Typically
+ used for demos and first-run scenarios.
+
+
+
+
+ List of locations to search for assemblyFiles when resolving dependencies.
+ The following types of things can be passed in here:
+ (1) A plain old directory path.
+ (2) {HintPathFromItem} -- Look at the HintPath attribute from the base item.
+ This attribute must be a file name *not* a directory name.
+ (3) {CandidateAssemblyFiles} -- Look at the files passed in through the CandidateAssemblyFiles
+ parameter.
+ (4) {Registry:_AssemblyFoldersBase_,_RuntimeVersion_,_AssemblyFoldersSuffix_}
+ Where:
+
+ _AssemblyFoldersBase_ = Software\Microsoft\[.NetFramework | .NetCompactFramework]
+ _RuntimeVersion_ = the runtime version property from the project file
+ _AssemblyFoldersSuffix_ = [ PocketPC | SmartPhone | WindowsCE]\AssemblyFoldersEx
+
+ Then look in the registry for keys with the following schema:
+
+ [HKLM | HKCU]\SOFTWARE\MICROSOFT\.NetFramework\
+ v1.0.3705
+ AssemblyFoldersEx
+ ControlVendor.GridControl.1.0:
+ @Default = c:\program files\ControlVendor\grid control\1.0\bin
+ @Description = Grid Control for .NET version 1.0
+ 9466
+ @Default = c:\program files\ControlVendor\grid control\1.0sp1\bin
+ @Description = SP1 for Grid Control for .NET version 1.0
+
+ The based registry key is composed as:
+
+ [HKLM | HKCU]\_AssemblyFoldersBase_\_RuntimeVersion_\_AssemblyFoldersSuffix_
+
+ (5) {AssemblyFolders} -- Use the VisualStudion 2003 .NET finding-assemblies-from-registry scheme.
+ (6) {GAC} -- Look in the GAC.
+ (7) {RawFileName} -- Consider the Include value to be an exact path and file name.
+
+
+
+
+
+
+
+ [default=.exe;.dll]
+ These are the assembly extensions that will be considered during references resolution.
+
+
+
+
+ [default=.pdb;.xml]
+ These are the extensions that will be considered when looking for related files.
+
+
+
+
+ If this file name is passed in, then we parse it as an app.config file and extract bindingRedirect mappings. These mappings are used in the dependency
+ calculation process to remap versions of assemblies.
+
+ If this parameter is passed in, then AutoUnify must be false, otherwise error.
+
+
+
+
+
+ This is true if the project type supports "AutoGenerateBindingRedirects" (currently only for EXE projects).
+
+
+
+
+
+ [default=false]
+ This parameter is used for building assemblies, such as DLLs, which cannot have a normal
+ App.Config file.
+
+ When true, the resulting dependency graph is automatically treated as if there were an
+ App.Config file passed in to the AppConfigFile parameter. This virtual
+ App.Config file has a bindingRedirect entry for each conflicting set of assemblies such
+ that the highest version assembly is chosen. A consequence of this is that there will never
+ be a warning about conflicting assemblies because every conflict will have been resolved.
+
+ When true, each distinct remapping will result in a high priority comment indicating the
+ old and new versions and the fact that this was done automatically because AutoUnify was true.
+
+ When true, the AppConfigFile parameter should be empty. Otherwise, it's an
+ error.
+
+ When false, no assembly version remapping will occur automatically. When two versions of an
+ assembly are present, there will be a warning.
+
+ When false, each distinct conflict between different versions of the same assembly will
+ result in a high priority comment. After all of these comments are displayed, there will be
+ a single warning with a unique error code and text that reads "Found conflicts between
+ different versions of reference and dependent assemblies".
+
+
+
+
+
+ When determining if a dependency should be copied locally one of the checks done is to see if the
+ parent reference in the project file has the Private metadata set or not. If that metadata is set then
+ We will use that for the dependency as well.
+
+ However, if the metadata is not set then the dependency will go through the same checks as the parent reference.
+ One of these checks is to see if the reference is in the GAC. If a reference is in the GAC then we will not copy it locally
+ as it is assumed it will be in the gac on the target machine as well. However this only applies to that specific reference and not its dependencies.
+
+ This means a reference in the project file may be copy local false due to it being in the GAC but the dependencies may still be copied locally because they are not in the GAC.
+ This is the default behavior for RAR and causes the default value for this property to be true.
+
+ When this property is false we will still check project file references to see if they are in the GAC and set their copy local state as appropriate.
+ However for dependencies we will not only check to see if they are in the GAC but we will also check to see if the parent reference from the project file is in the GAC.
+ If the parent reference from the project file is in the GAC then we will not copy the dependency locally.
+
+ NOTE: If there are multiple parent reference and ANY of them does not come from the GAC then we will set copy local to true.
+
+
+
+
+ [default=false]
+ Enables legacy mode for CopyLocal determination. If true, referenced assemblies will not be copied locally if they
+ are found in the GAC. If false, assemblies will be copied locally unless they were found only in the GAC.
+
+
+
+
+ An optional file name that indicates where to save intermediate build state
+ for this task. If not specified, then no inter-build caching will occur.
+
+
+
+
+
+ If set, then dependencies will be found. Otherwise, only Primary references will be
+ resolved.
+
+ Default is true.
+
+
+
+
+
+ If set, then satellites will be found.
+
+ Default is true.
+
+
+
+
+
+ If set, then serialization assemblies will be found.
+
+ Default is true.
+
+
+
+
+
+ If set, then related files (.pdbs and .xmls) will be found.
+
+ Default is true.
+
+
+
+
+
+ If set, then don't log any messages to the screen.
+
+ Default is false.
+
+
+
+
+
+ The project target framework version.
+
+ Default is empty. which means there will be no filtering for the reference based on their target framework.
+
+
+
+
+
+ The target framework moniker we are targeting if any. This is used for logging purposes.
+
+ Default is empty.
+
+
+
+
+
+ The display name of the target framework moniker, if any. This is only for logging.
+
+
+
+
+ Provide a set of names which if seen in the TargetFrameworkSubset list will cause the ignoring
+ of TargetFrameworkSubsets.
+
+ Full, Complete
+
+
+
+
+ Name of the target framework profile we are targeting.
+ Eg. Client, Web, or Network
+
+
+
+
+ Set of folders which containd a RedistList directory which represent the full framework for a given client profile.
+ An example would be
+ %programfiles%\reference assemblies\microsoft\framework\v4.0
+
+
+
+
+ This is a list of all primary references resolved to full paths.
+ bool CopyLocal - whether the given reference should be copied to the output directory.
+ string FusionName - the fusion name for this dependency.
+ string ResolvedFrom - the literal search path that this file was resolved from.
+ bool IsRedistRoot - Whether or not this assembly is the representative for an entire redist.
+ 'true' means the assembly is representative of an entire redist and should be indicated as
+ an application dependency in an application manifest.
+ 'false' means the assembly is internal to a redist and should not be part of the
+ application manifest.
+ string Redist - The name (if any) of the redist that contains this assembly.
+
+
+
+
+ A list of all n-th order paths-to-dependencies with the following attributes:
+ bool CopyLocal - whether the given reference should be copied to the output directory.
+ string FusionName - the fusion name for this dependency.
+ string ResolvedFrom - the literal search path that this file was resolved from.
+ bool IsRedistRoot - Whether or not this assembly is the representative for an entire redist.
+ 'true' means the assembly is representative of an entire redist and should be indicated as
+ an application dependency in an application manifest.
+ 'false' means the assembly is internal to a redist and should not be part of the
+ application manifest.
+ string Redist - The name (if any) of the redist that contains this assembly.
+ Does not include first order primary references--this list is in ResolvedFiles.
+
+
+
+
+ Related files are files like intellidoc (.XML) and symbols (.PDB) that have the same base
+ name as a reference.
+ bool Primary [always false] - true if this assembly was passed in with Assemblies.
+ bool CopyLocal - whether the given reference should be copied to the output directory.
+
+
+
+
+ Any satellite files found. These will be CopyLocal=true iff the reference or dependency
+ that caused this item to exist is CopyLocal=true.
+ bool CopyLocal - whether the given reference should be copied to the output directory.
+ string DestinationSubDirectory - the relative destination directory that this file
+ should be copied to. This is mainly for satellites.
+
+
+
+
+ Any XML serialization assemblies found. These will be CopyLocal=true iff the reference or dependency
+ that caused this item to exist is CopyLocal=true.
+ bool CopyLocal - whether the given reference should be copied to the output directory.
+
+
+
+
+ Scatter files associated with one of the given assemblies.
+ bool CopyLocal - whether the given reference should be copied to the output directory.
+
+
+
+
+ Returns every file in ResolvedFiles+ResolvedDependencyFiles+RelatedFiles+SatelliteFiles+ScatterFiles+SatelliteAssemblyFiles
+ that have CopyLocal flags set to 'true'.
+
+
+
+
+
+ Regardless of the value of AutoUnify, returns one item for every distinct conflicting assembly
+ identity--including culture and PKT--that was found that did not have a suitable bindingRedirect
+ entry in the ApplicationConfigurationFile.
+
+ Each returned ITaskItem will have the following values:
+ ItemSpec - the full fusion name of the assembly family with empty version=0.0.0.0
+ MaxVersion - the maximum version number.
+
+
+
+
+ Storage for names of all files writen to disk.
+
+
+
+
+ The names of all files written to disk.
+
+
+
+
+ Whether the assembly or any of its primary references depends on system.runtime. (Aka needs Facade references to resolve duplicate types)
+
+
+
+
+ Whether the assembly or any of its primary references depends on netstandard
+
+
+
+
+ If OutputUnresolvedAssemblyConflicts then a list of information about unresolved conflicts that normally would have
+ been outputted in MSB3277. Otherwise empty.
+
+
+
+
+ Log the results.
+
+ Reference table.
+ Array of ideal assembly remappings.
+ Array of identities of ideal assembly remappings.
+ List of exceptions that were not attributable to a particular fusion name.
+
+
+
+
+ Used to generate the string representation of a public key token.
+
+
+
+
+ Log the source items and dependencies which lead to a given item.
+
+
+
+
+ Log the dependee and the item specs which caused the dependee reference to be resolved.
+
+
+ The means by which messages should be logged.
+
+
+
+ Display the information about how a reference was resolved.
+
+ The reference information
+ The fusion name of the reference.
+
+
+
+ Choose an importance level for reporting information about this reference.
+
+ The reference.
+
+
+
+ Log all task inputs.
+
+
+
+
+ Log a specific item metadata.
+
+
+
+
+
+
+ Describes whether this reference is primary or not
+
+ The reference.
+ The fusion name for this reference.
+ The importance of the message.
+
+
+
+ Log any errors for a reference.
+
+ The reference.
+ The importance of the message.
+
+
+
+ Show the full name of a reference.
+
+ The reference.
+ The importance of the message.
+
+
+
+ If there is a list of assemblyFiles that was considered but then rejected,
+ show information about them.
+
+ The reference.
+ The fusion name.
+ The importance of the message.
+
+
+
+ Show the files that made this dependency necessary.
+
+ The reference.
+ The importance of the message.
+
+
+
+ Log related files.
+
+ The reference.
+ The importance of the message.
+
+
+
+ Log the satellite files.
+
+ The reference.
+ The importance of the message.
+
+
+
+ Log scatter files.
+
+ The reference.
+ The importance of the message.
+
+
+
+ Log a message about the CopyLocal state of the reference.
+
+ The reference.
+ The importance of the message.
+
+
+
+ Log a message about the imageruntime information.
+
+
+
+
+ Log a conflict.
+
+ The reference.
+ The fusion name of the reference.
+ StringBuilder holding information to be logged.
+
+
+
+ Reads the state file (if present) into the cache.
+
+
+
+
+ Write out the state file if a state name was supplied and the cache is dirty.
+
+
+
+
+ Read the app.config and get any assembly remappings from it.
+
+
+
+
+ Execute the task.
+
+ Delegate used for checking for the existence of a file.
+ Delegate used for checking for the existence of a directory.
+ Delegate used for finding directories.
+ Delegate used for finding fusion names of assemblyFiles.
+ Delegate used for finding dependencies of a file.
+ Used to get registry subkey names.
+ Used to get registry default values.
+ Delegate used to get the last write time.
+ Delegate used to get the runtime version.
+ Key object to open.
+ Delegate to get assembly path in the GAC.
+ Delegate used for checking whether it is a WinMD file.
+ Delegate use to read machine type from PE Header
+ True if there was success.
+
+
+
+ Returns the raw list of direct dependent assemblies from assembly's metadata.
+
+ reference we are interested
+ the delegate to check for the existence of a file.
+ the delegate to access assembly metadata
+ Cache of pre-extracted assembly metadata.
+ list of dependencies
+
+
+
+ Combines two DependentAssembly arrays into one.
+
+
+
+
+ If a targeted runtime is passed in use that, if none is passed in then we need to use v2.0.50727
+ since the common way this would be empty is if we were using RAR as an override task.
+
+ The targered runtime
+
+
+
+ For a given profile generate the exclusion list and return the list of redist list files read in so they can be logged at the end of the task execution.
+
+ Installed assembly info of the profile redist lists
+ Installed assemblyInfo for the full framework redist lists
+ Generated exclusion list
+ Redist list which will contain the full framework redist list.
+
+
+
+ Given the names of the targetFrameworkSubset lists passed in generate a single name which can be used for logging.
+
+
+
+
+ Make sure certain combinations of properties are validated before continuing with the execution of rar.
+
+
+
+
+
+ Log the target framework subset information.
+
+
+
+
+ Determine if an exclusion list should be used or not
+
+ The exclusion list should only be used if there are TargetFrameworkSubsets to use or TargetFrameworkProfiles.
+
+ 1) If we find a Full or equivalent marker in the list of subsets passed in we do not want to generate an exclusion list even if installedAssemblySubsets are passed in
+ 2) If we are ignoring the default installed subset tables and we have not passed in any additional subset tables, we do not want to generate an exclusion list
+ 3) If no targetframework subsets were passed in and no additional subset tables were passed in, we do not want to generate an exclusion list
+
+ True if we should generate an exclusion list
+
+
+
+ Populates the suggested redirects output parameter.
+
+ The list of ideal remappings.
+ The list of references to ideal assembly remappings.
+
+
+
+ Process TargetFrameworkDirectories and an array of InstalledAssemblyTables.
+ The goal is this: for each installed assembly table (whether found on disk
+ or given as an input), we wish to determine the target framework directory
+ it is associated with.
+
+ Array of AssemblyTableInfo objects (Describe the path and framework directory of a redist or subset list xml file)
+
+
+
+ Converts the string target framework value to a number.
+ Accepts both "v" prefixed and no "v" prefixed formats
+ if format is bad will log a message and return 0.
+
+ Target framework version value
+
+
+
+ Check if the assembly is available for on project's target framework.
+ - Assuming the russian doll model. It will be available if the projects target framework is higher or equal than the assembly target framework
+
+ True if the assembly is available for the project's target framework.
+
+
+
+ Validate and filter the Assemblies that were passed in.
+ - Check for assemblies that look like file names.
+ - Check for assemblies where subtype!=''. These are removed.
+ - Check for assemblies that have target framework higher than the project. These are removed.
+
+
+
+
+ Take a processor architecure and get the string representation back.
+
+
+
+
+ Checks to see if the assemblyName passed in is in the GAC.
+
+
+
+
+ Execute the task.
+
+ True if there was success.
+
+
+
+ Compare two ITaskItems by the file name in their ItemSpec.
+
+
+
+
+ Private construct so there's only one instance.
+
+
+
+
+ Compare the two AssemblyNameReferences by file name, and if that is equal, by item spec.
+
+
+ Sorting by item spec allows these to be ordered consistently:
+ c:\Regress315619\A\MyAssembly.dll
+ c:\Regress315619\B\MyAssembly.dll
+
+
+
+
+ The reason that a unification happened
+
+
+
+
+ This reference was not unified.
+
+
+
+
+ Unified because this was a framework assembly and it the current fusion
+ loader rules would unify to a different version.
+
+
+
+
+ Unified because of a binding redirect coming from either an explicit
+ app.config file or implicitly because AutoUnify was true.
+
+
+
+
+ A version number coupled with a reason why this version number
+ was chosen.
+
+
+
+
+ A unified assembly name.
+
+
+
+
+ Enum describing the behavior when a a primary reference has an architecture different from the project
+
+
+
+
+ Print an error
+
+
+
+
+ Print a warning
+
+
+
+
+ Do nothing
+
+
+
+
+ Contains utility functions for dealing with assembly folders found in the registry.
+
+
+
+
+ Key -- Like "hklm\Vendor RegKey" as provided to a reference by the <AssemblyFolderKey> on the reference in the project
+ Value -- Directory
+
+
+
+
+ Synchronize the creation of assemblyFolders
+
+
+
+
+ Given a registry key, find all of the registered assembly folders and add them to the list.
+
+ Like 'hklm' or 'hkcu'
+ The registry key to examine
+ The object to populate
+
+
+
+ For the given key name, look for registered assembly folders in HKCU then HKLM.
+
+
+
+
+ Populates the internal tables.
+
+
+
+
+ Returns the list of assembly folders that we're interested in.
+
+ Like "hklm\Vendor RegKey" as provided to a reference by the <AssemblyFolderKey> on the reference in the project.
+
+
+
+ Describes a remapping entry pair
+
+
+
+
+ Constructor
+
+
+
+
+ The assemblyName we mapped from
+
+
+
+
+ The assemblyName we mapped to
+
+
+
+
+ Compare two Assembly remapping objects
+
+
+
+
+ Get the hash code
+
+
+
+
+ We only compare the from because in terms of what is in the redist list unique from's are expected
+
+
+
+
+ Task to assign a reasonable "Link" metadata to the provided items.
+
+
+
+
+ The set of items to assign metadata to
+
+
+
+
+ The set of items to which the Link metadata has been set
+
+
+
+
+ Sets "Link" metadata on any item where the project file in which they
+ were defined is different from the parent project file to a sane default:
+ the relative directory compared to the defining file.
+
+ Does NOT overwrite Link metadata if it's already defined.
+
+
+
+
+ A special XML string containing a project configuration for each project - we need to simply
+ match the projects and assign the appropriate configuration names to them
+
+
+
+
+ Whether to use the solution dependency information passed in the solution blob
+ to add synthetic project references for the purposes of build ordering
+
+
+
+
+ String containing a semicolon-delimited list of mappings from the platform names used
+ by most VS types to those used by .vcxprojs.
+
+
+ E.g. "AnyCPU=Win32"
+
+
+
+
+ String containing a semicolon-delimited list of mappings from .vcxproj platform names
+ to the platform names use by most other VS project types.
+
+
+ E.g. "Win32=AnyCPU"
+
+
+
+
+ The current project's full path
+
+
+
+
+ The current project's platform.
+
+
+
+
+ The current project's platform.
+
+
+
+
+ Should we build references even if they were disabled in the project configuration
+
+
+
+
+ Whether to set the GlobalPropertiesToRemove metadata on the project reference such that
+ on an MSBuild call, the Configuration and Platform metadata will be unset, allowing the
+ child project to build in its default configuration / platform.
+
+
+
+
+ The output type for the project
+
+
+
+
+ True if we should use the default mappings to resolve the configuration/platform
+ of the passed in project references, false otherwise.
+
+
+
+
+ The list of resolved reference paths (preserving the original project reference attributes)
+
+
+
+
+ The list of project reference items that could not be resolved using the pre-resolved list of outputs.
+ Since VS only pre-resolves non-MSBuild projects, this means that project references in this list
+ are in the MSBuild format.
+
+
+
+
+ Main task method
+
+
+
+
+
+ Given a project reference task item and an XML document containing project configurations,
+ find the configuration for that task item.
+
+ true if resolved successfully
+
+
+
+ Given the project configuration blob and the project reference item, set the BuildInProject metadata and the ReferenceOutputAssembly metadata
+ based on the contents of the blob.
+
+
+
+
+ Given the contents of VcxToDefaultPlatformMapping and DefaultToVcxPlatformMapping properties,
+ fill out the maps that will be used to translate between the two.
+
+
+
+
+ Given a dictionary to populate and a string of the format "a=b;c=d", populate the
+ dictionary with the given pairs.
+
+
+
+
+ Create a new list of items that have <TargetPath> attributes if none was present in
+ the input.
+
+
+
+
+ The folder to make the links relative to.
+
+
+
+
+ The incoming list of files.
+
+
+
+
+ The resulting list of files.
+
+
+
+
+
+ Execute the task.
+
+
+
+
+
+ This class is the top-level object for the bootstrapper system.
+
+
+
+
+ Creates a new BootstrapperBuilder.
+
+
+
+
+ Creates a new BootstrapperBuilder.
+
+ The version of Visual Studio that is used to build this bootstrapper.
+
+
+
+ Specifies the location of the required bootstrapper files.
+
+ Path to bootstrapper files.
+
+
+
+ Returns all products available at the current bootstrapper Path
+
+
+
+
+ Generates a bootstrapper based on the specified settings.
+
+ The properties used to build this bootstrapper.
+ The results of the bootstrapper generation
+
+
+
+ Returns the directories bootstrapper component files would be copied to when built given the specified settings
+
+ The productCodes of the selected components
+ The culture used to build the bootstrapper
+ The fallback culture used to build the bootstrapper
+ How the bootstrapper would package the selected components
+
+
+
+ Represents messages that occur during the BootstrapperBuilder's Build operation.
+
+
+
+
+ This severity of this build message
+
+
+
+
+ A text string describing the details of the build message
+
+
+
+
+ The MSBuild F1-help keyword for the host IDE, or null
+
+
+
+
+ The MSBuild help id for the host IDE
+
+
+
+
+ Represents the results of the Build operation of the BootstrapperBuilder.
+
+
+
+
+ Returns true if the bootstrapper build was successful, false otherwise
+
+
+
+
+ The file path to the generated primary bootstrapper file
+
+ Path to setup.exe
+
+
+
+ File paths to copied component installer files
+
+ Path to component files
+
+
+
+ The build messages generated from a bootstrapper build
+
+
+
+
+ This class defines the settings for the bootstrapper build operation.
+
+
+
+
+ The name of the application to be installed after the bootstrapper has installed all required components. If no application is to be installed, this parameter may be null
+
+
+
+
+ The file to be installed after the bootstrapper has installed the required components. It is assumed that this file path is relative to the bootstrapper source path. If no application is to be installed, this parameter may be null
+
+
+
+
+ A value of true indicates that the application should require elevation to install on Vista.
+
+
+
+
+ The expected source location if the bootstrapper is published to a website. It is expected that the ApplicationFile, if specified, will be published to the location consistent to this value. If ComponentsLocation is Relative, required component files will also be published in a manner consistent with this value. This value may be null if setup.exe is not to be published to the web
+
+
+
+
+ Specifies the install time location for bootstrapper components
+
+
+
+
+ The location the bootstrapper install time will use for components if ComponentsLocation is "Absolute"
+
+
+
+
+ If true, the bootstrapper components will be copied to the build output directory. If false, the files will not be copied
+
+
+
+
+ The culture identifier for the bootstrapper to be built
+
+
+
+
+ The culture identifier to use if the LCID identifier is not available
+
+
+
+
+ The file location to copy output files to
+
+
+
+
+ The product builders to use for generating the bootstrapper
+
+
+
+
+ Specifies a URL for the Web site containing support information for the bootstrapper
+
+
+
+
+ True if the bootstrapper will perform XML validation on the component manifests
+
+
+
+
+ This interface exposes functionality necessary to build a bootstrapper.
+
+
+
+
+ Specifies the location of the required bootstrapper files.
+
+ Path to bootstrapper files.
+
+
+
+ Returns all products available at the current bootstrapper Path
+
+
+
+
+ Generates a bootstrapper based on the specified settings.
+
+ The properties used to build this bootstrapper.
+ The results of the bootstrapper generation
+
+
+
+ This interface defines the settings for the bootstrapper build operation.
+
+
+
+
+ The name of the application to be installed after the bootstrapper has installed all required components. If no application is to be installed, this parameter may be null
+
+
+
+
+ The file to be installed after the bootstrapper has installed the required components. It is assumed that this file path is relative to the bootstrapper source path. If no application is to be installed, this parameter may be null
+
+
+
+
+ The expected source location if the bootstrapper is published to a website. It is expected that the ApplicationFile, if specified, will be published to the location consistent to this value. If ComponentsLocation is Relative, required component files will also be published in a manner consistent with this value. This value may be null if setup.exe is not to be published to the web
+
+
+
+
+ The location the bootstrapper install time will use for components if ComponentsLocation is "Absolute"
+
+
+
+
+ If true, the bootstrapper components will be copied to the build output directory. If false, the files will not be copied
+
+
+
+
+ The culture identifier for the bootstrapper to be built
+
+
+
+
+ The culture identifier to use if the LCID identifier is not available
+
+
+
+
+ The file location to copy output files to
+
+
+
+
+ The product builders to use for generating the bootstrapper
+
+
+
+
+ True if the bootstrapper will perform XML validation on the component manifests
+
+
+
+
+ Specifies the install time location for bootstrapper components
+
+
+
+
+ Specifies a URL for the Web site containing support information for the bootstrapper
+
+
+
+
+ A value of true indicates that the application should require elevation to install on Windows Vista.
+
+
+
+
+ This interface represents a product in the found by the BootstrapperBuilder in the Path property.
+
+
+
+
+ The ProductBuilder representation of this Product
+
+
+
+
+ A human-readable name for this product
+
+
+
+
+ A string specifying the unique identifier of this product
+
+
+
+
+ All products which this product also installs
+
+
+
+
+ This interface describes a collection of Product objects. This collection is a closed set that is generated by the BootstrapperBuilder based on the Path property. The client cannot add or remove items from this collection.
+
+
+
+
+ Gets the number of elements actually contained in the ProductCollection
+
+
+
+
+ Gets the Product at the specified index.
+
+ The zero-based index of the element to get
+ The Product at the specified index
+
+
+
+ Gets the product with the specified product code
+
+
+ The product with the given name, null if the spercified product code is not found
+
+
+
+ This interface represents a buildable version of a Product. Used for the BootstrapperBuilder's Build method.
+
+
+
+
+ The product corresponding to this builder
+
+
+
+
+ This class contains a collection of ProductBuilder objects. Used for the BootstrapperBuilder's Build method.
+
+
+
+
+ Adds a builder to the collection
+
+ The ProductBuilder to add to the collection
+
+
+
+ Represents the results of the build operation of the BootstrapperBuilder.
+
+
+
+
+ Returns true if the bootstrapper build was successful, false otherwise
+
+
+
+
+ The file path to the generated primary bootstrapper file
+
+ Path to setup.exe
+
+
+
+ File paths to copied component installer files
+
+ Path to component files
+
+
+
+ The build messages generated from a bootstrapper build
+
+
+
+
+ Represents messages that occur during the BootstrapperBuilder's Build operation.
+
+
+
+
+ This severity of this build message
+
+
+
+
+ A text string describing the details of the build message
+
+
+
+
+ The MSBuild F1-help keyword for the host IDE, or null
+
+
+
+
+ The MSBuild help id for the host IDE
+
+
+
+
+ This enumeration provides three levels of importance for build messages.
+
+
+
+
+ Indicates that the message corresponds to build information
+
+
+
+
+ Indicates that the message corresponds to a build warning
+
+
+
+
+ Indicates that the message corresponds to a build error
+
+
+
+
+ This enumeration describes the way required components will be published
+
+
+
+
+ Products will be found according to the redist vendor's designated URL
+
+
+
+
+ Products will be located relative to generated bootstrapper
+
+
+
+
+ All products will be located at s specific location
+
+
+
+
+ This class represents a product in the found by the BootstrapperBuilder in the Path property.
+
+
+
+
+ The ProductBuilder representation of this Product
+
+
+
+
+ A string specifying the unique identifier of this product
+
+
+
+
+ A human-readable name for this product
+
+
+
+
+ All products which this product also installs
+
+
+
+
+ A buildable version of a Product. Used for the BootstrapperBuilder's Build method.
+
+
+
+
+ The Product corresponding to this ProductBuilder
+
+
+
+
+ This class contains a collection of ProductBuilder objects. Used for the BootstrapperBuilder's Build method.
+
+
+
+
+ Adds a ProductBuilder to the ProductBuilderCollection
+
+ The ProductBuilder to add to this collection
+
+
+
+ Returns an enumerator that can iterate through the ProductBuilderCollection
+
+ An enumerator that can iterate through the ProductBuilderCollection
+
+
+
+ This class contains a collection of Product objects. This collection is a closed set that is generated by the BootstrapperBuilder based on the Path property. The client cannot add or remove items from this collection.
+
+
+
+
+ Gets the Product at the specified index.
+
+ The zero-based index of the element to get
+ The Product at the specified index
+
+
+
+ Gets the product with the specified product code
+
+
+ The product with the given name, null if the spercified product code is not found
+
+
+
+ Gets the number of elements actually contained in the ProductCollection
+
+
+
+
+ Returns an enumerator that can iterate through the ProductCollection
+
+ An enumerator that can iterate through the ProductCollection
+
+
+
+ Handles and stores xml validation events for a product, and contains the XmlValidationResults of a package.
+
+
+
+
+ Adds the validation results of a package of the specified culture into the ProductValidationResults.
+
+ The culture of the XmlValidationResults to add.
+ The vaue of the results to add.
+
+
+
+ Gets the XmlValidationResults for the specified culture.
+
+ The culture of the XmlValidationResults to get.
+ The XmlValidationResults associated with the specified culture.
+
+
+
+ Handles and stores XML validation events.
+
+
+
+
+ Constructor which includes the path to the file being validated.
+
+ The file which is being validated.
+
+
+
+ Gets a string containing the name of the file being validated.
+
+ The name of the file being validated.
+
+
+
+ The delegate which will handle validation events.
+
+
+
+
+ Gets all of the validation errors of the file being validated.
+
+ An array of type string, containing all of the validation errors.
+
+
+
+ Gets a value indicating if there were no validation errors or warnings.
+
+ true if there were no validation errors or warnings; otherwise false. The default value is false.
+
+
+
+ Gets all of the validation warnings of the file being validated.
+
+ An array of type string, containing all of the validation warnings.
+
+
+
+ Provides a unique identifier for a ClickOnce application.
+
+
+
+
+ Initializes a new instance of the ApplicationIdentity class.
+
+ The deployment provider URL for the ClickOnce deployment manifest.
+ Path to ClickOnce deployment manifest. The assembly identity will be obtained from the specified file.
+ Path to ClickOnce application manifest. The assembly identity will be obtained from the specified file.
+
+
+
+ Initializes a new instance of the ApplicationIdentity class.
+
+ The deployment provider URL for the ClickOnce deployment manifest.
+ Assembly identity of the ClickOnce deployment manifest.
+ Assembly identity of the ClickOnce application manifest.
+
+
+
+ Returns the full ClickOnce application identity.
+
+ A string containing the ClickOnce application identity.
+
+
+
+ Describes a ClickOnce or native Win32 application manifest.
+
+
+ This is a serialization format, don't remove the private fields.
+
+
+
+
+ Initializes a new instance of the ApplicationManifest class.
+
+
+
+
+ Initializes a new instance of the ApplicationManifest class.
+
+
+
+
+ Gets or sets the application configuration file.
+
+
+ For a Win32 native manifest, this input is ignored.
+
+
+
+
+ Gets or sets the target framework version
+
+
+
+
+ Gets or sets the link to use if there is a failure launching the application.
+ The specified value should be a fully qualified URL or UNC path.
+
+
+
+
+ Gets or sets a value that indicates whether the application will run in IE using WPF's XBAP application model.
+
+ if the application will run in IE using WPF's XBAP application model; otherwise, .
+
+
+
+ Gets or sets the application icon file.
+
+
+ The application icon is expressed in the generated application manifest and is used for the start menu and Add/Remove Programs dialog.
+ If this input is not specified then a default icon is used.
+ For a Win32 native manifest, this input is ignored.
+
+
+
+
+ Gets or sets a value that indicates whether the manifest is a ClickOnce application manifest or a native Win32 application manifest.
+
+
+
+
+ Gets or sets the maximum allowable length of a file path in a ClickOnce application deployment.
+
+
+ If this value is specified, then the length of each file path in the application is checked against this limit.
+ Any items that exceed the limit will result in a warning message.
+ If this input is not specified or is zero, then no checking is performed.
+ For a Win32 native manifest, this input is ignored.
+
+
+
+
+ Gets or sets a textual description for the OS dependency.
+
+
+
+
+ Gets or sets a support URL for the OS dependency.
+
+
+
+
+ Gets or sets the minimum OS version required by the application.
+
+
+ An example value is "5.1.2600.0" for Windows XP.
+ If you don't specify a value, a default value is used.
+ The default value is the minimum supported OS of the .NET Framework, which is "4.10.0.0" for Windows 98 Second Edition.
+ However, if the application contains any native or Reg-Free COM references, then the default is the Windows XP version, which is "5.1.2600.0".
+ For a Win32 native manifest, this input is ignored.
+
+
+
+
+ Gets or sets the name of the application.
+
+
+ If this input is not specified then the Product is not written into the Application Manifest
+ This name is used for the shortcut name on the Start menu and is part of the name that appears in the Add/Remove Programs dialog.
+
+
+
+
+ Gets or sets the publisher of the application.
+
+
+ If this input is not, specified then the Publisher is not written into the Application Manifest
+ This name is used for the folder name on the Start menu and is part of the name that appears in the Add/Remove Programs dialog.
+
+
+
+
+ Gets or sets the suite name of the application.
+
+
+ This name is used for the sub-folder name on the Start menu (as a child of the publisher)
+
+
+
+
+ Gets or sets the link that appears in the Add/Remove Programs dialog for the application.
+
+
+ The specified value should be a fully qualified URL or UNC path.
+
+
+
+
+ Gets or sets a trust object defining the application security.
+
+
+
+
+ Gets or sets a value that indicates whether the install will use the settings in the application manifest in the trust prompt.
+
+
+ to use the settings in the application manifest in the trust prompt; otherwise, .
+
+
+
+
+ Describes the identity of an assembly.
+
+ This is a serialization format, do not remove or change the private fields.
+
+
+
+ Specifies which attributes are to be returned by the GetFullName function.
+
+
+
+
+ Include the Name, Version, Culture, and PublicKeyToken attributes.
+
+
+
+
+ Include the Name, Version, Culture, PublicKeyToken, and ProcessorArchitecture attributes.
+
+
+
+
+ Include the Name, Version, Culture, PublicKeyToken, and Type attributes.
+
+
+
+
+ Include all attributes.
+
+
+
+
+ Initializes a new instance of the AssemblyIdentity class.
+
+
+
+
+ Initializes a new instance of the AssemblyIdentity class.
+
+ Specifies the simple name of the assembly.
+
+
+
+ Initializes a new instance of the AssemblyIdentity class.
+
+ Specifies the simple name of the assembly.
+ Specifies the version of the assembly.
+
+
+
+ Initializes a new instance of the AssemblyIdentity class.
+
+ Specifies the simple name of the assembly.
+ Specifies the version of the assembly.
+ Specifies the public key token of the assembly, which is the last 8 bytes of the SHA-1 hash of the public key under which the assembly is signed.
+ Specifies the culture of the assembly. A blank string indicates the invariant culture.
+
+
+
+ Initializes a new instance of the AssemblyIdentity class.
+
+ Specifies the simple name of the assembly.
+ Specifies the version of the assembly.
+ Specifies the public key token of the assembly, which is the last 8 bytes of the SHA-1 hash of the public key under which the assembly is signed.
+ Specifies the culture of the assembly. A blank string indicates the invariant culture.
+ Specifies the processor architecture of the assembly. Valid values are "msil", "x86", "ia64", "amd64".
+
+
+
+ Initializes a new instance of the AssemblyIdentity class.
+
+ Specifies the simple name of the assembly.
+ Specifies the version of the assembly.
+ Specifies the public key token of the assembly, which is the last 8 bytes of the SHA-1 hash of the public key under which the assembly is signed.
+ Specifies the culture of the assembly. A blank string indicates the invariant culture.
+ Specifies the processor architecture of the assembly. Valid values are "msil", "x86", "ia64", "amd64".
+ Specifies the type attribute of the assembly. Valid values are "win32" or a blank string.
+
+
+
+ Initializes a new instance of the AssemblyIdentity class.
+
+ Specifies another instance to duplicate.
+
+
+
+ Parses string to obtain an assembly identity.
+ Returns null if identity could not be obtained.
+
+ The full name of the assembly, also known as the display name.
+ The resulting assembly identity.
+
+
+
+ Obtains identity of the specified manifest file.
+ File must be a stand-alone xml manifest file.
+ Returns null if identity could not be obtained.
+
+ The name of the file from which the identity is to be obtained.
+ The assembly identity of the specified file.
+
+
+
+ Obtains identity of the specified .NET assembly.
+ File must be a .NET assembly.
+ Returns null if identity could not be obtained.
+
+ The name of the file from which the identity is to be obtained.
+ The assembly identity of the specified file.
+
+
+
+ Obtains identity of the specified native assembly.
+ File must be either a PE with an embedded xml manifest, or a stand-alone xml manifest file.
+ Returns null if identity could not be obtained.
+
+ The name of the file from which the identity is to be obtained.
+ The assembly identity of the specified file.
+
+
+
+ Obtains identity of the specified assembly.
+ File can be a PE with an embedded xml manifest, a stand-alone xml manifest file, or a .NET assembly.
+ Returns null if identity could not be obtained.
+
+ The name of the file from which the identity is to be obtained.
+ The assembly identity of the specified file.
+
+
+
+ Returns true if this assembly is part of the .NET Framework.
+
+
+
+
+ Returns true if this assembly is part of the given framework.
+ identifier is “.NETFramework” or “Silverlight”, etc. and the version string looks like this: “4.5” or “v4.5”, or “v4.0.30319"
+ If frameworkVersion is null or empty, return true if this assembly is present in any of the given framework versions
+ If both arguments are null or empty strings, return true if this assembly is present in any of the frameworks
+
+
+
+
+ Specifies the culture of the assembly. A blank string indicates the invariant culture.
+
+
+
+
+ Returns the full name of the assembly.
+
+ Specifies which attributes to be included in the full name.
+ A string representation of the full name.
+
+
+
+ Specifies whether the assembly identity represents a neutral platform assembly.
+
+
+
+
+ Specifies whether the assembly identity is a strong name.
+
+
+
+
+ Specifies the simple name of the assembly.
+
+
+
+
+ Specifies the processor architecture of the assembly. Valid values are "msil", "x86", "ia64", "amd64".
+
+
+
+
+ Specifies the public key token of the assembly, which is the last 8 bytes of the SHA-1 hash of the public key under which the assembly is signed.
+
+
+
+
+ Specifies the type attribute of the assembly. Valid values are "win32" or a blank string.
+
+
+
+
+ Specifies the version of the assembly.
+
+
+
+
+ Describes a Win32 assembly manifest.
+
+ This is a serialization format, do not remove or rename private fields.
+
+
+
+ Specifies the set of external proxy stubs referenced by the manifest for isolated applications and Reg-Free COM.
+
+
+
+
+ Describes the type of an assembly reference.
+
+
+
+
+ Assembly type is unspecified and will be determined by the UpdateFileInfo method.
+
+
+
+
+ Specifies a ClickOnce manifest.
+
+
+
+
+ Specifies a .NET assembly.
+
+
+
+
+ Specifies a Win32 native assembly.
+
+
+
+
+ Describes a manifest assembly reference.
+
+
+
+
+ Initializes a new instance of the AssemblyReference class.
+
+
+
+
+ Initializes a new instance of the AssemblyReference class.
+
+ The specified source path of the file.
+
+
+
+ Specifies the identity of the assembly reference.
+
+
+
+
+ Specifies whether the assembly reference is a prerequisite.
+
+
+
+
+ Specifies the type of the assembly reference.
+
+
+
+
+ True if the reference is specified in the project file, false if it is added to the manifest as a result
+ of computing the closure of all project references.
+
+
+
+
+ Provides a collection for manifest assembly references.
+
+
+
+
+ Gets the element at the specified index.
+
+ The zero-based index of the entry to get.
+ The assembly reference instance.
+
+
+
+ Adds the specified assembly reference to the collection.
+
+ The specified assembly reference to add.
+ The added assembly reference instance.
+
+
+
+ Adds the specified assembly reference to the collection.
+
+ The specified assembly reference to add.
+ The added assembly reference instance.
+
+
+
+ Removes all objects from the collection.
+
+
+
+
+ Gets the number of objects contained in the collection.
+
+
+
+
+ Finds an assembly reference in the collection by simple name.
+
+ The specified assembly simple name.
+ The found assembly reference.
+
+
+
+ Finds an assembly reference in the collection by the specified assembly identity.
+
+ The specified assembly identity.
+ The found assembly reference.
+
+
+
+ Finds an assembly reference in the collection by the specified target path.
+
+ The specified target path.
+ The found assembly reference.
+
+
+
+ Returns an enumerator that can iterate through the collection.
+
+ The enumerator.
+
+
+
+ Removes the specified assembly reference from the collection.
+
+ The specified assembly reference to remove.
+
+
+
+ Describes base functionality common to both file and assembly references.
+
+ Note derived classes are serialization formats. Do not rename or remove private members.
+
+
+
+ Specifies the group for on-demand download functionality. A blank string indicates a primary file.
+
+
+
+
+ Specifies the SHA1 hash of the file.
+
+
+
+
+ Specifies whether the file is optional for on-deman download functionality.
+
+
+
+
+ Specifies the resolved path to the file. This path is determined by the Resolve method, and is used to compute the file information by the UpdateFileInfo method.
+
+
+
+
+ Specifies the file size in bytes.
+
+
+
+
+ Specifies the source path of the file.
+
+
+
+
+ Specifies the target path of the file. This is the path that is used for specification in the generated manifest.
+
+
+
+
+ Describes a CompatibleFramework for an deployment manifest
+
+
+
+
+ Specifies how the application checks for updates.
+
+
+
+
+ Check for updates in the background, after the application starts.
+
+
+
+
+ Check for updates in the foreground, before the application starts.
+
+
+
+
+ Specifies the units for the update interval.
+
+
+
+
+ Update interval is in hours.
+
+
+
+
+ Update interval is in days.
+
+
+
+
+ Update interval is in weeks.
+
+
+
+
+ Describes a ClickOnce deployment manifest.
+
+
+
+
+ Initializes a new instance of the DeployManifest class.
+
+
+
+
+ Initializes a new instance of the DeployManifest class.
+
+
+
+
+ codes from GetInstallableFrameworkForTargetFxInternal in
+ env/vscore/package/FxMultiTargeting/FrameworkMultiTargetingInternal.cs
+
+
+
+
+ Gets the InstallableFramework by reading the 'InstallableFramework' attribute in the redist file of the target framework
+
+ the path to the redistlist file
+ InstallableFramework
+
+
+
+ conver (MajorVersion).(MinorVersion).(Build).(Revision) to (MajorVersion).(MinorVersion).(Build)
+
+
+
+
+
+
+ Specifies whether the application install will create a shortcut on the desktop
+ If True, the installation will create a shortcut to the application on the desktop.
+ The default is False
+ If Install is False, this value will be ignored
+
+
+
+
+ Specifies the target framework moniker of this project.
+
+
+
+
+ A collection of CompatibleFrameworks
+
+
+
+
+ Specifies the update location for the application.
+ If this input is not specified then no update location will be defined for the application.
+ However, if application updates are specified then the update location must be specified.
+ The specified value should be a fully qualified URL or UNC path.
+
+
+
+
+ Specifies whether the application should be blocked from being activated via a URL.
+ If this option is True then application can only be activated from the user's Start menu.
+ The default is False.
+ This option is ignored if the Install property is False.
+
+
+
+
+ Specifies the link to use if there is a failure launching the application.
+ The specified value should be a fully qualified URL or UNC path.
+
+
+
+
+ Specifies whether the application is an installed application or an online only application.
+ If this flag is True the application will be installed on the user's Start menu, and can be removed from the Add/Remove Programs dialog.
+ If this flag is False then the application is intended for online use from a web page.
+ The default is True.
+
+
+
+
+ Specifies whether or not the ".deploy" file extension mapping is used.
+ If this flag is true then every application file is published with a ".deploy" file extension.
+ This option is useful for web server security to limit the number of file extensions that need to be unblocked to enable ClickOnce application deployment.
+ The default is false.
+
+
+
+
+ Specifies whether or not the user can skip the update.
+ If the user has a version less than the minimum required, he or she will not have the option to skip the update.
+ The default is to have no minimum required version.
+ This input only applies when Install is True.
+
+
+
+
+ Specifies the name of the application.
+ If this input is not specified then the name is inferred from the identity of the generated manifest.
+ This name is used for the shortcut name on the Start menu and is part of the name that appears in the Add/Remove Programs dialog.
+
+
+
+
+ Specifies the publisher of the application.
+ If this input is not specified then the name is inferred from the registered user, or the identity of the generated manifest.
+ This name is used for the folder name on the Start menu and is part of the name that appears in the Add/Remove Programs dialog.
+
+
+
+
+ Specifies the suite name of the application.
+ This name is used for the sub-folder name on the Start menu (as a child of the publisher)
+
+
+
+
+ Specifies the link that appears in the Add/Remove Programs dialog for the application.
+ The specified value should be a fully qualified URL or UNC path.
+
+
+
+
+ Specifies whether or not URL query-string parameters should be made available to the application.
+ The default is False indicating that parameters will not be available to the application.
+
+
+
+
+ Indicates whether or not the application is updatable.
+ The default is False.
+ This input only applies when Install is True.
+
+
+
+
+ Specifies the update interval for the application.
+ The default is zero.
+ This input only applies when Install and UpdateEnabled are both True.
+
+
+
+
+ Specifies whether updates should be checked in the foreground before starting the application, or in the background as the application is running.
+ The default is "Background".
+ This input only applies when Install and UpdateEnabled are both True.
+
+
+
+
+ Specifies the units for UpdateInterval input.
+ This input only applies when Install and UpdateEnabled are both True.
+
+
+
+
+ Describes a fileAssociation for an application manifest
+
+
+
+
+ Describes a manifest file reference.
+
+
+
+
+ Initializes a new instance of the FileReference class.
+
+
+
+
+ Initializes a new instance of the FileReference class.
+
+ The specified source path of the file.
+
+
+
+ Specifies the set of COM classes referenced by the manifest for isolated applications and Reg-Free COM.
+
+
+
+
+ Specifies whether the file is a data file.
+
+
+
+
+ Specifies the set of proxy stubs referenced by the manifest for isolated applications and Reg-Free COM.
+
+
+
+
+ Specifies the set of type libraries referenced by the manifest.
+
+
+
+
+ Provides a collection for manifest file references.
+
+
+
+
+ Gets the element at the specified index.
+
+ The zero-based index of the entry to get.
+ The file reference instance.
+
+
+
+ Adds the specified assembly reference to the collection.
+
+ The specified file reference to add.
+ The added file reference instance.
+
+
+
+ Adds the specified assembly reference to the collection.
+
+ The specified file reference to add.
+ The added file reference instance.
+
+
+
+ Removes all objects from the collection.
+
+
+
+
+ Gets the number of objects contained in the collection.
+
+
+
+
+ Finds a file reference in the collection by the specified target path.
+
+ The specified target path.
+ The found file reference.
+
+
+
+ Returns an enumerator that can iterate through the collection.
+
+ The enumerator.
+
+
+
+ Removes the specified file reference from the collection.
+
+ The specified file reference to remove.
+
+
+
+ Adds Launcher and updates its resource
+
+
+
+
+ Specifies the location of the required Launcher files.
+
+ Path to Launcher files.
+
+
+
+ Describes base functionality common to all supported manifest types.
+
+
+
+
+ Specifies the identity of the manifest.
+
+
+
+
+ Specifies the set of assemblies referenced by the manifest.
+
+
+
+
+ Assembly name passed to the manifest generation task
+
+
+
+
+ Indicates if manifest is part of Launcher-based deployment, which requires
+ somewhat different manifest generation and validation.
+
+
+
+
+ Specifies a textual description for the manifest.
+
+
+
+
+ Identifies an assembly reference which is the entry point of the application.
+
+
+
+
+ Specifies the set of files referenced by the manifest.
+
+
+
+
+ The input stream from which the manifest was read.
+ Used by ManifestWriter to reconstitute input which is not represented in the object representation.
+
+
+
+
+ Contains a collection of current error and warning messages.
+
+
+
+
+ Specifies whether the manifest is operating in read-only or read-write mode.
+ If only using to read a manifest then set this flag to true.
+ If using to write a new manifest then set this flag to false.
+ The default is false.
+ This flag provides additional context for the manifest generator, and affects how some error messages are reported.
+
+
+
+
+ Locates all specified assembly and file references by searching in the same directory as the loaded manifest, or in the current directory.
+ The location of each referenced assembly and file is required for hash computation and assembly identity resolution.
+ Any resulting errors or warnings are reported in the OutputMessages collection.
+
+
+
+
+ Locates all specified assembly and file references by searching in the specified directories.
+ The location of each referenced assembly and file is required for hash computation and assembly identity resolution.
+ Any resulting errors or warnings are reported in the OutputMessages collection.
+
+ An array of strings specify directories to search.
+
+
+
+ Specifies the location where the manifest was loaded or saved.
+
+
+
+
+ Updates file information for each referenced assembly and file.
+ The file information includes a hash computation and a file size for each referenced file and assembly.
+ Also, the assembly identity is obtained for any referenced assemblies with an unspecified assembly identity.
+ Any resulting errors or warnings are reported in the OutputMessages collection.
+
+
+
+
+ Implementation of UpdateFileInfo
+
+ null, if not TFV. If no TFV, it will use sha256 signature algorithm.
+
+
+
+ Performs various checks to verify the validity of the manifest.
+ Any resulting errors or warnings are reported in the OutputMessages collection.
+
+
+
+
+ Reads an XML manifest file into an object representation.
+
+
+
+
+ Reads the specified manifest XML and returns an object representation.
+
+ The name of the input file.
+ Specifies whether to preserve the input stream in the InputStream property of the resulting manifest object. Used by ManifestWriter to reconstitute input which is not represented in the object representation. This option is not honored if the specified input file is an embedded manfiest in a PE.
+ A base object representation of the manifest. Can be cast to AssemblyManifest, ApplicationManifest, or DeployManifest to access more specific functionality.
+
+
+
+ Reads the specified manifest XML and returns an object representation.
+
+ Specifies the expected type of the manifest. Valid values are "AssemblyManifest", "ApplicationManifest", or "DepoyManifest".
+ The name of the input file.
+ Specifies whether to preserve the input stream in the InputStream property of the resulting manifest object. Used by ManifestWriter to reconstitute input which is not represented in the object representation. This option is not honored if the specified input file is an embedded manfiest in a PE.
+ A base object representation of the manifest. Can be cast to AssemblyManifest, ApplicationManifest, or DeployManifest to access more specific functionality.
+
+
+
+ Reads the specified manifest XML and returns an object representation.
+
+ Specifies an input stream.
+ Specifies whether to preserve the input stream in the InputStream property of the resulting manifest object. Used by ManifestWriter to reconstitute input which is not represented in the object representation.
+ A base object representation of the manifest. Can be cast to AssemblyManifest, ApplicationManifest, or DeployManifest to access more specific functionality.
+
+
+
+ Reads the specified manifest XML and returns an object representation.
+
+ Specifies the expected type of the manifest. Valid values are "AssemblyManifest", "ApplicationManifest", or "DepoyManifest".
+ Specifies an input stream.
+ Specifies whether to preserve the input stream in the InputStream property of the resulting manifest object. Used by ManifestWriter to reconstitute input which is not represented in the object representation.
+ A base object representation of the manifest. Can be cast to AssemblyManifest, ApplicationManifest, or DeployManifest to access more specific functionality.
+
+
+
+ Writes object representation of a manifest to XML.
+
+
+
+
+ Writes the specified object representation of a manifest to XML.
+ The name of the output file is inferred from the SourcePath property of the manifest.
+
+ The object representation of the manifest.
+
+
+
+ Writes the specified object representation of a manifest to XML.
+
+ The object representation of the manifest.
+ The name of the output file.
+
+
+
+ Writes the specified object representation of a manifest to XML.
+
+ The object representation of the manifest.
+ The name of the output file.
+ The target framework version.
+
+
+
+ Writes the specified object representation of a manifest to XML.
+
+ The object representation of the manifest.
+ Specifies an output stream.
+
+
+
+
+
+
+
+ it will always use sha256 as signature algorithm if TFV is null
+
+
+
+ Specifies the type of output message as either an error, warning, or informational.
+
+
+
+
+ Indicates an informational message.
+
+
+
+
+ Indicates a warning.
+
+
+
+
+ Indicates an error.
+
+
+
+
+ Describes an error, warning, or informational output message for the manifest generator.
+
+
+
+
+ Returns a string array of arguments for the message.
+
+
+
+
+
+ Specifies an identifier for the message.
+
+
+
+
+ Contains the text of the message.
+
+
+
+
+ Indicates whether the message is an error, warning, or informational message.
+
+
+
+
+ Provides a collection for output messages.
+
+
+
+
+ Gets the element at the specified index.
+
+ The zero-based index of the entry to get.
+ The file reference instance.
+
+
+
+ Removes all objects from the collection.
+
+
+
+
+ Gets the number of error messages in the collecction.
+
+
+
+
+ Returns an enumerator that can iterate through the collection.
+
+ The enumerator.
+
+
+
+ Gets the number of warning messages in the collecction.
+
+
+
+
+ Provides a set of utility functions for manipulating security permision sets and signing.
+
+
+
+
+ Generates a permission set by computed the zone default permission set and adding any included permissions.
+
+ Specifies a zone default permission set, which is obtained from machine policy. Valid values are "Internet", "LocalIntranet", or "Custom". If "Custom" is specified, the generated permission set is based only on the includedPermissionSet parameter.
+ A PermissionSet object containing the set of permissions to be explicitly included in the generated permission set. Permissions specified in this parameter will be included verbatim in the generated permission set, regardless of targetZone parameter.
+ This property is no longer used.
+ The generated permission set.
+
+
+
+ Converts an array of permission identity strings to a permission set object.
+
+ An array of permission identity strings.
+ The converted permission set.
+
+
+
+ Converts a permission set object to an array of permission identity strings.
+
+ The input permission set to be converted.
+ An array of permission identity strings.
+
+
+
+ Converts an XmlElement into a PermissionSet object.
+
+ An XML representation of the permission set.
+ The converted permission set.
+
+
+
+ Signs a ClickOnce manifest or PE file.
+
+ Hexadecimal string that contains the SHA-1 hash of the certificate.
+ URL that specifies an address of a time stamping server.
+ Path of the file to sign with the certificate.
+
+
+
+ Signs a ClickOnce manifest or PE file.
+
+ Hexadecimal string that contains the SHA-1 hash of the certificate.
+ URL that specifies an address of a time stamping server.
+ Path of the file to sign with the certificate.
+ Version of the .NET Framework for the target.
+
+
+
+ Signs a ClickOnce manifest or PE file.
+
+ Hexadecimal string that contains the SHA-1 hash of the certificate.
+ URL that specifies an address of a time stamping server.
+ Path of the file to sign with the certificate.
+ Version of the .NET Framework for the target.
+ .NET Framework identifier for the target.
+
+
+
+ Signs a ClickOnce manifest or PE file.
+
+ Hexadecimal string that contains the SHA-1 hash of the certificate.
+ URL that specifies an address of a time stamping server.
+ Path of the file to sign with the certificate.
+ Version of the .NET Framework for the target.
+ .NET Framework identifier for the target.
+ Disallow fallback to legacy timestamping when RFC3161 timestamping fails during manifest signing
+
+
+
+ Signs a ClickOnce manifest.
+
+ The certificate to be used to sign the file.
+ The certificate password.
+ URL that specifies an address of a time stamping server.
+ Path of the file to sign with the certificate.
+ This function is only for signing a manifest, not a PE file.
+
+
+
+ Signs a ClickOnce manifest or PE file.
+
+ The certificate to be used to sign the file.
+ URL that specifies an address of a time stamping server.
+ Path of the file to sign with the certificate.
+ This function can only sign a PE file if the X509Certificate2 parameter represents a certificate in the
+ current user's personal certificate store.
+
+
+
+ Describes the application security trust information.
+
+
+
+
+ Resets the object to its default state.
+
+
+
+
+ Determines whether the application has permission to call unmanaged code.
+
+
+
+
+ Determines whether the application is full trust or partial trust.
+
+
+
+
+ Gets or sets the permission set object for the application trust.
+
+
+
+
+ Determines whether to preserve partial trust permission when the full trust flag is set.
+ If this option is false with full trust specified, then any permissions defined in the permission set object will be dropped on save.
+
+
+
+
+ Reads the application trust from an XML file.
+
+ The name of the input file.
+
+
+
+ Reads the application trust from an XML file.
+
+ Specifies an input stream.
+
+
+
+ Reads the application trust from a ClickOnce application manifest.
+
+ The name of the input file.
+
+
+
+ Reads the application trust from a ClickOnce application manifest.
+
+ Specifies an input stream.
+
+
+
+ Describes the level of "same site" access permitted, specifying whether the application has permission to communicate with the server from which it was deployed.
+
+
+
+
+ Writes the application trust to an XML file.
+
+ The name of the output file.
+
+
+
+ Writes the application trust to an XML file.
+
+
+
+
+
+ Writes the application trust to a ClickOnce application manifest.
+ If the file exists, the trust section will be updated.
+ If the file does not exist, a new template manifest with the specified trust will be created.
+
+ The name of the output file.
+
+
+
+ Writes the application trust to a new template ClickOnce application manifest.
+
+ Specifies an output stream.
+
+
+
+ Updates an existing ClickOnce application manifest with the specified trust.
+
+ Specifies an input stream.
+ Specifies an output stream.
+
+
+
+ Return a CLRVersion from a given target framework version.
+
+
+
+
+
+
+ Gets a Version object corresponding to the given target framework version string.
+
+
+
+
+ This class implements the "CallTarget" task, which invokes other targets within the same
+ project file. Marked RunInMTA because we do not want this task to ever be invoked explicitly
+ on the STA if the RequestBuilder is running on another thread, as this will cause thread
+ id validation checks to fail.
+
+
+
+
+ The targets to build.
+
+ Array of target names.
+
+ This is a required parameter. If you want to build the
+ default targets, use the <MSBuild> task and pass in Projects=$(MSBuildProjectFile).
+
+
+
+
+ Outputs of the targets built in each project.
+
+ Array of output items.
+
+
+
+ When this is true, instead of calling the engine once to build all the targets (for each project),
+ we would call the engine once per target (for each project). The benefit of this is that
+ if one target fails, you can still continue with the remaining targets.
+
+
+
+
+ Deprecated. Does nothing.
+
+
+
+
+ Instructs the MSBuild engine to build one or more targets in the current project.
+
+ true if all targets built successfully; false if any target fails
+
+
+
+ Task to call Path.Combine.
+
+
+
+
+ The base path, the first parameter into Path.Combine. Can be a relative path,
+ absolute path, or (blank).
+
+
+
+
+ The list of paths to combine with the base path. These can be relative paths
+ or absolute paths.
+
+
+
+
+ This is the output of the task, a list of paths produced by combining the base
+ path with each of the paths passed in.
+
+
+
+
+ Calls Path.Combine for each of the inputs. Preserves metadata.
+
+ true on success, false on failure
+
+
+
+ CommandLineBuilder derived class for specialized logic specific to MSBuild tasks
+
+
+
+
+ Initializes a new instance of the CommandLineBuilderExtension class.
+
+
+
+
+ Initializes a new instance of the CommandLineBuilderExtension class.
+
+
+
+
+ Set a boolean switch iff its value exists and its value is 'true'.
+
+
+
+
+ Set a boolean switch only if its value exists.
+
+
+
+
+ Set a boolean switch only if its value exists.
+
+
+
+
+ Set a switch if its value exists by choosing from the input choices
+
+
+
+
+ Set an integer switch only if its value exists.
+
+
+
+
+ Adds an aliased switch, used for ResGen:
+ /reference:Foo=System.Xml.dll
+
+
+
+
+ Adds a nested switch, used by SGen.exe. For example:
+ /compiler:"/keyfile:\"c:\some folder\myfile.snk\""
+
+
+
+
+
+
+
+ Returns a quoted string appropriate for appending to a command line.
+
+
+ Escapes any double quotes in the string.
+
+
+
+
+
+ Appends a command-line switch that takes a compound string parameter. The parameter is built up from the item-spec and
+ the specified attributes. The switch is appended as many times as there are parameters given.
+
+
+
+
+
+
+
+ Append a switch if 'parameter' is not null.
+ Split on the characters provided.
+
+
+
+
+ Returns true if the parameter is empty in spirits,
+ even if it contains the separators and white space only
+ Split on the characters provided.
+
+
+
+
+ Designed to handle the /link and /embed swithes:
+
+ /embed[resource]:<filename>[,<name>[,Private]]
+ /link[resource]:<filename>[,<name>[,Private]]
+
+ Where the last flag--Private--is either present or not present
+ depending on whether the ITaskItem has a Private="True" attribue.
+
+
+
+
+
+
+
+
+ Appends a switch if the specified value is true.
+
+
+
+
+ BinaryFormatter byte arrays contain the type name, but it is not directly accessible from the resx.
+
+
+
+
+ BinaryFormatter byte arrays contain the type name, but it is not directly accessible from the resx.
+
+
+
+
+ Construct a new linked resource.
+
+ The resource's name
+ The assembly-qualified type name of the resource (at runtime).
+ The absolute path of the file to be embedded as a resource.
+ The absolute path of the file that defined the ResXFileRef to this resource.
+
+
+
+ Name of the resource, as specified in the source.
+
+
+
+
+ The resource's type's assembly-qualified name. May be null when the type is not knowable from the source.
+
+
+
+
+ The resource's type's full name. May be null when the type is not knowable from the source.
+
+
+
+
+ Adds the resource represented by this object to the specified writer.
+
+
+
+
+ Name value resource pair to go in resources list
+
+
+
+
+ Does this assembly-qualified type name represent an array of bytes?
+
+
+ We can't hard-code byte[] type name due to version number
+ updates and potential whitespace issues with ResX files.
+
+ Comment and logic from https://github.com/dotnet/winforms/blob/16b192389b377c647ab3d280130781ab1a9d3385/src/System.Windows.Forms/src/System/Resources/ResXDataNode.cs#L411-L416
+
+
+
+
+ Extract s from a given file on disk.
+
+
+
+
+ Extract the full name of a type from an assembly-qualified name string.
+
+
+
+
+
+
+ Performs SetPlatform negotiation for all project references when opted
+ in via the EnableDynamicPlatformResolution property.
+
+ See ProjectReference-Protocol.md for details.
+
+
+
+
+ All ProjectReference items.
+
+
+
+
+ The platform the current project is building as.
+
+
+
+
+ Optional parameter that defines mappings from current project platforms
+ to what the ProjectReference should build as.
+ Win32=x86, for example.
+
+
+
+
+ The resulting items with NearestPlatform metadata set.
+
+
+
+
+ Create a wrapper so that when dispose is called we execute the delegate.
+
+
+
+
+ Has this been disposed
+
+
+
+
+ Delegate to call when we are in dispose
+
+
+
+
+ Constructor
+
+
+
+
+ Delegate to call when we are in dispose
+
+
+
+
+ IDisposable
+
+
+
+
+ Clear the caches
+
+
+
+
+ Represents a task that can download a file.
+
+
+
+
+ Gets or sets an optional filename for the destination file. By default, the filename is derived from the if possible.
+
+
+
+
+ Gets or sets a that specifies the destination folder to download the file to.
+
+
+
+
+ Gets or sets a that contains details about the downloaded file.
+
+
+
+
+ Gets or sets an optional number of times to retry if possible.
+
+
+
+
+ Gets or sets the number of milliseconds to wait before retrying.
+
+
+
+
+ Gets or sets an optional value indicating whether or not the download should be skipped if the file is up-to-date.
+
+
+
+
+ Gets or sets the URL to download.
+
+
+
+
+ Gets or sets the number of milliseconds to wait before the request times out.
+
+
+
+
+ Gets or sets a to use. This is used by unit tests to mock a connection to a remote server.
+
+
+
+
+
+
+
+ Attempts to download the file.
+
+ The parsed of the request.
+ The cancellation token for the task.
+
+
+
+ Determines if the specified exception is considered retriable.
+
+ The originally thrown exception.
+ The actual exception to be used for logging errors.
+ true if the exception is retriable, otherwise false.
+
+
+
+ Attempts to get the file name to use when downloading the file.
+
+ The with information about the response.
+ Receives the name of the file.
+ true if a file name could be determined, otherwise false.
+
+
+
+ Represents a wrapper around the that also contains the .
+ DEPRECATED as of net5.0, which included the StatusCode in the HttpRequestException class.
+
+
+
+
+ Computes the checksum for a single file.
+
+
+
+
+ The files to be hashed.
+
+
+
+
+ The algorithm. Allowed values: SHA256, SHA384, SHA512. Default = SHA256.
+
+
+
+
+ The metadata name where the hash is stored in each item. Defaults to "FileHash".
+
+
+
+
+ The encoding to use for generated hashs. Defaults to "hex". Allowed values = "hex", "base64".
+
+
+
+
+ The hash of the file. This is only set if there was one item group passed in.
+
+
+
+
+ The input files with additional metadata set to include the file hash.
+
+
+
+
+ Verifies that a file matches the expected file hash.
+
+
+
+
+ The file path.
+
+
+
+
+ The expected hash of the file.
+
+
+
+
+ The encoding format of . Defaults to "hex".
+
+
+
+
+ The hashing algorithm to use. Allowed values: SHA256, SHA384, SHA512. Default = SHA256.
+
+
+
+
+ CopyFile delegate
+
+ returns Success = true, Failure = false; Retry = null
+
+ Source file
+ Destination file
+
+
+
+ Short-term cache saves the result of IO operations on a filename. Should only be
+ used in cases where it is know there will be no exogenous changes to the filesystem
+ for this file.
+
+
+ Uses PInvoke rather than FileInfo because the latter does all kinds of expensive checks.
+
+ Deficiency: some of the properties eat some or all exceptions. If they are called first, they will
+ trigger the population and eat. Subsequent calls will then not throw, but instead eg return zero.
+ This could be fixed by storing the exception from the population, and throwing no matter who does
+ the population and whether it's been done before.
+
+
+
+
+ The name of the file.
+
+
+
+
+ Set to true if file or directory exists
+
+
+
+
+ Set to true if the path referred to a directory.
+
+
+
+
+ File length
+
+
+
+
+ Last time the file was updated
+
+
+
+
+ True if the file is readonly
+
+
+
+
+ Exception thrown on creation
+
+
+
+
+ Constructor gets the data for the filename.
+ On Win32 it uses native means. Otherwise,
+ uses standard .NET FileInfo/DirInfo
+
+
+
+
+ Throw exception as if the FileInfo did it. We
+ know that getting the length of a file would
+ throw exception if there are IO problems
+
+
+
+
+ Throw non-IO-related exception if occurred during creation.
+ Return true if exception did occur, but was IO-related
+
+
+
+
+ Throw any exception collected during construction
+
+
+
+
+ The name of the file.
+
+
+
+
+ Holds the full path equivalent of _filename
+
+
+
+
+ Actual file or directory information
+
+
+
+
+ Constructor.
+ Only stores file name: does not grab the file state until first request.
+
+
+
+
+ Whether the file is readonly.
+ Returns false for directories.
+ Throws if file does not exist.
+
+
+
+
+ Whether the file exists.
+ Returns false if it is a directory, even if it exists.
+ Returns false instead of IO related exceptions.
+
+
+
+
+ Whether the directory exists.
+ Returns false for files.
+ Returns false instead of IO related exceptions.
+
+
+
+
+ Last time the file was written.
+ Works for directories.
+
+
+
+
+ Last time the file was written, in UTC. Avoids translation for daylight savings, time zone etc which isn't needed for just comparisons.
+ If file does not exist, returns 12 midnight 1/1/1601.
+ Works for directories.
+
+
+
+
+ Length of the file in bytes.
+ Throws if it is a directory.
+ Throws if it does not exist.
+
+
+
+
+ Name of the file as it was passed in.
+ Not normalized.
+
+
+
+
+ Whether this is a directory.
+ Throws if it does not exist.
+
+
+
+
+ Use in case the state is known to have changed exogenously.
+
+
+
+
+ A task that copies files.
+
+
+
+
+ Constructor.
+
+
+
+
+ Force the copy to retry even when it hits ERROR_ACCESS_DENIED -- normally we wouldn't retry in this case since
+ normally there's no point, but occasionally things get into a bad state temporarily, and retrying does actually
+ succeed. So keeping around a secret environment variable to allow forcing that behavior if necessary.
+
+
+
+
+ Global flag to force on UseSymboliclinksIfPossible since Microsoft.Common.targets doesn't expose the functionality.
+
+
+
+
+ Default milliseconds to wait between necessary retries
+
+
+
+
+ Gets or sets the number of times to attempt to copy, if all previous attempts failed.
+ Warning: using retries may mask a synchronization problem in your build process.
+
+
+
+
+ Gets or sets the delay, in milliseconds, between any necessary retries.
+ Defaults to RetryDelayMillisecondsDefault
+
+
+
+
+ Gets or sets a value that indicates whether to use hard links for the copied files
+ rather than copy the files, if it's possible to do so.
+
+
+
+
+ Gets or sets a value that indicates whether to create symbolic links for the copied files
+ rather than copy the files, if it's possible to do so.
+
+
+
+
+ Fail if unable to create a symbolic or hard link instead of falling back to copy
+
+
+
+
+ The subset of files that were successfully copied.
+
+
+
+
+ Gets or sets a value that indicates whether to overwrite files in the destination
+ that have the read-only attribute set.
+
+
+
+
+ Stop and return (in an undefined state) as soon as possible.
+
+
+
+
+ Method compares two files and returns true if their size and timestamp are identical.
+
+ The source file
+ The destination file
+
+
+
+ INTERNAL FOR UNIT-TESTING ONLY
+
+ We've got several environment variables that we read into statics since we don't expect them to ever
+ reasonably change, but we need some way of refreshing their values so that we can modify them for
+ unit testing purposes.
+
+
+
+
+ If MSBUILDALWAYSRETRY is set, also log useful diagnostic information -- as
+ a warning, so it's easily visible.
+
+
+
+
+ Copy one file from source to destination. Create the target directory if necessary and
+ leave the file read-write.
+
+ Return true to indicate success, return false to indicate failure and NO retry, return NULL to indicate retry.
+
+
+
+ Ensure the read-only attribute on the specified file is off, so
+ the file is writeable.
+
+
+
+
+ Copy the files.
+
+ Delegate used to copy the files.
+
+ Thread parallelism allowed during copies. 1 uses the original algorithm, >1 uses newer algorithm.
+
+
+
+
+ Original copy code that performs single-threaded copies.
+ Used for single-file copies and when parallelism is 1.
+
+
+
+
+ Parallelize I/O with the same semantics as the single-threaded copy method above.
+ ResolveAssemblyReferences tends to generate longer and longer lists of files to send
+ to CopyTask as we get further and further down the dependency graph.
+ The OS can handle a lot of parallel I/O so let's minimize wall clock time to get
+ it all done.
+
+
+
+
+ Verify that the inputs are correct.
+
+ False on an error, implying that the overall copy operation should be aborted.
+
+
+
+ Set up our list of destination files.
+ For SourceFiles: Apply DestinationFolder to each SourceFiles item to create a DestinationFiles item.
+ For SourceFolders: With each SourceFolders item, get the files in the represented directory. Create both SourceFiles and DestinationFiles items.
+
+ False if an error occurred, implying aborting the overall copy operation.
+
+
+
+ Tries the path operation. Logs a 'Copy.Error' if an exception is thrown.
+
+ The operation.
+ The source to use for the log message.
+ The destination to use for the log message.
+ The result of the path operation.
+
+
+
+
+ Copy source to destination, unless SkipUnchangedFiles is true and they are equivalent.
+
+ True if the file was copied or, on SkipUnchangedFiles, the file was equivalent.
+
+
+
+ Copy one file with the appropriate number of retries if it fails.
+
+
+
+
+ Try to get a message to inform the user which processes have a lock on a given file.
+
+
+
+
+ Standard entry point.
+
+
+
+
+
+ Compares two paths to see if they refer to the same file. We can't solve the general
+ canonicalization problem, so we just compare strings on the full paths.
+
+
+
+
+ Base class for task that determines the appropriate manifest resource name to
+ assign to a given resx or other resource.
+
+
+
+
+ Utility function for creating a C#-style manifest name from
+ a resource name.
+
+ The file name of the dependent (usually a .resx)
+ The file name of the dependent (usually a .resx)
+ The root namespace (usually from the project file). May be null
+ The file name of the parent of this dependency (usually a .cs file). May be null
+ File contents binary stream, may be null
+ Returns the manifest name
+
+
+
+ Utility function for creating a C#-style manifest name from
+ a resource name. Note that this function attempts to emulate the
+ Everret implementation of this code which can be found by searching for
+ ComputeNonWFCResourceName() or ComputeWFCResourceName() in
+ \vsproject\langproj\langbldmgrsite.cpp
+
+ The file name of the dependent (usually a .resx)
+ The file name of the dependent (usually a .resx)
+ The root namespace (usually from the project file). May be null
+ should the culture name be prepended to the manifest name as a path
+ The file name of the parent of this dependency (usually a .cs file). May be null
+ The override culture of this resource, if any
+ File contents binary stream, may be null
+ Task's TaskLoggingHelper, for logging warnings or errors
+ Whether to treat the current file as 'culture-neutral' and retain the culture in the name.
+ Returns the manifest name
+
+
+
+ Return 'true' if this is a C# source file.
+
+ Name of the candidate source file.
+ True, if this is a validate source file.
+
+
+
+ Base class for task that determines the appropriate manifest resource name to
+ assign to a given resx or other resource.
+
+
+
+
+ Utility function for creating a VB-style manifest name from
+ a resource name.
+
+ The file name of the dependent (usually a .resx)
+ The file name of the dependent (usually a .resx)
+ The root namespace (usually from the project file). May be null
+ The file name of the parent of this dependency (usually a .vb file). May be null
+ File contents binary stream, may be null
+ Returns the manifest name
+
+
+
+ Utility function for creating a VB-style manifest name from
+ a resource name. Note that this function attempts to emulate the
+ Everret implementation of this code which can be found by searching for
+ ComputeNonWFCResourceName() or ComputeWFCResourceName() in
+ \vsproject\langproj\langbldmgrsite.cpp
+
+ The file name of the dependent (usually a .resx)
+ The file name of the dependent (usually a .resx)
+ should the culture name be prepended to the manifest name as a path
+ The root namespace (usually from the project file). May be null
+ The file name of the parent of this dependency (usually a .vb file). May be null
+ The override culture of this resource, if any
+ File contents binary stream, may be null
+ Task's TaskLoggingHelper, for logging warnings or errors
+ Whether to treat the current file as 'culture-neutral' and retain the culture in the name.
+ Returns the manifest name
+
+
+
+ Return 'true' if this is a VB source file.
+
+ Name of the candidate source file.
+ True, if this is a validate source file.
+
+
+
+ Forward a list of items from input to output. This allows dynamic item lists.
+
+
+
+
+ Only apply the additional metadata is none already exists
+
+
+
+
+ A list of metadata name/value pairs to apply to the output items.
+ A typical input: "metadataname1=metadatavalue1", "metadataname2=metadatavalue2", ...
+
+
+ `
+ The engine fails on this because it doesn't like item lists being concatenated with string
+ constants when the data is being passed into an array parameter. So the workaround is to
+ write this in the project file:
+ ``
+ ]]>
+
+
+
+
+
+ Execute.
+
+
+
+
+ Create the list of output items.
+
+
+
+
+ Expand wildcards in the item list.
+
+
+
+
+ Create a table of unique items
+
+
+
+
+ Base class for task that determines the appropriate manifest resource name to
+ assign to a given resx or other resource.
+
+
+
+
+ Should the culture name be prepended to the manifest resource name as a directory?
+ This is true by default.
+
+
+
+
+ The possibly dependent resource files.
+
+
+
+
+ Rootnamespace to use for naming.
+
+
+
+
+ The resulting manifest names.
+
+
+
+
+
+ The initial list of resource names, with additional metadata for manifest resource names
+
+
+
+
+ Method in the derived class that composes the manifest name.
+
+ The file name of the dependent (usually a .resx)
+ The name of the file specified by the Link attribute.
+ The root namespace (usually from the project file). May be null
+ The file name of the parent of this dependency. May be null
+ File contents binary stream, may be null
+ Returns the manifest name
+
+
+
+ The derived class chooses whether this is a valid source file to work against.
+ Usually, this is just a matter of looking at the file's extension.
+
+ Name of the candidate source file.
+ True, if this is a validate source file.
+
+
+
+ Given a file path, return a stream on top of that path.
+
+ Path to the file
+ File mode
+ Access type
+ The FileStream
+
+
+
+ Execute the task with delegate handlers.
+
+ CreateFileStream delegate
+ True if task succeeded.
+
+
+
+ Do the task's work.
+
+ True if succeeded.
+
+
+
+ Is the character a valid first Everett identifier character?
+
+
+
+
+ Is the character a valid Everett identifier character?
+
+
+
+
+ Make a folder subname into an Everett-compatible identifier
+
+
+
+
+ Make a folder name into an Everett-compatible identifier
+
+
+
+
+ This method is provided for compatibility with Everett which used to convert parts of resource names into
+ valid identifiers
+
+
+
+
+ Just a straight pass-through of the inputs through to the outputs.
+
+
+
+
+ The in/out property value.
+
+
+ So ... why is this a string[] instead of a string?
+ Basically if the project author passed in:
+
+ CreateProperty Value="Clean;Build"
+ Output TaskParameter="Value" PropertyName="MyTargetsToBuild"
+ /CreateProperty
+
+ We need to respect the semicolon that they put in the value, and need to treat
+ this exactly as if they had done:
+
+ PropertyGroup
+ MyTargetsToBuild="Clean;Build"
+ /PropertyGroup
+
+ If we make this parameter a "string", then the engine will escape the
+ value on the way out from the task back to the engine, creating a property
+ that is set to "Clean%3BBuild", which is not what the user wanted.
+
+
+
+
+ This is to fool MSBuild into not doing its little TLDA trick whereby even if
+ a target is up-to-date, it will still set the properties that were meant to
+ be set using the CreateProperty task. This is because MSBuild is smart enough
+ to figure out the value of the output property without running the task.
+ But if the input parameter is differently named than the output parameter,
+ MSBuild can't be smart enough to do that. This is an important scenario
+ for people who want to know whether a particular target was up-to-date or not.
+
+
+
+
+ Create the property. Since the input property is the same as the
+ output property, this is rather easy.
+
+
+
+
+
+ Specific-purpose utility functions for parsing C#.
+
+
+
+
+ Parse a C# file and get the first class name, fully qualified with namespace.
+
+
+
+
+
+
+ Extract the class name.
+
+
+
+
+ File.GetAttributes delegate.
+
+ The path get attributes for.
+
+
+
+ File SetAttributes delegate.
+
+ The path to set attributes for.
+ The actual file attributes.
+
+
+
+ File SetLastAccessTime delegate.
+
+
+
+
+ File SetLastWriteTime delegate.
+
+
+
+
+ GetDirectories delegate.
+
+ The path to get directories for.
+ The pattern to search for.
+ An array of directories.
+
+
+
+ CopyFile delegate
+
+ Source file
+ Destination file
+
+
+
+ GetAssemblyName delegate
+
+ The path to the file
+ The assembly name.
+
+
+
+ GetAssemblyRuntimeVersion delegate to get the clr runtime version of a file.
+
+ The path to the file
+ The clr runtime version for the file
+
+
+
+ GetGacEnumerator delegate to get the enumerator which will enumerate over the GAC
+
+ StrongName to get an enumerator for
+ The enumerator for the gac
+
+
+
+ GetPathFromFusionName delegate to get path to a file based on the fusion name
+
+ StrongName to get a path for
+ The path to the assembly
+
+
+
+ Delegate. Given an assembly name, crack it open and retrieve the list of dependent
+ assemblies and the list of scatter files.
+
+ Path to the assembly.
+ Assembly metadata cache.
+ Receives the list of dependencies.
+ Receives the list of associated scatter files.
+ The framework name
+
+
+
+ Delegate to take in a dll path and read the machine type from the PEHeader
+
+
+
+
+ Delegate to get the path to an assembly in the GAC.
+
+
+
+
+ Determines if a assembly is an winmd file
+
+
+
+
+ CreateFileString delegate. Creates a stream on top of a file.
+
+ Path to the file
+ File mode
+ Access type
+ The Stream
+
+
+
+ Delegate for System.IO.File.GetLastWriteTime
+
+ The file name
+ The last write time.
+
+
+
+ Delete files from disk.
+
+
+
+
+ When true, errors will be logged as warnings.
+
+
+
+
+ Gets or sets the delay, in milliseconds, between any necessary retries.
+
+
+
+
+ Gets or sets the number of times to attempt to copy, if all previous attempts failed.
+
+
+
+
+ Set question parameter to verify if this is incremental.
+
+
+
+
+
+ Verify that the inputs are correct.
+
+ False on an error, implying that the overall delete operation should be aborted.
+
+
+
+ Stop and return (in an undefined state) as soon as possible.
+
+
+
+
+ Delete the files.
+
+
+
+
+ Log an error.
+
+ The file that wasn't deleted.
+ The exception.
+
+
+
+ Task that simply emits an error. Engine will add project file path and line/column
+ information.
+
+
+
+
+ Error message
+
+
+
+
+ Error code
+
+
+
+
+ Relevant file if any.
+ If none is provided, the file containing the Error
+ task will be used.
+
+
+
+
+ Error help keyword
+
+
+
+
+ A link pointing to more information about the error
+
+
+
+
+ Main task method
+
+
+
+
+
+ This class defines an "Exec" MSBuild task, which simply invokes the specified process with the specified arguments, waits
+ for it to complete, and then returns True if the process completed successfully, and False if an error occurred.
+
+
+
+
+ Default constructor.
+
+
+
+
+ Enable the pipe of the standard out to an item (StandardOutput).
+
+
+ Even thought this is called a pipe, it is in fact a Tee. Use StandardOutputImportance to adjust the visibility of the stdout.
+
+
+
+
+ Users can supply a regular expression that we should
+ use to spot error lines in the tool output. This is
+ useful for tools that produce unusually formatted output
+
+
+
+
+ Users can supply a regular expression that we should
+ use to spot warning lines in the tool output. This is
+ useful for tools that produce unusually formatted output
+
+
+
+
+ Whether to use pick out lines in the output that match
+ the standard error/warning format, and log them as errors/warnings.
+ Defaults to false.
+
+
+
+
+ Property specifying the encoding of the captured task standard output stream
+
+
+
+
+ Property specifying the encoding of the captured task standard error stream
+
+
+
+
+ Project visible property specifying the encoding of the captured task standard output stream
+
+
+
+
+ Project visible property specifying the encoding of the captured task standard error stream
+
+
+
+
+ Returns the output as an Item. Whitespace are trimmed.
+ ConsoleOutput is enabled when ConsoleToMSBuild is true. This avoids holding lines in memory
+ if they aren't used. ConsoleOutput is a combination of stdout and stderr.
+
+
+
+
+ Write out a temporary batch file with the user-specified command in it.
+
+
+
+
+ Executes cmd.exe and waits for it to complete
+
+
+ Overridden to clean up the batch file afterwards.
+
+ Upon completion of the process, returns True if successful, False if not.
+
+
+
+ Allows tool to handle the return code.
+ This method will only be called with non-zero exitCode set to true.
+
+
+ Overridden to make sure we display the command we put in the batch file, not the cmd.exe command
+ used to run the batch file.
+
+
+
+
+ Logs the tool name and the path from where it is being run.
+
+
+ Overridden to avoid logging the path to "cmd.exe", which is not interesting.
+
+
+
+
+ Logs the command to be executed.
+
+
+ Overridden to log the batch file command instead of the cmd.exe command.
+
+
+
+
+
+ Calls a method on the TaskLoggingHelper to parse a single line of text to
+ see if there are any errors or warnings in canonical format.
+
+
+ Overridden to handle any custom regular expressions supplied.
+
+
+
+
+ Returns true if the string is matched by the regular expression.
+ If the regular expression is invalid, logs an error, then clears it out to
+ prevent more errors.
+
+
+
+
+ Validate the task arguments, log any warnings/errors
+
+ true if arguments are corrent enough to continue processing, false otherwise
+
+
+
+ Accessor for ValidateParameters purely for unit-test use
+
+
+
+
+
+ Determining the path to cmd.exe
+
+ path to cmd.exe
+
+
+
+ Gets the working directory to use for the process. Should return null if ToolTask should use the
+ current directory.
+ May throw an IOException if the directory to be used is somehow invalid.
+
+ working directory
+
+
+
+ Accessor for GetWorkingDirectory purely for unit-test use
+
+
+
+
+
+ Adds the arguments for cmd.exe
+
+ command line builder class to add arguments to
+
+
+
+ The name of the tool to execute
+
+
+
+
+ Importance with which to log ordinary messages in the
+ standard error stream.
+
+
+
+
+ Importance with which to log ordinary messages in the
+ standard out stream.
+
+
+ Overridden to increase from the default "Low" up to "High".
+
+
+
+
+ Finds the app.config file, if any, in the provided lists.
+ For compat reasons, it has to follow a particular arbitrary algorithm.
+ It also adds the TargetPath metadata.
+
+
+
+
+ The primary list to search through
+
+
+
+
+ The secondary list to search through
+
+
+
+
+ The value to add as TargetPath metadata
+
+
+
+
+ The first matching item found in the list, if any
+
+
+
+
+ Find the app config
+
+
+
+
+ Examines the item to see if it matches what we are looking for.
+ If it does, returns true.
+
+
+
+
+ Returns the reference assembly paths to the various frameworks
+
+
+
+
+ Regex for breaking up the platform moniker
+ Example: XNA, Version=8.0
+
+
+
+
+ Reference moniker metadata
+
+
+
+
+ SimpleName group
+
+
+
+
+ Version group
+
+
+
+
+ List of Platform monikers for each referenced project
+
+
+
+
+ Target platform version of the current project
+
+
+
+
+ Target platform identifier of the current project
+
+
+
+
+ Invalid references to be unresolved
+
+
+
+
+ Execute the task.
+
+
+
+
+ Take the identity and the version of a platform moniker
+
+
+
+
+ Returns the paths to the various frameworks versions.
+
+
+
+
+ Does nothing: getters do all the work
+
+
+
+
+ Path to the latest framework, whatever version it happens to be
+
+
+
+
+ Path to the v1.1 framework, if available
+
+
+
+
+ Path to the v2.0 framework, if available
+
+
+
+
+ Path to the v3.0 framework, if available
+
+
+
+
+ Path to the v3.5 framework, if available
+
+
+
+
+ Path to the v4.0 framework, if available
+
+
+
+
+ Path to the v4.5 framework, if available
+
+
+
+
+ Path to the v4.5.1 framework, if available
+
+
+
+
+ Path to the v4.5.2 framework, if available
+
+
+
+
+ Path to the v4.6 framework, if available
+
+
+
+
+ Path to the v4.6.1 framework, if available
+
+
+
+
+ Path to the v4.6.2 framework, if available
+
+
+
+
+ Path to the v4.7 framework, if available
+
+
+
+
+ Path to the v4.7.1 framework, if available
+
+
+
+
+ Path to the v4.7.2 framework, if available
+
+
+
+
+ Path to the v4.8 framework, if available
+
+
+
+
+ Returns the reference assembly paths to the various frameworks
+
+
+
+
+ This is the sentinel assembly for .NET FX 3.5 SP1
+ Used to determine if SP1 of 3.5 is installed
+
+
+
+
+ Cache in a static whether or not we have found the 35sp1sentinel assembly.
+
+
+
+
+ Hold the reference assembly paths based on the passed in targetframeworkmoniker.
+
+
+
+
+ Hold the reference assembly paths based on the passed in targetframeworkmoniker without considering any profile passed in.
+
+
+
+
+ Returns the path based on the passed in TargetFrameworkMoniker. If the TargetFrameworkMoniker is null or empty
+ this path will be empty.
+
+
+
+
+ Returns the path based on the passed in TargetFrameworkMoniker without considering the profile part of the moniker. If the TargetFrameworkMoniker is null or empty
+ this path will be empty.
+
+
+
+
+ The target framework moniker to get the reference assembly paths for
+
+
+
+
+ The root path to use to generate the reference assembly path
+
+
+
+
+ By default GetReferenceAssemblyPaths performs simple checks
+ to ensure that certain runtime frameworks are installed depending on the
+ target framework.
+ set BypassFrameworkInstallChecks to true in order to bypass those checks.
+
+
+
+
+ If set to true, the task will not generate an error (or a warning) if the reference assemblies cannot be found.
+ This allows the task to be used to check whether reference assemblies for a framework are available.
+
+
+
+
+ Gets the display name for the targetframeworkmoniker
+
+
+
+
+ Target frameworks are looked up in @RootPath. If it cannot be found
+ there, then paths in @TargetFrameworkFallbackSearchPaths
+ are used for the lookup, in order. This can have multiple paths, separated
+ by ';'
+
+
+
+
+ If the target framework moniker is set, generate the correct Paths.
+
+
+
+
+ Generate the set of chained reference assembly paths
+
+
+
+
+ Generates a hash of a given ItemGroup items. Metadata is not considered in the hash.
+
+
+ Currently uses SHA256. Implementation subject to change between MSBuild versions.
+ This class is not intended as a cryptographic security measure, only uniqueness between build executions
+ - collisions can theoretically be possible in the future (should we move to noncrypto hash) and should be handled gracefully by the caller.
+
+ Usage of cryptographic secure hash brings slight performance penalty, but it is considered acceptable.
+ Would this need to be revised - XxHash64 from System.Io.Hashing could be used instead for better performance.
+ (That however currently requires load of additional binary into VS process which has it's own costs)
+
+
+
+
+ Items from which to generate a hash.
+
+
+
+
+ When true, will generate a case-insensitive hash.
+
+
+
+
+ Hash of the ItemsToHash ItemSpec.
+
+
+
+
+ Execute the task.
+
+
+
+
+ Add bytes to the sha buffer. Once the limit size is reached, sha.TransformBlock is called and the buffer is flushed.
+
+ Hashing algorithm sha.
+ The sha buffer which stores bytes of the strings. Bytes should be added to this buffer.
+ Number of used bytes of the sha buffer.
+ The size of sha buffer.
+ Bytes buffer which contains bytes to be written to sha buffer.
+ Amount of bytes that are to be added to sha buffer.
+ Updated shaBufferPosition.
+
+
+
+ There is no search path element because the only way to get this resolver is by having the SDKName metadata on the reference.
+
+
+
+
+ Resolved SDKs
+
+
+
+
+ Construct.
+
+
+
+
+
+
+
+ Task that emits an error given a resource string. Engine will add project file path and line/column
+ information.
+
+
+
+
+ Resource from which error message is extracted
+
+
+
+
+ Optional arguments to use when formatting the error message
+
+
+
+
+ Error code
+
+
+
+
+ Relevant file if any.
+ If none is provided, the file containing the Error
+ task will be used.
+
+
+
+
+ Error help keyword
+
+
+
+
+ Log the requested error message.
+
+
+
+
+ Extracted class name from the source file.
+
+
+
+
+ Whether or not we found the name inside a block of conditionally compiled code
+
+
+
+
+ Extracted class name
+
+
+
+
+ Read a list of items from a file.
+
+
+
+
+ File to read lines from.
+
+
+
+
+ Receives lines from file.
+
+
+
+
+ Execute the task.
+
+
+
+
+
+ Appends a list of items to a file. One item per line with carriage returns in-between.
+
+
+
+
+ File to write lines to.
+
+
+
+
+ Write each item as a line in the file.
+
+
+
+
+ If true, overwrite any existing file contents.
+
+
+
+
+ Encoding to be used.
+
+
+
+
+ If true, the target file specified, if it exists, will be read first to compare against
+ what the task would have written. If identical, the file is not written to disk and the
+ timestamp will be preserved.
+
+
+
+
+ Question whether this task is incremental.
+
+ When question is true, then error out if WriteOnlyWhenDifferent would have
+ written to the file.
+
+
+
+ Execute the task.
+
+
+
+
+
+ A task that finds an item with the specified itemspec, if present,
+ in the provided list.
+
+
+
+
+ The list to search through
+
+
+
+
+ Whether to match against just the file part of the itemspec,
+ or the whole itemspec (the default)
+
+
+
+
+ The first matching item found in the list, if any
+
+
+
+
+ The itemspec to try to find
+
+
+
+
+ Whether or not to match case sensitively
+
+
+
+
+ Whether or not to return the last match, instead of
+ the first one
+
+
+
+
+ Entry point
+
+
+
+
+ Examines the item to see if it matches what we are looking for.
+ If it does, returns true.
+
+
+
+
+ Formats a url by canonicalizing it (i.e. " " -> "%20") and transforming "localhost" to "machinename".
+
+
+
+
+ Formats a version by combining version and revision.
+
+
+ Case #1: Input: Version=<undefined> Revision=<don't care> Output: OutputVersion="1.0.0.0"
+ Case #2: Input: Version="1.0.0.*" Revision="5" Output: OutputVersion="1.0.0.5"
+ Case #3: Input: Version="1.0.0.0" Revision=<don't care> Output: OutputVersion="1.0.0.0"
+
+
+
+
+ Generates an application manifest for ClickOnce projects.
+
+
+
+
+ Generates a deploy manifest for ClickOnce projects.
+
+
+
+
+ Generates a bootstrapper for ClickOnce deployment projects.
+
+
+
+
+ Base class for all manifest generation tasks.
+
+
+
+
+ This class defines the "GenerateResource" MSBuild task, which enables using resource APIs
+ to transform resource files.
+
+
+ This class defines the "GenerateResource" MSBuild task, which enables using resource APIs
+ to transform resource files.
+
+ See GenerateResource.cs for the source code to the GenerateResource task; this file
+ just contains the nested internal ResGen task
+
+
+
+ Table of aliases for types defined in resx / resw files
+ Ordinal comparer matches ResXResourceReader's use of a HashTable.
+
+
+
+
+ The task items that we remoted across the appdomain boundary
+ we use this list to disconnect the task items once we're done.
+
+
+
+
+ Satellite input assemblies.
+
+
+
+
+ The names of the items to be converted. The extension must be one of the
+ following: .txt, .resx or .resources.
+
+
+
+
+ Indicates whether the resource reader should use the source file's directory to
+ resolve relative file paths.
+
+
+
+
+ Resolves types in ResX files (XML resources) for Strongly Typed Resources
+
+
+
+
+ Indicates whether resources should be passed through in their current serialization
+ format. .NET Core-targeted assemblies should use this; it's the only way to support
+ non-string resources with MSBuild running on .NET Core.
+
+
+
+
+ Additional inputs to the dependency checking done by this task. For example,
+ the project and targets files typically should be inputs, so that if they are updated,
+ all resources are regenerated.
+
+
+
+
+ This is the path/name of the file containing the dependency cache
+
+
+
+
+ The name(s) of the resource file to create. If the user does not specify this
+ attribute, the task will append a .resources extension to each input filename
+ argument and write the file to the directory that contains the input file.
+ Includes any output files that were already up to date, but not any output files
+ that failed to be written due to an error.
+
+
+
+
+ Storage for names of *all files* written to disk. This is part of the implementation
+ for Clean, and contains the OutputResources items and the StateFile item.
+ Includes any output files that were already up to date, but not any output files
+ that failed to be written due to an error.
+
+
+
+
+ Gets or sets the language to use when generating the class source for the strongly typed resource.
+ This parameter must match exactly one of the languages used by the CodeDomProvider.
+
+
+
+
+ Specifies the namespace to use for the generated class source for the
+ strongly typed resource. If left blank, no namespace is used.
+
+
+
+
+ Specifies the resource namespace or manifest prefix to use in the generated
+ class source for the strongly typed resource.
+
+
+
+
+ Specifies the class name for the strongly typed resource class. If left blank, the base
+ name of the resource file is used.
+
+
+
+
+ Specifies the filename for the source file. If left blank, the name of the class is
+ used as the base filename, with the extension dependent on the language.
+
+
+
+
+ Specifies whether the strongly typed class should be created public (with public methods)
+ instead of the default internal. Analogous to resgen.exe's /publicClass switch.
+
+
+
+
+ Whether this rule is generating .resources files or extracting .ResW files from assemblies.
+ Requires some additional input filtering.
+
+
+
+
+ (default = false)
+ When true, a new AppDomain is always created to evaluate the .resx files.
+ When false, a new AppDomain is created only when it looks like a user's
+ assembly is referenced by the .resx.
+
+
+
+
+ Even though the generate resource task will do the processing in process, a logging message is still generated. This logging message
+ will include the path to the windows SDK. Since the targets now will pass in the Windows SDK path we should use this for logging.
+
+
+
+
+ Property to allow multitargeting of ResolveComReferences: If true, tlbimp.exe and
+ aximp.exe from the appropriate target framework will be run out-of-proc to generate
+ the necessary wrapper assemblies.
+
+
+
+
+ Array of equals-separated pairs of environment
+ variables that should be passed to the spawned resgen.exe,
+ in addition to (or selectively overriding) the regular environment block.
+ These aren't currently used when resgen is run in-process.
+
+
+
+
+ That set of paths from which tracked inputs will be ignored during
+ Up to date checking
+
+
+
+
+ Property used to set whether tracked incremental build will be used. If true,
+ incremental build is turned on; otherwise, a rebuild will be forced.
+
+
+
+
+ True if we should be tracking file access patterns - necessary for incremental
+ build support.
+
+
+
+
+ Names of the read tracking logs.
+
+
+
+
+ Names of the write tracking logs.
+
+
+
+
+ Intermediate directory into which the tracking logs from running this task will be placed.
+
+
+
+
+ Microsoft.Build.Utilities.ExecutableType of ResGen.exe. Used to determine whether or not
+ Tracker.exe needs to be used to spawn ResGen.exe. If empty, uses a heuristic to determine
+ a default architecture.
+
+
+
+
+ Path to the appropriate .NET Framework location that contains FileTracker.dll. If set, the user
+ takes responsibility for making sure that the bitness of the FileTracker.dll that they pass matches
+ the bitness of the ResGen.exe that they intend to use. If not set, the task decides the appropriate
+ location based on the current .NET Framework version.
+
+
+ Should only need to be used in partial or full checked in toolset scenarios.
+
+
+
+
+ Path to the appropriate Windows SDK location that contains Tracker.exe. If set, the user takes
+ responsibility for making sure that the bitness of the Tracker.exe that they pass matches the
+ bitness of the ResGen.exe that they intend to use. If not set, the task decides the appropriate
+ location based on the current Windows SDK.
+
+
+ Should only need to be used in partial or full checked in toolset scenarios.
+
+
+
+
+ Where to extract ResW files. (Could be the intermediate directory.)
+
+
+
+
+ Simple public constructor.
+
+
+
+
+ Logs a Resgen.exe command line that indicates what parameters were
+ passed to this task. Since this task is replacing Resgen, and we used
+ to log the Resgen.exe command line, we need to continue logging an
+ equivalent command line.
+
+
+
+
+
+
+ Generate the parts of the resgen command line that are don't involve resgen.exe itself or the
+ resources to be generated.
+
+
+ Expects resGenCommand to be non-null -- otherwise, it doesn't get passed back to the caller, so it's
+ useless anyway.
+
+
+
+
+
+ This is the main entry point for the GenerateResource task.
+
+ true, if task executes successfully
+
+
+
+ For setting OutputResources and ensuring it can be read after the second AppDomain has been unloaded.
+
+ ITaskItems in another AppDomain
+
+
+
+
+ Remember this TaskItem so that we can disconnect it when this Task has finished executing
+ Only if we're passing TaskItems to another AppDomain is this necessary. This call
+ Will make that determination for you.
+
+
+
+
+ Computes the path to ResGen.exe for use in logging and for passing to the
+ nested ResGen task.
+
+ True if the path is found (or it doesn't matter because we're executing in memory), false otherwise
+
+
+
+ Wrapper around the call to the ResGen task that handles setting up the
+ task to run properly.
+
+ Array of names of inputs to be processed
+ Array of output names corresponding to the inputs
+
+
+
+ Given an instance of the ResGen task with everything but the strongly typed
+ resource-related parameters filled out, execute the task and return the result
+
+ Input files to give to resgen.exe.
+ Output files to give to resgen.exe.
+
+
+
+ Given the list of inputs and outputs, returns the number of resources (starting at the provided initial index)
+ that can fit onto the commandline without exceeding MaximumCommandLength.
+
+
+
+
+ Given an instance of the ResGen task with everything but the strongly typed
+ resource-related parameters filled out, execute the task and return the result
+
+ Input files to give to resgen.exe.
+ Output files to give to resgen.exe.
+
+
+
+ Factoring out the setting of the default parameters to the
+ ResGen task.
+
+
+
+
+ Check for parameter errors.
+
+ true if parameters are valid
+
+
+
+ Returns true if everything is up to date and we don't need to do any work.
+
+
+
+
+
+ Given a cached portable library that is up to date, create ITaskItems to represent the output of the task, as if we did real work.
+
+ The portable library cache entry to extract output files and metadata from.
+ List of output files produced from the cache.
+
+
+
+ Checks if this list contain any duplicates. Do this so we don't have any races where we have two
+ threads trying to write to the same file simultaneously.
+
+ A list that may have duplicates
+ Were there duplicates?
+
+
+
+ Determines if the given output file is up to date with respect to the
+ the given input file by comparing timestamps of the two files as well as
+ (if the source is a .resx) the linked files inside the .resx file itself
+
+
+
+
+
+
+
+ Returns true if the output does not exist, if the provided source is newer than the output,
+ or if any of the set of additional inputs is newer than the output. Otherwise, returns false.
+
+
+
+
+ Add the strongly typed resource to the set of resources to process if it is out of date.
+
+
+
+
+ Returns the newest last write time among the references and additional inputs.
+ If any do not exist, returns DateTime.MaxValue so that resource generation produces a nice error.
+
+
+
+
+ Make the decision about whether a separate AppDomain is needed.
+ If this algorithm is unsure about whether a separate AppDomain is
+ needed, it should always err on the side of returning 'true'. This
+ is because a separate AppDomain, while slow to create, is always safe.
+
+
+
+
+
+ Finds the "value" element expected to be the next element read from the supplied reader.
+ Deserializes the data content in order to figure out whether it implies a new app domain
+ should be used to process resources.
+
+
+
+
+ Deserializes a base64 block from a resx in order to figure out if its type is in the GAC.
+ Because we're not providing any assembly resolution callback, deserialization
+ will attempt to load the object's type using fusion rules, which essentially means
+ the GAC. So, if the object is null, it's definitely not in the GAC.
+
+
+
+
+ Chars that should be ignored in the nicely justified block of base64
+
+
+
+
+ Turns the nicely justified block of base64 found in a resx into a byte array.
+ Copied from fx\src\winforms\managed\system\winforms\control.cs
+
+
+
+
+ Make sure that OutputResources has 1 file name for each name in Sources.
+
+
+
+
+ Remove any output resources that we didn't successfully create (due to error) from the
+ OutputResources list. Keeps the ordering of OutputResources the same.
+
+
+ Q: Why didn't we keep a "successfully created" list instead, like in the Copy task does, which
+ would save us doing the removal algorithm below?
+ A: Because we want the ordering of OutputResources to be the same as the ordering passed in.
+ Some items (the up to date ones) would be added to the successful output list first, and the other items
+ are added during processing, so the ordering would change. We could fix that up, but it's better to do
+ the fix up only in the rarer error case. If there were no errors, the algorithm below skips.
+
+
+
+ Record the list of file that will be written to disk.
+
+
+
+
+ Read the state file if able.
+
+
+
+
+ Write the state file if there is one to be written.
+
+
+
+
+ Defines the "ResGen" MSBuild task, which enables using ResGen.exe
+ to generate strongly-typed resource classes and convert resource
+ files from one format to another.
+
+
+
+
+ Files being passed to ResGen.exe to be converted to a different resource format.
+ If a strongly typed resource class is being created, only one file may be
+ passed to InputFiles at a time.
+
+
+
+
+ Should be the same length as InputFiles or null. If null, the files output
+ by ResGen.exe will be named "inputFiles[i].resources". Otherwise, the
+ extensions on the output filesnames indicate which format the corresponding
+ input file will be translated to.
+
+
+
+
+ Specifies whether the strongly typed class should be created public (with public methods)
+ instead of the default internal. Analogous to resgen.exe's /publicClass switch.
+
+
+
+
+ Resolves types in ResX files (XML resources) for Strongly Typed Resources
+
+
+
+
+ Path to the SDK directory where ResGen.exe can be found
+
+
+
+
+ The language to use when generating the class source for the strongly typed resource.
+ This parameter must match exactly one of the languages used by the CodeDomProvider.
+
+
+
+
+ Specifies the namespace to use for the generated class source for the
+ strongly typed resource. If left blank, no namespace is used.
+
+
+
+
+ Specifies the class name for the strongly typed resource class. If left blank, the base
+ name of the resource file is used.
+
+
+
+
+ Specifies the filename for the source file. If left blank, the name of the class is
+ used as the base filename, with the extension dependent on the language.
+
+
+
+
+ Indicates whether the resource reader should use the source file's directory to
+ resolve relative file paths.
+
+
+
+
+ Returns the name of the tool to execute
+
+
+
+
+ Tracker.exe wants Unicode response files, and ResGen.exe doesn't care,
+ so make them Unicode across the board.
+
+
+ We no longer use Tracker.exe in ResGen, but given that as ResGen doesn't care,
+ there doesn't really seem to be a particular reason to change it back, either...
+
+
+
+
+ Invokes the ToolTask with the given parameters
+
+ True if the task succeeded, false otherwise
+
+
+
+ Fills the provided CommandLineBuilderExtension with all the command line options used when
+ executing this tool that can go into a response file.
+
+
+ ResGen 3.5 and earlier doesn't support response files, but ResGen 4.0 and later does.
+
+ Gets filled with command line options
+
+
+
+ Fills the provided CommandLineBuilderExtension with all the command line options used when
+ executing this tool that must go on the command line
+
+
+ Has to be command line commands because ResGen 3.5 and earlier don't know about
+ response files.
+
+ Gets filled with command line options
+
+
+
+ Generates the full path to the tool being executed by this ToolTask
+
+ A string containing the full path of this tool, or null if the tool was not found
+
+
+
+ Validates the parameters passed to the task
+
+ True if parameters are valid
+
+
+
+ Checks a string array for null or length zero. Does not check if
+ individual members are null
+
+ The string array to check
+ True if the array is null or has length zero
+
+
+
+ If OutputFiles is null, we need to generate default output names
+ to pass to resgen.exe (which would generate the names on its own, but
+ then we wouldn't have access to them)
+
+
+
+
+ Generates the full path to ResGen.exe.
+
+ The path to ResGen.exe, or null.
+
+
+
+ Generate the command line to be passed to resgen.exe, sans the path to the tool.
+
+
+
+
+ This class handles the processing of source resource files into compiled resource files.
+ Its designed to be called from a separate AppDomain so that any files locked by ResXResourceReader
+ can be released.
+
+
+
+
+ List of readers used for input.
+
+
+
+
+ Logger for any messages or errors
+
+
+
+
+ Language for the strongly typed resources.
+
+
+
+
+ Filename for the strongly typed resources.
+ Getter provided since the processor may choose a default.
+
+
+
+
+ Namespace for the strongly typed resources.
+
+
+
+
+ ResourceNamespace for the strongly typed resources.
+
+
+
+
+ Class name for the strongly typed resources.
+ Getter provided since the processor may choose a default.
+
+
+
+
+ Whether the fields in the STR class should be public, rather than internal
+
+
+
+
+ Class that gets called by the ResxResourceReader to resolve references
+ to assemblies within the .RESX.
+
+
+
+
+ Handles assembly resolution events.
+
+
+
+
+ The referenced assemblies
+
+
+
+
+ The AssemblyNameExtensions for each of the referenced assemblies in "assemblyFiles".
+ This is populated lazily.
+
+
+
+
+ List of input files to process.
+
+
+
+
+ List of satellite input files to process.
+
+
+
+
+ List of output files to process.
+
+
+
+
+ Whether we are extracting ResW files from an assembly, instead of creating .resources files.
+
+
+
+
+ Where to write extracted ResW files.
+
+
+
+
+ Record all the information about outputs here to avoid future incremental builds.
+
+
+
+
+ List of output files that we failed to create due to an error.
+ See note in RemoveUnsuccessfullyCreatedResourcesFromOutputResources()
+
+
+
+
+ Whether we successfully created the STR class
+
+
+
+
+ Indicates whether the resource reader should use the source file's
+ directory to resolve relative file paths.
+
+
+
+
+ Process all files.
+
+
+
+
+ Callback to resolve assembly names to assemblies.
+
+
+
+
+
+
+
+ Read all resources from a file and write to a new file in the chosen format
+
+ Uses the input and output file extensions to determine their format
+ Input resources file
+ Output resources file or directory
+ True if conversion was successful, otherwise false
+
+
+
+ For very long resource names, the directory structure we generate may be too deep.
+ If so, assume that the name is so long it will already uniquely distinguish itself.
+ However for shorter names we'd still prefer to use the assembly simple name
+ in the path to avoid conflicts.
+
+ The current path name
+ The current file name without a path.
+ Output directory path
+ culture for this resource
+ The current path or a shorter one.
+
+
+
+ Remove a corrupted file, with error handling and a warning if we fail.
+
+ Full path to file to delete
+
+
+
+ Figure out the format of an input resources file from the extension
+
+ Input resources file
+ Resources format
+
+
+
+ Text files are just name/value pairs. ResText is the same format
+ with a unique extension to work around some ambiguities with MSBuild
+ ResX is our existing XML format from V1.
+
+
+
+
+ Reads the resources out of the specified file and populates the
+ resources hashtable.
+
+ Filename to load
+ Whether to resolve paths in the
+ resources file relative to the resources file location
+ Output file or directory.
+
+
+
+ Legacy Core implementation of string-only ResX handling
+
+
+
+
+ Reads resources from an assembly.
+
+
+ Output file or directory.
+ This should not run for Framework assemblies.
+
+
+
+ Checks the consistency of the CultureInfo and NeutralResourcesLanguageAttribute settings.
+
+ Assembly's file name
+ AssemblyName of this assembly
+ Assembly's CultureInfo
+ The actual Assembly
+ Whether this is the main assembly
+
+
+
+ Write resources from the resources ArrayList to the specified output file
+
+ Reader information
+ Output resources file
+
+
+
+ Create a strongly typed resource class
+
+ Reader information
+ Output resource filename, for defaulting the class filename
+ Input resource filename, for error messages
+ The generated strongly typed filename
+
+
+
+ If no strongly typed resource class filename was specified, we come up with a default based on the
+ input file name and the default language extension.
+
+
+ Broken out here so it can be called from GenerateResource class.
+
+ A CodeDomProvider for the language
+ Name of the output resources file
+ Filename for strongly typed resource class
+
+
+
+ Tries to create a CodeDom provider for the specified strongly typed language. If successful, returns true,
+ otherwise returns false.
+
+
+ Broken out here so it can be called from GenerateResource class.
+ Not a true "TryXXX" method, as it still throws if it encounters an exception it doesn't expect.
+
+ Logger helper.
+ The language to create a provider for.
+ The provider in question, if one is successfully created.
+ True if the provider was successfully created, false otherwise.
+
+
+
+ Read resources from an XML or binary format file
+
+ Reader info
+ Appropriate IResourceReader
+ Filename, for error messages
+
+
+
+ Read resources from a text format file
+
+ Reader info
+ Input resources filename
+
+
+
+ Write resources to an XML or binary format resources file.
+
+ Closes writer automatically
+ Reader information
+ Appropriate IResourceWriter
+
+
+
+ Write resources to a text format resources file
+
+ Reader information
+ Output resources file
+
+
+
+ Add a resource from a text file to the internal data structures
+
+ Reader information
+ Resource name
+ Resource value
+ Input file for messages
+ Line number for messages
+ Column number for messages
+
+
+
+ Add a resource from an XML or binary format file to the internal data structures
+
+ Reader information.
+ Resource name.
+ Resource value.
+ Input file for messages.
+
+
+
+ Custom StreamReader that provides detailed position information,
+ used when reading text format resources
+
+
+
+
+ For flow of control and passing sufficient error context back
+ from ReadTextResources
+
+
+
+
+ This implemention of ITypeResolutionService is passed into the ResxResourceReader
+ class, which calls back into the methods on this class in order to resolve types
+ and assemblies that are referenced inside of the .RESX.
+
+
+
+
+ Constructor, initialized with the set of resolved reference paths passed
+ into the GenerateResource task.
+
+
+
+
+
+ Not implemented. Not called by the ResxResourceReader.
+
+
+
+
+
+
+ Not implemented. Not called by the ResxResourceReader.
+
+
+
+
+
+
+
+ Given a path to an assembly, load the assembly if it's not already loaded.
+
+
+
+
+
+
+
+ Not implemented. Not called by the ResxResourceReader.
+
+
+
+
+
+
+ Returns the type with the specified name. Searches for the type in all
+ of the assemblies passed into the References parameter of the GenerateResource
+ task.
+
+
+
+
+
+
+ Returns the type with the specified name. Searches for the type in all
+ of the assemblies passed into the References parameter of the GenerateResource
+ task.
+
+
+
+
+
+
+
+ Returns the type with the specified name. Searches for the type in all
+ of the assemblies passed into the References parameter of the GenerateResource
+ task.
+
+
+
+
+
+
+
+
+ Not implemented. Not called by the ResxResourceReader.
+
+
+
+
+
+
+ Sniffs input files for their assembly identities, and outputs a set of items with the identity information.
+
+
+ Input: Assembly Include="foo.exe"
+ Output: Identity Include="Foo, Version=1.0.0.0", Name="Foo, Version="1.0.0.0"
+
+
+
+
+ Gathers the list of installed SDKS in the registry and on disk and outputs them into the project
+ so they can be used during SDK reference resolution and RAR for single files.
+
+
+
+
+ Metadata name for directory roots on installed SDK items
+
+
+
+
+ Metadata name for extension directory roots on installed SDK items
+
+
+
+
+ Metadata name for SDK Name
+
+
+
+
+ Metadata name for registry roots on installed SDK items
+
+
+
+
+ Key into our build cache
+
+
+
+
+ Target platform version
+
+
+
+
+ Target platform identifier
+
+
+
+
+ Platform version we are targeting
+
+
+
+
+ Platform identifier we are targeting
+
+
+
+
+ Root registry root to look for SDKs
+
+
+
+
+ Root directory on disk to look for SDKs
+
+
+
+
+ Root directories on disk to look for new style extension SDKs
+
+
+
+
+ When set to true, the task will produce a warning if there were no SDKs found.
+
+
+
+
+ Set of items that represent all of the installed SDKs found in the SDKDirectory and SDKRegistry roots.
+ The itemspec is the SDK install location. There is a piece of metadata called SDKName which contains the name of the SDK.
+
+
+
+
+ Get the SDK.
+
+
+
+
+ Resolves an SDKReference to a full path on disk
+
+
+
+
+ Set of resolvedSDK references which we will use to find the reference assemblies.
+
+
+
+
+ Set of resolved reference assemblies. This removes any duplicate ones between sdks.
+
+
+
+
+ Set of resolved reference assemblies. This removes any duplicate ones between sdks.
+
+
+
+
+ Set of reference assembly extensions to look for.
+
+
+
+
+ Dictionary of SDK Identity to the cache file that contains the file information for it.
+
+
+
+
+ Set of exceptions which were thrown while reading or writing to the cache file, this needs to be thread safe since TPL code will add exceptions into this structure at the same time.
+
+
+
+
+ Delegate to get the assembly name
+
+
+
+
+ Get the image runtime version from a file
+
+
+
+
+ File exists delegate
+
+
+
+
+ When false, allow fire-and-forget background work.
+
+
+
+
+ Folder where the cache files are written to
+
+
+
+
+ Path where the cache files should be stored
+
+
+
+
+ Resolved SDK references which we will get the reference assemblies from.
+
+
+
+
+ Extensions which should be considered reference files, we will look for
+ the files in the order they are specified in the array.
+
+
+
+
+ Should the references found as part of resolving the sdk be logged.
+ The default is true
+
+
+
+
+ Should the redist files found as part of resolving the sdk be logged.
+ The default is true
+
+
+
+
+ The targetted SDK identifier.
+
+
+
+
+ The targeted SDK version.
+
+
+
+
+ The targetted platform identifier.
+
+
+
+
+ The targeted platform version.
+
+
+
+
+ Resolved reference items.
+
+
+
+
+ Resolved redist files.
+
+
+
+
+ Files that need to be copied locally, this is the reference assemblies and the xml intellisense files.
+
+
+
+
+ Should conflicts between redist files within an SDK be logged as a message or a warning.
+ The default is to log them as a message.
+
+
+
+
+ Should conflicts between redist files across different referenced SDKs be logged as a message or a warning.
+ The default is to log them as a warning.
+
+
+
+
+ Should conflicts between reference files within an SDK be logged as a message or a warning.
+ The default is to log them as a message.
+
+
+
+
+ Should conflicts between reference files across different referenced SDKs be logged as a message or a warning.
+ The default is to log them as a warning.
+
+
+
+
+ Should we log exceptions which were hit when the cache file is being read and written to
+
+
+
+
+ Execute the task
+
+
+
+
+ Execute the task
+
+
+
+
+ Find the redist files
+
+
+
+
+ Find references for the sdk
+
+
+
+
+ Generate the output groups
+
+
+
+
+ Gather the reference assemblies from the referenceassembly directory.
+
+
+
+
+ Gather the redist files from the redist directory.
+
+
+
+
+ Gather the contents of all of the SDK into a cache file and save it to disk.
+
+
+
+
+ Get the referenced file names from the SDK's manifest if applicable- may return null.
+
+
+
+
+ Class which represents a resolved reference assembly
+
+
+
+
+ Is the reference copy local
+
+
+
+
+ Constructor
+
+
+
+
+ What is the file name
+
+
+
+
+ What is the location of the assembly on disk.
+
+
+
+
+ Is the assembly copy local or not.
+
+
+
+
+ Original resolved SDK reference item passed in.
+
+
+
+
+ Override object equals to use the equals redist in this object.
+
+
+
+
+ Override get hash code
+
+
+
+
+ Are two resolved references items Equal
+
+
+
+
+ Class which represents a resolved redist file
+
+
+
+
+ Constructor
+
+
+
+
+ What is the file name
+
+
+
+
+ What is the targetPath for the redist file.
+
+
+
+
+ What is the root directory of the target path
+
+
+
+
+ Original resolved SDK reference item passed in.
+
+
+
+
+ Override object equals to use the equals redist in this object.
+
+
+
+
+ Override get hash code
+
+
+
+
+ Are two resolved references items Equal
+
+
+
+
+ Methods which are used to save and read the cache files per sdk from and to disk.
+
+
+
+
+ Thread-safe queue which contains exceptions throws during cache file reading and writing.
+
+
+
+
+ Delegate to get the assembly name
+
+
+
+
+ Get the image runtime version from a file
+
+
+
+
+ File exists delegate
+
+
+
+
+ Location for the cache files to be written to
+
+
+
+
+ Constructor
+
+
+
+
+ Load reference assembly information from the cache file
+
+
+
+
+ Save assembly reference information to the cache file
+
+
+
+
+ Get references from the paths provided, and populate the provided cache
+
+
+
+
+ Populate an existing assembly dictionary for the given framework moniker utilizing provided manifest reference information
+
+
+
+
+ Populate an existing assembly dictionary for the given framework moniker
+
+
+
+
+ Populate an existing assembly dictionary for the given framework moniker
+
+
+
+
+ Is the assembly list cache file up to date.
+ This is done by comparing the last write time of the cache file to the last write time of the code.
+ If our code is newer than the last write time of the cache file then there may be some different serialization used so we should say it is out of date and just regenerate it.
+
+
+
+
+ Generate an SDKReferenceInfo object
+
+
+
+
+ Generate cache file name from sdkIdentity, sdkRoot and suffixHash.
+
+
+
+
+ Get all redist subdirectories under the given path
+
+
+
+
+ Get all reference subdirectories under the given path
+
+
+
+
+ Class to contain some identity information about a file in an sdk
+
+ This is a serialization format. Do not change member naming.
+
+
+
+ Structure that contains the on disk representation of the SDK in memory.
+
+
+
+
+ A dictionary which maps a file path to a structure that contain some metadata information about that file.
+
+
+
+
+ Hashset
+
+
+
+
+ This class represents the context information used by the background cache serialization thread.
+
+
+
+
+ Constructor
+
+
+
+
+ Identity of the sdk
+
+
+
+
+ Root path of the sdk
+
+
+
+
+ Assembly metadata information
+
+
+
+
+ Defines an interface for the Vbc/Csc tasks to communicate information about
+ analyzers and rulesets to the IDE.
+
+
+
+
+ Defines an interface for the Csc task to communicate with the IDE. In particular,
+ the Csc task will delegate the actual compilation to the IDE, rather than shelling
+ out to the command-line compilers.
+
+
+
+
+ Defines an interface for the Csc task to communicate with the IDE. In particular,
+ the Csc task will delegate the actual compilation to the IDE, rather than shelling
+ out to the command-line compilers.
+
+
+
+
+ Defines an interface for the Csc task to communicate with the IDE. In particular,
+ the Csc task will delegate the actual compilation to the IDE, rather than shelling
+ out to the command-line compilers.
+
+
+
+
+ Defines an interface for the Csc task to communicate with the IDE. In particular,
+ the Csc task will delegate the actual compilation to the IDE, rather than shelling
+ out to the command-line compilers.
+
+
+
+
+ Defines an interface for the Vbc task to communicate with the IDE. In particular,
+ the Vbc task will delegate the actual compilation to the IDE, rather than shelling
+ out to the command-line compilers.
+
+
+
+
+ Defines an interface for the Vbc task to communicate with the IDE. In particular,
+ the Vbc task will delegate the actual compilation to the IDE, rather than shelling
+ out to the command-line compilers.
+
+
+
+
+ Defines an interface for the Vbc task to communicate with the IDE. In particular,
+ the Vbc task will delegate the actual compilation to the IDE, rather than shelling
+ out to the command-line compilers.
+
+
+
+
+ Defines an interface for the Vbc task to communicate with the IDE. In particular,
+ the Vbc task will delegate the actual compilation to the IDE, rather than shelling
+ out to the command-line compilers.
+
+
+
+
+ Defines an interface that proffers a free threaded host object that
+ allows for background threads to call directly (avoids marshalling
+ to the UI thread.
+
+
+
+
+ Defines a free threaded interface for the Vbc task to communicate with the IDE. In particular,
+ the Vbc task will delegate the actual compilation to the IDE, rather than shelling
+ out to the command-line compilers.
+ This particular version of Compile (unlike the IVbcHostObject::Compile) is not marshalled back to the UI
+ thread. The implementor of the interface is responsible for any marshalling.
+ This was added to allow some of the implementors code to run on the BG thread from which VBC Task is being
+ called from.
+
+
+
+
+ A parameter passed to the task was invalid.
+ Currently used by the RAR task.
+ ArgumentException was not used because it does not have a property for ActualValue.
+ ArgumentOutOfRangeException does, but it appends its own message to yours.
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor
+
+
+
+
+ The name of the parameter.
+
+
+
+
+ The value supplied, that was bad.
+
+
+
+
+ The License Compiler task
+
+
+
+
+ Specifies the items that contain licensed components that need to be included in the .licenses file
+
+
+
+
+ The name of the .licenses file, output only. It's inferred from LicenseTarget and OutputDirectory.
+
+
+
+
+ Specifies the executable for which the .licenses files are being generated
+
+
+
+
+ Output directory for the generated .licenses file
+
+
+
+
+
+ Specifies the referenced components (licensed controls and possibly their dependent assemblies)
+ to load when generating the .license file.
+
+
+
+
+ Suppresses the display of the startup banner
+
+
+
+
+ Targeted version of the framework (i.e. 4.5 or 2.0, etc.)
+
+
+
+
+ The name of the tool to execute
+
+
+
+
+ Validate the task arguments, log any warnings/errors
+
+ true if arguments are corrent enough to continue processing, false otherwise
+
+
+
+ Determing the path to lc.exe
+
+ path to lc.exe, null if not found
+
+
+
+ Generates arguments to be passed to lc.exe
+
+ command line builder class to add arguments to
+
+
+
+ Generates response file with arguments for lc.exe
+ Used when targeting framework version is 4.6 or later
+
+ command line builder class to add arguments to the response file
+
+
+
+ Generates command line arguments for lc.exe
+ Used when targeting framework version is less than 4.6
+
+ command line builder class to add arguments to the command line
+
+
+
+ Given a list of items, determine which are in the cone of the folder passed in and which aren't.
+
+
+
+
+ Filter based on whether items fall under this path or not.
+
+
+
+
+ Files to consider.
+
+
+
+
+ Set to true if the paths of the output items should be updated to be absolute
+
+
+
+
+ Files that were inside of Path.
+
+
+
+
+ Files that were outside of Path.
+
+
+
+
+ Execute the task.
+
+
+
+
+ Given a list of items, remove duplicate items. Attributes are not considered. Case insensitive.
+
+
+
+
+ The left-hand set of items to be RemoveDuplicatesed from.
+
+
+
+
+ List of unique items.
+
+
+
+
+ True if any duplicate items were found. False otherwise.
+
+
+
+
+ Execute the task.
+
+
+
+
+
+ Starts a new Restart Manager session.
+ A maximum of 64 Restart Manager sessions per user session
+ can be open on the system at the same time. When this
+ function starts a session, it returns a session handle
+ and session key that can be used in subsequent calls to
+ the Restart Manager API.
+
+
+ A pointer to the handle of a Restart Manager session.
+ The session handle can be passed in subsequent calls
+ to the Restart Manager API.
+
+
+ Reserved. This parameter should be 0.
+
+
+ A null-terminated string that contains the session key
+ to the new session. The string must be allocated before
+ calling the RmStartSession function.
+
+ System error codes that are defined in Winerror.h.
+
+ The RmStartSession function doesn’t properly null-terminate
+ the session key, even though the function is documented as
+ returning a null-terminated string. To work around this bug,
+ we pre-fill the buffer with null characters so that whatever
+ ends gets written will have a null terminator (namely, one of
+ the null characters we placed ahead of time).
+
+ see .
+
+
+
+
+
+ Ends the Restart Manager session.
+ This function should be called by the primary installer that
+ has previously started the session by calling the
+ function. The RmEndSession function can be called by a secondary installer
+ that is joined to the session once no more resources need to be registered
+ by the secondary installer.
+
+ A handle to an existing Restart Manager session.
+
+ The function can return one of the system error codes that are defined in Winerror.h.
+
+
+
+
+ Try to get a message to inform the user which processes have a lock on a given file.
+
+
+
+
+ A task that creates a directory
+
+
+
+
+ Executes the MakeDir task. Create the directory.
+
+
+
+
+ Task that simply emits a message. Importance defaults to high if not specified.
+
+
+
+
+ Text to log.
+
+
+
+
+ Importance: high, normal, low (default normal)
+
+
+
+
+ Message code
+
+
+
+
+ Relevant file if any.
+ If none is provided and this is a critical message, the file containing the Message
+ task will be used.
+
+
+
+
+ Message help keyword
+
+
+
+
+ Indicates if this is a critical message
+
+
+
+
+ Task to move one or more files.
+
+
+ This does not support moving directories (ie, xcopy)
+ but this could restriction could be lifted as MoveFileEx,
+ which is used here, supports it.
+
+
+
+
+ Flags for MoveFileEx.
+
+
+
+
+
+ Whether we should cancel.
+
+
+
+
+ List of files to move.
+
+
+
+
+ Destination folder for all the source files.
+
+
+
+
+ Whether to overwrite files in the destination
+ that have the read-only attribute set.
+ Default is to not overwrite.
+
+
+
+
+ Destination files matching each of the source files.
+
+
+
+
+ Subset that were successfully moved.
+
+
+
+
+ Set question parameter for Move task.
+
+ Move can be chained A->B->C with location C as the final location.
+ Incrementally, it is hard to question A->B if both files are gone.
+ In short, question will always return false and author should use target inputs/outputs.
+
+
+
+ Stop and return (in an undefined state) as soon as possible.
+
+
+
+
+ Main entry point.
+
+
+
+
+ Makes the provided file writeable if necessary.
+
+
+
+
+ Move one file from source to destination. Create the target directory if necessary.
+
+ IO related exceptions.
+
+
+
+ This class implements the "MSBuild" task, which hands off child project files to the MSBuild engine to be built.
+ Marked RunInMTA because there is no reason MSBuild tasks should run on a thread other than that of the
+ RequestBuilder which spawned them.
+
+
+
+
+ Enum describing the behavior when a project doesn't exist on disk.
+
+
+
+
+ Default when unset by user.
+
+
+
+
+ Skip the project if there is no file on disk.
+
+
+
+
+ Error if the project does not exist on disk.
+
+
+
+
+ Build even if the project does not exist on disk.
+
+
+
+
+ A list of property name/value pairs to apply as global properties to
+ the child project.
+ A typical input: "propname1=propvalue1", "propname2=propvalue2", "propname3=propvalue3".
+
+
+ `
+ The engine fails on this because it doesn't like item lists being concatenated with string
+ constants when the data is being passed into an array parameter. So the workaround is to
+ write this in the project file:
+ ``
+ ]]>
+
+
+
+
+
+ Gets or sets the set of global properties to remove.
+
+
+
+
+ The targets to build in each project specified by the property.
+
+ Array of target names.
+
+
+
+ The projects to build.
+
+ Array of project items.
+
+
+
+ Outputs of the targets built in each project.
+
+ Array of output items.
+
+
+
+ Indicates if the paths of target output items should be rebased relative to the calling project.
+
+ true, if target output item paths should be rebased
+
+
+
+ Forces the task to stop building the remaining projects as soon as any of
+ them fail.
+
+
+
+
+ When this is true, instead of calling the engine once to build all the targets (for each project),
+ we would call the engine once per target (for each project). The benefit of this is that
+ if one target fails, you can still continue with the remaining targets.
+
+
+
+
+ Value of ToolsVersion to use when building projects passed to this task.
+
+
+
+
+ When this is true we call the engine with all the projects at once instead of
+ calling the engine once per project
+
+
+
+
+ If true the project will be unloaded once the operation is completed
+
+
+
+
+ Deprecated. Does nothing.
+
+
+
+
+ When this is true, project files that do not exist on the disk will be skipped. By default,
+ such projects will cause an error.
+
+
+
+
+ Unescape Targets, Properties (including Properties and AdditionalProperties as Project item metadata)
+ will be un-escaped before processing. e.g. %3B (an escaped ';') in the string for any of them will
+ be treated as if it were an un-escaped ';'
+
+
+
+
+ Instructs the MSBuild engine to build one or more project files whose locations are specified by the
+ property.
+
+ true if all projects build successfully; false if any project fails
+
+
+
+ Build projects which have not been skipped. This will be done in parallel
+
+
+
+
+ Expand and re-construct arrays of all targets and properties
+
+
+
+ True if the operation was successful
+
+
+
+ The original ITypeInfo interface in the CLR has incorrect definitions for GetRefTypeOfImplType and GetRefTypeInfo.
+ It uses ints for marshalling handles which will result in a crash on 64 bit systems. This is a temporary interface
+ for use until the one in the CLR is fixed. When it is we can go back to using ITypeInfo.
+
+
+
+
+ Interop methods.
+
+
+
+
+ Add implementation of this function when not running on windows. The implementation is
+ not complete, of course, but should work for most common cases.
+
+
+
+
+
+
+
+
+ GetCachePath from fusion.dll.
+ A common design pattern in unmanaged C++ is calling a function twice, once to determine the length of the string
+ and then again to pass the client-allocated character buffer.
+
+ Value that indicates the source of the cached assembly.
+ The returned pointer to the path.
+ The requested maximum length of CachePath, and upon return, the actual length of CachePath.
+
+
+
+
+ Get the runtime version for a given file.
+
+ The path of the file to be examined.
+ The buffer allocated for the version information that is returned.
+ The size, in wide characters, of szBuffer.
+ The size, in bytes, of the returned szBuffer.
+ HResult.
+
+
+
+ Given a pointer to a metadata blob, read the string parameter from it. Returns true if
+ a valid string was constructed and false otherwise.
+
+ Adapted from bizapps\server\designers\models\packagemodel\nativemethods.cs (TryReadStringArgument) and
+ the original ARD implementation in vsproject\compsvcspkg\enumcomplus.cpp (GetStringCustomAttribute)
+ This code was taken from the vsproject\ReferenceManager\Providers\NativeMethods.cs
+
+
+
+
+ Returns the number of bytes that compressed data -- the length of the uncompressed
+ data -- takes up, and has an out value of the length of the string.
+
+ Decompression algorithm stolen from ndp\clr\src\toolbox\mdbg\corapi\metadata\cormetadata.cs, which
+ was translated from the base implementation in ndp\clr\src\inc\cor.h
+ This code was taken from the vsproject\ReferenceManager\Providers\NativeMethods.cs
+
+ Pointer to the beginning of the data block
+ Length of the uncompressed data block
+
+
+
+ This class is a wrapper over the native GAC enumeration API.
+
+
+
+
+ Path to the gac
+
+
+
+
+ Regex for directory version parsing
+
+
+
+
+ The IAssemblyEnum interface which allows us to ask for the next assembly from the GAC enumeration.
+
+
+
+
+ For non-Windows implementation, we need assembly name
+
+
+
+
+ For non-Windows implementation, we need assembly name
+
+
+
+
+ Are we done going through the enumeration.
+
+
+
+
+ Initialize the GAC Enum
+
+
+
+
+
+ State used by the c# and vb parsers. Maintains information about
+ what's being parsed and what has been seen so far.
+
+
+
+
+ Are we resolving a namespace?
+
+
+
+
+ Are we resolving a class?
+
+
+
+
+ Are we inside a conditional directive?
+
+
+
+
+ The current namespace name as its being resolved.
+
+
+
+
+ Reset the state, but don't throw away namespace stack information.
+
+
+
+
+ Note that we've entered a conditional directive
+
+
+
+
+ Note that we've exited a conditional directive
+
+
+
+
+ Push a namespace element onto the stack. May be null.
+
+
+
+
+ Pop a namespace element from the stack. May be null.
+
+
+
+
+ Build a fully qualified (i.e. with the namespace) class name based on the contents of the stack.
+
+
+
+
+ Defines list of redistributable assemblies for use in dependency analysis.
+ The input is a set of XML files in a well known format consisting of
+ File elements. Each File element defines the assembly name of an assembly
+ that is part of a redistributable unit, such as the .NET Framework
+ (i.e. dotnetfx.exe) or the J# Framework. For the .NET Framework, these
+ data files are specified in a sub-folder of the .NET Framework named
+ "RedistList". This list is used by the build system to unify previous
+ Framework version dependencies to the current Framework version.
+ This list is also used by the deployment system to exclude Framework
+ dependencies from customer deployment packages.
+
+
+
+
+ When we check to see if an assembly is in this redist list we want to cache it so that if we ask again we do not
+ have to re-scan bits of the redist list and do the assemblynameExtension comparisons.
+
+
+
+
+ AssemblyName to unified assemblyName. We make this kind of call a lot and also will ask for the same name multiple times.
+
+
+
+
+ AssemblyName to AssemblyNameExtension object. We make this kind of call a lot and also will ask for the same name multiple times.
+
+
+
+
+ When we check to see if an assembly is remapped we should cache the result because we may get asked the same question a number of times.
+ Since the remapping list does not change between builds neither would the results of the remapping for a given fusion name.
+
+
+
+
+ Returns any exceptions encountered while reading\parsing the XML.
+
+
+
+
+ Returns any exceptions encountered while reading\parsing the XML.
+
+
+
+
+ Returns the number of entries in the redist list
+
+
+
+
+ Determines whether or not the specified assembly is part of the Framework.
+ Assemblies from a previous version of the Framework will be
+ correctly identified.
+
+
+
+
+ Determines whether or not the specified assembly is a Prerequisite assembly.
+ A prerequisite assembly is any assembly that is flagged as being installed in the GAC
+ in a redist data file.
+
+
+
+
+ If there was a remapping entry in the redist list then remap the passed in assemblynameextension
+ if not just return the original one.
+
+
+
+
+ Determines whether or not the specified assembly is a redist root.
+
+
+
+
+ Returns an instance of RedistList initialized from the framework folder for v2.0
+ This function returns a statically cached object, so all calls will return the
+ same instance.
+
+
+
+
+ Returns an instance of RedistList initialized from the framework folder for v3.0
+ This function returns a statically cached object, so all calls will return the
+ same instance.
+
+
+
+
+ Returns an instance of RedistList initialized from the framework folder for v3.5
+ This function returns a statically cached object, so all calls will return the
+ same instance.
+
+
+
+
+ This is owned by chris mann
+
+
+
+
+ Given a framework directory path, this static method will find matching
+ redist list files underneath that path. A process-wide cache is used to
+ avoid hitting the disk multiple times for the same framework directory.
+
+ Array of paths to redist lists under given framework directory.
+
+
+
+ The name of this redist.
+
+
+
+
+ Returns an instance of RedistList initialized from the specified set of files.
+ This function returns a statically cached object, so subsequent calls with the same set
+ of files will return the same instance.
+
+
+
+
+ Given an assemblyNameExtension, is that assembly name in the redist list or not. This will use partial matching and match as much of the fusion name as exists in the assemblyName passed in.
+
+
+
+
+ Returns the unified version of the specified assembly.
+ Assemblies from a previous version of the Framework will be
+ returned with the current runtime version.
+
+
+
+
+ Find every assembly full name that matches the given simple name.
+
+ The list of assembly names.
+
+
+
+ This method will take a list of AssemblyTableInfo and generate a deny list by subtracting the
+ assemblies listed in the AllowList from the RedistList.
+
+ 1) If there are assemblies in the redist list and one or more client subset files are read in with matching names then
+ the subtraction will take place. If there were no matching redist lists read in the deny list will be empty.
+
+ 2) If the subset has a matching name but there are no files inside of it then the deny list will contain ALL files in the redist list.
+
+ 3) If the redist list assembly has a null or empty redist name or the subset list has a null or empty subset name they will not be used for deny list generation.
+
+ When generating the denylist, we will first see if the deny list is in the appdomain wide cache
+ so that we do not regenerate one for multiple calls using the same allowListAssemblyTableInfo.
+
+
+ List of paths to allow list xml files
+ List of allow listed errors
+ List of allow listed error file names
+ A dictionary containing the full assembly names of deny listed assemblies as the key, and null as the value.
+ If there is no assemblies in the redist list null is returned.
+
+
+
+
+ Read the redist list from disk.
+ XML formatting issues will recorded in the 'errors' collection.
+
+ Information about the redistlist file.
+ List of assembly from installed assembly table.
+ Error list.
+ Error filename list.
+ Assembly remaping.
+ Redist name of the redist list just read in
+
+
+
+ Parse the remapping xml element in the redist list
+
+
+
+
+ Parse the FileList section in the redist list.
+
+
+
+
+ Parse an individual FileListEntry in the redist list
+
+
+
+
+ The redist list is a collection of AssemblyEntry. We would like to have the redist list sorted on two keys.
+ The first key is simple name, the simple names should be sorted alphabetically in ascending order (a,b,c,d,e).
+ When the simple names are the same the sorting shouldbe done by version number rather than the alphabetical representation of the version.
+ A numerical comparison is required because the alphabetical sort does not place the versions in numerical order. For example 1, 10, 2, 3, 4
+ This sort should be done descending ( 10,9,8,7,6,5) so that if the resdist list is read from top to bottom the newest version is seen first.
+
+
+
+
+ Internal class representing a redist list or allowlist and its corresponding framework directory.
+
+
+
+
+ Provide a mechanism to determine where the subset allow lists are located by searching the target framework folders
+ for a list of provided subset list names.
+
+
+
+
+ The subset names to search for.
+
+
+
+
+ This class takes in a list of subset names to look for and provides a method to search the target framework directories to see if those
+ files exist.
+
+ String array of subset names, ie Client, Net, MySubset. This may be null or empty if no subsets were requested to be
+ found in the target framework directories. This can happen if the subsets are instead passed in as InstalledDefaultSubsetTables
+
+
+
+ Folder to look for the subset lists under the target framework directories
+
+
+
+
+ Given a framework directory path, this method will find matching
+ subset list files underneath that path. An appdomain-wide cache is used to
+ avoid hitting the disk multiple times for the same framework directory and set of requested subset names.
+
+ Framework directory to look for set of subset files under
+ Array of paths locations to subset lists under the given framework directory.
+
+
+
+ Describes an assembly entry found in an installed assembly table.
+
+
+
+
+ Remove the specified directories.
+
+
+
+
+ This class is a caching mechanism for the resgen task to keep track of linked
+ files within processed .resx files.
+
+
+
+
+ The list of resx files.
+
+
+
+
+ A list of portable libraries and the ResW files they can produce.
+
+
+
+
+ A newly-created ResGenDependencies is not dirty.
+ What would be the point in saving the default?
+
+
+
+
+ This is the directory that will be used for resolution of files linked within a .resx.
+ If this is NULL then we use the directory in which the .resx is in (that should always
+ be the default!)
+
+
+
+
+ Writes the contents of this object out to the specified file.
+
+
+
+
+ Reads the .cache file from disk into a ResGenDependencies object.
+
+
+
+
+ Represents a single .resx file in the dependency cache.
+
+
+
+
+ Given a .RESX file, returns all the linked files that are referenced within that .RESX.
+
+ May be thrown if Resx is invalid. May contain XmlException.
+ May be thrown if Resx is invalid
+
+
+
+ Represents a single assembly in the dependency cache, which may produce
+ 0 to many ResW files.
+
+ Must be serializable because instances may be marshaled cross-AppDomain, see .
+
+
+
+
+ Whether this cache is dirty or not.
+
+
+
+
+ Determines which file, if any, to be used as the code analysis rule set based
+ on the supplied code analysis properties.
+
+
+
+
+ The desired code analysis rule set file. May be a simple name, relative
+ path, or full path.
+
+
+
+
+ The set of additional directories to search for code analysis rule set files.
+
+
+
+
+ The location of the project currently being built.
+
+
+
+
+ The location of the resolved rule set file. May be null if the file
+ does not exist on disk.
+
+
+
+
+ Runs the task.
+
+ True if the task succeeds without errors; false otherwise.
+
+
+
+ Computes the resolved rule set path.
+
+ There are four cases: null, file name, relative path, and full path.
+
+ If we were given no value for the ruleset, simply return null.
+
+ For full path we return the string as it is.
+
+ A simple file name can refer to either a file in the MSBuild project directory
+ or a file in the rule set search paths. In the former case we return the string as-is.
+ In the latter case, we create a full path by prepending the first rule set search path
+ where the file is found.
+
+ For relative paths we return the string as-is.
+
+ In all cases, we return null if the file does not actual exist.
+
+ The full or relative path to the rule set, or null if the file does not exist.
+
+
+
+ Determine the strong name key source
+
+
+
+
+ This task resolves items in the build process (built, dependencies, satellites,
+ content, debug symbols, documentation, etc.) to files for manifest generation.
+
+
+ This task executes following steps:
+ (1) Filter out Framework assemblies
+ (2) Filter out non-existent files
+ (3) Build list of Dependencies from built items with CopyLocal=True
+ (4) Build list of Prerequisites from built items with CopyLocal=False
+ (5) Build list of Satellites from built items based on TargetCulture
+ (6) Build list of Files from Files and ExtraFiles inputs, using next step
+ (7) For each PublishFile item...
+ If item is on Dependencies list then move it to Prerequisites list
+ If item is on Content list then add it to File list unless it is excluded
+ If item is on Extra list then add it to File list only if it is included
+ Apply Group and Optional attributes from PublishFile items to built items
+ (8) Insure all output items have a TargetPath, and if in a Group that IsOptional is set
+
+
+
+
+ This task determines the output files for non-MSBuild project references. We look inside
+ a special property set by the VS IDE for the list of project guids and their associated outputs.
+ While there's nothing that would prevent resolution of MSBuild projects in this task, the IDE
+ only pre-resolves non-MSBuild projects so that we can separate MSBuild project references from
+ non-MSBuild ones and return the list of MSBuild projects as UnresolvedProjectReferences.
+ Then we can use more powerful MSBuild mechanisms to manipulate just the MSBuild project
+ references (i.e. calling into specific targets of references to get the manifest file name)
+ which would not be possible with a mixed list of MSBuild and non-MSBuild references.
+
+
+
+
+ default public constructor
+
+
+
+
+ A special XML string containing resolved project outputs - we need to simply match the projects and
+ return the appropriate paths
+
+
+
+
+ The list of resolved reference paths (preserving the original project reference attributes)
+
+
+
+
+ The list of project reference items that could not be resolved using the pre-resolved list of outputs.
+ Since VS only pre-resolves non-MSBuild projects, this means that project references in this list
+ are in the MSBuild format.
+
+
+
+
+ A delegate with a signature that matches AssemblyName.GetAssemblyName.
+
+
+
+
+ A dependency-injection way of getting an assembly name.
+
+
+
+
+ Main task method
+
+
+
+
+ Given a project reference task item and an XML document containing pre-resolved output paths,
+ find the output path for that task item.
+
+ project reference to resolve
+ resulting ITaskItem containing the resolved path
+ true if resolved successfully
+
+
+
+ Base class for ResolveNonMSBuildProjectOutput and AssignProjectConfiguration, since they have
+ similar architecture
+
+
+
+
+ The list of project references
+
+
+
+
+ Checks if a project reference task item contains all the required attributes.
+ Currently, the only required attribute is project GUID for inside the IDE mode.
+
+
+
+
+ Checks all project reference task items for required attributes
+ Internal for unit testing
+
+
+
+
+ Pre-cache individual project elements from the XML string in a hashtable for quicker access.
+
+
+
+
+ Helper method for retrieving whatever was stored in the XML string for the given project
+
+
+
+
+ Helper method for retrieving the XML element for the given project
+
+
+
+
+ Helper method for retrieving the extra "project references" passed in the solution blob.
+ These came from dependencies expressed in the solution file itself.
+
+
+
+
+ Resolves an SDKReference to a full path on disk
+
+
+
+
+ Platform aliases
+
+
+
+
+ Regex for breaking up the sdk reference include into pieces.
+ Example: XNA, Version=8.0
+
+
+
+
+ SimpleName group
+
+
+
+
+ Version group
+
+
+
+
+ Delimiter used to delimit the dependent sdk's in the warning message
+
+
+
+
+ Split char for the appx attribute
+
+
+
+
+ SDKName
+
+
+
+
+ PlatformVersion
+
+
+
+
+ Default target platform version
+
+
+
+
+ Set of sdk references to resolve to paths on disk.
+
+
+
+
+ The list of installed SDKs the location of the SDK, the SDKName metadata is the SDKName.
+
+
+
+
+ stores value of TargetPlatformVersion property
+
+
+
+
+ Stores TargetPlatform property
+
+
+
+
+ Stores ProjectName property
+
+
+
+
+ Stores dictionary with runtime only reference dependencies
+
+
+
+
+ Set of SDK References to resolve to paths on disk
+
+
+
+
+ The list of installed SDKs the location of the SDK, the SDKName metadata is the SDKName.
+
+
+
+
+ TargetPlatform used in warning/error messages
+
+
+
+
+ ProjectName used in warning/error messages
+
+
+
+
+ TargetPlatformVersion property used to filter SDKs
+
+
+
+
+ Reference may be passed in so their SDKNames can be resolved and then sdkroot paths can be tacked onto the reference
+ so RAR can find the assembly correctly in the sdk location.
+
+
+
+
+ List of disallowed dependencies passed from the targets file (deprecated)
+ For instance "VCLibs 11" should be disallowed in projects targeting Win 8.1 or higher.
+
+
+
+
+ List of dependencies passed from the targets file that will have the metadata RuntimeReferenceOnly set as true.
+ For instance "VCLibs 11" should have such a metadata set to true in projects targeting Win 8.1 or higher.
+
+
+
+
+ Configuration for SDK's which are resolved
+
+
+
+
+ Architecture of the SDK's we are targeting
+
+
+
+
+ Enables warning when MaxPlatformVersion is not present in the manifest and the ESDK platform version (from its path)
+ is different than the target platform version (from the project)
+
+
+
+
+ Should problems resolving SDKs be logged as a warning or an error.
+ If the resolution problem is logged as an error the build will fail.
+ If the resolution problem is logged as a warning we will warn and continue.
+
+
+
+
+ The prefer32bit flag used during the build
+
+
+
+
+ Resolved SDK References
+
+
+
+
+ Version object containing target platform version
+
+
+
+
+ Execute the task.
+
+
+
+
+ Add metadata to a specified subset of reference items
+
+
+
+
+ Verify the dependencies SDKs have for each other
+
+
+
+
+ Get a set of unresolved SDK identities
+
+
+
+
+ Parse out the sdk identities
+
+
+
+
+ Parse the item include of the SDKReference item into its simple name and version parts.
+
+
+
+
+ Take the identity of an sdk and use a regex to parse out the version and simple name
+
+
+
+
+ Log where we searched ect, for sdk references and if we found them or not.
+
+
+
+
+ Log an error or warning depending on the LogErrorsAsWarnigns propertry.
+
+
+
+
+ This class holds the sdk reference task item and the split versions of the simple name and version.
+
+
+
+
+ Delimiter for supported architectures
+
+
+
+
+ Delimiter used to delimit the supported architectures in the error message
+
+
+
+
+ Neutral architecture name
+
+
+
+
+ Neutral architecture name
+
+
+
+
+ ANY CPU architecture name
+
+
+
+
+ TargetedSDKArchitecture metadata name
+
+
+
+
+ TargetedSDKConfiguration metadata name
+
+
+
+
+ Retail config name
+
+
+
+
+ Debug config name
+
+
+
+
+ Path to the sdk manifest file
+
+
+
+
+ SDKManifest object encapsulating all the information contained in the manifest xml file
+
+
+
+
+ What should happen if this sdk is resolved with other sdks of the same productfamily or same sdk name.
+
+
+
+
+ Value of the prefer32Bit property from the project.
+
+
+
+
+ Constructor
+
+
+
+
+ Sdk reference item passed in from the build
+
+
+
+
+ Parsed simple name
+
+
+
+
+ Parsed version.
+
+
+
+
+ Resolved full path to the root of the sdk.
+
+
+
+
+ Has the reference been resolved
+
+
+
+
+ Messages which may be warnings or errors depending on the logging setting.
+
+
+
+
+ Warning messages only
+
+
+
+
+ Messages generated during resolution
+
+
+
+
+ SDKName, this is a formatted name based on the SimpleName and the Version
+
+
+
+
+ Resolved item which will be output by the task.
+
+
+
+
+ SDKType found in the sdk manifest
+
+
+
+
+ The target platform in the sdk manifest
+
+
+
+
+ The target platform min version in the sdk manifest
+
+
+
+
+ The target platform max version in the sdk manifest
+
+
+
+
+ DisplayName found in the sdk manifest
+
+
+
+
+ Support Prefer32bit found in the sdk manifest
+
+
+
+
+ CopyRedistToSubDirectory specifies where the redist files should be copied to relative to the root of the package.
+
+
+
+
+ ProductFamilyName specifies the product family for the SDK. This is offered up as metadata on the resolved sdkreference and is used to detect sdk conflicts.
+
+
+
+
+ SupportsMultipleVersions specifies what should happen if multiple versions of the product family or sdk name are detected
+
+
+
+
+ Supported Architectures is a semicolon delimited list of architectures that the SDK supports.
+
+
+
+
+ DependsOnSDK is a semicolon delimited list of SDK identities that the SDK requires be resolved in order to function.
+
+
+
+
+ MaxPlatformVersion as in the manifest
+
+
+
+
+ MinOSVersion as in the manifest
+
+
+
+
+ MaxOSVersionTested as in the manifest
+
+
+
+
+ MoreInfo as in the manifest
+
+
+
+
+ What ever framework identities we found in the manifest.
+
+
+
+
+ The frameworkIdentity for the sdk, this may be a single name or a | delimited name
+
+
+
+
+ PlatformIdentity if it exists in the appx manifest for this sdk.
+
+
+
+
+ Whatever appx locations we found in the manifest
+
+
+
+
+ The appxlocation for the sdk can be a single name or a | delimited list
+
+
+
+
+ Set the location where the reference was resolved.
+
+
+
+
+ Override object equals to use the equals implementation in this object.
+
+
+
+
+ Override get hash code
+
+
+
+
+ Are two SDKReference items Equal
+
+
+
+
+ Add a resolution error or warning to the reference
+
+
+
+
+ Add a resolution warning to the reference
+
+
+
+
+ Get a piece of metadata off an item and make sureit is trimmed
+
+
+
+
+ After resolving a reference we need to check to see if there is a SDKManifest file in the root directory and if there is we need to extract the frameworkidentity.
+ We ignore other attributes to leave room for expansion of the file format.
+
+
+
+
+
+ Parse the multipleversions string and set supportsMultipleVersions if it can be parsed correctly.
+
+
+
+
+ Create a resolved output item which contains the path to the SDK and the associated metadata about it.
+
+
+
+
+ Check to see if an FrameworkIdentity is in the list of framework identities found in the SDKManifest.
+
+
+
+
+ Keep track of messages which are status information about resolving this reference. We want to print it out in a nicer format at the end of resolution.
+
+
+
+
+ This task determines if this project requires VS2008 SP1 assembly.
+
+
+
+
+ Is this file's IncludeHash set to false?
+ Is this file System.Data.Entity.dll?
+ Is this file Client Sentinel Assembly?
+
+
+
+
+ A set of default namespaces to add so that user does not have to include them. Make sure that these are covered
+ by the list of .
+
+
+
+
+ A set of default references to add so that the user does not have to include them.
+
+
+
+
+ The name of a subdirectory that contains reference assemblies.
+
+
+
+
+ A cache of objects and their corresponding compiled assembly. This cache ensures that two of the exact same code task
+ declarations are not compiled multiple times.
+
+
+
+
+ Stores the path to the directory that this assembly is located in.
+
+
+
+
+ Stores an instance of a for logging messages.
+
+
+
+
+ Stores functions that were added to the current app domain. Should be removed once we're finished.
+
+
+
+
+ Stores the parameters parsed in the <UsingTask />.
+
+
+
+
+ Stores the task name parsed in the <UsingTask />.
+
+
+
+
+
+
+
+ Gets the of the compiled task.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the full source code by applying an appropriate template based on the current .
+
+
+
+
+ Parses and validates the body of the <UsingTask />.
+
+ A used to log events during parsing.
+ The name of the task.
+ The raw inner XML string of the <UsingTask />> to parse and validate.
+ An containing parameters for the task.
+ A object that receives the details of the parsed task.
+ true if the task body was successfully parsed, otherwise false.
+
+ The will look like this:
+
+
+
+
+ // Source code
+
+
+ ]]>
+
+
+
+
+
+ Attempts to resolve assembly references that were specified by the user.
+
+ A used for logging.
+ A object containing details about the task.
+ Receives the list of full paths to resolved assemblies.
+ true if all assemblies could be resolved, otherwise false.
+ The user can specify a short name like My.Assembly or My.Assembly.dll. In this case we'll
+ attempt to look it up in the directory containing our reference assemblies. They can also specify a
+ full path and we'll do no resolution. At this time, these are the only two resolution mechanisms.
+ Perhaps in the future this could be more powerful by using NuGet to resolve assemblies but we think
+ that is too complicated for a simple in-line task. If users have more complex requirements, they
+ can compile their own task library.
+
+
+
+ Attempts to compile the current source code and load the assembly into memory.
+
+ An to use give to the compiler task so that messages can be logged.
+ A object containing details about the task.
+ The if the source code be compiled and loaded, otherwise null.
+ true if the source code could be compiled and loaded, otherwise null.
+
+
+
+ Represents the kind of code contained in the code task definition.
+
+
+
+
+ The code is a fragment and should be included within a method.
+
+
+
+
+ The code is a method and should be included within a class.
+
+
+
+
+ The code is a whole class and no modifications should be made to it.
+
+
+
+
+ Gets or sets the code language of the task.
+
+
+
+
+ Gets or sets the of the task.
+
+
+
+
+ Gets or sets the name of the task.
+
+
+
+
+ Gets a of namespaces to use.
+
+
+
+
+ Gets an of assembly references.
+
+
+
+
+ Gets or sets the source code of the assembly.
+
+
+
+
+
+
+
+ This class will provide the ability for classes given an SdkToolsPath and their tool name to find that tool.
+ The tool will be looked for either under the SDKToolPath passed into the task or as fallback to look for the toolname using the toolslocation helper.
+
+
+
+
+ Cache the file exists delegate which will determine if a file exists or not but will not eat the CAS exceptions.
+
+
+
+
+ Provide a delegate which will do the correct file exists.
+
+
+
+
+ This method will take a sdkToolsPath and a toolName and return the path to the tool if it is found and exists.
+
+ First the method will try and find the tool under the sdkToolsPath taking into account the current processor architecture
+ If the tool could not be found the method will try and find the tool under the sdkToolsPath (which should point to the x86 sdk directory).
+
+ Finally if the method has not found the tool yet it will fallback and use the toolslocation helper method to try and find the tool.
+
+ Path including the toolName of the tool if found, null if it is not found
+
+
+
+ This method will take the toolName and use the Legacy ToolLocation helper methods to try and find the tool.
+ This is a last ditch effort to find the tool when we cannot find it using the passed in SDKToolsPath (in either the x86 or processor specific directories).
+
+ Name of the tool to find the sdk path for
+ A path to the tool or null if the path does not exist.
+
+
+
+ Provide a method which can be used with a delegate to provide a specific FileExists behavior.
+
+ Use FileInfo instead of FileSystems.Default.FileExists(...) because the latter fails silently (by design) if CAS
+ doesn't grant access. We want the security exception if there is going to be one.
+
+ True if the file exists. False if it does not
+
+
+
+ An interface containing public SGen task properties to make sure that all versions of the task have the same public surface.
+
+
+
+
+ Gets or Sets the Compiler Platform used by SGen to generate the output assembly.
+
+
+
+
+ Gets or Sets a list of specific Types to generate serialization code for, SGen will generate serialization code only for those types.
+
+
+
+
+ Genererates a serialization assembly containing XML serializers for the input assembly.
+
+
+
+
+ Gets or Sets the Compiler Platform used by SGen to generate the output assembly.
+
+
+
+
+ Gets or Sets a list of specific Types to generate serialization code for, SGen will generate serialization code only for those types.
+
+
+
+
+ The name of the tool to execute.
+
+
+
+
+ The full path of the tool to execute.
+
+
+
+
+ Validate parameters, log errors and warnings and return true if Execute should proceed.
+
+
+
+
+ Returns true if task execution is not necessary. Executed after ValidateParameters
+
+
+
+
+
+ Returns a string with those switches and other information that can't go into a response file and
+ must go directly onto the command line.
+ Called after ValidateParameters and SkipTaskExecution
+
+
+
+
+ This task signs the passed in file using the Authenticode cert
+ provided and optionally uses a timestamp if a URL is provided.
+ It can sign ClickOnce manifests as well as exe's.
+
+
+
+
+ Constructs a new sys description.
+
+
+ description text.
+
+
+
+
+ Retrieves the description text.
+
+
+ description
+
+
+
+
+ AutoGenerated resource class. Usage:
+
+ string s = SR.GetString(SR.MyIdenfitier);
+
+
+
+
+ The containing assembly is set to lookup resources for the neutral language in satellite assemblies, not in the main assembly.
+ System.Design resources are not meant to be translated, so the ResourceManager should not look for satellite assemblies.
+ This ResourceManager forces resource lookup to be constrained to the current assembly and not look for satellites.
+
+
+
+
+ A small intermediate class for MSBuild tasks, see also TaskLoadInSeparateAppDomainExtension
+
+
+
+
+ Gets an instance of a TaskLoggingHelperExtension class containing task logging methods.
+
+ The logging helper object.
+
+
+
+ Task that logs telemetry.
+
+
+
+
+ Gets or sets a semi-colon delimited list of equal-sign separated key/value pairs. An example would be "Property1=Value1;Property2=Value2".
+
+
+
+
+ Gets or sets the event name.
+
+
+
+
+ Main task method
+
+
+
+
+ A small intermediate class between ToolTask and classes using it in XMakeTasks, implementing functionality
+ that we didn't want to expose in Utilities
+
+
+ This class has to be public because the tasks that derive from it are public.
+ Ideally we would like this class to be internal, but C# does not allow a base class
+ to be less accessible than its derived classes.
+
+
+
+
+ Default constructor.
+
+
+
+
+ Gets an instance of a TaskLoggingHelperExtension class containing task logging methods.
+
+ The logging helper object.
+
+
+
+ Whether this ToolTaskExtension has logged any errors
+
+
+
+
+ Gets the collection of parameters used by the derived task class.
+
+ Parameter bag.
+
+
+
+ When set to true, the response file will use new lines instead of spaces to separate arguments.
+
+
+
+
+ Get a bool parameter and return a default if its not present
+ in the hash table.
+
+
+
+
+ Get an int parameter and return a default if its not present
+ in the hash table.
+
+
+
+
+ Returns the command line switch used by the tool executable to specify the response file
+ Will only be called if the task returned a non empty string from GetResponseFileCommands
+ Called after ValidateParameters, SkipTaskExecution and GetResponseFileCommands
+
+
+
+
+
+ Returns a string with those switches and other information that can't go into a response file and
+ must go directly onto the command line.
+ Called after ValidateParameters and SkipTaskExecution
+
+
+
+
+
+ Fills the provided CommandLineBuilderExtension with those switches and other information that can go into a response file.
+
+
+
+
+ Fills the provided CommandLineBuilderExtension with those switches and other information that can't go into a response file and
+ must go directly onto the command line.
+
+ true, if successful
+
+
+
+ This class defines the touch task.
+
+
+
+
+ Forces a touch even if the file to be touched is read-only.
+
+
+
+
+ Creates the file if it doesn't exist.
+
+
+
+
+ Specifies a specific time other than current.
+
+
+
+
+ File(s) to touch.
+
+
+
+
+ Output of this task - which files were touched.
+
+
+
+
+ Importance: high, normal, low (default normal)
+
+
+
+
+ Question the incremental nature of this task.
+
+ When Question is true, skip touching the disk to avoid causing incremental issue.
+ Unless the file doesn't exists, in which case, error out.
+
+
+
+ Implementation of the execute method.
+
+
+
+
+
+ Run the task
+
+
+
+
+
+ Helper method creates a file.
+
+
+
+ "true" if the file was created.
+
+
+
+ Helper method touches a file.
+
+ "True" if the file was touched.
+
+
+
+ Represents a task that can extract a .zip archive.
+
+
+
+
+ Stores a used for cancellation.
+
+
+
+
+ Stores the include patterns after parsing.
+
+
+
+
+ Stores the exclude patterns after parsing.
+
+
+
+
+ Gets or sets a with a destination folder path to unzip the files to.
+
+
+
+
+ Gets or sets a value that indicates whether read-only files should be overwritten.
+
+
+
+
+ Gets or sets a value that indicates whether files should be skipped if the destination is unchanged.
+
+
+
+
+ Gets or sets an array of objects containing the paths to .zip archive files to unzip.
+
+
+
+
+ Gets or sets an MSBuild glob expression that specifies which files to include being unzipped from the archive.
+
+
+
+
+ Gets or sets an MSBuild glob expression that specifies which files to exclude from being unzipped from the archive.
+
+
+
+
+
+
+
+
+
+
+ Extracts all files to the specified directory.
+
+ The containing the files to extract.
+ The to extract files to.
+
+
+
+ Determines whether or not a file should be skipped when unzipping by filtering.
+
+ The object containing information about the file in the zip archive.
+ true if the file should be skipped, otherwise false.
+
+
+
+ Determines whether or not a file should be skipped when unzipping.
+
+ The object containing information about the file in the zip archive.
+ A object containing information about the destination file.
+ true if the file should be skipped, otherwise false.
+
+
+
+ Specific-purpose utility functions for parsing VB.
+
+
+
+
+ Parse a VB file and get the first class name, fully qualified with namespace.
+
+
+
+
+
+
+ Extract the class name.
+
+
+
+
+
+
+ Task that simply emits a warning. Engine will add the project path because
+ we do not specify a filename.
+
+
+
+
+ Error message
+
+
+
+
+ Warning code
+
+
+
+
+ Relevant file if any.
+ If none is provided, the file containing the Warning
+ task will be used.
+
+
+
+
+ Warning help keyword
+
+
+
+
+ A link pointing to more information about the warning
+
+
+
+
+ Main task method
+
+
+
+
+
+ A task that transforms a XML input with an XSLT or Compiled XSLT
+ and outputs to screen or specified file.
+
+
+
+
+ The output files.
+
+
+
+
+ The XML input as file path.
+
+
+
+
+ The XML input as string.
+
+
+
+
+ The XSLT input as file path.
+
+
+
+
+ The XSLT input as string.
+
+
+
+
+ Flag to preserve whitespaces in the XSLT file.
+
+
+
+
+ The XSLT input as compiled dll.
+
+
+
+
+ The output file.
+
+
+
+
+ The parameters to XSLT Input document.
+
+
+
+
+ Determines whether or not to use trusted settings. Default is false.
+
+
+
+
+ Executes the XslTransform task.
+
+ true if transformation succeeds.
+
+
+
+ Takes the raw XML and loads XsltArgumentList
+
+ The raw XML that holds each parameter as
+ XsltArgumentList.
+
+
+
+ This class prepares XML input from XmlFile and Xml parameters
+
+
+
+
+ This either contains the raw Xml or the path to Xml file.
+
+
+
+
+ Constructor.
+ Only one parameter should be non null or will throw ArgumentException.
+
+ The path to XML file or null.
+ The raw XML.
+
+
+
+ Possible accepted types of XML input.
+
+
+
+
+ If the mode is a XML file.
+
+
+
+
+ If the mode is a raw XML.
+
+
+
+
+ Returns the count of Xml Inputs
+
+
+
+
+ Returns the current mode of the XmlInput
+
+
+
+
+ Creates correct reader based on the input type.
+
+ The XmlReader object
+
+
+
+ This class prepares XSLT input from XsltFile, Xslt and XsltCompiledDll parameters
+
+
+
+
+ What XSLT input type are we at.
+
+
+
+
+ Contains the raw XSLT
+ or the path to XSLT file
+ or the path to compiled XSLT dll.
+
+
+
+
+ Flag to preserve whitespaces in the XSLT file.
+
+
+
+
+ Tool for logging build messages, warnings, and errors
+
+
+
+
+ Constructer.
+ Only one parameter should be non null or will throw ArgumentException.
+
+ The path to XSLT file or null.
+ The raw to XSLT or null.
+ The path to compiled XSLT file or null.
+ Log helper.
+ Flag for xslt whitespace option.
+
+
+
+ Possible accepted types of XSLT input.
+
+
+
+
+ If the mode is a XSLT file.
+
+
+
+
+ If the mode is a raw XSLT.
+
+
+
+
+ If the mode is a compiled Xslt dll.
+
+
+
+
+ Loads the XSLT to XslCompiledTransform. By default uses Default settings instead of trusted settings.
+
+ A XslCompiledTransform object.
+
+
+
+ Loads the XSLT to XslCompiledTransform. By default uses Default settings instead of trusted settings.
+
+ Determines whether or not to use trusted settings.
+ A XslCompiledTransform object.
+
+
+
+ Find the type from an assembly and loads it.
+
+ The path to assembly.
+ The type name.
+ Found type.
+
+
+
+ Class: AssignCulture
+
+ This task takes a list of resource file names and sets an attribute that
+ contains the culture name embedded in the file name:
+
+ MyResources.fr.resx ==> Culture='fr'
+
+ The task can also return a list of "Culture-neutral" file names, like:
+
+ MyGlyph.fr.bmp ==> MyGlyph.bmp [Culture='fr']
+
+ This is because embedded resources are referred to this way.
+
+ There are plenty of corner cases with this task. See the unit test for
+ more details.
+
+
+
+
+ The incoming list of files to assign a culture to.
+
+
+
+
+ This outgoing list of files is exactly the same as the incoming Files
+ list except that an attribute name "Culture" will have been added if
+ the particular file name is in the form:
+
+ MyResource.<any-valid-culture-id>.resx
+
+ The value of Culture will be "<any-valid-culture-id>".
+
+ If the incoming item from Files already has a Culture attribute then
+ that original attribute is used instead.
+
+
+
+
+ This is a subset of AssignedFiles that has all of the items that
+ ended up have a Culture assigned to them. This includes items that
+ already had a Culture in the incoming Files list as well as items
+ that were assigned a Culture because they had a valid culture ID
+ embedded in their file name.
+
+ The following is always true:
+
+ AssignedFiles = AssignedFilesWithCulture + AssignedFilesWithNoCulture
+
+
+
+
+ This is a subset of AssignedFiles that has all of the items that
+ ended up with no Culture assigned to them.
+
+ The following is always true:
+
+ AssignedFiles = AssignedFilesWithCulture + AssignedFilesWithNoCulture
+
+
+
+
+ This list has the same number of items as the Files list or the
+ AssignedFiles list.
+
+ Items in this list have the file name from Files or AssignedFiles
+ but with the culture stripped if it was embedded in the file name.
+
+ So for example, if the incoming item in Files was:
+
+ MyBitmap.fr.bmp
+
+ then the corresponding file in CultureNeutralAssignedFiles will be:
+
+ MyBitmap.bmp
+
+ The culture will only be stripped if it is a valid culture identifier.
+ So for example,
+
+ MyDifferentFile.XX.txt
+
+ will result in exactly the same file name:
+
+ MyDifferentFile.XX.txt
+
+ because 'XX' is not a valid culture identifier.
+
+
+
+
+ Execute.
+
+
+
+
+
+ Utility functions for dealing with Culture information.
+
+
+
+
+ Culture information about an item.
+
+
+
+
+ Given an item's filename, return information about the item including the culture and the culture-neutral filename.
+
+
+ We've decided to ignore explicit Culture attributes on items.
+
+
+
+
+ Provides read-only cached instances of .
+
+ Original source:
+ https://raw.githubusercontent.com/aspnet/Localization/dev/src/Microsoft.Framework.Globalization.CultureInfoCache/CultureInfoCache.cs
+
+
+
+
+
+ Determine if a culture string represents a valid instance.
+
+ The culture name.
+ True if the culture is determined to be valid.
+
+
+
+ Generates a temporary code file with the specified generated code fragment.
+ Does not delete the file.
+
+
+ Currently only supports writing .NET attributes.
+
+
+
+
+ Language of code to generate.
+ Language name can be any language for which a CodeDom provider is
+ available. For example, "C#", "VisualBasic".
+ Emitted file will have the default extension for that language.
+
+
+
+
+ Description of attributes to write.
+ Item include is the full type name of the attribute.
+ For example, "System.AssemblyVersionAttribute".
+ Each piece of metadata is the name-value pair of a parameter, which must be of type System.String.
+ Some attributes only allow positional constructor arguments, or the user may just prefer them.
+ To set those, use metadata names like "_Parameter1", "_Parameter2" etc.
+ If a parameter index is skipped, it's an error.
+
+
+
+
+ Destination folder for the generated code.
+ Typically the intermediate folder.
+
+
+
+
+ The path to the file that was generated.
+ If this is set, and a file name, the destination folder will be prepended.
+ If this is set, and is rooted, the destination folder will be ignored.
+ If this is not set, the destination folder will be used, an arbitrary file name will be used, and
+ the default extension for the language selected.
+
+
+
+
+ Main entry point.
+
+
+
+
+ Generates the code into a string.
+ If it fails, logs an error and returns null.
+ If no meaningful code is generated, returns empty string.
+ Returns the default language extension as an out parameter.
+
+
+
+
+ Finds the metadata items that are used to indicate the types of
+ parameters, and removes those items from the given dictionary.
+ Returns a dictionary that maps parameter names to their declared types.
+
+
+
+
+ Uses the given parameters to add CodeDom arguments to the given attribute.
+ Returns true if the arguments could be defined, or false if the values could
+ not be converted to the required type. An error is also logged for failures.
+
+
+
+
+ Finds the types that the parameters are likely to be, by finding a constructor
+ on the attribute that has the same number of parameters that have been provided.
+ Returns an array of types with a length equal to the number of positional parameters.
+ If no suitable constructor is found, the array will contain null types.
+
+
+
+
+ Attempts to convert the raw value provided in the metadata to the type with the specified name.
+ Returns true if conversion is successful. An error is logged and false is returned if the conversion fails.
+
+
+
+
+ Convert the raw value provided in the metadata to the type
+ that has been inferred based on the parameter position or name.
+ Returns the converted value as a CodeExpression if successful, or the raw value
+ as a CodeExpression if conversion fails. No errors are logged if the conversion fails.
+
+
+
+
+ Converts the given value to a CodeExpression object where the value is the specified type.
+ Returns the CodeExpression if successful, or throws an exception if the conversion fails.
+
+
+
+
+ A task that returns values as specified by XPath Query
+ from an XML file.
+
+
+
+
+ The XPath Query.
+
+
+
+
+ The XML input as a string.
+
+
+
+
+ The XPath Query.
+
+
+
+
+ The results returned by this task.
+
+
+
+
+ The namespaces for XPath query's prefixes.
+
+
+
+
+ Set to true to prohibit loading XML with embedded DTD and produce error MSB3733
+ if DTD is present. This was a pre-v15 behavior. By default, a DTD clause if any is ignored.
+
+
+
+
+ Executes the XMLPeek task.
+
+ true if transformation succeeds.
+
+
+
+ Loads the namespaces specified at Namespaces parameter to XmlNSManager.
+
+ The namespace manager to load namespaces to.
+ The namespaces as XML snippet.
+
+
+
+ This class prepares XML input from XMLInputPath and XMLContent parameters
+
+
+
+
+ This either contains the raw Xml or the path to Xml file.
+
+
+
+
+ FileStream used to read XML.
+
+
+
+
+ Constructor.
+ Only one parameter should be non null or will throw ArgumentException.
+
+ The path to XML file or null.
+ The raw XML.
+
+
+
+ Possible accepted types of XML input.
+
+
+
+
+ If the mode is a XML file.
+
+
+
+
+ If the mode is a raw XML.
+
+
+
+
+ Returns the current mode of the XmlInput
+
+
+
+
+ Creates correct reader based on the input type.
+
+ The XmlReader object
+
+
+
+ Closes the reader.
+
+
+
+
+ A task that sets values as specified by XPath Query
+ into a XML file.
+
+
+
+
+ The XML input as file path.
+
+
+
+
+ The XPath Query.
+
+
+
+
+ The value to be inserted into the specified location.
+
+
+
+
+ The namespaces for XPath query's prefixes.
+
+
+
+
+ Executes the XMLPoke task.
+
+ true if task execution succeeds.
+
+
+
+ Loads the namespaces specified at Namespaces parameter to XmlNSManager.
+
+ The namespace manager to load namespaces to.
+ The namespaces as XML snippet.
+
+
+
+ A task factory which can take code dom supported languages and create a task out of it
+
+
+
+
+ This dictionary keeps track of custom references to compiled assemblies. The in-memory assembly is loaded from a byte
+ stream and as such its dependencies cannot be found unless they are in the MSBuild.exe directory or the GAC. They
+ cannot be found even if they are already loaded in the AppDomain. This dictionary knows the FullName of the assembly
+ and a reference to the assembly itself. In the handler, the dictionary
+ is used to return the loaded assemblies as a way to allow custom references that are not in the normal assembly Load
+ context.
+
+
+
+
+ Handles the event to return assemblies loaded from custom references.
+
+
+
+
+ Default assemblies names to reference during inline code compilation - from the .NET Framework
+
+
+
+
+ Default using's for the code
+
+
+
+
+ A collection of task assemblies which have been instantiated by any CodeTaskFactory. Used to prevent us from creating
+ duplicate assemblies.
+
+
+
+
+ Merged set of assembly reference paths (default + specified)
+
+
+
+
+ Merged set of namespaces (default + specified)
+
+
+
+
+ Type of code fragment, ie Fragment, Class, Method
+
+
+
+
+ Is the type a fragment or not
+
+
+
+
+ Is the type a method or not
+
+
+
+
+ By default the language supported is C#, but anything that supports code dom will work
+
+
+
+
+ The source that will be compiled
+
+
+
+
+ The name of the task for which this is the factory
+
+
+
+
+ Path to source that is outside the project file
+
+
+
+
+ The using task node from the project file
+
+
+
+
+ The inline source compiled into an in memory assembly
+
+
+
+
+ Helper to assist in logging messages
+
+
+
+
+ Task parameter type information
+
+
+
+
+ MSBuild engine uses this for logging where the task comes from
+
+
+
+
+ Gets the type of the generated task.
+
+
+
+
+ Get the type information for all task parameters.
+
+
+
+
+ Initializes the task factory.
+
+
+
+
+ Create a taskfactory instance which contains the data that needs to be refreshed between task invocations.
+
+
+
+
+ Cleans up any context or state that may have been built up for a given task.
+
+ The task to clean up.
+
+ For many factories, this method is a no-op. But some factories may have built up
+ an AppDomain as part of an individual task instance, and this is their opportunity
+ to shutdown the AppDomain.
+
+
+
+
+ Create a property (with the corresponding private field) from the given type information
+
+
+
+
+ Create the Execute() method for the task from the fragment of code from the element
+
+
+
+
+ Create the body of the task's code by simply using the taskCode as a snippet for the CodeDom
+
+
+
+
+ Create a property (with the corresponding private field) from the given type information
+
+
+
+
+ Extract the elements from the
+
+ string[] of reference paths
+
+
+
+ Extract the elements from the
+
+ string[] of using's
+
+
+
+ Extract the node from the UsingTask node
+
+ textual content of the node
+ XmlNode
+
+
+
+ Make sure the task node only contains Code, Reference, Usings
+
+
+
+
+ If a parent node has a child node and it is not supposed to, log an error indicating it has an invalid element.
+
+
+
+
+ Add a reference assembly to the list of references passed to the compiler. We will try and load the assembly to make sure it is found
+ before sending it to the compiler. The reason we load here is that we will be using it in this appdomin anyways as soon as we are going to compile, which should be right away.
+
+
+
+
+ Compile the assembly in memory and get a reference to the assembly itself.
+ If compilation fails, returns null.
+
+
+
+
+ Combine our default referenced assemblies with those explicitly specified
+
+
+
+
+ Combine our default imported namespaces with those explicitly specified
+
+
+
+
+ Create the task properties
+
+
+
+
+ Create the task class
+
+
+
+
+ Class used as a key for the compiled assembly cache
+
+
+
+
+ The set of assemblies referenced by this task.
+
+
+
+
+ The complete source code for the task.
+
+
+
+
+ Constructor
+
+
+
+
+ Override of GetHashCode
+
+
+
+
+ Override of Equals
+
+
+
+
+ Implementation of Equals.
+
+
+
+
+ Implementation of CompareTo
+
+
+
+
+ The task factory provider for XAML tasks.
+
+
+
+
+ The namespace we put the task in.
+
+
+
+
+ The compiled task assembly.
+
+
+
+
+ The task type.
+
+
+
+
+ The name of the task pulled from the XAML.
+
+
+
+
+ The namespace of the task pulled from the XAML.
+
+
+
+
+ The contents of the UsingTask body.
+
+
+
+
+ The name of this factory. This factory name will be used in error messages. For example
+ Task "Mytask" failed to load from "FactoryName".
+
+
+
+
+ The task type object.
+
+
+
+
+ MSBuild engine will call this to initialize the factory. This should initialize the factory enough so that the factory can be asked
+ whether or not task names can be created by the factory.
+
+
+
+
+ Create an instance of the task to be used.
+
+ The task factory logging host will log messages in the context of the task.
+
+
+
+ Cleans up any context or state that may have been built up for a given task.
+
+ The task to clean up.
+
+ For many factories, this method is a no-op. But some factories may have built up
+ an AppDomain as part of an individual task instance, and this is their opportunity
+ to shutdown the AppDomain.
+
+
+
+
+ Get a list of parameters for the task.
+
+
+
+
+ Base class for task state files.
+
+
+
+
+ True if should create the state file and serialize ourselves, false otherwise.
+
+
+
+
+ Writes the contents of this object out to the specified file.
+
+
+
+
+ Reads the specified file from disk into a StateFileBase derived object.
+
+
+
+
+ Deletes the state file from disk
+
+
+
+
+
+
+ Class is used to cache system state.
+
+
+
+
+ Cache at the SystemState instance level. Has the same contents as .
+ It acts as a flag to enforce that an entry has been checked for staleness only once.
+
+
+
+
+ Cache at the SystemState instance level.
+
+
+ Before starting execution, RAR attempts to populate this field by deserializing a per-project cache file. During execution,
+ objects that get actually used are inserted into .
+ After execution, is serialized and written to disk if it's different from
+ what we originally deserialized into this field.
+
+
+
+
+ Cache at the SystemState instance level. It is serialized to disk and reused between instances via .
+
+
+
+
+ LastModified information is purely instance-local. It doesn't make sense to
+ cache this for long periods of time since there's no way (without actually
+ calling File.GetLastWriteTimeUtc) to tell whether the cache is out-of-date.
+
+
+
+
+ DirectoryExists information is purely instance-local. It doesn't make sense to
+ cache this for long periods of time since there's no way (without actually
+ calling Directory.Exists) to tell whether the cache is out-of-date.
+
+
+
+
+ GetDirectories information is also purely instance-local. This information
+ is only considered good for the lifetime of the task (or whatever) that owns
+ this instance.
+
+
+
+
+ Additional level of caching kept at the process level.
+
+
+
+
+ XML tables of installed assemblies.
+
+
+
+
+ True if the contents have changed.
+
+
+
+
+ Delegate used internally.
+
+
+
+
+ Cached delegate.
+
+
+
+
+ Cached delegate.
+
+
+
+
+ Cached delegate.
+
+
+
+
+ Cached delegate.
+
+
+
+
+ Cached delegate
+
+
+
+
+ Class that holds the current file state.
+
+
+
+
+ The last modified time for this file.
+
+
+
+
+ The fusion name of this file.
+
+
+
+
+ The assemblies that this file depends on.
+
+
+
+
+ The scatter files associated with this assembly.
+
+
+
+
+ FrameworkName the file was built against
+
+
+
+
+ The CLR runtime version for the assembly.
+
+
+
+
+ Default construct.
+
+
+
+
+ Ctor for translator deserialization
+
+
+
+
+ Reads/writes this class
+
+
+
+
+ Gets the last modified date.
+
+
+
+
+
+ Get or set the assemblyName.
+
+
+
+
+
+ Get or set the runtimeVersion
+
+
+
+
+
+ Get or set the framework name the file was built against
+
+
+
+
+ The last-modified value to use for immutable framework files which we don't do I/O on.
+
+
+
+
+ It is wasteful to persist entries for immutable framework files.
+
+
+
+
+ Construct.
+
+
+
+
+ Set the target framework paths.
+ This is used to optimize IO in the case of files requested from one
+ of the FX folders.
+
+ List of Assembly Table Info.
+
+
+
+ Reads/writes this class.
+ Used for serialization and deserialization of this class persistent cache.
+
+
+
+
+
+
+
+ Flag that indicates that has been modified.
+
+
+
+
+
+ Set the GetLastWriteTime delegate.
+
+ Delegate used to get the last write time.
+
+
+
+ Cache the results of a GetAssemblyName delegate.
+
+ The delegate.
+ Cached version of the delegate.
+
+
+
+ Cache the results of a GetAssemblyMetadata delegate.
+
+ The delegate.
+ Cached version of the delegate.
+
+
+
+ Cache the results of a FileExists delegate.
+
+ Cached version of the delegate.
+
+
+
+ Cache the results of a GetDirectories delegate.
+
+ The delegate.
+ Cached version of the delegate.
+
+
+
+ Cache the results of a GetAssemblyRuntimeVersion delegate.
+
+ The delegate.
+ Cached version of the delegate.
+
+
+
+ Cached implementation of GetAssemblyName.
+
+ The path to the file
+ The assembly name.
+
+
+
+ Cached implementation. Given a path, crack it open and retrieve runtimeversion for the assembly.
+
+ Path to the assembly.
+
+
+
+ Cached implementation. Given an assembly name, crack it open and retrieve the list of dependent
+ assemblies and the list of scatter files.
+
+ Path to the assembly.
+ Cache for pre-extracted assembly metadata.
+ Receives the list of dependencies.
+ Receives the list of associated scatter files.
+
+
+
+
+ Reads in cached data from stateFiles to build an initial cache. Avoids logging warnings or errors.
+
+ List of locations of caches on disk.
+ How to log
+ Whether a file exists
+ A cache representing key aspects of file states.
+
+
+
+ Modifies this object to be more portable across machines, then writes it to filePath.
+
+ Path to which to write the precomputed cache
+ How to log
+
+
+
+ Cached implementation of GetDirectories.
+
+
+
+ The list of directories from the specified path.
+
+
+
+ Cached implementation of FileExists.
+
+ Path to file.
+ True if the file exists.
+
+
+
+ Cached implementation of DirectoryExists.
+
+ Path to file.
+ True if the directory exists.
+
+
+
+ Represents a single input to a compilation-style task.
+ Keeps track of timestamp for later comparison.
+
+ Must be serializable because instances may be marshaled cross-AppDomain, see .
+
+
+
+
+ The name of the file.
+
+
+
+
+ The last-modified timestamp when the class was instantiated.
+
+
+
+
+ Returns true if the file existed when this class was instantiated.
+
+
+
+
+ Construct.
+
+ The file name.
+
+
+
+ Checks whether the file has changed since the last time a timestamp was recorded.
+
+
+
+
+
+ Gets or sets a containing the full path to the destination file to create.
+
+
+
+
+ Gets or sets a value indicating if the destination file should be overwritten.
+
+
+
+
+ Gets or sets a containing the full path to the source directory to create a zip archive from.
+
+
+
+
+ Question the incremental nature of this task.
+
+ This task does not support incremental build and will error out instead.
+
+
+
+ This class defines the "AL" XMake task, which enables using al.exe to link
+ modules and resource files into assemblies.
+
+
+
+
+ Return the name of the tool to execute.
+
+
+
+
+ Return the path of the tool to execute
+
+
+
+
+ Fills the provided CommandLineBuilderExtension with those switches and other information that can go into a response file.
+
+
+
+
+ The AspNetCompiler task, which is a wrapper around aspnet_compiler.exe
+
+
+
+
+ If specified, the strong-name assembly will allow partially
+ trusted callers.
+
+
+
+
+ If specified, the assemblly is not fully signed when created.
+
+
+
+
+ If specified, the compiled assemblies will be given fixed names.
+
+
+
+
+ Specifies a strong name key container.
+
+
+
+
+ The physical path to the strong name key file.
+
+
+
+
+ The full IIS metabase path of the application. This switch
+ cannot be combined with the virtualPath or PhysicalDir option.
+
+
+
+
+ The physical path of the application to be compiled. If physicalDir
+ is missing, the IIS metabase is used to locate the application.
+
+
+
+
+ The physical path to which the application is compiled. If not
+ specified, the application is precompiled in-place.
+
+
+
+
+ The virtual path of the application to be compiled. If PhysicalDir is
+ used to locate the application is specified. Otherwise, the IIS metabase
+ is used, and the application is assumed to be in the default site (under
+ "/LM/W3SVC/1/Root").
+
+
+
+
+ If Updateable is true, then the web is compile with -u flag so that it
+ can be updated after compilation
+
+
+
+
+ If Force is true, then the web is compile with -f flag overwriting
+ files in the target location
+
+
+
+
+ If Debug is true, then the debug information will be emitted during
+ compilation.
+
+
+
+
+ If Clean is true, then the application will be built clean. Previously
+ compiled components will be re-compiled.
+
+
+
+
+ The TargetFrameworkMoniker indicating which .NET Framework version of
+ aspnet_compiler.exe should be used. Only accepts .NET Framework monikers.
+
+
+
+
+ The name of the tool to execute
+
+
+
+
+ Small helper property to get the "project name"
+
+
+
+
+ Small helper property for determining the "name of the target" that's currently being built
+
+
+
+
+ Override the Execute method to be able to send ExternalProjectStarted/Finished events.
+
+
+
+
+
+ Generates command line arguments for aspnet_compiler.exe
+
+ command line builder class to add arguments to
+
+
+
+ Determine the path to aspnet_compiler.exe
+
+ path to aspnet_compiler.exe, null if not found
+
+
+
+ Validate the task arguments, log any warnings/errors
+
+ true if arguments are corrent enough to continue processing, false otherwise
+
+
+
+ Generates a bootstrapper for ClickOnce deployment projects.
+
+
+
+
+ Generate the bootstrapper.
+
+ Return true on success, false on failure.
+
+
+
+ This task generates the application trust from the base manifest
+ and the TargetZone and ExcludedPermissions properties.
+
+
+
+
+ Returns paths to the frameworks SDK.
+
+
+
+
+ The path to the latest .NET SDK if it could be found. It will be String.Empty if the SDK was not found.
+
+
+
+
+ The path to the v2.0 .NET SDK if it could be found. It will be String.Empty if the SDK was not found.
+
+
+
+
+ The path to the v3.5 .NET SDK if it could be found. It will be String.Empty if the SDK was not found.
+
+
+
+
+ The path to the v4.0 .NET SDK if it could be found. It will be String.Empty if the SDK was not found.
+
+
+
+
+ The path to the v4.5 .NET SDK if it could be found. It will be String.Empty if the SDK was not found.
+
+
+
+
+ The path to the v4.5.1 .NET SDK if it could be found. It will be String.Empty if the SDK was not found.
+
+
+
+
+ The path to the v4.6 .NET SDK if it could be found. It will be String.Empty if the SDK was not found.
+
+
+
+
+ The path to the v4.6.1 .NET SDK if it could be found. It will be String.Empty if the SDK was not found.
+
+
+
+
+ Get the SDK.
+
+ true
+
+
+
+ Registers a managed assembly for COM interop (equivalent of regasm.exe functionality, but this code doesn't actually call the exe).
+
+ ITypeLibExporterNotifySink is necessary for the ITypeLibConverter.ConvertAssemblyToTypeLib call.
+
+
+
+ The cache file for Register/UnregisterAssembly. Necessary for UnregisterAssembly to do the proper clean up.
+
+
+
+
+ Task entry point
+
+
+
+
+ Callback method for reporting type library export events
+
+
+
+
+ Callback method for finding type libraries for given assemblies. If we are here, it means
+ the type library we're looking for is not in the current directory and it's not registered.
+ Currently we assume that all dependent type libs are already registered.
+
+
+ In theory, we could automatically register dependent assemblies for COM interop and return
+ a newly created typelib here. However, one danger of such approach is the following scenario:
+ The user creates several projects registered for COM interop, all of them referencing assembly A.
+ The first project that happens to be built will register assembly A for COM interop, creating
+ a type library in its output directory and registering it. The other projects will then refer to that
+ type library, since it's already registered. If then for some reason the first project is deleted
+ from disk, the typelib for assembly A goes away too, and all the other projects, built five years ago,
+ suddenly stop working.
+
+
+
+
+ Helper registration method
+
+
+
+
+ Helper method - exports a type library for an assembly. Returns true if succeeded.
+
+
+
+
+ COM references specified by guid/version/lcid
+
+
+
+
+ COM references specified by type library file path
+
+
+
+
+ Array of equals-separated pairs of environment
+ variables that should be passed to the spawned tlbimp.exe and aximp.exe,
+ in addition to (or selectively overriding) the regular environment block.
+
+
+
+
+ the directory wrapper files get generated into
+
+
+
+
+ When set to true, the typelib version will be included in the wrapper name. Default is false.
+
+
+
+
+ source of resolved .NET assemblies - we need this for ActiveX wrappers, since we can't resolve .NET assembly
+ references ourselves
+
+
+
+
+ container name for public/private keys
+
+
+
+
+ file containing public/private keys
+
+
+
+
+ delay sign wrappers?
+
+
+
+
+ Passes the TypeLibImporterFlags.PreventClassMembers flag to tlb wrapper generation
+
+
+
+
+ If true, do not log messages or warnings. Default is false.
+
+
+
+
+ The preferred target processor architecture. Passed to tlbimp.exe /machine flag after translation.
+ Should be a member of Microsoft.Build.Utilities.ProcessorArchitecture.
+
+
+
+
+ Property to allow multitargeting of ResolveComReferences: If true, tlbimp.exe
+ from the appropriate target framework will be run out-of-proc to generate
+ the necessary wrapper assemblies. Aximp is always run out of proc.
+
+
+
+
+ paths to found/generated reference wrappers
+
+
+
+
+ paths to found modules (needed for isolation)
+
+
+
+
+ If ExecuteAsTool is true, this must be set to the SDK
+ tools path for the framework version being targeted.
+
+
+
+
+ Cache file for COM component timestamps. If not present, every run will regenerate all the wrappers.
+
+
+
+
+ The project target framework version.
+
+ Default is empty. which means there will be no filtering for the reference based on their target framework.
+
+
+
+
+ Main class for the COM reference resolution task
+
+
+ Main class for the COM reference resolution task
+
+
+ Main class for the COM reference resolution task
+
+
+
+ version 4.0
+
+
+
+ Task entry point.
+
+
+
+
+
+ Converts the string target framework value to a number.
+ Accepts both "v" prefixed and no "v" prefixed formats
+ if format is bad will log a message and return 0.
+
+ Target framework version value
+
+
+
+ Computes the path to TlbImp.exe for use in logging and for passing to the
+ nested TlbImp task.
+
+ True if the path is found (or it doesn't matter because we're executing in memory), false otherwise
+
+
+
+ Computes the path to AxImp.exe for use in logging and for passing to the
+ nested AxImp task.
+
+ True if the path is found, false otherwise
+
+
+
+ Try to get the path to the tool in the Windows SDK with the given .NET Framework version and
+ of the same architecture as we were currently given for TargetProcessorArchitecture.
+
+
+
+
+ Clean various caches and other state that should not be preserved between subsequent runs
+
+
+
+
+ Every ActiveX reference (aximp) requires a corresponding tlbimp reference. If the tlbimp reference is
+ missing from the project file we pretend it's there to save the user some useless typing.
+
+
+
+
+ Resolves the COM reference, and adds it to the appropriate item list.
+
+
+
+
+ Helper function - resolves a PIA COM classic reference given the type library attributes.
+
+ Information about the reference to be resolved
+ Name of reference
+ Information about wrapper locations
+ True if the reference was already found or successfully generated, false otherwise.
+
+
+
+ Return the set of item specs for the resolved assembly references.
+
+
+
+
+
+ Helper function - resolves a regular tlb COM classic reference given the type library attributes.
+
+ Information about the reference to be resolved
+ Directory the interop DLL should be written to
+ Name of reference
+ True if this is a top-level reference
+ List of dependency paths for that reference
+ Information about wrapper locations
+ True if the reference was already found or successfully generated, false otherwise.
+
+
+
+ Helper function - resolves an ActiveX reference given the type library attributes.
+
+ Information about the reference to be resolved
+ Directory the interop DLL should be written to
+ Name of reference
+ Information about wrapper locations
+ True if the reference was already found or successfully generated, false otherwise.
+
+
+
+ Set the CopyLocal metadata to false on all assemblies that are located in the GAC.
+
+ List of ITaskItems that will be outputted from the task
+ The GAC root path
+
+
+
+ Scan all the dependencies of the main project references and preresolve them
+ so that when we get asked about a previously unknown dependency in the form of a .NET assembly
+ we know what to do with it.
+
+
+
+
+ Defines the "AxImp" MSBuild task, which enables using AxImp.exe
+ to generate Windows Forms wrappers for ActiveX controls.
+
+
+
+
+ .ocx File the ActiveX controls being wrapped are defined in.
+
+
+
+
+ If true, will generate C# source code for the Windows Forms wrapper.
+
+
+
+
+ If true, suppresses displaying the logo
+
+
+
+
+ File name of assembly to be produced.
+
+
+
+
+ Name of assembly to use as a RuntimeCallableWrapper instead of generating one.
+
+
+
+
+ If true, prevents AxImp from displaying success message.
+
+
+
+
+ If true, AxImp prints more information.
+
+
+
+
+ Returns the name of the tool to execute
+
+
+
+
+ Fills the provided CommandLineBuilderExtension with all the command line options used when
+ executing this tool
+
+ Gets filled with command line commands
+
+
+
+ Validates the parameters passed to the task
+
+ True if parameters are valid
+
+
+
+ Passed to the "Transform" property on the TlbImp task to indicate
+ what transforms, if any, to apply to the type library during
+ assembly generation
+
+
+
+
+ No transforms should be applied.
+
+
+
+
+ Transforms [out, retval] parameters of methods on dispatch-only
+ interfaces into return values.
+
+
+
+
+ Mark all value classes as serializable.
+
+
+
+
+ Defines the "TlbImp" MSBuild task, which enables using TlbImp.exe
+ to generate assemblies from type libraries.
+
+
+
+
+ Type library being imported to an assembly.
+
+
+
+
+ Namespace of the generated assembly
+
+
+
+
+ Version of the generated assembly
+
+
+
+
+ Create an assembly for the specified machine type
+ Supported machine types:
+ X86
+ X64
+ Itanium
+ Agnostic
+
+
+
+
+ If true, suppresses displaying the logo
+
+
+
+
+ File name of assembly to be produced.
+
+
+
+
+ If true, prevents TlbImp from adding members to classes
+
+
+
+
+ If true, import the SAFEARRAY type as System.Arrays
+
+
+
+
+ If true, prevents AxImp from displaying success message.
+
+
+
+
+ Transformation to be applied to the resulting assembly.
+
+
+
+
+ If true, AxImp prints more information.
+
+
+
+
+ References to dependency assemblies.
+
+
+
+
+ Returns the name of the tool to execute
+
+
+
+
+ Fills the provided CommandLineBuilderExtension with all the command line options used when
+ executing this tool
+
+ Gets filled with command line commands
+
+
+
+ Validates the parameters passed to the task
+
+ True if parameters are valid
+
+
+
+ Returns the TlbImpTransformFlags value stored in the hashtable under the provided
+ parameter, or the default value passed if the value in the hashtable is null
+
+ The parameter used to retrieve the value from the hashtable
+ The default value to return if the hashtable value is null
+ The value contained in the hashtable, or if that's null, the default value passed to the method
+
+
+
+ Verifies that an allowed combination of TlbImpTransformFlags has been
+ passed to the Transform property.
+
+ True if Transform is valid and false otherwise
+
+
+
+ Converts a given flag to the equivalent parameter passed to the /transform:
+ option of tlbimp.exe
+
+ The TlbImpTransformFlags being converted
+ A string that can be passed to /transform: on the command line
+
+
+
+ Main class for the native reference resolution task.
+
+
+
+
+ ResolveNativeReference constructor
+
+
+
+
+ Task entry point.
+
+
+
+
+ Helper manifest resolution method. Cracks the manifest and extracts the different elements from it.
+
+
+
+
+ Registers a managed assembly for COM interop (equivalent of regasm.exe functionality, but this code
+ doesn't actually call the exe).
+
+
+
+
+ The cache file for Register/UnregisterAssembly. Necessary for UnregisterAssembly to do the proper clean up.
+
+
+
+
+ Task entry point
+
+
+
+
+
+ Helper unregistration method
+
+
+
+
+ Updates selected properties in a manifest and resigns.
+
+
+
+
+ Exports a managed assembly to a windows runtime metadata.
+
+
+
+
+ Set of references to pass to the winmdexp tool.
+
+
+
+
+ Warning codes to disable
+
+
+
+
+ Input documentation file
+
+
+
+
+ Output documentation file
+
+
+
+
+ Input PDB file
+
+
+
+
+ Output PDB file
+
+
+
+
+ WinMDModule to generate the WinMDFile for.
+
+
+
+
+ Output windows metadata file .winmd
+
+
+
+
+ Path to the SDK directory which contains this tool
+
+
+
+
+ Use output stream encoding as UTF-8.
+
+
+
+
+ Path to the SDK directory which contains this tool
+
+
+
+
+ The policy used for assembly unification.
+
+
+
+
+ The name of the tool to execute.
+
+
+
+
+ Overridable property specifying the encoding of the captured task standard output stream
+
+
+
+
+ Overridable property specifying the encoding of the captured task standard error stream
+
+
+
+
+ The full path of the tool to execute.
+
+
+
+
+ Validate parameters, log errors and warnings and return true if Execute should proceed.
+
+
+
+
+ Returns true if task execution is not necessary. Executed after ValidateParameters
+
+
+
+
+ This class provides the same functionality as the Task class, but derives from MarshalByRefObject so that it can be
+ instantiated in its own app domain.
+
+
+
+
+ Gets an instance of a TaskLoggingHelperExtension class containing task logging methods.
+
+ The logging helper object.
+
+
+
+ Resolve searchpath type {GAC}
+
+
+
+
+ Delegate to get the assembly path in the GAC
+
+
+
+
+ Construct.
+
+ Like x86 or IA64\AMD64, the processor architecture being targeted.
+ The search path element.
+ Delegate to get the assembly name object.
+ Delegate to check if the file exists.
+ Delegate to get the runtime version.
+ The targeted runtime version.
+ Delegate to get assembly path in the GAC.
+
+
+
+
+
+
+ Methods for dealing with the GAC.
+
+
+
+
+ Default delegate to get the path based on a fusion name.
+
+
+
+
+ Default delegate to get the gac enumerator.
+
+
+
+
+ Lazy loaded cached root path of the GAC.
+
+
+
+
+ Gets the root path of the GAC.
+
+
+
+
+ Given a strong name, find its path in the GAC.
+
+ The assembly name.
+ Like x86 or IA64\AMD64.
+ Delegate to get the clr version of the file.
+ Version of the targetted runtime.
+ Delegate to check whether the file exists.
+ Delegate to get path to a file based on the fusion name.
+ Delegate to get the enumerator which will enumerate over the GAC.
+ Whether to check for a specific version.
+ The path to the assembly. Empty if none exists.
+
+
+
+ Given a strong name generate the gac enumerator.
+
+
+
+
+ Enumerate the gac and generate a list of assemblies which match the strongname by runtime.
+
+
+
+
+ Given a fusion name get the path to the assembly on disk.
+
+
+
+
+ If we know we have a full fusion name we can skip enumerating the gac and just query for the path. This will
+ not check the runtime version of the assembly.
+
+
+
+
+ Given a strong name, find its path in the GAC.
+
+ The strong name.
+ Like x86 or IA64\AMD64.
+ Delegate to get the runtime version from a file path
+ What version of the runtime are we targeting
+ Are we guaranteed to have a full fusion name. This really can only happen if we have already resolved the assembly
+ Delegate to check whether the file exists.
+ Delegate to get path to a file based on the fusion name.
+ Delegate to get the enumerator which will enumerate over the GAC.
+ Whether to check for a specific version.
+ The path to the assembly. Empty if none exists.
+
+
+
+ Given a strong name, find its path in the GAC.
+
+ The build engine
+ The strong name.
+ Like x86 or IA64\AMD64.
+ Delegate to get the runtime version from a file path
+ What version of the runtime are we targeting
+ Are we guranteed to have a full fusion name. This really can only happen if we have already resolved the assembly
+ Delegate to check whether the file exists.
+ Delegate to get path to a file based on the fusion name.
+ Delegate to get the enumerator which will enumerate over the GAC.
+ Whether to check for a specific version.
+ The path to the assembly. Empty if none exists.
+
+
+
+ Return the root path of the GAC.
+
+
+
+
+ This class is a caching mechanism for the Register/UnregisterAssembly task to keep track of registered assemblies to clean up
+
+
+
+
+ The list of registered assembly files.
+
+
+
+
+ The list of registered type library files.
+
+
+
+
+ The number of entries in the state file
+
+
+
+
+ Sets the entry with the specified index
+
+
+
+
+ Gets the entry with the specified index
+
+
+
+
+ internal constructor
+
+ task logger instance used for logging
+ true if this task should log only errors, no warnings or messages; false otherwise
+ callback interface for resolving dependent COM refs/NET assemblies
+ cached reference information (typelib pointer, original task item, typelib name etc.)
+ reference name (for better logging experience)
+ directory we should write the wrapper to
+ delay sign wrappers?
+ file containing public/private keys
+ container name for public/private keys
+ True if the interop name should include the typelib's version
+ Path to the SDK tools directory where aximp.exe can be found
+ BuildEngine of parent task; needed for logging purposes when generating wrapper out-of-proc
+ Array of equals-separated pairs of environment variables that should be passed to the spawned executable, in addition to (or selectively overriding) the regular environment block.
+
+
+
+ Constructs the wrapper file name from a type library name.
+
+
+
+
+ Generates a wrapper for this reference.
+
+
+
+
+ Common abstract base for aximp and tlbimp COM reference wrapper classes.
+ They share the resolution method and only differ in constructing the wrapper file name.
+
+
+
+
+ internal constructor
+
+ task logger instance used for logging
+ true if this task should log only errors, no warnings or messages; false otherwise
+ callback interface for resolving dependent COM refs/NET assemblies
+ cached reference information (typelib pointer, original task item, typelib name etc.)
+ reference name (for better logging experience)
+ directory we should write the wrapper to
+ delay sign wrappers?
+ file containing public/private keys
+ container name for public/private keys
+ True if the interop name should include the typelib's version
+ True if GenerateWrapper() should generate the wrapper out-of-proc using aximp.exe or tlbimp.exe
+ Path to the SDK tools directory where aximp.exe or tlbimp.exe can be found
+ BuildEngine of parent task; needed for logging purposes when generating wrapper out-of-proc
+ Array of equals-separated pairs of environment variables that should be passed to the spawned executable, in addition to (or selectively overriding) the regular environment block.
+
+
+
+ directory we should write the wrapper to
+
+
+
+
+ callback interface for resolving dependent COM refs/NET assemblies
+
+
+
+
+ container name for public/private keys
+
+
+
+
+ file containing public/private keys
+
+
+
+
+ True if generated wrappers should be delay signed
+
+
+
+
+ Property to allow multitargeting of ResolveComReferences: If true, tlbimp.exe and
+ aximp.exe from the appropriate target framework will be run out-of-proc to generate
+ the necessary wrapper assemblies.
+
+
+
+
+ The BuildEngine of the ResolveComReference instance that created this instance
+ of the class: necessary for passing to the AxImp or TlbImp task that is spawned
+ when ExecuteAsTool is set to true
+
+
+
+
+ Environment variables to pass to the tool.
+
+
+
+
+ If ExecuteAsTool is true, this must be set to the SDK
+ tools path for the framework version being targeted.
+
+
+
+
+ When true, we include the typelib version number in the name.
+
+
+
+
+ Checks if there's a preexisting wrapper for this reference.
+
+
+
+
+ Checks if the existing wrapper is up to date.
+
+
+
+
+ Constructs the wrapper file path.
+
+
+
+
+ Helper method for constructing wrapper file name.
+
+
+
+
+ Constructs the wrapper file name from a type library name. Specialized wrappers must override it if
+ they want to use the Resolve method from this class.
+
+
+
+
+ Static version of GetWrapperFileName for use when calling from the outside.
+ This version need only be used if the interop DLL needs to include the typelib version in the name
+ Default implementation
+
+ XXX, when the interop DLL is of the form XXX.typeLibName.[Y.Z.]dll
+ The typelib to generate the wrapper name for
+ True if the interop name should include the typelib's version
+ Major version number to append to the interop DLL's name
+ Minor version number to append to the interop DLL's name
+
+
+
+ Given our KeyFile, KeyContainer, and DelaySign parameters, generate the public / private
+ key pair and validate that it exists to the extent needed.
+
+
+
+
+ Compare the strong name signing state of the existing wrapper to the signing
+ state we are requesting in this run of the task. Return true if they match (e.g.
+ from a signing perspective, the wrapper is up-to-date) or false otherwise.
+
+
+
+
+ ToolTask that contains shared functionality between the AxImp and TlbImp tasks.
+
+
+
+
+ True if the keyfile only contains the public key data, and thus
+ we should pass the file using the /publickey: parameter instead of
+ /keyfile.
+
+
+
+
+ Force strong name delay signing. Used with KeyFile or KeyContainer.
+
+
+
+
+ Key container containing strong name key pair.
+
+
+
+
+ File containing strong name key pair.
+
+
+
+
+ Path to the SDK directory where AxImp.exe and TlbImp.exe can be found
+
+
+
+
+ Returns the name of the tool to execute. AxTlbBaseTask is not
+ executable, so return null for the ToolName -- And make sure that
+ Execute() logs an error!
+
+
+
+
+ Invokes the ToolTask with the given parameters
+
+ True if the task succeeded, false otherwise
+
+
+
+ Adds commands for the tool being executed, that cannot be put in a response file.
+
+ The CommandLineBuilderExtension to add the commands to
+
+
+
+ Generates the full path to the tool being executed by this ToolTask
+
+ A string containing the full path of this tool, or null if the tool was not found
+
+
+
+ Validates the parameters passed to the task
+
+ True if parameters are valid
+
+
+
+ Adds options involving strong name signing -- syntax is the same between
+ AxImp and TlbImp
+
+ The command line to add options to
+
+
+
+ Validates the parameters passed to the task that involve strong name signing --
+ DelaySign, KeyContainer, and KeyFile
+
+ true if the parameters are valid, false otherwise.
+
+
+
+ Resolves metadata for the specified set of assemblies.
+
+
+
+
+ Assembly paths.
+
+
+
+
+ Set of resolved assembly metadata.
+
+
+
+
+ Execute the task.
+
+
+
+
+ List of assembly paths.
+
+
+
+
+ Gets a list of resolved assembly metadata.
+
+
+
+
+ Creates a TaskItem and populates it with the given assembly attributes.
+
+
+
+
+ COM type library dependency walker class
+
+
+
+
+ List of exceptions thrown by the components during scanning
+
+
+
+
+ Internal constructor
+
+
+
+
+ The main entry point to the dependency walker
+
+ type library to be analyzed
+
+
+
+ Analyze the given type looking for dependencies on other type libraries
+
+
+
+
+
+ Returns true if we don't need to analyze this particular type.
+
+
+
+
+ For a given type, analyze recursively all the types implemented by it.
+
+
+
+
+ For a given type, analyze all the variables defined by it
+
+
+
+
+ For a given type, analyze all the functions implemented by it. That means all the argument and return types.
+
+
+
+
+ Analyze the given element (i.e. composite type of an argument) recursively
+
+
+
+
+ Get all the dependencies of the processed libraries
+
+
+
+
+
+ FOR UNIT-TESTING ONLY
+ Returns a list of the analyzed type names
+
+
+
+
+ Clear the dependency list so we can read dependencies incrementally but still have the advantage of
+ not scanning previously seen types
+
+
+
+
+ Clear the analyzed type cache. This is necessary if we have to resolve dependencies that are also
+ COM references in the project, or we may get an inaccurate view of what their dependencies are.
+
+
+
+
+ Abstract base class for COM reference wrappers providing common functionality.
+ This class hierarchy is used by the ResolveComReference task.Every class deriving from ComReference
+ provides functionality for wrapping Com type libraries in a given way(for example AxReference, or PiaReference).
+
+
+
+
+ Internal constructor
+
+ task logger instance used for logging
+ true if this task should log only errors, no warnings or messages; false otherwise
+ cached reference information (typelib pointer, original task item, typelib name etc.)
+ reference name (for better logging experience)
+
+
+
+ various data for this reference (type lib attrs, name, path, ITypeLib pointer etc)
+
+
+
+
+ item name as it appears in the project file
+ (used for logging purposes, we use the actual typelib name for interesting operations)
+
+
+
+
+ task used for logging messages
+
+
+
+
+ True if this class should only log errors, but no messages or warnings.
+
+
+
+
+ lazy-init property, returns true if ADO 2.7 is installed on the machine
+
+
+
+
+ Error message if Ado27 is not installed on the machine (usually something like "type lib not registered")
+ Only contains valid data if ADO 2.7 is not installed and Ado27Installed was called before
+
+
+
+
+ Given a TYPELIBATTR structure, generates a key that can be used in hashtables to identify it.
+
+
+
+
+ Compares two TYPELIBATTR structures
+
+
+
+
+ Helper method for retrieving type lib attributes for the given type lib
+
+
+
+
+ Helper method for retrieving type attributes for a given type info
+
+
+
+
+
+
+
+ Helper method for retrieving type attributes for a given type info
+ This method needs to also return the native pointer to be released when we're done with our VARDESC.
+ It's not really possible to copy everything to a managed struct and then release the ptr immediately
+ here, since VARDESCs contain other native pointers we may need to access.
+
+
+
+
+ Helper method for retrieving the function description structure for the given function index.
+ This method needs to also return the native pointer to be released when we're done with our FUNCDESC.
+ It's not really possible to copy everything to a managed struct and then release the ptr immediately
+ here, since FUNCDESCs contain other native pointers we may need to access.
+
+
+
+
+ Gets the name of given type library.
+
+
+
+
+ Gets the name of given type library.
+
+
+
+
+ Strips type library number from a type library path (for example, "ref.dll\2" becomes "ref.dll")
+
+ type library path with possible typelib number appended to it
+ Delegate to check whether the file exists
+ proper file path to the type library
+
+
+
+ Gets the type lib path for given type lib attributes(reused almost verbatim from vsdesigner utils code)
+ NOTE: If there's a typelib number at the end of the path, does NOT strip it.
+
+
+
+
+ Tries to remap an ADO type library to ADO 2.7. If the type library passed in is an older ADO tlb,
+ then remap it to ADO 2.7 if it's registered on the machine (!). Otherwise don't modify the typelib.
+ Returns true if the type library passed in was successfully remapped.
+
+
+
+
+ Finds an existing wrapper for the specified component
+
+
+
+
+ Internal class representing information about a COM reference.
+
+
+
+
+ ITypeLib pointer
+
+
+
+
+ type library attributes for the reference. Taken from the task item itself or type library if
+ reference is specified as file on disk.
+
+
+
+
+ type library name
+
+
+
+
+ path to the reference, with typelibrary number stripped, if any (so ref1.dll\2 becomes ref1.dll).
+ The full path is only used for loading the type library, and it's not necessary
+ to do it after the interface pointer is cached in this object.
+
+
+
+
+ When using TlbImp.exe, we need to make sure that we keep track of the non-stripped typelib path,
+ because that's what we need to pass to TlbImp.
+
+
+
+
+ reference to the original ITaskItem, if any
+
+
+
+
+ Path to the resolved reference.
+
+
+
+
+ The wrapper that resulted from resolving the COM reference.
+
+
+
+
+ List of the paths to COM wrapper assemblies that this reference is dependent upon.
+
+
+
+
+ Reference to the ITaskItem generated from the resolved reference, if any.
+
+
+
+
+ Default constructor
+
+
+
+
+ Construct a new ComReferenceInfo copying all state from the given ComReferenceInfo instance
+
+
+
+
+ Initialize the object with type library attributes
+
+
+
+
+ Initialize the object with a type library path
+
+
+
+
+ A unique id string of this reference, it's either the item spec or (in the case of a dependency ref)
+ guid and version from typelib attributes
+
+
+
+
+ Get the source item, if available. Null otherwise.
+
+
+
+
+ Release the COM ITypeLib pointer for this reference
+
+
+
+
+ Predefined XML attributes of a ComReference Item.
+
+
+
+
+ Internal exception thrown when there's an unrecoverable failure resolving a COM reference and we should
+ move on to the next one, if it makes sense.
+
+
+
+
+ Default constructor
+
+
+
+
+ Constructor that allows to preserve the original exception information
+
+
+
+
+ Deserializing constructor. It should not be necessary if everything goes well, but if it doesn't
+ then we don't want to crash when trying to deserialize the uncaught exception into another AppDomain.
+
+
+
+
+
+
+ Predefined typelib wrapper types.
+
+
+
+
+ returns true is refType equals tlbimp
+
+
+
+
+ returns true is refType equals aximp
+
+
+
+
+ returns true is refType equals pia
+
+
+
+
+ returns true if refType equals primaryortlbimp, which is basically an unknown reference type
+
+
+
+
+ Class containing info about wrapper location, used for caching.
+
+
+
+
+ Callback interface for COM references to resolve their dependencies
+
+
+
+
+ Resolves a COM classic reference given the type library attributes and the type of wrapper to use.
+ If wrapper type is not specified, this method will first look for an existing reference in the project,
+ fall back to looking for a PIA and finally try to generate a regular tlbimp wrapper.
+
+ This method is available for references to call back to resolve their dependencies
+
+
+
+
+ Resolves a .NET assembly reference using the list of resolved managed references supplied to the task.
+
+ This method is available for references to call back to resolve their dependencies
+
+
+
+
+ Resolves a COM wrapper assembly reference based on the COM references resolved so far. This method is necessary
+ for Ax wrappers only, so all necessary references will be resolved by then(since we resolve them in
+ the following order: pia, tlbimp, aximp)
+
+ This method is available for references to call back to resolve their dependencies
+
+
+
+
+ Create an RCW for the current context/apartment.
+ This improves performance of cross apartment calls as the CLR will only
+ cache marshalled pointers for an RCW created in the current context.
+
+ Type of the RCW object
+
+
+
+ The last RCW that was created for the current context.
+
+
+
+
+ Indicates if we created the RCW and therefore need to release it's com reference.
+
+
+
+
+ Constructor creates the new RCW in the current context.
+
+ The RCW created in the original context.
+
+
+
+ Finalizes an instance of the class.
+
+
+
+
+ Call this helper if your managed object is really an RCW to a COM object
+ and that COM object was created in a different apartment from where it is being accessed
+
+ A new RCW created in the current apartment context
+
+
+
+ Override for IDisposable::Dispose
+
+
+ We created an RCW for the current apartment. When this object goes out of scope
+ we need to release the COM object before the apartment is released (via COUninitialize)
+
+
+
+
+ Cleanup our RCW com object references if required.
+
+
+
+
+ COM reference wrapper class for the tlbimp tool using a PIA.
+
+
+
+
+ Gets the resolved assembly path for the typelib wrapper.
+
+
+
+
+ Stores timestamps of COM components processed in the last run. The problem here is that installing/uninstalling
+ COM components does not update their timestamps with the current time (for a good reason). So if you revert to
+ an earlier revision of a COM component, its timestamp can go back in time and we still need to regenerate its
+ wrapper. So in ResolveComReference we compare the stored timestamp with the current component timestamp, and if
+ they are different, we regenerate the wrapper.
+
+
+
+
+ Component timestamps.
+ Key: Component path on disk
+ Value: DateTime struct
+
+
+
+
+ indicates whether the cache contents have changed since it's been created
+
+
+
+
+ Construct.
+
+
+
+
+ Compares the tlbimp and aximp paths to what the paths were when the cache was created
+ If these are different return false.
+
+ True if both paths match what is in the cache, false otherwise
+
+
+
+ Gets or sets the timestamp associated with the specified component file
+
+
+
+
+
+
+ Internal exception thrown when there's an unrecoverable failure extracting public/private keys.
+
+
+
+
+ Default constructor
+
+
+
+
+ Constructor that allows to preserve the original exception information
+
+
+
+
+ Constructor to implement required constructors for serialization
+
+
+
+
+ Possible strong name states of an assembly
+
+
+
+
+ Strong naming utilities.
+
+
+
+
+ Reads contents of a key file. Reused from vsdesigner code.
+
+
+
+
+ Given a key file or container, extract private/public key data. Reused from vsdesigner code.
+
+
+
+
+ Given an assembly path, determine if the assembly is [delay] signed or not. This code is based on similar unmanaged
+ routines in vsproject and sn.exe (ndp tools) codebases.
+
+
+
+
+
+
+ Retrieves the relative virtual address of the COR20 header, given the address of the NT headers structure. The catch
+ here is that the NT headers struct can be either 32 or 64 bit version, and some fields have different sizes there. We
+ need to see if we're dealing with a 32bit header or a 64bit one first.
+
+
+
+
+
+
+ internal constructor
+
+ task logger instance used for logging
+ true if this task should log only errors, no warnings or messages; false otherwise
+ callback interface for resolving dependent COM refs/NET assemblies
+ List of referenc files
+ cached reference information (typelib pointer, original task item, typelib name etc.)
+ reference name (for better logging experience)
+ directory we should write the wrapper to
+ Whether it has a temporary wrapper
+ delay sign wrappers?
+ file containing public/private keys
+ container name for public/private keys
+ Whether it has no class members
+ Architecture to seek.
+ True if the interop name should include the typelib's version
+ True if GenerateWrapper() should generate the wrapper out-of-proc using tlbimp.exe
+ Path to the SDK tools directory where tlbimp.exe can be found
+ BuildEngine of parent task; needed for logging purposes when generating wrapper out-of-proc
+ Array of equals-separated pairs of environment variables that should be passed to the spawned executable, in addition to (or selectively overriding) the regular environment block.
+
+
+
+ does this reference have a temporary (i.e. written to tmp directory) wrapper?
+
+
+
+
+ directory we should write the wrapper to
+
+
+
+
+ Static version of GetWrapperFileName, as it really doesn't depend on
+ anything specific to the class, and this way it can be called using
+ TlbReference.GetWrapperFileName from outside
+
+ The typelib to generate the wrapper name for
+ The appropriate wrapper filename
+
+
+
+ Static version of GetWrapperFileName, as it really doesn't depend on
+ anything specific to the class, and this way it can be called using
+ TlbReference.GetWrapperFileName from outside
+
+ The typelib to generate the wrapper name for
+ True if the interop name should include the typelib's version
+ Major version number to append to the interop DLL's name
+ Minor version number to append to the interop DLL's name
+ The appropriate wrapper filename
+
+
+
+ The list of active switches in the order they should be emitted.
+
+
+
+
+ The list of active switches in the order they should be emitted.
+
+
+
+
+ The dictionary that holds all set switches
+ The string is the name of the property, and the CommandLineToolSwitch holds all of the relevant information
+ i.e., switch, boolean value, type, etc.
+
+
+
+
+ Creates a generator that generates a command-line based on the specified Xaml file and parameters.
+
+
+
+
+ Creates a generator that generates a command-line based on the specified Xaml file and parameters.
+
+
+
+
+ Any additional options (as a literal string) that may have been specified in the project file
+
+
+
+
+ The template which, if set, will be used to govern formatting of the command line(s)
+
+
+
+
+ The string to append to the end of a non-templated commandline.
+
+
+
+
+ Generate the command-line
+
+
+
+
+ Appends a literal string containing the verbatim contents of any
+ "AdditionalOptions" parameter. This goes last on the command
+ line in case it needs to cancel any earlier switch.
+ Ideally this should never be needed because the MSBuild task model
+ is to set properties, not raw switches
+
+
+
+
+ Generates a part of the command line depending on the type
+
+ Depending on the type of the switch, the switch is emitted with the proper values appended.
+ e.g., File switches will append file names, directory switches will append filenames with "\" on the end
+
+
+
+ Verifies that the required args are present. This function throws if we have missing required args
+
+
+
+
+ Verifies that the dependencies are present, and if the dependencies are present, or if the property
+ doesn't have any dependencies, the switch gets emitted
+
+
+
+
+ Returns true if the property has a value in the list of active tool switches
+
+
+
+
+ Checks to see if the switch name is empty
+
+
+
+
+ Returns true if the property exists (regardless of whether it is
+ set or not) and false otherwise.
+
+
+
+
+ Emit a switch that's an array of task items
+
+
+
+
+ Generates the commands for the switches that may have an array of arguments
+ The switch may be empty.
+
+ For stringarray switches (e.g., Sources), the CommandLineToolSwitchName (if it exists) is emitted
+ along with each and every one of the file names separately (if no separator is included), or with all of the
+ file names separated by the separator.
+ e.g., AdditionalIncludeDirectores = "@(Files)" where Files has File1, File2, and File3, the switch
+ /IFile1 /IFile2 /IFile3 or the switch /IFile1;File2;File3 is emitted (the latter case has a separator
+ ";" specified)
+
+
+
+ Substitute the value for the switch into the switch value where the [value] string is found, if it exists.
+
+
+
+
+ Generates the commands for switches that have integers appended.
+
+ For integer switches (e.g., WarningLevel), the CommandLineToolSwitchName is emitted
+ with the appropriate integer appended, as well as any arguments
+ e.g., WarningLevel = "4" will emit /W4
+
+
+
+ Generates the switches for switches that either have literal strings appended, or have
+ different switches based on what the property is set to.
+
+ The string switch emits a switch that depends on what the parameter is set to, with and
+ arguments
+ e.g., Optimization = "Full" will emit /Ox, whereas Optimization = "Disabled" will emit /Od
+
+
+
+ Gets the arguments required by the specified switch and collects them into a string.
+
+
+
+
+ Generates the switches that are nonreversible
+
+ A boolean switch is emitted if it is set to true. If it set to false, nothing is emitted.
+ e.g. nologo = "true" will emit /Og, but nologo = "false" will emit nothing.
+
+
+
+ Generates the command line for switches that are reversible
+
+ A reversible boolean switch will emit a certain switch if set to true, but emit that
+ exact same switch with a flag appended on the end if set to false.
+ e.g., GlobalOptimizations = "true" will emit /Og, and GlobalOptimizations = "false" will emit /Og-
+
+
+
+ Generates the command line using the standard algorithm.
+
+
+
+
+ Generates the command-line using the template specified.
+
+
+
+
+ This enumeration specifies the different types for each switch in a tool
+ The types are used in the documentation
+
+
+
+
+ The boolean type has a boolean value, and there are types: one that can have a flag appended on the end
+ and one that can't
+ e.g. GlobalOptimizations = "true" would be /Og, and GlobalOptimizations="false" would be /Og-, but
+ WarnAsError = "true" would be /WX, while WarnAsError = "false" would be nothing.
+
+
+
+
+ The integer switch is used for properties that have several different integer values,
+ and depending on the value the property is set to, appends an integer to the end
+ of a certain switch
+ e.g. WarningLevel = "0" is /W0, WarningLevel = "2" is /W2
+
+
+
+
+ The string switch is used for two kinds of properties.
+ The first is the kind that has multiple values, and has a different switch for each value
+ e.g. Optimization="disabled" is /Od, "Full" is /Ox
+ The second is the kind that has a literal string appended to the end of a switch.
+ This type is similar to the File type, but in this case, will never get quoted.
+
+
+
+
+ The stringarray switch is used for properties that may have more
+ than one string appended to the end of the switch
+ e.g. InjectPrecompiledHeaderReference = myfile is /Ylmyfile
+
+
+
+
+ The ITaskItemArray type is used for properties that pass multiple files, but
+ want to keep the metadata. Otherwise, it is used in the same way as a StringArray type.
+
+
+
+
+ The class CommandLineToolSwitch holds information about the properties
+ for each task
+
+
+
+
+ Boolean switch type
+
+
+
+
+ Integer switch type
+
+
+
+
+ ITaskItemArray switch type.
+
+
+
+
+ String array switch type.
+
+
+
+
+ The value for a boolean switch.
+
+
+
+
+ The value for the integer type.
+
+
+
+
+ The list of strings for a string array.
+
+
+
+
+ The list of task items for ITaskItemArray types.
+
+
+
+
+ The default constructor creates a new CommandLineToolSwitch to hold the name of
+ the tool, the attributes, the dependent switches, and the values (if they exist)
+
+
+
+
+ Overloaded constructor. Takes a CommandLineToolSwitchType and sets the type.
+
+
+
+
+ The name of the parameter
+
+
+
+
+ Specifies if this switch should be included on the command-line.
+
+
+
+
+ The Value of the parameter
+
+
+
+
+ Flag indicating if the switch is valid.
+
+
+
+
+ The SwitchValue of the parameter
+
+
+
+
+ The SwitchValue of the parameter
+
+
+
+
+ The arguments.
+
+
+
+
+ The DisplayName of the parameter
+
+
+
+
+ The Description of the parameter
+
+
+
+
+ The type of the switch, i.e., boolean, string, stringarray, etc.
+
+
+
+
+ Indicates whether or not the switch is emitted with a flag when false
+
+
+
+
+ True if multiple values are allowed.
+
+
+
+
+ The flag to append at the end of a switch when the switch is set to false
+ i.e., for all CL switches that are reversible, the FalseSuffix is "-"
+
+
+
+
+ The flag to append to the end of the switch when that switch is true
+ i.e., In the OptimizeForWindows98, the switch is OPT, the FalseSuffix is
+ :NOWIN98, and the TrueSuffix is :WIN98
+
+
+
+
+ The separator indicates the characters that go between the switch and the string
+ in the string typed case, the characters that go between each name for the
+ string array case, or the characters that go between the switch and the
+ appendage for the boolean case.
+
+
+
+
+ The Fallback attribute is used to specify which property to look at in the
+ case that the argument property is not set, or if the file that the
+ argument property indicates is nonexistent.
+
+
+
+
+ This attribute specifies whether or not an argument attribute is required.
+
+
+
+
+ This property indicates whether or not the property is required in the project file
+
+
+
+
+ This property indicates the parent of the dependency
+
+
+
+
+ This property indicates the parent of the dependency
+
+
+
+
+ The BooleanValue is used for the boolean switches, and are set to true
+ or false, depending on what you set it to.
+
+
+
+
+ The number is the number you wish to append to the end of integer switches
+
+
+
+
+ Returns the set of inputs to a switch
+
+
+
+
+
+ Returns the set of inputs to a switch that is a set of ITaskItems
+
+
+
+
+
+ Expresses a relationship between an argument and a property.
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor.
+
+
+
+
+ The name of the argument
+
+
+
+
+ The value.
+
+
+
+
+ Flag indicating if the argument is required or not.
+
+
+
+
+ Derived class indicating how to separate values from the specified argument.
+
+
+
+
+ Constructor.
+
+
+
+
+ The separator.
+
+
+
+
+ Class describing the relationship between switches.
+
+
+
+
+ The RelationsParser class takes an xml file and parses the parameters for a task.
+
+
+
+
+ A boolean to see if the current file parsed is an import file.
+
+
+
+
+ The name of the task
+
+
+
+
+ The base type of the class
+
+
+
+
+ The namespace of the class
+
+
+
+
+ Namespace for the resources
+
+
+
+
+ The name of the executable
+
+
+
+
+ The default prefix for each switch
+
+
+
+
+ All of the parameters that were parsed
+
+
+
+
+ All of the parameters that have a default value
+
+
+
+
+ All of the properties that serve as fallbacks for unset properties
+
+
+
+
+ Returns the number of errors encountered
+
+
+
+
+ Returns the log of errors
+
+
+
+
+ The method that loads in an XML file.
+
+ the xml file containing switches and properties.
+
+
+
+ Overloaded method that reads from a stream to load.
+
+ the xml file containing switches and properties
+
+
+
+ Parses the xml file.
+
+
+
+
+ Parses the loaded xml file, creates toolSwitches and adds them to the properties list
+
+
+
+
+ Checks to see if the "name" attribute exists
+
+
+
+
+ Checks to see if the element's name is "task"
+
+
+
+
+ Gets all the attributes assigned in the xml file for this parameter or all of the nested switches for
+ this parameter group
+
+
+
+
+ Increases the error count by 1, and logs the error message
+
+
+
+
+ An XML document can have many root nodes, but usually we want the single root
+ element. Callers can test each root node in turn with this method, until it returns
+ true.
+
+ Candidate root node
+ true if node is the root element
+
+
+
+ The type of value this property takes.
+
+
+
+
+ The property has no value type specified
+
+
+
+
+ The property takes values of type Boolean
+
+
+
+
+ The property takes values of type String
+
+
+
+
+ The property takes values of type Integer
+
+
+
+
+ The property takes values of type String[]
+
+
+
+
+ The property takes values of type ITaskItem[]
+
+
+
+
+ The class Property holds information about the properties
+ for each task
+
+
+
+
+ The type of the switch, i.e., boolean, stringarray, etc.
+
+
+
+
+ Specifies if the property should be included on the command line.
+
+
+
+
+ Specifies whether the switch is reversible (has a false suffix) or not
+
+
+
+
+ The name of the switch, without the / in front of it
+ i.e., Od for the Optimization property
+
+
+
+
+ The name of the reverse switch, without the / in front of it
+
+
+
+
+ The flag to append at the end of a switch when the switch is set to false
+ i.e., for all CL switches that are reversible, the FalseSuffix is "-"
+
+
+
+
+ The flag to append to the end of the switch when that switch is true
+ i.e., In the OptimizeForWindows98, the switch is OPT, the FalseSuffix is
+ :NOWIN98, and the TrueSuffix is :WIN98
+
+
+
+
+ The max integer value an integer typed switch can have
+ An exception should be thrown in the number the user specifies is
+ larger than the max
+
+
+
+
+ The minimum integer value an integer typed switch can have
+ An exception should be thrown in the number the user specifies is
+ less than the minimum
+
+
+
+
+ The separator indicates the characters that go between the switch and the string
+ in the string typed case, the characters that go between each name for the
+ string array case, or the characters that go between the switch and the
+ appendage for the boolean case.
+
+
+
+
+ The default value for the switch to have (in the case of reversibles, true
+ or false, in the case of files, a default file name)
+
+
+
+
+ The argument specifies which property to look for when appending a
+ file name, and that property contains the actual file name.
+ i.e., UsePrecompiledHeader has the argument "PrecompiledHeaderThrough"
+ and the values "CreateUsingSpecific", "GenerateAuto", and "UseUsingSpecific"
+ that have the switches /Yc, /YX, and /Yu.
+ If PrecompiledHeaderThrough has the value "myfile", then the emitted switch
+ would be /Ycmyfile, /YXmyfile, or /Yumyfile
+
+
+
+
+ The Fallback attribute is used to specify which property to look at in the
+ case that the argument property is not set, or if the file that the
+ argument property indicates is nonexistent.
+
+
+
+
+ This property whether or not the property is required in the project file
+
+
+
+
+ This property indicates whether the property is an output, i.e., object files
+
+
+
+
+ The name of the property this one is dependent on.
+
+
+
+
+ The name of the property
+
+
+
+
+ The list of switches that are dependent with this one.
+
+
+
+
+ The different choices for each property, and the corresponding switch
+
+
+
+
+ The prefix for each switch.
+
+
+
+
+ The Category for each switch.
+
+
+
+
+ The Display Name for each switch.
+
+
+
+
+ The Description for each switch.
+
+
+
+
+ The arguments which apply to this property.
+
+
+
+
+ creates a new Property with the exact same information as this one
+
+
+
+
+ An enum value.
+
+
+
+
+ The name of the property
+
+
+
+
+ The switch Name of the property
+
+
+
+
+ The switch Name of the property
+
+
+
+
+ The switch Name of the property
+
+
+
+
+ The switch Name of the property
+
+
+
+
+ The prefix for each switch.
+
+
+
+
+ The switch Name of the property
+
+
+
+
+ An argument for the property.
+
+
+
+
+ The switch Name of the property
+
+
+
+
+ The switch Name of the property
+
+
+
+
+ The switch Name of the property
+
+
+
+
+ The TaskGenerator class creates code for the specified file
+
+
+
+
+ The property for the tool name.
+
+
+
+
+ IsOn
+
+
+
+
+ IsOff
+
+
+
+
+ The value attribute.
+
+
+
+
+ The boolean type
+
+
+
+
+ The integer type
+
+
+
+
+ The string type
+
+
+
+
+ The string array type
+
+
+
+
+ The ITaskItemArray type
+
+
+
+
+ The KeyValue pair type.
+
+
+
+
+ The import type.
+
+
+
+
+ The ToolSwitch.
+
+
+
+
+ The ToolSwitch type.
+
+
+
+
+ The switchToAdd field.
+
+
+
+
+ The ActiveToolSwitches property.
+
+
+
+
+ The switchMap field.
+
+
+
+
+ The MultiValues property.
+
+
+
+
+ The AddLast method.
+
+
+
+
+ The ValidateInteger method.
+
+
+
+
+ The ReadSwitchMap method.
+
+
+
+
+ The IsPropertySet method.
+
+
+
+
+ The IsSwitchValueSet method.
+
+
+
+
+ The AddDefaultsToActiveSwitchList method.
+
+
+
+
+ The AddFallbacksToActiveSwitchList method.
+
+
+
+
+ The ValidateRelations method.
+
+
+
+
+ The ReplaceToolSwitch method.
+
+
+
+
+ The Overrides method.
+
+
+
+
+ The Name property
+
+
+
+
+ The BooleanValue property
+
+
+
+
+ The FileName property
+
+
+
+
+ The TaskItemArray property
+
+
+
+
+ The StringList property
+
+
+
+
+ The Number property
+
+
+
+
+ The FalseSuffix property
+
+
+
+
+ The TrueSuffix property
+
+
+
+
+ The Separator property
+
+
+
+
+ The FallbackArgumentParameter property
+
+
+
+
+ The Output property
+
+
+
+
+ The ArgumentParameter property
+
+
+
+
+ The Required property
+
+
+
+
+ The Parents property
+
+
+
+
+ The Reversible property
+
+
+
+
+ The SwitchValue property
+
+
+
+
+ The Value property
+
+
+
+
+ The Required property
+
+
+
+
+ The DisplayName property
+
+
+
+
+ The Description property
+
+
+
+
+ The ReverseSwitchValue property
+
+
+
+
+ The IsValid property
+
+
+
+
+ Types to ignore.
+
+
+
+
+ The xml parsers
+
+
+
+
+ The relations parser
+
+
+
+
+ The default constructor
+
+
+
+
+ When set to true, the generated code will include comments.
+
+
+
+
+ Constructor that takes a parser
+
+
+
+
+ The platform
+
+
+
+
+ Removes properties that have types we are ignoring.
+
+
+
+
+ Generates the source code for the task in the specified file
+
+
+
+
+ Generates a method called "AddDefaultsToActiveSwitchList" that takes all of the properties that have
+ default values and adds them to the active switch list
+
+
+
+
+ Generates a method called "AddFallbacksToActiveSwitchList" that takes all of the properties that
+ are not set but have fallbacks and adds the fallbacks to the active list if they are set.
+
+
+
+
+ Generates code for the different properties in a task
+
+
+
+
+ Generates an assignment statment for the setters of properties, where the rhs is a string
+ e.g., switchToAdd.Name = "Optimizations";
+
+
+
+
+ Generates an assignment statment for the setters of properties, where the rhs is an expression
+ e.g., switchToAdd.ArgumentRequired = true;
+
+
+
+
+ Generates an assignment for the toolswitch, with a prefix included
+ i.e., switchToAdd.ToolSwitchName = "/Ox";
+
+
+
+
+ This method generates all of the common cases between different property types.
+ The common cases are:
+ 1) A new ToolSwitch object has to be created for each property
+ 2) The newly created ToolSwitch has to be added to the ActiveToolSwitches list
+ 4) For all non-empty common attributes that don't need customization, set the property
+ These would be:
+ name, type, separator, argument, argumentRequired, fallback, dependencies
+
+ The property
+ The CodeDom property
+ The type of the property
+ The return type of the property
+ The lhs of the assignment statement lhs = value
+
+
+
+ Generates standart set statements for properties.
+
+
+
+
+ Generates an ITaskItem array property type.
+
+
+
+
+ This method generates all of the switches for integer typed properties.
+
+
+
+
+ This method generates the switches for all of the nonreversible properties.
+
+
+
+
+ This method generates all of the switches for the string type property.
+
+
+
+
+ Returns true if the property refers to the current platform.
+
+
+
+
+ Returns true if the switch value refers to the current platform.
+
+
+
+
+ This method generates overrides array
+
+
+
+
+ This method generates switches for all the properties that are of type
+ string array
+
+
+
+
+ This method generates the property that returns the tool exe value set by the ToolExe property
+
+
+
+
+ This method generates the code that appears at the top of each class (that imports other libraries)
+
+
+
+
+ This method generates the default constructor for the generated task
+
+
+
+
+ This method generates the relations which will be used at runtime to validate the command line
+
+
+
+
+ Increases the error count by 1, and logs the error message
+
+
+
+
+ Puts a string inside two quotes
+
+
+
+
+ Returns the number of errors encountered
+
+
+
+
+ Returns the log of errors
+
+
+
+
+ The TaskParser class takes an xml file and parses the parameters for a task.
+
+
+
+
+ The ordered list of how the switches get emitted.
+
+
+
+
+ The name of the task
+
+
+
+
+ The base type of the class
+
+
+
+
+ The namespace of the class
+
+
+
+
+ Namespace for the resources
+
+
+
+
+ The name of the executable
+
+
+
+
+ The default prefix for each switch
+
+
+
+
+ All of the parameters that were parsed
+
+
+
+
+ All of the parameters that have a default value
+
+
+
+
+ All of the properties that serve as fallbacks for unset properties
+
+
+
+
+ The ordered list of properties
+
+
+
+
+ Returns the log of errors
+
+
+
+
+ Parse the specified string, either as a file path or actual XML content.
+
+
+
+
+ Parse a Xaml document from a TextReader
+
+
+
+
+ Parse a Xaml document from a rule
+
+
+
+
+ Reads in the nodes of the xml file one by one and builds the data structure of all existing properties
+
+
+
+
+ Fills in the property data structure
+
+
+
+
+ Gets all the attributes assigned in the xml file for this parameter or all of the nested switches for
+ this parameter group
+
+
+
+
+ Part of the base class for tasks generated by the Xaml task factory.
+
+
+
+
+ True if we returned our commands directly from the command line generation and do not need to use the
+ response file (because the command-line is short enough)
+
+
+
+
+ The task logging helper
+
+
+
+
+ The command line for this task.
+
+
+
+
+ Constructor called by the generated task.
+
+
+
+
+ The command-line template to use, if any.
+
+
+
+
+ The additional options that have been set. These are raw switches that
+ go last on the command line.
+
+
+
+
+ Retrieves the list of acceptable non-zero exit codes.
+
+
+
+
+ Gets or set the dictionary of active tool switch values.
+
+
+
+
+ Ordered list of switches
+
+ Switches in declaration order
+
+
+
+ The list of all the switches that have been set
+
+
+
+
+ Overridden to use UTF16, which works better than UTF8 for older versions of CL, LIB, etc.
+
+
+
+
+ Made a property to abstract out the "if null, call GenerateCommands()" logic.
+
+
+
+
+ Returns true if the property has a value in the list of active tool switches
+
+
+
+
+ Replace an existing switch with the specifed one of the same name.
+
+
+
+
+ Add the value for a switch to the list of active values
+
+
+
+
+ Override Execute so that we can close the event handle we've created
+
+
+
+
+ For testing purposes only
+ Returns the generated command line
+
+
+
+
+ Checks to see if the switch name is empty
+
+
+
+
+ Determine if the return value is in the list of acceptable exit codes.
+
+
+
+
+ Validate the data
+
+
+
+
+ Validate relationships.
+
+
+
+
+ Validate the overrides.
+
+
+
+
+ Creates the command line and returns it as a string by:
+ 1. Adding all switches with the default set to the active switch list
+ 2. Customizing the active switch list (overridden in derived classes)
+ 3. Iterating through the list and appending switches
+
+
+
+
+ Allows tool to handle the return code.
+ This method will only be called with non-zero exitCode. If the non zero code is an acceptable one then we return true
+
+ The return value of this method will be used as the task return value
+
+
+
+ Generates the command line for the tool.
+
+
+
+
+ A method that will validate the integer type arguments
+ If the min or max is set, and the value a property is set to is not within
+ the range, the build fails
+
+
+
+
+ A method for the enumerated values a property can have
+ This method checks the value a property is set to, and finds the corresponding switch
+
+ The switch that a certain value is mapped to
+
+
+
+ A method for the enumerated values a property can have
+ This method checks the value a property is set to, and finds the corresponding switch
+
+ The switch that a certain value is mapped to
+
+
+
+ Gets a switch value by concatenating the switch's base value (usually the switch itself) with its argument, if any.
+
+
+
+
+ Default constructor
+
+
+
+
+ This method is called to find the tool if ToolPath wasn't specified.
+ We just return the name of the tool so it can be found on the path.
+ Deriving classes can choose to do something else.
+
+
+
+
+ Validates all of the set properties that have either a string type or an integer type
+
+
+
+
+ Generate the command line if it is less than 32k.
+
+
+
+
+ A dictionary that has copy-on-write semantics.
+ KEYS AND VALUES MUST BE IMMUTABLE OR COPY-ON-WRITE FOR THIS TO WORK.
+
+ The value type.
+
+ Thread safety: for all users, this class is as thread safe as the underlying Dictionary implementation, that is,
+ safe for concurrent readers or one writer from EACH user. It achieves this by locking itself and cloning before
+ any write, if it is being shared - i.e., stopping sharing before any writes occur.
+
+
+ This class must be serializable as it is used for metadata passed to tasks, which may
+ be run in a separate appdomain.
+
+
+
+
+ Empty dictionary with a ,
+ used as the basis of new dictionaries with that comparer to avoid
+ allocating new comparers objects.
+
+
+
+
+ Empty dictionary with ,
+ used as the basis of new dictionaries with that comparer to avoid
+ allocating new comparers objects.
+
+
+
+
+ The backing dictionary.
+ Lazily created.
+
+
+
+
+ Constructor. Consider supplying a comparer instead.
+
+
+
+
+ Constructor taking a specified comparer for the keys
+
+
+
+
+ Serialization constructor, for crossing appdomain boundaries
+
+
+
+
+ Cloning constructor. Defers the actual clone.
+
+
+
+
+ Returns the collection of keys in the dictionary.
+
+
+
+
+ Returns the collection of values in the dictionary.
+
+
+
+
+ Returns the number of items in the collection.
+
+
+
+
+ Returns true if the collection is read-only.
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ Comparer used for keys
+
+
+
+
+ Accesses the value for the specified key.
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ Adds a value to the dictionary.
+
+
+
+
+ Adds several value to the dictionary.
+
+
+
+
+ Returns true if the dictionary contains the specified key.
+
+
+
+
+ Removes the entry for the specified key from the dictionary.
+
+
+
+
+ Attempts to find the value for the specified key in the dictionary.
+
+
+
+
+ Adds an item to the collection.
+
+
+
+
+ Clears the collection.
+
+
+
+
+ Returns true ff the collection contains the specified item.
+
+
+
+
+ Copies all of the elements of the collection to the specified array.
+
+
+
+
+ Remove an item from the dictionary.
+
+
+
+
+ Implementation of generic IEnumerable.GetEnumerator()
+
+
+
+
+ Implementation of IEnumerable.GetEnumerator()
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ Clone, with the actual clone deferred
+
+
+
+
+ Returns true if these dictionaries have the same backing.
+
+
+
+
+ Defines methods to support the comparison of objects for
+ equality over constrained inputs.
+
+
+
+
+ Determines whether the specified objects are equal, factoring in the specified bounds when comparing .
+
+
+
+
+ Returns a hash code for the specified object factoring in the specified bounds.
+
+
+
+
+ A read-only wrapper over an empty collection.
+
+
+ Thus this is an omission from the BCL.
+
+ Type of element in the collection
+
+
+
+ Backing live collection
+
+
+
+
+ Private default constructor as this is a singleton
+
+
+
+
+ Get the instance
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Returns true.
+
+
+
+
+ Whether collection is synchronized
+
+
+
+
+ Sync root
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Get an enumerator over an empty collection
+
+
+
+
+ Get an enumerator over an empty collection
+
+
+
+
+ ICollection version of CopyTo
+
+
+
+
+ This is a custom string comparer that has three advantages over the regular
+ string comparer:
+ 1) It can generate hash codes and perform equivalence operations on parts of a string rather than a whole
+ 2) It uses "unsafe" pointers to maximize performance of those operations
+ 3) It takes advantage of limitations on MSBuild Property/Item names to cheaply do case insensitive comparison.
+
+
+
+
+ The processor architecture on which we are running, but default it will be x86
+
+
+
+
+ The default immutable comparer instance.
+
+
+
+
+ Performs the "Equals" operation on two MSBuild property, item or metadata names
+
+
+
+
+ Getting a case insensitive hash code for the msbuild property, item or metadata name
+
+
+
+
+ A read-only live wrapper over a collection.
+ It does not prevent modification of the values themselves.
+
+
+ There is a type with the same name in the BCL, but it is actually a ReadOnlyList and does not accept an ICollection>T<.
+ Thus this is an omission from the BCL.
+
+ Type of element in the collection
+
+
+
+ Backing live enumerable.
+ May be a collection.
+
+
+
+
+ Construct a read only wrapper around the current contents
+ of the IEnumerable, or around the backing collection if the
+ IEnumerable is in fact a collection.
+
+
+
+
+ Return the number of items in the backing collection
+
+
+
+
+ Returns true.
+
+
+
+
+ Whether collection is synchronized
+
+
+
+
+ Sync root
+
+
+
+
+ Get a backing ICollection.
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Pass through for underlying collection
+
+
+ NOTE: This does NOT cause a copy into a List, since the
+ backing enumerable suffices.
+
+
+
+
+ Pass through for underlying collection
+
+
+ NOTE: This does NOT cause a copy into a List, since the
+ backing enumerable suffices.
+
+
+
+
+ ICollection version of CopyTo
+
+
+
+
+ A special singleton enumerable that enumerates a read-only empty dictionary
+
+ Key
+ Value
+
+
+
+ The single instance
+
+
+
+
+ The single instance
+
+
+
+
+ Private default constructor as this is a singleton
+
+
+
+
+ Get the instance
+
+
+
+
+ Empty returns zero
+
+
+
+
+ Returns true
+
+
+
+
+ Gets empty collection
+
+
+
+
+ Gets empty collection
+
+
+
+
+ Is it fixed size
+
+
+
+
+ Not synchronized
+
+
+
+
+ No sync root
+
+
+
+
+ Keys
+
+
+
+
+ Values
+
+
+
+
+ Keys
+
+
+
+
+ Values
+
+
+
+
+ Indexer
+
+
+
+
+ Get returns null as read-only
+ Set is prohibited and throws.
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Empty returns false
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Empty returns false
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Empty returns false
+
+
+
+
+ Empty does nothing
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Get empty enumerator
+
+
+
+
+ Get empty enumerator
+
+
+
+
+ Add
+
+
+
+
+ Contains
+
+
+
+
+ Enumerator
+
+
+
+
+ Remove
+
+
+
+
+ CopyTo
+
+
+
+
+ A debug only helper class for tracing
+
+
+
+
+ A dictionary of named counters
+
+
+
+
+ Last time logging happened
+
+
+
+
+ How often to log
+
+
+
+
+ A place callers can put something worth logging later
+
+
+
+
+ Short name of the current assembly - to distinguish statics when this type is shared into different assemblies
+
+
+
+
+ Put something in the slot
+
+
+
+
+ Put something in the slot
+
+ The key type.
+ The value type.
+
+
+
+ Increment the named counter, and dump if it's time to do so
+
+
+
+
+ Log the provided items
+
+ The item type.
+
+
+
+ Dump all the named counters, if any
+
+
+
+
+ The methods here are designed to aid in transition from the v2 StrongName APIs on mscoree.dll to the
+ v4 metahost APIs (which are in-proc SxS aware).
+
+
+
+
+ This is a managed wrapper for the IClrStrongName interface defined in metahost.idl
+ This uses IntPtrs in some places where you'd normally expect a byte[] in order to
+ be compatible with callers who wrote their PInvoke signatures that way.
+ Ideally we'd probably just simplify all such callers to using byte[] and remove this
+ version of the interface.
+
+
+
+
+ This is a managed wrapper for the IClrStrongName interface defined in metahost.idl
+ This is very similar to the standard RCWs provided in
+ ndp/fx/src/hosting/interop/microsoft/runtime/hosting/interop, but we don't want to
+ reference that assembly (part of the SDK only, not .NET redist). Also, our version
+ is designed specifically for easy migration from the old mscoree APIs, for example
+ all APIs return HResults rather than throw exceptions.
+
+
+
+
+ The reason you need provider type 24, is because that’s the only RSA provider type that supports SHA-2 operations. (For instance, PROV_RSA_FULL does not support SHA-2).
+ As for official guidance – I’m not sure of any. For workarounds though, if you’re using the Microsoft software CSPs, they share the underlying key store. You can get the key container name from your RSA object, then open up a new RSA object with the same key container name but with PROV_RSA_AES. At that point, you should be able to use SHA-2 algorithms.
+
+
+ Whether to use sha256
+
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Build.Utilities.Core.xml b/msvc/MSBuild/Current/Bin/Microsoft.Build.Utilities.Core.xml
new file mode 100644
index 0000000000000000000000000000000000000000..993aa846da768261b5d616fefddc85b48d6a3df2
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Build.Utilities.Core.xml
@@ -0,0 +1,10131 @@
+
+
+
+ Microsoft.Build.Utilities.Core
+
+
+
+
+ Represents an API contract definition
+
+
+
+
+ Name of the contract
+
+
+
+
+ Version of the contract
+
+
+
+
+ Constructor.
+
+
+
+
+ Returns true if this element is a "ContainedApiContracts" element.
+
+
+
+
+ Given an XML element containing API contracts, read out all contracts within that element.
+
+
+
+
+ Helper class with ApiContract element names
+
+
+
+
+ Element containing a bucket of contracts
+
+
+
+
+ Element representing an individual API contract
+
+
+
+
+ Element representing a flag to indicate if the SDK content is versioned
+
+
+
+
+ Helper class with attribute names
+
+
+
+
+ Name associated with this element
+
+
+
+
+ Version associated with this element
+
+
+
+
+ This class provides the same functionality as the Task class, but derives from MarshalByRefObject so that it can be
+ instantiated in its own app domain.
+
+
+
+
+ Default (family) constructor.
+
+
+
+
+ This (family) constructor allows derived task classes to register their resources.
+
+ The task resources.
+
+
+
+ This (family) constructor allows derived task classes to register their resources, as well as provide a prefix for
+ composing help keywords from string resource names. If the prefix is an empty string, then string resource names will
+ be used verbatim as help keywords. For an example of how the prefix is used, see the
+ method.
+
+ The task resources.
+ The help keyword prefix.
+
+
+
+ The build engine automatically sets this property to allow tasks to call back into it.
+
+ The build engine interface available to tasks.
+
+
+
+ The build engine sets this property if the host IDE has associated a host object with this particular task.
+
+ The host object instance (can be null).
+
+
+
+ Gets an instance of a TaskLoggingHelper class containing task logging methods.
+
+ The logging helper object.
+
+
+
+ Gets or sets the task's culture-specific resources. Derived classes should register their resources either during
+ construction, or via this property, if they have localized strings.
+
+ The task's resources (can be null).
+
+
+
+ Gets or sets the prefix used to compose help keywords from string resource names. If a task does not have help
+ keywords associated with its messages, it can ignore this property or set it to null. If the prefix is set to an empty
+ string, then string resource names will be used verbatim as help keywords. For an example of how this prefix is used,
+ see the method.
+
+ The help keyword prefix string (can be null).
+
+
+
+ Must be implemented by derived class.
+
+ true, if successful
+
+
+
+ Overridden to give tasks deriving from this class infinite lease time. Otherwise we end up with a limited
+ lease (5 minutes I think) and task instances can expire if they take long time processing.
+
+
+
+
+ Contains information about entries in the AssemblyFoldersEx registry keys.
+
+
+
+
+ Constructor
+
+
+
+
+ Registry hive used
+
+
+
+
+ Registry view used
+
+
+
+
+ The registry key to the component
+
+
+
+
+ Folder found at the registry keys default value
+
+
+
+
+ Target framework version for the registry key
+
+
+
+
+ Represents information about assembly folders.
+
+
+
+
+ Initializes a new instance of the AssemblyFoldersFromConfigInfo class.
+
+ The directory path.
+ The of the target framework.
+
+
+
+ Gets the path to the assembly folder.
+
+
+
+
+ Gets the of the target framework.
+
+
+
+
+ (1) Make sure values containing hyphens are quoted (RC at least requires this)
+ (2) Escape any embedded quotes.
+ -- Literal double quotes should be written in the form \" not ""
+ -- Backslashes falling just before doublequotes must be doubled.
+ -- Literal double quotes can only occur in pairs (you cannot pass a single literal double quote)
+ -- Functional double quotes (for example to handle spaces) are best put around both name and value
+ in switches like /Dname=value.
+
+
+
+ Below are some quoting experiments, using the /D switch with the CL and RC preprocessor.
+ The /D switch is a little more tricky than most switches, because it has a name=value pair.
+ The table below contains what the preprocessor actually embeds when passed the switch in the
+ first column:
+
+ CL via cmd line CL via response file RC
+ /DFOO="A" A A
+ /D"FOO="A"" A A A
+ /DFOO=A A A
+ /D"FOO=A" A A
+ /DFOO=""A"" A A A
+
+ /DFOO=\"A\" "A" "A"
+ /DFOO="""A""" "A" broken "A"
+ /D"FOO=\"A\"" "A" "A"
+ /D"FOO=""A""" "A" "A"
+
+ /DFOO="A B" A B A B
+ /D"FOO=A B" A B A B
+
+ /D"FOO="A B"" broken
+ /DFOO=\"A B\" broken
+ /D"FOO=\"A B\"" "A B" "A B" "A B"
+ /D"FOO=""A B""" "A B" broken broken
+
+ From my experiments (with CL and RC only) it seems that
+ -- Literal double quotes are most reliably written in the form \" not ""
+ -- Backslashes falling just before doublequotes must be doubled.
+ -- Values containing literal double quotes must be quoted.
+ -- Literal double quotes can only occur in pairs (you cannot pass a single literal double quote)
+ -- For /Dname=value style switches, functional double quotes (for example to handle spaces) are best put around both
+ name and value (in other words, these kinds of switches don't need special treatment for their '=' signs).
+ -- Values containing hyphens should be quoted; RC requires this, and CL does not mind.
+
+
+
+
+ Default constructor
+
+
+
+
+ Default constructor
+
+
+
+
+ Default constructor
+
+
+
+
+ Returns the length of the current command
+
+
+
+
+ Retrieves the private StringBuilder instance for inheriting classes
+
+
+
+
+ Return the command-line as a string.
+
+
+
+
+
+ Should hyphens be quoted or not
+
+
+
+
+ Should use new line separators instead of spaces to separate arguments.
+
+
+
+
+ Instead of defining which characters must be quoted, define
+ which characters we know its safe to not quote. This way leads
+ to more false-positives (which still work, but don't look as
+ nice coming out of the logger), but is less likely to leave a
+ security hole.
+
+
+
+
+ Also, define the characters that we know for certain need quotes.
+ This is partly to document which characters we know can cause trouble
+ and partly as a sanity check against a bug creeping in.
+
+
+
+
+ Use a private property so that we can lazy initialize the regex
+
+
+
+
+ Use a private getter property to we can lazy initialize the regex
+
+
+
+
+ Checks the given switch parameter to see if it must/can be quoted.
+
+ the string to examine for characters that require quoting
+ true, if parameter should be quoted
+
+
+
+ Add a space or newline to the specified string if and only if it's not empty.
+
+
+ This is a pretty obscure method and so it's only available to inherited classes.
+
+
+
+
+ Appends a string. Quotes are added if they are needed.
+ This method does not append a space to the command line before executing.
+
+
+ Escapes any double quotes in the string.
+
+ The string to append
+
+
+
+ Appends given text to the buffer after first quoting the text if necessary.
+
+
+
+
+
+
+ Appends a string. No quotes are added.
+ This method does not append a space to the command line before executing.
+
+
+ AppendTextUnquoted(@"Folder name\filename.cs") => "Folder name\\filename.cs"
+
+
+ In the future, this function may fixup 'textToAppend' to handle
+ literal embedded quotes.
+
+ The string to append
+
+
+
+ Appends a file name. Quotes are added if they are needed.
+ If the first character of the file name is a dash, ".\" is prepended to avoid confusing the file name with a switch
+ This method does not append a space to the command line before executing.
+
+
+ AppendFileNameWithQuoting("-StrangeFileName.cs") => ".\-StrangeFileName.cs"
+
+
+ In the future, this function may fixup 'text' to handle
+ literal embedded quotes.
+
+ The file name to append
+
+
+
+ Appends a file name quoting it if necessary.
+ This method appends a space to the command line (if it's not currently empty) before the file name.
+
+
+ AppendFileNameIfNotNull("-StrangeFileName.cs") => ".\-StrangeFileName.cs"
+
+ File name to append, if it's null this method has no effect
+
+
+
+ Appends a file name quoting it if necessary.
+ This method appends a space to the command line (if it's not currently empty) before the file name.
+
+
+ See the string overload version
+
+ File name to append, if it's null this method has no effect
+
+
+
+ Appends array of file name strings, quoting them if necessary, delimited by a delimiter.
+ This method appends a space to the command line (if it's not currently empty) before the file names.
+
+
+ AppendFileNamesIfNotNull(new string[] {"Alpha.cs", "Beta.cs"}, ",") => "Alpha.cs,Beta.cs"
+
+ File names to append, if it's null this method has no effect
+ The delimiter between file names
+
+
+
+ Appends array of ITaskItem specs as file names, quoting them if necessary, delimited by a delimiter.
+ This method appends a space to the command line (if it's not currently empty) before the file names.
+
+
+ See the string[] overload version
+
+ Task items to append, if null this method has no effect
+ Delimiter to put between items in the command line
+
+
+
+ Appends a command-line switch that has no separate value, without any quoting.
+ This method appends a space to the command line (if it's not currently empty) before the switch.
+
+
+ AppendSwitch("/utf8output") => "/utf8output"
+
+ The switch to append to the command line, may not be null
+
+
+
+ Appends a command-line switch that takes a single string parameter, quoting the parameter if necessary.
+ This method appends a space to the command line (if it's not currently empty) before the switch.
+
+
+ AppendSwitchIfNotNull("/source:", "File Name.cs") => "/source:\"File Name.cs\""
+
+ The switch to append to the command line, may not be null
+ Switch parameter to append, quoted if necessary. If null, this method has no effect.
+
+
+
+ Throws if the parameter has a double-quote in it. This is used to prevent parameter
+ injection. It's virtual so that tools can override this method if they want to have quotes escaped in filenames
+
+ Switch name for error message
+ Switch parameter to scan
+
+
+
+ Append a switch [overload]
+ This method appends a space to the command line (if it's not currently empty) before the switch.
+
+
+ See the string overload version
+
+ The switch to append to the command line, may not be null
+ Switch parameter to append, quoted if necessary. If null, this method has no effect.
+
+
+
+ Appends a command-line switch that takes a string[] parameter,
+ and add double-quotes around the individual filenames if necessary.
+ This method appends a space to the command line (if it's not currently empty) before the switch.
+
+
+ AppendSwitchIfNotNull("/sources:", new string[] {"Alpha.cs", "Be ta.cs"}, ";") => "/sources:Alpha.cs;\"Be ta.cs\""
+
+ The switch to append to the command line, may not be null
+ Switch parameters to append, quoted if necessary. If null, this method has no effect.
+ Delimiter to put between individual parameters, may not be null (may be empty)
+
+
+
+ Appends a command-line switch that takes a ITaskItem[] parameter,
+ and add double-quotes around the individual filenames if necessary.
+ This method appends a space to the command line (if it's not currently empty) before the switch.
+
+
+ See the string[] overload version
+
+ The switch to append to the command line, may not be null
+ Switch parameters to append, quoted if necessary. If null, this method has no effect.
+ Delimiter to put between individual parameters, may not be null (may be empty)
+
+
+
+ Appends the literal parameter without trying to quote.
+ This method appends a space to the command line (if it's not currently empty) before the switch.
+
+
+ AppendSwitchUnquotedIfNotNull("/source:", "File Name.cs") => "/source:File Name.cs"
+
+ The switch to append to the command line, may not be null
+ Switch parameter to append, not quoted. If null, this method has no effect.
+
+
+
+ Appends the literal parameter without trying to quote.
+ This method appends a space to the command line (if it's not currently empty) before the switch.
+
+
+ See the string overload version
+
+ The switch to append to the command line, may not be null
+ Switch parameter to append, not quoted. If null, this method has no effect.
+
+
+
+ Appends a command-line switch that takes a string[] parameter, not quoting the individual parameters
+ This method appends a space to the command line (if it's not currently empty) before the switch.
+
+
+ AppendSwitchUnquotedIfNotNull("/sources:", new string[] {"Alpha.cs", "Be ta.cs"}, ";") => "/sources:Alpha.cs;Be ta.cs"
+
+ The switch to append to the command line, may not be null
+ Switch parameters to append, not quoted. If null, this method has no effect.
+ Delimiter to put between individual parameters, may not be null (may be empty)
+
+
+
+ Appends a command-line switch that takes a ITaskItem[] parameter, not quoting the individual parameters
+ This method appends a space to the command line (if it's not currently empty) before the switch.
+
+
+ See the string[] overload version
+
+ The switch to append to the command line, may not be null
+ Switch parameters to append, not quoted. If null, this method has no effect.
+ Delimiter to put between individual parameters, may not be null (may be empty)
+
+
+
+ Structure to represent an extension sdk
+
+
+
+
+ Path to the platform sdk may be null if not a platform sdk.
+
+
+
+
+ Extension SDK moniker
+
+
+
+
+ SDK version
+
+
+
+
+ SDK identifier
+
+
+
+
+ Object containing the properties in the SDK manifest
+
+
+
+
+ Caches minimum Visual Studio version from the manifest
+
+
+
+
+ Caches max platform version from the manifest
+
+
+
+
+ Constructor
+
+
+
+
+ SDK version from the moniker
+
+
+
+
+ SDK identifier from the moniker
+
+
+
+
+ The type of the SDK.
+
+
+
+
+ Minimum Visual Studio version from SDKManifest.xml
+
+
+
+
+ Maximum platform version from SDKManifest.xml
+
+
+
+
+ Api contracts from the SDKManifest, if any
+
+
+
+
+ Reference to the manifest object
+ Makes sure manifest is instantiated only once
+
+ Load manifest from disk the first time it is needed
+
+
+
+ Parse SDK moniker
+
+
+
+
+ This helper base class provides default functionality for loggers that handle events raised by the build engine. This
+ class can only be instantiated in a derived form.
+
+
+
+
+ Gets or sets the level of detail to show in the event log.
+
+ The verbosity level.
+
+
+
+ Gets or sets the user-specified parameters to the logger. Derived class can ignore if it doesn't take parameters.
+
+ The parameter string (can be null).
+
+
+
+ Must be implemented by derived class to subscribe to build events.
+
+ The available events that a logger can subscribe to.
+
+
+
+ Derived class should override if it needs to release any resources.
+
+
+
+
+ Generates a message in the default format from a BuildErrorEventArgs object.
+
+ Error event arguments
+ Error message in canonical format
+
+
+
+ Generates a message in the default format from a BuildWarningEventArgs object.
+
+ Warning event arguments
+ Warning message in canonical format
+
+
+
+ Determines whether the current verbosity setting is at least the value
+ passed in.
+
+
+
+
+
+
+ This is a multiplexing logger. The purpose of this logger is to allow the registration and deregistration of
+ multiple loggers during the build. This is to support the VS IDE scenario where loggers are registered and unregistered
+ for each project system's build request. This means one physical build may have multiple logical builds
+ each with their own set of loggers.
+
+ The Mux logger will register itself with the build manager as a regular central /l style logger.
+ It will be responsible for receiving messages from the build manager and route them to the correct
+ logger based on the logical build the message came from.
+
+ Requirements:
+ 1) Multiplexing logger will be registered at the beginning of the build manager's Begin build
+ Any loggers registered before the build manager actually started building will get the build started event at the same time as the MUX logger
+ Any loggers registered after the build manager starts the build will get a synthesised build started event. The event cannot be cached because the
+ timestamp of the build started event is determined when the event is created, caching the event would give incorrect build times in the loggers registered to the MUX.
+
+ 2) The MUX logger will be initialized by the build manager.
+ The mux will listen to all events on the event source from the build manager and will route events correctly to the registered loggers.
+
+ 3) The MUX logger will be shutdown when the build is finished in end build . At this time it will un-register any loggers attached to it.
+
+ 4) The MUX logger will log the build finished event when the project finished event for the first project started event is seen for each logger.
+
+ Registering Loggers:
+
+ The multiplexing logger will function in the following way:
+ A logger will be passed to the MUX Register logger method with a submission ID which will be used to route a the message to the correct logger.
+ A new event source will be created so that the logger passed in can be registered to that event source
+ If the build started event has already been logged the MUX logger will create a new BuildStartedEvent and send that to the event source.
+
+ UnregisterLoggers:
+ When a build submission is completed the UnregisterLoggers method will be called with the submission ID.
+ At this point we will look up the success state of the project finished event for the submission ID and log a build finished event to the logger.
+ The event source will be cleaned up. This may be interesting because the unregister will come from a thread other than what is doing the logging.
+ This may create a Synchronization issue, if unregister is called while events are being logged.
+
+
+
+
+ The mapping of submission IDs to the submission record.
+
+
+
+
+ Keep the build started event if it has been seen, we need the message off it.
+
+
+
+
+ Event source which events from the build manager will be raised on.
+
+
+
+
+ The handler for the build started event
+
+
+
+
+ The handler for the build finished event.
+
+
+
+
+ The handler for the project started event.
+
+
+
+
+ The handler for the project finished event.
+
+
+
+
+ Dictionary mapping submission id to projects in progress.
+
+
+
+
+ The maximum node count as specified in the call to Initialize()
+
+
+
+
+ Constructor.
+
+
+
+
+ Required for ILogger interface
+
+
+
+
+ Required for the ILoggerInterface
+
+
+
+
+ Should evaluation events include generated metaprojects?
+
+
+
+
+ Should evaluation events include profiling information?
+
+
+
+
+ Should task events include task inputs?
+
+
+
+
+ Should properties and items be logged on
+ instead of ?
+
+
+
+
+ Initialize the logger.
+
+
+
+
+ Initialize the logger.
+
+
+
+
+ Shutdown the mux logger and clear out any state
+
+
+
+
+ This method will register a logger on the MUX logger and then raise a build started event if the build started event has already been logged
+
+
+
+
+ Unregisters all the loggers for a given submission id.
+
+
+
+
+ Receives the build started event for the whole build.
+
+
+
+
+ Receives the build finished event.
+
+
+
+
+ Receives the project started event and records the submission as being in-progress.
+
+
+
+
+ Receives the project finished event.
+
+
+
+
+ This class holds everything the logger needs to know about a particular submission, including the event source.
+
+
+
+
+ Object used to synchronize access to internals.
+
+
+
+
+ List of loggers
+
+
+
+
+ The maximum node count
+
+
+
+
+ The event source which will have events raised from the buld manager.
+
+
+
+
+ The buildStartedEvent to use when synthesizing the build started event.
+
+
+
+
+ The project build event coontext for the first project started event seen, this is the root of the submission.
+
+
+
+
+ SubmissionId for this submission record
+
+
+
+
+ Has the record been shutdown yet.
+
+
+
+
+ Even hander for "anyEvent" this is a handler which will be called from each of the other event handlers
+
+
+
+
+ Handle the Build Finished event
+
+
+
+
+ Handle the Build started event
+
+
+
+
+ Handle custom build events
+
+
+
+
+ Handle error events
+
+
+
+
+ Handle message events
+
+
+
+
+ Handle project finished events
+
+
+
+
+ Handle project started events
+
+
+
+
+ Handle build sttus events
+
+
+
+
+ Handle target finished events
+
+
+
+
+ Handle target started events
+
+
+
+
+ Handle task finished
+
+
+
+
+ Handle task started
+
+
+
+
+ Handle warning events
+
+
+
+
+ Handle telemetry events.
+
+
+
+
+ Constructor.
+
+
+
+
+ This event is raised to log a message.
+
+
+
+
+ This event is raised to log an error.
+
+
+
+
+ This event is raised to log a warning.
+
+
+
+
+ this event is raised to log the start of a build
+
+
+
+
+ this event is raised to log the end of a build
+
+
+
+
+ this event is raised to log the start of a project build
+
+
+
+
+ this event is raised to log the end of a project build
+
+
+
+
+ this event is raised to log the start of a target build
+
+
+
+
+ this event is raised to log the end of a target build
+
+
+
+
+ this event is raised to log the start of task execution
+
+
+
+
+ this event is raised to log the end of task execution
+
+
+
+
+ this event is raised to log a custom event
+
+
+
+
+ this event is raised to log build status events, such as
+ build/project/target/task started/stopped
+
+
+
+
+ This event is raised to log that some event has
+ occurred. It is raised on every event.
+
+
+
+
+ This event is raised when telemetry is sent.
+
+
+
+
+ Adds the specified logger to the set of loggers for this submission.
+
+
+
+
+ Shuts down the loggers and removes them
+
+
+
+
+ Sets the build started event for this event source if it hasn't already been set.
+
+
+
+
+ Raises a message event to all registered loggers.
+
+ sender of the event
+ BuildMessageEventArgs
+
+
+
+ Raises an error event to all registered loggers.
+
+ sender of the event
+ BuildErrorEventArgs
+
+
+
+ Raises a warning event to all registered loggers.
+
+ sender of the event
+ BuildWarningEventArgs
+
+
+
+ Raises a "build started" event to all registered loggers.
+
+ sender of the event
+ BuildStartedEventArgs
+
+
+
+ Raises a "build finished" event to all registered loggers.
+
+ sender of the event
+ BuildFinishedEventArgs
+
+
+
+ Raises a "project build started" event to all registered loggers.
+
+ sender of the event
+ ProjectStartedEventArgs
+
+
+
+ Raises a "project build finished" event to all registered loggers.
+
+ sender of the event
+ ProjectFinishedEventArgs
+
+
+
+ Raises a "target build started" event to all registered loggers.
+
+ sender of the event
+ TargetStartedEventArgs
+
+
+
+ Raises a "target build finished" event to all registered loggers.
+
+ sender of the event
+ TargetFinishedEventArgs
+
+
+
+ Raises a "task execution started" event to all registered loggers.
+
+ sender of the event
+ TaskStartedEventArgs
+
+
+
+ Raises a "task finished executing" event to all registered loggers.
+
+ sender of the event
+ TaskFinishedEventArgs
+
+
+
+ Raises a custom event to all registered loggers.
+
+ sender of the event
+ CustomBuildEventArgs
+
+
+
+ Raises a catch-all build status event to all registered loggers.
+
+ sender of the event
+ BuildStatusEventArgs
+
+
+
+ Raises a status event, optionally cascading to an any event.
+
+
+
+
+ Raises a catch-all build event to all registered loggers.
+
+ sender of the event
+ Build EventArgs
+
+
+
+ Raises a telemetry event to all registered loggers.
+
+
+
+
+ Initialize the internal event source which is used to raise events on loggers registered to this submission
+
+
+
+
+ Clears out all events.
+
+
+
+
+ Structure to represent the information contained in Platform.xml
+
+
+
+
+ Location of Platform.xml
+
+
+
+
+ Constructor
+ Takes the location of Platform.xml and populates the structure with manifest data
+
+
+
+
+ Platform name
+
+
+
+
+ Platform friendly name
+
+
+
+
+ Platform version
+
+
+
+
+ The platforms that this platform depends on.
+ Item1: Platform name
+ Item2: Platform version
+
+
+
+
+ The contracts contained by this platform
+ Item1: Contract name
+ Item2: Contract version
+
+
+
+
+ Flag set to true if an exception occurred while reading the manifest
+
+
+
+
+ Message from exception thrown while reading manifest
+
+
+
+
+ Load content of Platform.xml
+
+
+
+
+ Represents a dependency on another platform
+
+
+
+
+ Name of the platform on which this platform depends
+
+
+
+
+ Version of the platform on which this platform depends
+
+
+
+
+ Constructor
+
+
+
+
+ Helper class with element names in Platform.xml
+
+
+
+
+ Root element
+
+
+
+
+ Element describing a platform this platform is dependent on
+
+
+
+
+ Helper class with attribute names in Platform.xml
+
+
+
+
+ Name associated with this element
+
+
+
+
+ Friendly name associated with this element
+
+
+
+
+ Version associated with this element
+
+
+
+
+ Processor architecture utilities
+
+
+
+
+ Represents the 32-bit x86 processor architecture.
+
+
+
+
+ Represents the 64-bit IA64 processor architecture.
+
+
+
+
+ Represents the 64-bit AMD64 processor architecture.
+
+
+
+
+ Represents the Microsoft Intermediate Language processor architecture.
+
+
+
+
+ Represents the ARM processor architecture.
+
+
+
+
+ Represents the ARM64 processor architecture.
+
+
+
+
+ Represents the WebAssembly platform.
+
+
+
+
+ Represents the S390x processor architecture.
+
+
+
+
+ Represents the LoongAarch64 processor architecture.
+
+
+
+
+ Represents the 32-bit ARMv6 processor architecture.
+
+
+
+
+ Represents the PowerPC 64-bit (little-endian) processor architecture.
+
+
+
+
+ Lazy-initted property for getting the architecture of the currently running process
+
+
+
+
+ Gets the processor architecture of the currently running process
+
+ null if unknown architecture or error, one of the known architectures otherwise
+
+
+
+ What should happen if multiple versions of a given productfamily or sdk name are found
+
+
+
+
+ No action should be taken if multiple versions are detected
+
+
+
+
+ Log warning
+
+
+
+
+ Log an error
+
+
+
+
+ Structure to represent the information contained in SDKManifest.xml
+
+
+
+
+ Pattern in path to extension SDK used to help determine if manifest is from a framework SDK
+
+
+
+
+ Default version of MaxPlatformVersion in framework extension SDKs with manifest not containing such a property
+
+
+
+
+ Default version of MinOSVersion in framework extension SDKs with manifest not containing such a property
+
+
+
+
+ Default version of MaxOSVersionTested in framework extension SDKs with manifest not containing such a property
+
+
+
+
+ What should happen if this sdk is resolved with other sdks of the same productfamily or same sdk name.
+
+
+
+
+ Path to where the file SDKManifest.xml is stored
+
+
+
+
+ Whatever appx locations we found in the manifest
+
+
+
+
+ Whatever framework identities we found in the manifest.
+
+
+
+
+ Whatever MaxOSVersionTested we found in the manifest.
+
+
+
+
+ Whatever MinOSVersion we found in the manifest
+
+
+
+
+ Whatever MaxPlatformVersion we found in the manifest
+
+
+
+
+ The SDKType, default of unspecified
+
+
+
+
+ Constructor
+ Takes the path to SDKManifest.xml and populates the structure with manifest data
+
+
+
+
+ Whatever information regarding support for multiple versions is found in the manifest
+
+
+
+
+ Whatever framework identities we found in the manifest.
+
+
+
+
+ Whatever appx locations we found in the manifest
+
+
+
+
+ PlatformIdentity if it exists in the appx manifest for this sdk.
+
+
+
+
+ The FrameworkIdentity for the sdk, this may be a single name or a | delimited name
+
+
+
+
+ Support Prefer32bit found in the sdk manifest
+
+
+
+
+ SDKType found in the sdk manifest
+
+
+
+
+ CopyRedistToSubDirectory specifies where the redist files should be copied to relative to the root of the package.
+
+
+
+
+ Supported Architectures is a semicolon delimited list of architectures that the SDK supports.
+
+
+
+
+ DependsOnSDK is a semicolon delimited list of SDK identities that the SDK requires be resolved in order to function.
+
+
+
+
+ ProductFamilyName specifies the product family for the SDK. This is offered up as metadata on the resolved sdkreference and is used to detect sdk conflicts.
+
+
+
+
+ The platform the SDK targets.
+
+
+
+
+ Minimum version of the platform the SDK supports.
+
+
+
+
+ Maximum version of the platform that the SDK supports.
+
+
+
+
+ DisplayName found in the sdk manifest
+
+
+
+
+ MinVSVersion found in the sdk manifest
+
+
+
+
+ MinOSVersion found in the sdk manifest, defaults to 6.2.1 for framework extension SDKs when manifest does not have this property set
+
+
+
+
+ MaxPlatformVersion found in the sdk manifest, defaults to 8.0 for framework extension SDKs when manifest does not have this property set
+
+
+
+
+ MaxOSVersionTested found in the sdk manifest, defaults to 6.2.1 for framework extension SDKs when manifest does not have this property set
+
+
+
+
+ MoreInfo as found in the sdk manifest
+
+
+
+
+ Flag set to true if an exception occurred while reading the manifest
+
+
+
+
+ Message from exception thrown while reading manifest
+
+
+
+
+ The contracts contained by this manifest, if any
+ Item1: Contract name
+ Item2: Contract version
+
+
+
+
+ Decide on whether it is a framework extension sdk based on manifest's FrameworkIdentify and path
+
+
+
+
+ Load content of SDKManifest.xml
+
+
+
+
+ Reads the attributes from the "FileList" element of the SDK manifest.
+
+
+
+
+ Parse the multipleversions string. Returns MultipleVersionSupport.Allow if it cannot be parsed correctly.
+
+
+
+
+ Helper class with attributes of SDKManifest.xml
+
+
+
+
+ Platform that the SDK targets
+
+
+
+
+ The minimum version of the platform that the SDK targets
+
+
+
+
+ The max version of the platform that the SDK targets
+
+
+
+
+ Framework Identity metadata name and manifest attribute
+
+
+
+
+ Supported Architectures metadata name and manifest attribute
+
+
+
+
+ Prefer32BitSupport metadata name and manifest attribute
+
+
+
+
+ AppxLocation metadata
+
+
+
+
+ APPX manifest attribute
+
+
+
+
+ PlatformIdentity metadata name and manifest attribute
+
+
+
+
+ SDKType metadata name and manifest attribute
+
+
+
+
+ DisplayName metadata name and manifest attribute
+
+
+
+
+ CopyRedistToSubDirectory metadata name and manifest attribute
+
+
+
+
+ ProductFamilyName metadata name and manifest attribute
+
+
+
+
+ SupportsMultipleVersions metadata name and manifest attribute
+
+
+
+
+ TargetedSDKArchitecture metadata name
+
+
+
+
+ TargetedSDKConfiguration metadata name
+
+
+
+
+ ExpandReferenceAssemblies metadata name
+
+
+
+
+ DependsOn metadata name
+
+
+
+
+ CopyRedist metadata name
+
+
+
+
+ CopyLocalExpandedReferenceAssemblies metadata name
+
+
+
+
+ MinOSVersion metadata name
+
+
+
+
+ MinVSVersion metadata name
+
+
+
+
+ MaxPlatformVersionAttribute metadata name
+
+
+
+
+ MoreInfoAttribute metadata name
+
+
+
+
+ MaxOSVersionTestedAttribute metadata name
+
+
+
+
+ Helper class with elements of SDKManifest.xml
+
+
+
+
+ Root element
+
+
+
+
+ Type of SDK
+
+
+
+
+ Not specified
+
+
+
+
+ Traditional 3rd party SDK
+
+
+
+
+ Platform extension SDK
+
+
+
+
+ Framework extension SDK
+
+
+
+
+ Structure to represent a target platform sdk
+
+
+
+
+ Path to the platform sdk may be null if not a platform sdk.
+
+
+
+
+ Object containing the properties in the SDK manifest
+
+
+
+
+ Cache for min Visual Studio version from manifest
+
+
+
+
+ Cache for min OS version from manifest
+
+
+
+
+ Constructor
+
+
+
+
+ Min Visual Studio version from manifest
+
+
+
+
+ Min OS version from manifest
+
+
+
+
+ Target platform identifier
+
+
+
+
+ Target platform version
+
+
+
+
+ Path to target platform sdk if it exists, it may not if there is no target platform is installed
+
+
+
+
+ The SDK's display name, or null if one is not defined.
+
+
+
+
+ Extension sdks within this platform,
+
+
+
+
+ Set of platforms supported by this SDK.
+
+
+
+
+ Reference to manifest object
+ Makes it is instantiated only once
+
+
+
+
+ Override GetHashCode
+
+
+
+
+ Override equals
+
+
+
+
+ Implement IEquatable
+
+
+
+
+ Returns true if this SDK supports the given platform, or false otherwise.
+
+
+
+
+ Given an identifier and version, construct a string to use as a key for that combination.
+
+
+
+
+ This helper base class provides default functionality for tasks. This class can only be instantiated in a derived form.
+
+
+
+
+ Default (family) constructor.
+
+
+
+
+ This (family) constructor allows derived task classes to register their resources.
+
+ The task resources.
+
+
+
+ This (family) constructor allows derived task classes to register their resources, as well as provide a prefix for
+ composing help keywords from string resource names. If the prefix is an empty string, then string resource names will
+ be used verbatim as help keywords. For an example of how the prefix is used, see the
+ TaskLoggingHelper.LogErrorWithCodeFromResources(string, object[]) method.
+
+ The task resources.
+ The help keyword prefix.
+
+
+
+ The build engine automatically sets this property to allow tasks to call back into it.
+
+ The build engine interface available to tasks.
+
+
+
+ The build engine automatically sets this property to allow tasks to call back into it.
+ This is a convenience property so that task authors inheriting from this class do not
+ have to cast the value from IBuildEngine to IBuildEngine2.
+
+ The build engine interface available to tasks.
+
+
+
+ Retrieves the version of the build engine interface provided by the host.
+
+
+
+
+ Retrieves the version of the build engine interface provided by the host.
+
+
+
+
+ Retrieves the version of the build engine interface provided by the host.
+
+
+
+
+ Retrieves the version of the build engine interface provided by the host.
+
+
+
+
+ Retrieves the version of the build engine interface provided by the host.
+
+
+
+
+ Retrieves the version of the build engine interface provided by the host.
+
+
+
+
+ Retrieves the version of the build engine interface provided by the host.
+
+
+
+
+ The build engine sets this property if the host IDE has associated a host object with this particular task.
+
+ The host object instance (can be null).
+
+
+
+ Gets an instance of a TaskLoggingHelper class containing task logging methods.
+ The taskLoggingHelper is a MarshallByRef object which needs to have MarkAsInactive called
+ if the parent task is making the appdomain and marshaling this object into it. If the appdomain is not unloaded at the end of
+ the task execution and the MarkAsInactive method is not called this will result in a leak of the task instances in the appdomain the task was created within.
+
+ The logging helper object.
+
+
+
+ Gets or sets the task's culture-specific resources. Derived classes should register their resources either during
+ construction, or via this property, if they have localized strings.
+
+ The task's resources (can be null).
+
+
+
+ Gets or sets the prefix used to compose help keywords from string resource names. If a task does not have help
+ keywords associated with its messages, it can ignore this property or set it to null. If the prefix is set to an empty
+ string, then string resource names will be used verbatim as help keywords. For an example of how this prefix is used,
+ see the TaskLoggingHelper.LogErrorWithCodeFromResources(string, object[]) method.
+
+ The help keyword prefix string (can be null).
+
+
+
+ Must be implemented by derived class.
+
+ true, if successful
+
+
+
+ This class represents a single item of the project, as it is passed into a task. TaskItems do not exactly correspond to
+ item elements in project files, because then tasks would have access to data that wasn't explicitly passed into the task
+ via the project file. It's not a security issue, but more just an issue with project file clarity and transparency.
+
+ Note: This class has to be sealed. It has to be sealed because the engine instantiates it's own copy of this type and
+ thus if someone were to extend it, they would not get the desired behavior from the engine.
+
+
+ Surprisingly few of these Utilities TaskItems are created: typically several orders of magnitude fewer than the number of engine TaskItems.
+
+
+
+
+ May be defined if we're copying this item from a pre-existing one. Otherwise,
+ we simply don't know enough to set it properly, so it will stay null.
+
+
+
+
+ Default constructor -- we need it so this type is COM-createable.
+
+
+
+
+ This constructor creates a new task item, given the item spec.
+
+ Assumes the itemspec passed in is escaped.
+ The item-spec string.
+
+
+
+ This constructor creates a new TaskItem, using the given item spec and metadata.
+
+
+ Assumes the itemspec passed in is escaped, and also that any escapable metadata values
+ are passed in escaped form.
+
+ The item-spec string.
+ Custom metadata on the item.
+
+
+
+ This constructor creates a new TaskItem, using the given ITaskItem.
+
+ The item to copy.
+
+
+
+ Gets or sets the item-spec.
+
+
+ This one is a bit tricky. Orcas assumed that the value being set was escaped, but
+ that the value being returned was unescaped. Maintain that behaviour here. To get
+ the escaped value, use ITaskItem2.EvaluatedIncludeEscaped.
+
+ The item-spec string.
+
+
+
+ Gets or sets the escaped include, or "name", for the item.
+
+
+ Taking the opportunity to fix the property name, although this doesn't
+ make it obvious it's an improvement on ItemSpec.
+
+
+
+
+ Gets the names of all the item's metadata.
+
+ List of metadata names.
+
+
+
+ Gets the number of metadata set on the item.
+
+ Count of metadata.
+
+
+
+ Gets the metadata dictionary
+ Property is required so that we can access the metadata dictionary in an item from
+ another appdomain, as the CLR has implemented remoting policies that disallow accessing
+ private fields in remoted items.
+
+
+
+
+ Removes one of the arbitrary metadata on the item.
+
+ Name of metadata to remove.
+
+
+
+ Sets one of the arbitrary metadata on the item.
+
+
+ Assumes that the value being passed in is in its escaped form.
+
+ Name of metadata to set or change.
+ Value of metadata.
+
+
+
+ Retrieves one of the arbitrary metadata on the item.
+ If not found, returns empty string.
+
+
+ Returns the unescaped value of the metadata requested.
+
+ The name of the metadata to retrieve.
+ The metadata value.
+
+
+
+ Copy the metadata (but not the ItemSpec) to destinationItem. If a particular metadata already exists on the
+ destination item, then it is not overwritten -- the original value wins.
+
+ The item to copy metadata to.
+
+
+
+ Get the collection of custom metadata. This does not include built-in metadata.
+
+
+ RECOMMENDED GUIDELINES FOR METHOD IMPLEMENTATIONS:
+ 1) this method should return a clone of the metadata
+ 2) writing to this dictionary should not be reflected in the underlying item.
+
+
+ Returns an UNESCAPED version of the custom metadata. For the escaped version (which
+ is how it is stored internally), call ITaskItem2.CloneCustomMetadataEscaped.
+
+
+
+
+ Gets the item-spec.
+
+ The item-spec string.
+
+
+
+ Overridden to give this class infinite lease time. Otherwise we end up with a limited
+ lease (5 minutes I think) and instances can expire if they take long time processing.
+
+
+
+
+ This allows an explicit typecast from a "TaskItem" to a "string", returning the escaped ItemSpec for this item.
+
+ The item to operate on.
+ The item-spec of the item.
+
+
+
+ Returns the escaped value of the metadata with the specified key.
+
+
+
+
+ Sets the escaped value of the metadata with the specified name.
+
+
+ Assumes the value is passed in unescaped.
+
+
+
+
+ ITaskItem2 implementation which returns a clone of the metadata on this object.
+ Values returned are in their original escaped form.
+
+ The cloned metadata.
+
+
+
+ Used to specify the targeted version of the .NET Framework for some methods of ToolLocationHelper.
+
+
+
+
+ version 1.1
+
+
+
+
+ version 2.0
+
+
+
+
+ version 3.0
+
+
+
+
+ version 3.5
+
+
+
+
+ version 4.0
+
+
+
+
+ version 4.5
+
+
+
+
+ version 4.5.1
+
+
+
+
+ version 4.6
+
+
+
+
+ version 4.6.1
+
+
+
+
+ version 4.5.2. Enum is out of order because it was shipped out of band from a Visual Studio update
+ without a corresponding SDK release.
+
+
+
+
+ version 4.6.2
+
+
+
+
+ version 4.7
+
+
+
+
+ version 4.7.1
+
+
+
+
+ version 4.7.2
+
+
+
+
+ version 4.8
+
+
+
+
+ version 4.8.1
+
+
+
+
+ The latest version available at the time of major release. This
+ value should not be updated in minor releases as it could be a
+ breaking change. Use 'Latest' if possible, but note the
+ compatibility implications.
+
+
+
+
+ Sentinel value for the latest version that this version of MSBuild is aware of. Similar
+ to VersionLatest except the compiled value in the calling application will not need to
+ change for the update in MSBuild to be used.
+
+
+ This value was introduced in Visual Studio 15.1. It is incompatible with previous
+ versions of MSBuild.
+
+
+
+
+ Used to specify the version of Visual Studio from which to select associated
+ tools for some methods of ToolLocationHelper
+
+
+
+
+ Visual Studio 2010 (Dev10) and SP1
+
+
+
+
+ Visual Studio 2012 (Dev11)
+
+
+
+
+ Visual Studio 2013 (Dev12)
+
+
+
+
+ Visual Studio 2015 (Dev14)
+
+
+
+
+ Visual Studio 2017 (Dev15)
+
+
+
+
+ Visual Studio 2019 (Dev16)
+
+
+
+
+ Visual Studio 2022 (Dev17)
+
+
+
+
+ The latest version available at the time of release
+
+
+
+
+ Used to specify the targeted bitness of the .NET Framework for some methods of ToolLocationHelper
+
+
+
+
+ Indicates the .NET Framework that is currently being run under.
+
+
+
+
+ Indicates the 32-bit .NET Framework
+
+
+
+
+ Indicates the 64-bit .NET Framework
+
+
+
+
+ ToolLocationHelper provides utility methods for locating .NET Framework and .NET Framework SDK directories and files.
+ NOTE: All public methods of this class are available to MSBuild projects for use in functions - they must be safe for
+ use during project evaluation.
+
+
+
+
+ Cache the results of reading the redist list so that we do not have to read the redist list over and over again to get the chains.
+
+
+
+
+ Lock object to synchronize chainedReferenceAssemblyPath dictionary
+
+
+
+
+ Cache the results of calling the GetPathToReferenceAssemblies so that we do not recalculate it every time we call the method
+
+
+
+
+ Cache the frameworkName of the highest version of a framework given its root path and identifier.
+ This is to optimize calls to GetHighestVersionOfTargetFramework
+
+
+
+
+ Cache the sdk structure as found by enumerating the disk and registry.
+
+
+
+
+ Cache new style extension sdks that we've enumerated
+
+
+
+
+ Cache the display name for the TFM/FrameworkName, keyed by the target framework directory.
+ This is generated by the "Name" attribute on the root tag of the primary matching redist list.
+ Value is never an empty string or null: a name will be synthesized if necessary.
+
+
+
+
+ Cache the set of target platform references for a particular combination of inputs. For legacy
+ target platforms, this is just grabbing all winmds from the References\CommonConfiguration\Neutral
+ folder; for OneCore-based platforms, this involves reading the list from Platform.xml and synthesizing
+ the locations.
+
+
+
+
+ Cache the set of extension Sdk references for a particular combination of inputs.
+
+
+
+
+ Cache the list of supported frameworks
+
+
+
+
+ Cache the VS Install folders for particular range of VS versions
+
+
+
+
+ Character used to separate search paths specified for MSBuildExtensionsPath* in
+ the config file
+
+
+
+
+ Delegate to a method which takes a version enumeration and return a string path
+
+
+
+
+ The current ToolsVersion.
+
+
+
+
+ Get a sorted list of AssemblyFoldersExInfo which contain information about what directories the 3rd party assemblies are registered under for use during build and design time.
+
+ This method will enumerate the AssemblyFoldersEx registry location and return a list of AssemblyFoldersExInfo in the same order in which
+ they will be searched during both design and build time for reference assemblies.
+
+ The root registry location for the targeted framework. For .NET this is SOFTWARE\MICROSOFT\.NETFramework
+ The targeted framework version (2.0, 3.0, 3.5, 4.0, etc)
+ The name of the folder (AssemblyFoldersEx) could also be PocketPC\AssemblyFoldersEx, or others
+ Components may declare Min and Max OSVersions in the registry this value can be used filter directories returned based on whether or not the osversion is bounded by the Min and Max versions declared by the component. If this value is blank or null no filtering is done
+ Components may declare platform guids in the registry this can be used to return only directories which have a certain platform guid. If this value is blank or null no filtering is done
+ What processor architecture is being targeted. This determines which registry hives are searched in what order.
+ On a 64 bit operating system we do the following
+ If you are targeting 64 bit (target x64 or ia64)
+ Add in the 64 bit hive first
+ Add in the 32 bit hive second
+ If you are not targeting a 64 bit
+ Add in the 32 bit hive first
+ Add in the 64 bit hive second
+ On a 32 bit machine we only add in the 32 bit hive.
+
+ List of AssemblyFoldersExInfo
+
+
+
+ Get a sorted list of AssemblyFoldersFromConfigInfo which contain information about what directories the 3rd party assemblies are registered under for use during build and design time.
+
+ This method will read the specified configuration file and enumerate the and return a list of AssemblyFoldersFromConfigInfo in the same order in which
+ they will be searched during both design and build time for reference assemblies.
+
+ Full path to the Assembly Folders config file.
+ The targeted framework version (2.0, 3.0, 3.5, 4.0, etc).
+ What processor architecture is being targeted. This determines which registry hives are searched in what order.
+ On a 64 bit operating system we do the following
+ If you are targeting 64 bit (target x64 or ia64)
+ Add in the 64 bit assembly folders first
+ Add in the 32 bit assembly folders second
+ If you are not targeting a 64 bit
+ Add in the 32 bit assembly folders first
+ Add in the 64 bit assembly folders second
+ On a 32 bit machine we only add in the 32 bit assembly folders.
+
+ List of AssemblyFoldersFromConfigInfo
+
+
+
+ Get a list of SDK's installed on the machine for a given target platform
+
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ IDictionary of installed SDKS and their location. K:SDKName V:SDK installation location
+
+
+
+ Get a list of SDK's installed on the machine for a given target platform
+
+ Array of disk locations to search for sdks
+ Root registry location to look for sdks
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ IDictionary of installed SDKS and their location. K:SDKName V:SDK installation location
+
+
+
+ Get a list of SDK's installed on the machine for a given target platform
+
+ Array of disk locations to search for sdks
+ New style extension SDK roots
+ Root registry location to look for sdks
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ IDictionary of installed SDKS and their location. K:SDKName V:SDK installation location
+
+
+
+ Get a list of SDK's installed on the machine for a given target platform
+
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ IDictionary of installed SDKS and their tuples containing (location, platform version).
+
+
+
+ Set of installed SDKs and their location and platform versions
+
+ Array of disk locations to search for sdks
+ Root registry location to look for sdks
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ IDictionary of installed SDKS and their tuples containing (location, platform version).
+
+
+
+ Set of installed SDKs and their location and platform versions
+
+ Array of disk locations to search for sdks
+ Array of disk locations to search for SDKs that target multiple versions
+ Root registry location to look for sdks
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ IDictionary of installed SDKS and their tuples containing (location, platform version). Version may be null if the SDK targets multiple versions.
+
+
+
+ Get target platform monikers used to extract ESDK information in the methods GetPlatformExtensionSDKLocationsAndVersions and GetPlatformExtensionSDKLocations
+
+
+
+
+ Given an SDKName, targetPlatformIdentifier and TargetPlatformVersion search the default sdk locations for the passed in sdk name.
+ The format of the sdk moniker is SDKName, Version=X.X
+
+ Name of the SDK to determine the installation location for.
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ Location of the SDK if it is found, empty string if it could not be found
+
+
+
+ Given an SDKName, targetPlatformIdentifier and TargetPlatformVersion search the default sdk locations for the passed in sdk name.
+ The format of the sdk moniker is SDKName, Version=X.X
+
+ Name of the SDK to determine the installation location for.
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ List of disk roots to search for sdks within
+ Registry root to look for sdks within
+ Location of the SDK if it is found, empty string if it could not be found
+
+
+
+ Given an SDKName, targetPlatformIdentifier and TargetPlatformVersion search the default sdk locations for the passed in sdk name.
+ The format of the sdk moniker is SDKName, Version=X.X
+
+ Name of the SDK to determine the installation location for.
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ List of disk roots to search for sdks within
+ List of disk roots to look for manifest driven extension sdks
+ Registry root to look for sdks within
+ Location of the SDK if it is found, empty string if it could not be found
+
+
+
+ Given an SDK moniker and the targeted platform get the path to the SDK root if it exists.
+
+ Moniker for the sdk
+ Identifier for the platform
+ Version of the platform
+ A full path to the sdk root if the sdk exists in the targeted platform or an empty string if it does not exist.
+
+
+
+ Given an SDKName, targetPlatformIdentifier and TargetPlatformVersion search the default sdk locations for the passed in sdk name.
+ The format of the sdk moniker is SDKName, Version=X.X
+
+ Name of the SDK to determine the installation location for.
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ List of disk roots to search for sdks within
+ Registry root to look for sdks within
+ Location of the SDK if it is found, empty string if it could not be found
+
+
+
+ Given an SDKName, targetPlatformIdentifier and TargetPlatformVersion search the default sdk locations for the passed in sdk name.
+ The format of the sdk moniker is SDKName, Version=X.X
+
+ Name of the SDK to determine the installation location for.
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ List of disk roots to search for sdks within
+ List of disk roots to look for manifest driven extension sdks
+ Registry root to look for sdks within
+ Location of the SDK if it is found, empty string if it could not be found
+
+
+
+ Gets a dictionary containing a collection of extension SDKs and filter it based on the target platform version
+ if max platform version isn't set in the extension sdk manifest, add the extension sdk to the filtered list
+
+
+
+ A IDictionary collection of filtered extension SDKs
+
+
+
+ Get the list of SDK folders which contains the references for the sdk at the sdkRoot provided
+ in the order in which they should be searched for references.
+
+ Root folder for the SDK
+ A list of folders in the order which they should be used when looking for references in the SDK
+
+
+
+ Get the list of SDK folders which contains the references for the sdk at the sdkRoot provided
+ in the order in which they should be searched for references.
+
+ Root folder for the SDK
+ The configuration the SDK is targeting. This should be Debug or Retail
+ The architecture the SDK is targeting
+ A list of folders in the order which they should be used when looking for references in the SDK
+
+
+
+ Add the set of paths for where sdk files should be found. Where <folderType> is redist, references, designtime
+
+
+
+
+ Get the list of SDK folders which contains the redist files for the sdk at the sdkRoot provided
+ in the order in which they should be searched for references.
+
+ Root folder for the SDK must contain a redist folder
+ A list of folders in the order which they should be used when looking for redist files in the SDK
+
+
+
+ Get the list of SDK folders which contains the redist files for the sdk at the sdkRoot provided
+ in the order in which they should be searched for references.
+
+ Root folder for the SDK must contain a redist folder
+ The configuration the SDK is targeting. This should be Debug or Retail
+ The architecture the SDK is targeting
+ A list of folders in the order which they should be used when looking for redist files in the SDK
+
+
+
+ Get the list of SDK folders which contains the designtime files for the sdk at the sdkRoot provided
+ in the order in which they should be searched for references.
+
+ Root folder for the SDK must contain a Designtime folder
+ A list of folders in the order which they should be used when looking for DesignTime files in the SDK
+
+
+
+ Get the list of SDK folders which contains the DesignTime files for the sdk at the sdkRoot provided
+ in the order in which they should be searched for references.
+
+ Root folder for the SDK must contain a DesignTime folder
+ The configuration the SDK is targeting. This should be Debug or Retail
+ The architecture the SDK is targeting
+ A list of folders in the order which they should be used when looking for DesignTime files in the SDK
+
+
+
+ Get a list target platform sdks on the machine.
+
+ List of Target Platform SDKs, Item1: TargetPlatformName Item2: Version of SDK Item3: Path to sdk root
+
+
+
+ Get a list target platform sdks on the machine.
+
+ List of disk locations to search for platform sdks
+ Registry root location to look for platform sdks
+ List of Target Platform SDKs
+
+
+
+ Filter list of platform sdks based on minimum OS and VS versions
+
+ List of platform sdks
+ Operating System version. Pass null to not filter based on this parameter
+ Visual Studio version. Pass null not to filter based on this parameter
+ List of Target Platform SDKs
+
+
+
+ Get the location of the target platform SDK props file for a given {SDKI, SDKV, TPI, TPMinV, TPV} combination.
+
+ The OneCore SDK identifier that defines OnceCore SDK root
+ The verision of the OneCore SDK
+ Identifier for the targeted platform
+ The min version of the targeted platform
+ The version of the targeted platform
+ Location of the target platform SDK props file without .props filename
+
+
+
+ Get the location of the target platform SDK props file for a given {SDKI, SDKV, TPI, TPMinV, TPV} combination.
+
+ The OneCore SDK identifier that defines OnceCore SDK root
+ The verision of the OneCore SDK
+ Identifier for the targeted platform
+ The min version of the targeted platform
+ The version of the targeted platform
+ List of disk roots to search for sdks within
+ Registry root to look for sdks within
+ Location of the target platform SDK props file without .props filename
+
+
+
+ Gathers the set of platform winmds for a particular {SDKI, SDKV, TPI, TPMinV, TPV} combination
+
+
+
+
+ Gathers the set of platform winmds for a particular {SDKI, SDKV, TPI, TPMinV, TPV} combination
+
+
+
+
+ Gathers the specified extension SDK references for the given target SDK
+
+ The moniker is the Name/Version string. Example: "Windows Desktop, Version=10.0.0.1"
+ The target SDK name.
+ The target SDK version.
+ The disk roots used to gather installed SDKs.
+ The disk roots used to gather installed extension SDKs.
+ The registry root used to gather installed extension SDKs.
+
+
+
+ Gathers the specified extension SDK references for the given target SDK
+
+ The moniker is the Name/Version string. Example: "Windows Desktop, Version=10.0.0.1"
+ The target SDK name.
+ The target SDK version.
+ The target platform name.
+ The target platform version.
+ The disk roots used to gather installed SDKs.
+ The disk roots used to gather installed extension SDKs.
+ The registry root used to gather installed extension SDKs.
+
+
+
+ Get platform version string which is used to generate versioned path
+
+ The target SDK
+ The target platform name.
+ The target platform version.
+ Return the version string if the platform is versioned, otherwise return empty string
+
+
+
+ Gathers the set of platform winmds based on the assumption that they come from
+ an SDK that is specified solely by TPI / TPV.
+
+
+
+
+ Gathers the set of platform winmds for a particular {SDKI, SDKV, TPI, TPMinV, TPV} combination,
+ based on the assumption that it is an SDK that has both {SDKI, SDKV} and TP* specifiers.
+
+
+
+
+ Return the WinMD paths referenced by the given api contracts and target sdk root
+
+ The API contract definitions
+ The root of the target platform SDK
+ List of matching WinMDs
+
+
+
+ Return the WinMD paths referenced by the given api contracts and target sdk root
+
+ The API contract definitions
+ The root of the target platform SDK
+ The version of the target platform SDK
+ List of matching WinMDs
+
+
+
+ Return the versioned/unversioned SDK content folder path
+
+ The identifier of the SDK
+ The verision of the SDK
+ The identifier of the targeted platform
+ The min version of the targeted platform
+ The version of the targeted platform
+ The content folder name under SDK path
+ An optional disk root to search. A value should only be passed from a unit test.
+ The SDK content folder path
+
+
+
+ Given a target platform identifier and a target platform version search the default sdk locations for the platform sdk for the target platform.
+
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ Location of the SDK if it is found, empty string if it could not be found
+
+
+
+ Given a target platform identifier and a target platform version search the default sdk locations for the platform sdk for the target platform.
+
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ List of disk roots to search for sdks within
+ Registry root to look for sdks within
+ Location of the SDK if it is found, empty string if it could not be found
+
+
+
+ Given a target platform identifier and a target platform version search the default sdk locations for the platform sdk for the target platform.
+
+ Identifier for the platform
+ Version of the platform
+ A full path to the sdk root if the sdk exists in the targeted platform or an empty string if it does not exist.
+
+
+
+ Given a target platform identifier and a target platform version search the default sdk locations for the platform sdk for the target platform.
+
+ Targeted platform to find SDKs for
+ Targeted platform version to find SDKs for
+ List of disk roots to search for sdks within
+ Registry root to look for sdks within
+ Location of the platform SDK if it is found, empty string if it could not be found
+
+
+
+ Given a target platform identifier and version, get the display name for that platform SDK.
+
+
+
+
+ Given a target platform identifier and version, get the display name for that platform SDK.
+
+
+
+
+ Given an SDK identifier and an SDK version, return a list of installed platforms.
+
+ SDK for which to find the installed platforms
+ SDK version for which to find the installed platforms
+ A list of keys for the installed platforms for the given SDK
+
+
+
+ Given an SDK identifier and an SDK version, return a list of installed platforms.
+
+ SDK for which to find the installed platforms
+ SDK version for which to find the installed platforms
+ List of disk roots to search for sdks within
+ Registry root to look for sdks within
+ A list of keys for the installed platforms for the given SDK
+
+
+
+ Given an SDK Identifier and SDK version, return the latest installed platform.
+
+ SDK for which to find the latest installed platform
+ SDK version for which to find the latest installed platform
+ The latest installed version for the given SDK
+
+
+
+ Given an SDK Identifier and SDK version, return the latest installed platform.
+
+ SDK for which to find the latest installed platform
+ SDK version for which to find the latest installed platform
+ SDK Root folders
+ The latest installed version for the given SDK
+
+
+
+ Returns folders in VS installs of specifid range of versions, starting with 15.0.
+
+ Optional. If specified, only VS instances with this or bigger version will be included.
+ Optional. If specified, only VS instances with smaller versions will be included. For instance, 16.0 means that only 15.* versions will be included.
+ Optional. If specified, the returned list will contain [VSInstallDir][subFolder] paths
+ Returns folders in VS installs in VS version descending order
+
+
+
+ Returns folders in VS installs of specified range of versions (starting with 15.0) separated by ';'.
+
+ Optional. If specified, only VS instances with this or bigger version will be included.
+ Optional. If specified, only VS instances with smaller versions will be included. For instance, 16.0 means that only 15.* versions will be included.
+ Optional. If specified, the returned list will contain [VSInstallDir][subFolder] paths
+ Returns folders in VS installs in VS version descending order separated by ';'
+
+
+
+ Finds first folder in the list which contains all given files. Returns an empty string if not found.
+
+ Root folders separated by ';'
+ Relative file paths to find under root folders, separated by ';'.
+ The first root folder in the given list, which contains all files. Empty string if not found.
+
+
+
+ Tries to parse the "version" out of a platformMoniker.
+
+ PlatformMoniker, in the form "PlatformName, Version=version"
+ The version of the platform, if the parse was successful - Else set to null
+ True if parse was successful, false otherwise
+
+
+
+ Given a target platform identifier and version and locations in which to search, find the TargetPlatformSDK
+ object that matches.
+
+
+
+
+ Given a target platform identifier and version and locations in which to search, find the TargetPlatformSDK
+ object that matches.
+
+
+
+
+ Given a target platform identifier and version, generate a reasonable default display name.
+
+
+
+
+
+
+ Gets the fully qualified path to the system directory i.e. %SystemRoot%\System32
+
+ The system path.
+
+
+
+ Returns the prefix of the .NET Framework version folder (e.g. "v2.0")
+
+ Version of the targeted .NET Framework
+
+
+
+
+ Returns the full name of the .NET Framework root registry key
+
+ Version of the targeted .NET Framework
+
+
+
+
+ Returns the full name of the .NET Framework SDK root registry key. When targeting .NET 3.5 or
+ above, looks in the locations associated with Visual Studio 2010. If you wish to target the
+ .NET Framework SDK that ships with Visual Studio Dev11 or later, please use the override that
+ specifies a VisualStudioVersion.
+
+ Version of the targeted .NET Framework
+
+
+
+ Returns the full name of the .NET Framework SDK root registry key
+
+ Version of the targeted .NET Framework
+ Version of Visual Studio the requested SDK is associated with
+
+
+
+ Name of the value of GetDotNetFrameworkRootRegistryKey that contains the SDK install root path. When
+ targeting .NET 3.5 or above, looks in the locations associated with Visual Studio 2010. If you wish
+ to target the .NET Framework SDK that ships with Visual Studio Dev11 or later, please use the override
+ that specifies a VisualStudioVersion.
+
+ Version of the targeted .NET Framework
+
+
+
+ Name of the value of GetDotNetFrameworkRootRegistryKey that contains the SDK install root path
+
+ Version of the targeted .NET Framework
+ Version of Visual Studio the requested SDK is associated with
+
+
+
+ Get a fully qualified path to the frameworks root directory.
+
+ Version of the targeted .NET Framework
+ Will return 'null' if there is no target frameworks on this machine.
+
+
+
+ Get a fully qualified path to the framework's root directory.
+
+ Version of the targeted .NET Framework
+ Desired architecture, or DotNetFrameworkArchitecture.Current for the architecture this process is currently running under.
+
+
+
+
+ Returns the path to the "bin" directory of the latest .NET Framework SDK. When targeting .NET 3.5
+ or above, looks in the locations associated with Visual Studio 2010. If you wish to target
+ the .NET Framework SDK that ships with Visual Studio Dev11 or later, please use the override
+ that specifies a VisualStudioVersion.
+
+ Path string.
+
+
+
+ Returns the path to the "bin" directory of the .NET Framework SDK. When targeting .NET 3.5
+ or above, looks in the locations associated with Visual Studio 2010. If you wish to target
+ the .NET Framework SDK that ships with Visual Studio Dev11 or later, please use the override
+ that specifies a VisualStudioVersion.
+
+ Version of the targeted .NET Framework
+ Path string.
+
+
+
+ Returns the path to the .NET Framework SDK.
+
+ The of the .NET Framework.
+ The of Visual Studio.
+
+
+
+
+ Returns the path to the reference assemblies location for the given framework version.
+
+ Version of the targeted .NET Framework
+ Path string.
+
+
+
+ Returns the path to the reference assemblies location for the given target framework's standard libraries (i.e. mscorlib).
+ This method will assume the requested ReferenceAssemblyRoot path will be the ProgramFiles directory specified by Environment.SpecialFolder.ProgramFiles
+ In additon when the .NETFramework or .NET Framework targetFrameworkIdentifiers are seen and targetFrameworkVersion is 2.0, 3.0, 3.5 or 4.0 we will return the correctly chained reference assembly paths
+ for the legacy .net frameworks. This chaining will use the existing GetPathToDotNetFrameworkReferenceAssemblies to build up the list of reference assembly paths.
+
+ Identifier being targeted
+ Version being targeted
+ Profile being targeted
+ When the frameworkName is null
+ Collection of reference assembly locations.
+
+
+
+ Returns the path to mscorlib and system.dll
+
+ Identifier being targeted
+ Version being targeted
+ Profile being targeted
+ What is the targeted platform, this is used to determine where we should look for the standard libraries. Note, this parameter is only used for .net frameworks less than 4.0
+ When the frameworkName is null
+ Collection of reference assembly locations.
+
+
+
+ Returns the path to mscorlib and system.dll
+
+ Identifier being targeted
+ Version being targeted
+ Profile being targeted
+ What is the targeted platform, this is used to determine where we should look for the standard libraries. Note, this parameter is only used for .net frameworks less than 4.0
+ Root directory where the target framework will be looked for. Uses default path if this is null
+ When the frameworkName is null
+ Collection of reference assembly locations.
+
+
+
+ Returns the path to mscorlib and system.dll
+
+ Identifier being targeted
+ Version being targeted
+ Profile being targeted
+ What is the targeted platform, this is used to determine where we should look for the standard libraries. Note, this parameter is only used for .net frameworks less than 4.0
+ Root directory where the target framework will be looked for. Uses default path if this is null
+ ';' separated list of paths that are looked up if the framework cannot be found in @targetFrameworkRootPath
+ When the frameworkName is null
+ Collection of reference assembly locations.
+
+
+
+ Returns the paths to the reference assemblies location for the given target framework.
+ This method will assume the requested ReferenceAssemblyRoot path will be the ProgramFiles directory specified by Environment.SpecialFolder.ProgramFiles
+ In additon when the .NETFramework or .NET Framework targetFrameworkIdentifiers are seen and targetFrameworkVersion is 2.0, 3.0, 3.5 or 4.0 we will return the correctly chained reference assembly paths
+ for the legacy .net frameworks. This chaining will use the existing GetPathToDotNetFrameworkReferenceAssemblies to build up the list of reference assembly paths.
+
+ Identifier being targeted
+ Version being targeted
+ Profile being targeted
+ When the frameworkName is null
+ Collection of reference assembly locations.
+
+
+
+ Returns the paths to the reference assemblies location for the given target framework.
+ This method will assume the requested ReferenceAssemblyRoot path will be the ProgramFiles directory specified by Environment.SpecialFolder.ProgramFiles
+ In additon when the .NETFramework or .NET Framework targetFrameworkIdentifiers are seen and targetFrameworkVersion is 2.0, 3.0, 3.5 or 4.0 we will return the correctly chained reference assembly paths
+ for the legacy .net frameworks. This chaining will use the existing GetPathToDotNetFrameworkReferenceAssemblies to build up the list of reference assembly paths.
+
+ Identifier being targeted
+ Version being targeted
+ Profile being targeted
+ Root directory which will be used to calculate the reference assembly path. The references assemblies will be
+ generated in the following way TargetFrameworkRootPath\TargetFrameworkIdentifier\TargetFrameworkVersion\SubType\TargetFrameworkSubType.
+ Uses the default path if this is null.
+
+ When the frameworkName is null
+ Collection of reference assembly locations.
+
+
+
+ Returns the paths to the reference assemblies location for the given target framework.
+ This method will assume the requested ReferenceAssemblyRoot path will be the ProgramFiles directory specified by Environment.SpecialFolder.ProgramFiles
+ In addition when the .NETFramework or .NET Framework targetFrameworkIdentifiers are seen and targetFrameworkVersion is 2.0, 3.0, 3.5 or 4.0 we will return the correctly chained reference assembly paths
+ for the legacy .net frameworks. This chaining will use the existing GetPathToDotNetFrameworkReferenceAssemblies to build up the list of reference assembly paths.
+
+ Identifier being targeted
+ Version being targeted
+ Profile being targeted
+ Root directory which will be used to calculate the reference assembly path. The references assemblies will be
+ generated in the following way TargetFrameworkRootPath\TargetFrameworkIdentifier\TargetFrameworkVersion\SubType\TargetFrameworkSubType.
+ Uses the default path if this is null.
+
+ ';' separated list of paths that are looked up if the framework cannot be found in
+ When the frameworkName is null
+ Collection of reference assembly locations.
+
+
+
+ Returns the paths to the reference assemblies location for the given target framework.
+ This method will assume the requested ReferenceAssemblyRoot path will be the ProgramFiles directory specified by Environment.SpecialFolder.ProgramFiles
+ In additon when the .NETFramework or .NET Framework targetFrameworkIdentifiers are seen and targetFrameworkVersion is 2.0, 3.0, 3.5 or 4.0 we will return the correctly chained reference assembly paths
+ for the legacy .net frameworks. This chaining will use the existing GetPathToDotNetFrameworkReferenceAssemblies to build up the list of reference assembly paths.
+
+ Framework required
+ When the frameworkName is null
+ Collection of reference assembly locations.
+
+
+
+ Call either the static method or the delegate. This is done purely for performance as the delegate is only required for ease of unit testing and since
+ the methods being called are static this will be a non 0 cost to use delegates vs the static methods directly.
+
+
+
+
+ Call either the static method or the delegate. This is done purely for performance as the delegate is only required for ease of unit testing and since
+ the methods being called are static this will be a non 0 cost to use delegates vs the static methods directly.
+
+
+
+
+ Generate the list of reference assembly paths for well known .net framework versions
+
+ Target framework moniker class which contains the targetframeworkVersion
+
+
+ A collection of strings which list the chained reference assembly paths with the highest version being first
+
+
+
+ Returns the path to the "bin" directory of the .NET Framework SDK.
+
+ Version of the targeted .NET Framework
+ Version of Visual Studio the requested SDK is associated with
+ Path string.
+
+
+
+ Generate the key which will be used for the reference assembly cache so that multiple static methods will generate it in the same way.
+
+
+
+
+ Create the shared cache if it is not null
+
+
+
+
+ Do the correct chaining of .net 3.5, 3.0 and 2.0. Throw an exception if any of the chain is missing
+
+
+
+
+ Do the correct chaining of .net 3.5, 3.0 and 2.0. Throw an exception if any of the chain is missing
+
+
+
+
+ Check to see if .net 2.0 is installed
+
+
+
+
+ Returns the paths to the reference assemblies location for the given framework version relative to a given targetFrameworkRoot.
+ The method will not check to see if the path exists or not.
+
+ Root directory which will be used to calculate the reference assembly path. The references assemblies will be
+ generated in the following way TargetFrameworkRootPath\TargetFrameworkIdentifier\TargetFrameworkVersion\SubType\TargetFrameworkSubType.
+
+ ';' separated list of paths that are looked up if the framework cannot be found in @targetFrameworkRootPath
+ A frameworkName class which represents a TargetFrameworkMoniker. This cannot be null.
+ Collection of reference assembly locations.
+
+
+
+ Returns the paths to the reference assemblies location for the given framework version relative to a given targetFrameworkRoot.
+ The method will not check to see if the path exists or not.
+
+ Root directory which will be used to calculate the reference assembly path. The references assemblies will be
+ generated in the following way TargetFrameworkRootPath\TargetFrameworkIdentifier\TargetFrameworkVersion\SubType\TargetFrameworkSubType.
+
+ A frameworkName class which represents a TargetFrameworkMoniker. This cannot be null.
+ Collection of reference assembly locations.
+
+
+
+ Figures out a display name given the target framework details.
+ This is the equivalent of the target framework moniker, but for display.
+ If one cannot be found from the redist list file, a synthesized one is returned, so there is always a display name.
+
+
+
+
+ Returns the paths to the reference assemblies location for the given framework version and properly chains the reference assemblies if required.
+
+ Collection of reference assembly locations.
+
+
+
+ Clear out the appdomain wide cache of Platform and Extension SDKs.
+
+
+
+
+ Clear our the appdomain wide caches
+
+
+
+
+ Remap some common architectures to a single one that will be in the SDK.
+
+
+
+
+ Add the reference folder to the list of reference directories if it exists.
+
+
+
+
+ Get the list of extension sdks for a given platform and version
+
+
+
+
+ Gets new style extension SDKs (those that are under the target SDK name and version and are driven by manifest, not directory structure).
+
+
+
+
+ Given a root disk location and the target platform properties find all of the SDKs installed in that location.
+
+
+
+
+ Given a registry location enumerate the registry and find the installed SDKs.
+
+
+
+
+ Gather the list of SDKs installed on the machine from the registry.
+ Do not parallelize the getting of these entries, order is important, we want the first ones in to win.
+
+
+
+
+ Get the disk locations to search for sdks under. This can be overridden by an environment variable
+
+
+
+
+ Extract the disk roots from the environment
+
+
+
+
+ Get the disk roots to search for both platform and extension sdks in. The environment variable can
+ override the defaults.
+
+
+
+
+
+ Get the disk roots to search for multi platform extension sdks in. The environment variable can
+ override the defaults.
+
+
+
+
+ Get the registry root to find sdks under. The registry can be disabled if we are in a checked in scenario
+
+
+
+
+
+ Given a platform SDK object, populate its supported platforms.
+
+
+
+
+ Take the path to a reference assembly directory which contains a RedistList folder which then contains a FrameworkList.xml file.
+ We will read in the xml file and determine if it has an IncludedFramework element in the redist list. If it does it will calculate
+ the path where the next link in the chain should be and return that path.
+ Also, when reading the redist list, if any display name is found it will be cached, keyed off the path passed in.
+
+ Return null if we could not chain due to an error or the path not being found. return String.Empty if there is no next element in the chain
+
+
+
+ Get a fully qualified path to a file in the latest .NET Framework SDK. Error if the .NET Framework SDK can't be found.
+ When targeting .NET 3.5 or above, looks in the locations associated with Visual Studio 2010. If you wish to
+ target the .NET Framework SDK that ships with Visual Studio Dev11 or later, please use the override that
+ specifies a VisualStudioVersion.
+
+ File name to locate in the .NET Framework SDK directory
+ Path string.
+
+
+
+ Get a fully qualified path to a file in the .NET Framework SDK. Error if the .NET Framework SDK can't be found.
+ When targeting .NET 3.5 or above, looks in the locations associated with Visual Studio 2010. If you wish to
+ target the .NET Framework SDK that ships with Visual Studio Dev11 or later, please use the override that
+ specifies a VisualStudioVersion.
+
+ File name to locate in the .NET Framework SDK directory
+ Version of the targeted .NET Framework
+ Path string.
+
+
+
+ Get a fully qualified path to a file in the .NET Framework SDK. Error if the .NET Framework SDK can't be found.
+
+ File name to locate in the .NET Framework SDK directory
+ Version of the targeted .NET Framework
+ Version of Visual Studio the requested SDK is associated with
+ Path string.
+
+
+
+ Get a fully qualified path to a file in the .NET Framework SDK. Error if the .NET Framework SDK can't be found.
+
+ File name to locate in the .NET Framework SDK directory
+ Version of the targeted .NET Framework
+ The required architecture of the requested file.
+ Path string.
+
+
+
+ Get a fully qualified path to a file in the .NET Framework SDK. Error if the .NET Framework SDK can't be found.
+
+ File name to locate in the .NET Framework SDK directory
+ Version of the targeted .NET Framework
+ Version of Visual Studio
+ The required architecture of the requested file.
+ Path string.
+
+
+
+ Get a fully qualified path to a file in the .NET Framework SDK. Error if the .NET Framework SDK can't be found.
+
+ File name to locate in the .NET Framework SDK directory
+ Version of the targeted .NET Framework
+ Version of Visual Studio
+ The required architecture of the requested file.
+ If true, will follow the fallback pattern -- from requested architecture, to
+ current architecture, to x86. Otherwise, if the requested architecture path doesn't exist, that's it -- no path
+ will be returned.
+
+
+
+
+ Gets the path to a sdk exe based on the processor architecture and the provided bin directory path.
+ If the fileName cannot be found in the pathToSDK after the processor architecture has been taken into account a null is returned.
+
+
+
+
+ Given a member of the DotNetFrameworkArchitecture enumeration, returns the equivalent ProcessorArchitecture string.
+ Internal for Testing Purposes Only
+
+
+
+
+
+
+ Returns the path to the Windows SDK for the desired .NET Framework and Visual Studio version. Note that
+ this is only supported for a targeted .NET Framework version of 4.5 and above.
+
+ Target .NET Framework version
+ Version of Visual Studio associated with the SDK.
+ Path to the appropriate Windows SDK location
+
+
+
+ Returns the path to a file in the Windows SDK for the desired .NET Framework and Visual Studio version. Note that
+ this is only supported for a targeted .NET Framework version of 4.5 and above.
+
+ The name of the file being requested.
+ Target .NET Framework version.
+ Version of Visual Studio associated with the SDK.
+ Path to the appropriate Windows SDK file
+
+
+
+ Returns the path to a file in the Windows SDK for the desired .NET Framework and Visual Studio version and the desired
+ architecture. Note that this is only supported for a targeted .NET Framework version of 4.5 and above.
+
+ The name of the file being requested.
+ Target .NET Framework version.
+ Version of Visual Studio associated with the SDK.
+ Desired architecture of the resultant file.
+ Path to the appropriate Windows SDK file
+
+
+
+ Returns the path to a file in the Windows SDK for the desired .NET Framework and Visual Studio version and the desired
+ architecture. Note that this is only supported for a targeted .NET Framework version of 4.5 and above.
+
+ The name of the file being requested.
+ Target .NET Framework version.
+ Version of Visual Studio associated with the SDK.
+ Desired architecture of the resultant file.
+ true to fallback, otherwise false.
+ Path to the appropriate Windows SDK file
+
+
+
+ Gets the path to a sdk exe based on the processor architecture and the provided bin directory path.
+ If the fileName cannot be found in the pathToSDK after the processor architecture has been taken into account a null is returned.
+
+
+
+
+ Given a ToolsVersion, return the path to the MSBuild tools for that ToolsVersion
+
+ The ToolsVersion for which to get the tools path
+ The tools path folder of the appropriate ToolsVersion if it exists, otherwise null.
+
+
+
+ Given a ToolsVersion, return the path to the MSBuild tools for that ToolsVersion
+
+ The ToolsVersion for which to get the tools path
+ The architecture of the build tools location to get
+ The tools path folder of the appropriate ToolsVersion if it exists, otherwise null.
+
+
+
+ Given the name of a file and a ToolsVersion, return the path to that file in the MSBuild
+ tools path for that ToolsVersion
+
+ The file to find the path to
+ The ToolsVersion in which to find the file
+ The path to the file in the tools path folder of the appropriate ToolsVersion if it
+ exists, otherwise null.
+
+
+
+ Given the name of a file and a ToolsVersion, return the path to that file in the MSBuild
+ tools path for that ToolsVersion
+
+ The file to find the path to
+ The ToolsVersion in which to find the file
+ The architecture of the build tools file to get
+ The path to the file in the tools path folder of the appropriate ToolsVersion if it
+ exists, otherwise null.
+
+
+
+ Get a fully qualified path to a file in the frameworks root directory.
+
+ File name to locate in the .NET Framework directory
+ Version of the targeted .NET Framework
+ Will return 'null' if there is no target frameworks on this machine.
+
+
+
+ Get a fully qualified path to a file in the frameworks root directory for the specified architecture.
+
+ File name to locate in the .NET Framework directory
+ Version of the targeted .NET Framework
+ Desired architecture, or DotNetFrameworkArchitecture.Current for the architecture this process is currently running under.
+ Will return 'null' if there is no target frameworks on this machine.
+
+
+
+ Get a fully qualified path to a file in the system directory (i.e. %SystemRoot%\System32)
+
+ File name to locate in the system directory
+ Path string.
+
+
+
+ Gets a IList of supported target framework monikers.
+
+ list of supported target framework monikers
+
+
+
+ This method will return the highest version of a target framework moniker based on the identifier. This method will only
+ find full frameworks, this means no profiles will be returned.
+
+
+
+
+ Will return the root location for the reference assembly directory under the program files directory.
+
+
+
+
+
+ Converts a member of the Microsoft.Build.Utilities.DotNetFrameworkArchitecture enum to the equivalent member of the
+ Microsoft.Build.Shared.DotNetFrameworkArchitecture enum.
+
+
+
+
+ Given a string which may start with a "v" convert the string to a version object.
+
+
+
+
+ Gets the installed framework identifiers
+
+
+
+
+
+
+ Gets the installed versions for a given framework
+
+
+
+
+ Get installed framework profiles
+
+
+
+
+
+
+
+
+ returns the .NETFramework versions lessthanOrEqualTo 3.5 installed in the machine
+ Only returns Fx versions lessthanOrEqualTo 3.5 if DNFx3.5 is installed
+
+
+
+
+
+
+ Compares framework version strings of the format v4.1.2.3
+ major version and minor version are mandatory others are optional
+
+
+
+
+ The return value from InitializeHostObject. This enumeration defines what action the ToolTask
+ should take next, after we've tried to initialize the host object.
+
+
+
+
+ This means that there exists an appropriate host object for this task, it can support
+ all of the parameters passed in, and it should be invoked to do the real work of the task.
+
+
+
+
+ This means that either there is no host object available, or that the host object is
+ not capable of supporting all of the features required for this build. Therefore,
+ ToolTask should fallback to an alternate means of doing the build, such as invoking
+ the command-line tool.
+
+
+
+
+ This means that the host object is already up-to-date, and no further action is necessary.
+
+
+
+
+ This means that some of the parameters being passed into the task are invalid, and the
+ task should fail immediately.
+
+
+
+
+ Base class used for tasks that spawn an executable. This class implements the ToolPath property which can be used to
+ override the default path.
+
+
+
+
+ Protected constructor
+
+
+
+
+ Protected constructor
+
+ The resource manager for task resources
+
+
+
+ Protected constructor
+
+ The resource manager for task resources
+ The help keyword prefix for task's messages
+
+
+
+ The return code of the spawned process. If the task logged any errors, but the process
+ had an exit code of 0 (success), this will be set to -1.
+
+
+
+
+ When set to true, this task will yield the node when its task is executing.
+
+
+
+
+ When set to true, the tool task will create a batch file for the command-line and execute that using the command-processor,
+ rather than executing the command directly.
+
+
+
+
+ When set to true, it passes /Q to the cmd.exe command line such that the command line does not get echo-ed on stdout
+
+
+
+
+ A timeout to wait for a task to terminate before killing it. In milliseconds.
+
+
+
+
+ Used to signal when a tool has been cancelled.
+
+
+
+
+ This is the batch file created when UseCommandProcessor is set to true.
+
+
+
+
+ The encoding set to the console code page.
+
+
+
+
+ Implemented by the derived class. Returns a string which is the name of the underlying .EXE to run e.g. "resgen.exe"
+ Only used by the ToolExe getter.
+
+ Name of tool.
+
+
+
+ Projects may set this to override a task's ToolName.
+ Tasks may override this to prevent that.
+
+
+
+
+ Project-visible property allows the user to override the path to the executable.
+
+ Path to tool.
+
+
+
+ Whether or not to use UTF8 encoding for the cmd file and console window.
+ Values: Always, Never, Detect
+ If set to Detect, the current code page will be used unless it cannot represent
+ the Command string. In that case, UTF-8 is used.
+
+
+
+
+ Array of equals-separated pairs of environment
+ variables that should be passed to the spawned executable,
+ in addition to (or selectively overriding) the regular environment block.
+
+
+ Using this instead of EnvironmentOverride as that takes a Dictionary,
+ which cannot be set from an MSBuild project.
+
+
+
+
+ Project visible property that allows the user to specify an amount of time after which the task executable
+ is terminated.
+
+ Time-out in milliseconds. Default is (no time-out).
+
+
+
+ Overridable property specifying the encoding of the response file, UTF8 by default
+
+
+
+
+ Overridable method to escape content of the response file
+
+
+
+
+ Overridable property specifying the encoding of the captured task standard output stream
+
+
+ Console-based output uses the current system OEM code page by default. Note that we should not use Console.OutputEncoding
+ here since processes we run don't really have much to do with our console window (and also Console.OutputEncoding
+ doesn't return the OEM code page if the running application that hosts MSBuild is not a console application).
+
+
+
+
+ Overridable property specifying the encoding of the captured task standard error stream
+
+
+ Console-based output uses the current system OEM code page by default. Note that we should not use Console.OutputEncoding
+ here since processes we run don't really have much to do with our console window (and also Console.OutputEncoding
+ doesn't return the OEM code page if the running application that hosts MSBuild is not a console application).
+
+
+
+
+ Gets the Path override value.
+
+ The new value for the Environment for the task.
+
+
+
+ Importance with which to log text from the
+ standard error stream.
+
+
+
+
+ Whether this ToolTask has logged any errors
+
+
+
+
+ Task Parameter: Importance with which to log text from the
+ standard out stream.
+
+
+
+
+ Task Parameter: Importance with which to log text from the
+ standard error stream.
+
+
+
+
+ Should ALL messages received on the standard error stream be logged as errors.
+
+
+
+
+ Importance with which to log text from in the
+ standard out stream.
+
+
+
+
+ The actual importance at which standard out messages will be logged.
+
+
+
+
+ The actual importance at which standard error messages will be logged.
+
+
+
+
+ Gets an instance of a private TaskLoggingHelper class containing task logging methods.
+ This is necessary because ToolTask lives in a different assembly than the task inheriting from it
+ and needs its own separate resources.
+
+ The logging helper object.
+
+
+
+ Gets an instance of a shared resources TaskLoggingHelper class containing task logging methods.
+ This is necessary because ToolTask lives in a different assembly than the task inheriting from it
+ and needs its own separate resources.
+
+ The logging helper object.
+
+
+
+ Overridable function called after in
+
+
+
+
+ Gets the fully qualified tool name. Should return ToolExe if ToolTask should search for the tool
+ in the system path. If ToolPath is set, this is ignored.
+
+ Path string.
+
+
+
+ Gets the working directory to use for the process. Should return null if ToolTask should use the
+ current directory.
+
+ This is a method rather than a property so that derived classes (like Exec) can choose to
+ expose a public WorkingDirectory property, and it would be confusing to have two properties.
+
+
+
+
+ Implemented in the derived class
+
+ true, if successful
+
+
+
+ Returns true if task execution is not necessary. Executed after ValidateParameters
+
+
+
+
+
+ ToolTask is not incremental by default. When a derived class overrides SkipTaskExecution, then Question feature can take into effect.
+
+
+
+
+ Returns a string with those switches and other information that can go into a response file.
+ Called after ValidateParameters and SkipTaskExecution
+
+
+
+
+
+ Returns a string with those switches and other information that can't go into a response file and
+ must go directly onto the command line.
+ Called after ValidateParameters and SkipTaskExecution
+
+
+
+
+
+ Returns the command line switch used by the tool executable to specify the response file.
+ Will only be called if the task returned a non empty string from GetResponseFileCommands
+ Called after ValidateParameters, SkipTaskExecution and GetResponseFileCommands
+
+ full path to the temporarily created response file
+
+
+
+
+ Allows tool to handle the return code.
+ This method will only be called with non-zero exitCode.
+
+ The return value of this method will be used as the task return value
+
+
+
+ We expect the tasks to override this method, if they support host objects. The implementation should call into the
+ host object to perform the real work of the task. For example, for compiler tasks like Csc and Vbc, this method would
+ call Compile() on the host object.
+
+ The return value indicates success (true) or failure (false) if the host object was actually called to do the work.
+
+
+
+ We expect tasks to override this method if they support host objects. The implementation should
+ make sure that the host object is ready to perform the real work of the task.
+
+ The return value indicates what steps to take next. The default is to assume that there
+ is no host object provided, and therefore we should fallback to calling the command-line tool.
+
+
+
+ Logs the actual command line about to be executed (or what the task wants the log to show)
+
+
+ Descriptive message about what is happening - usually the command line to be executed.
+
+
+
+
+ Logs the tool name and the path from where it is being run.
+
+
+ The tool to Log. This is the actual tool being used, ie. if ToolExe has been specified it will be used, otherwise it will be ToolName
+
+
+ The path from where the tool is being run.
+
+
+
+
+ Figures out the path to the tool (including the .exe), either by using the ToolPath
+ parameter, or by asking the derived class to tell us where it should be located.
+
+ path to the tool, or null
+
+
+
+ Creates a temporary response file for the given command line arguments.
+ We put as many command line arguments as we can into a response file to
+ prevent the command line from getting too long. An overly long command
+ line can cause the process creation to fail.
+
+
+ Command line arguments that cannot be put into response files, and which
+ must appear on the command line, should not be passed to this method.
+
+ The command line arguments that need
+ to go into the temporary response file.
+ [out] The command line switch for using
+ the temporary response file, or null if the response file is not needed.
+
+ The path to the temporary response file, or null if the response
+ file is not needed.
+
+
+
+ Initializes the information required to spawn the process executing the tool.
+
+
+
+
+ The information required to start the process.
+
+
+
+ We expect tasks to override this method if they need information about the tool process or its process events during task execution.
+ Implementation should make sure that the task is started in this method.
+ Starts the process during task execution.
+
+ Fully populated instance representing the tool process to be started.
+ A started process. This could be or another instance.
+
+
+
+ Writes out a temporary response file and shell-executes the tool requested. Enables concurrent
+ logging of the output of the tool.
+
+ The computed path to tool executable on disk
+ Command line arguments that should go into a temporary response file
+ Command line arguments that should be passed to the tool executable directly
+ exit code from the tool - if errors were logged and the tool has an exit code of zero, then we sit it to -1
+
+
+
+ Cancels the process executing the task by asking it to close nicely, then after a short period, forcing termination.
+
+
+
+
+ Delete temporary file. If the delete fails for some reason (e.g. file locked by anti-virus) then
+ the call will not throw an exception. Instead a warning will be logged, but the build will not fail.
+
+ File to delete
+
+
+
+ Handles all the notifications sent while the tool is executing. The
+ notifications can be for tool output, tool time-out, or tool completion.
+
+
+ The slightly convoluted use of the async stderr/stdout streams of the
+ Process class is necessary because we want to log all our messages from
+ the main thread, instead of from a worker or callback thread.
+
+
+
+
+
+ Kills the given process that is executing the tool, because the tool's
+ time-out period expired.
+
+
+
+
+ Kills the specified process
+
+
+
+
+ Confirms that the given process has really and truly exited. If the
+ process is still finishing up, this method waits until it is done.
+
+
+ This method is a hack, but it needs to be called after both
+ Process.WaitForExit() and Process.Kill().
+
+
+
+
+
+ Logs all the messages that the tool wrote to stderr. The messages
+ are read out of the stderr data queue.
+
+
+
+
+ Logs all the messages that the tool wrote to stdout. The messages
+ are read out of the stdout data queue.
+
+
+
+
+ Logs all the messages that the tool wrote to either stderr or stdout.
+ The messages are read out of the given data queue. This method is a
+ helper for the () and () methods.
+
+
+
+
+
+
+
+
+ Calls a method on the TaskLoggingHelper to parse a single line of text to
+ see if there are any errors or warnings in canonical format. This can
+ be overridden by the derived class if necessary.
+
+
+
+
+
+
+ Signals when the tool times-out. The tool timer calls this method
+ when the time-out period on the tool expires.
+
+ This method is used as a System.Threading.TimerCallback delegate.
+
+
+
+
+ Signals when the tool exits. The Process object executing the tool
+ calls this method when the tool exits.
+
+ This method is used as a System.EventHandler delegate.
+
+
+
+
+
+ Queues up the output from the stderr stream of the process executing
+ the tool, and signals the availability of the data. The Process object
+ executing the tool calls this method for every line of text that the
+ tool writes to stderr.
+
+ This method is used as a System.Diagnostics.DataReceivedEventHandler delegate.
+
+
+
+
+
+ Queues up the output from the stdout stream of the process executing
+ the tool, and signals the availability of the data. The Process object
+ executing the tool calls this method for every line of text that the
+ tool writes to stdout.
+
+ This method is used as a System.Diagnostics.DataReceivedEventHandler delegate.
+
+
+
+
+
+ Queues up the output from either the stderr or stdout stream of the
+ process executing the tool, and signals the availability of the data.
+ This method is a helper for the ()
+ and () methods.
+
+
+
+
+
+
+
+ Assign the importances that will be used for stdout/stderr logging of messages from this tool task.
+ This takes into account (1 is highest precedence):
+ 1. the override value supplied as a task parameter.
+ 2. those overridden by any derived class and
+ 3. the defaults given by tooltask
+
+
+
+
+ Looks for the given file in the system path i.e. all locations in the %PATH% environment variable.
+
+
+ The location of the file, or null if file not found.
+
+
+
+ This method invokes the tool with the given parameters.
+
+ true, if task executes successfully
+
+
+
+ Replace backslashes with OS-specific path separators,
+ except when likely that the backslash is intentional.
+
+
+ Not a static method so that an implementation can
+ override with more-specific knowledge of what backslashes
+ are likely to be correct.
+
+
+
+
+ Log a single environment variable that's about to be applied to the tool
+
+
+
+
+ An object to hold the event shutdown lock
+
+
+
+
+ Splitter for environment variables
+
+
+
+
+ The actual importance at which standard out messages will be logged
+
+
+
+
+ The actual importance at which standard error messages will be logged
+
+
+
+
+ Holds the stderr output from the tool.
+
+ This collection is NOT thread-safe.
+
+
+
+ Holds the stdout output from the tool.
+
+ This collection is NOT thread-safe.
+
+
+
+ Used for signalling when the tool writes to stderr.
+
+
+
+
+ Used for signalling when the tool writes to stdout.
+
+
+
+
+ Used for signalling when the tool exits.
+
+
+
+
+ Set to true if the tool process was terminated,
+ either because the timeout was reached or it was canceled.
+
+
+
+
+ Used for signalling when the tool times-out.
+
+
+
+
+ Used for timing-out the tool.
+
+
+
+
+ Used to support overriding the toolExe name.
+
+
+
+
+ Set when the events are about to be disposed, so that tardy
+ calls on the event handlers don't try to reset a disposed event
+
+
+
+
+ List of name, value pairs to be passed to the spawned tool's environment.
+ May be null.
+
+
+
+
+ Enumeration which indicates what kind of queue is being passed
+
+
+
+
+ Check that the given composite root contains all entries in the composite sub root
+
+ The root to look for all sub roots in
+ The root that is comprised of subroots to look for
+
+
+
+
+ This method checks that the specified files exist. During the scan the
+ most recent file write time of all the outputs is remembered. It will be
+ the basis for up to date comparisons.
+
+ The files being checked for existence.
+ The TaskLoggingHelper used to log the nonexistent files.
+ Name of the most recently modified file.
+ Timestamp of the most recently modified file.
+ True if all members of 'files' exist, false otherwise
+
+
+
+ This method checks that the specified files exist. During the scan the
+ least recent file write time of all the outputs is remembered. It will be
+ the basis for up to date comparisons.
+
+ The files being checked for existence.
+ The TaskLoggingHelper used to log the nonexistent files.
+ Name of the least recently modified file.
+ Timestamp of the least recently modified file.
+ True if all members of 'files' exist, false otherwise
+
+
+
+ This class is the filetracking log interpreter for .read. tracking logs in canonical form
+ or those that have been rooted (^) to make them canonical
+
+
+
+
+ Gets the current dependency table.
+
+
+
+
+ Constructor for multiple input source files
+
+ The .read. tlog files to interpret
+ The primary source files to interpret dependencies for
+ The output files produced by compiling this set of sources
+ WARNING: Minimal rebuild optimization requires 100% accurate computed outputs to be specified!
+ True to keep composite rooting markers around (many-to-one case) or false to shred them (one-to-one or one-to-many case)
+
+
+
+ Constructor for multiple input source files
+
+ The .read. tlog files to interpret
+ The primary source files to interpret dependencies for
+ The set of paths that contain files that are to be ignored during up to date check
+ The output files produced by compiling this set of sources
+ WARNING: Minimal rebuild optimization requires 100% accurate computed outputs to be specified!
+ True to keep composite rooting markers around (many-to-one case) or false to shred them (one-to-one or one-to-many case)
+
+
+
+ Constructor for multiple input source files
+
+ The task that is using file tracker
+ The .read. tlog files to interpret
+ The primary source files to interpret dependencies for
+ The set of paths that contain files that are to be ignored during up to date check
+ The output files produced by compiling this set of sources
+ WARNING: Minimal rebuild optimization requires 100% accurate computed outputs to be specified!
+ True to keep composite rooting markers around (many-to-one case) or false to shred them (one-to-one or one-to-many case)
+
+
+
+ Constructor for multiple input source files
+
+ The task that is using file tracker
+ The .read. tlog files to interpret
+ The primary source files to interpret dependencies for
+ The set of paths that contain files that are to be ignored during up to date check
+ The output files produced by compiling this set of sources
+ WARNING: Minimal rebuild optimization requires 100% accurate computed outputs to be specified!
+ True to keep composite rooting markers around (many-to-one case) or false to shred them (one-to-one or one-to-many case)
+
+
+
+ Constructor for a single input source file
+
+ The task that is using file tracker
+ The .read. tlog files to interpret
+ The primary source file to interpret dependencies for
+ The set of paths that contain files that are to be ignored during up to date check
+ The output files produced by compiling this source
+ WARNING: Minimal rebuild optimization requires 100% accurate computed outputs to be specified!
+ True to keep composite rooting markers around (many-to-one case) or false to shred them (one-to-one or one-to-many case)
+
+
+
+ Common internal constructor
+
+ The task that is using file tracker
+ The .read. tlog files to interpret
+ The primary source files to interpret dependencies for
+ The output files produced by compiling this set of sources
+ The output files.
+ The set of paths that contain files that are to be ignored during up to date check
+ WARNING: Minimal rebuild optimization requires 100% accurate computed outputs to be specified!
+ True to keep composite rooting markers around (many-to-one case) or false to shred them (one-to-one or one-to-many case)
+
+
+
+ This method computes the sources that need to be compiled based on the output files and the
+ full dependency graph of inputs
+
+ Array of files that need to be compiled
+
+
+
+ This method computes the sources that need to be compiled based on the output files and the
+ full dependency graph of inputs, optionally searching composite rooting markers
+ for subroots that may contain input files
+
+ Array of files that need to be compiled
+
+
+
+ This method computes the sources that need to be compiled based on the output files and the
+ full dependency graph of inputs, making the assumption that the source files are all primary
+ files -- ie. there is either a one-to-one or a one-to-many correspondence between inputs
+ and outputs
+
+ Array of files that need to be compiled
+
+
+
+ Check to see if the source specified needs compilation relative to its outputs
+
+
+
+
+ A very simple comparer for TaskItems so that up to date check results can be sorted.
+
+
+
+
+ This method computes the sources that need to be compiled based on the output files and the
+ full dependency graph of inputs, making the assumption that the source files are the components
+ of a composite rooting marker, as in the case where there is a many-to-one correspondence
+ between inputs and outputs.
+
+ Array of files that need to be compiled
+
+
+
+ Given a composite output rooting marker, gathers up all the sources it depends on.
+
+
+
+
+ Check if the source file needs to be compiled
+
+ The primary dependency
+ bool
+
+
+
+ Test to see if the specified file is excluded from tracked dependency checking
+
+
+ Full path of the file to test
+
+
+
+
+ Construct our dependency table for our source files.
+
+
+
+
+ This method will re-write the tlogs from the current output table new entries will
+ be tracked.
+
+
+
+
+ This method will re-write the tlogs from the current dependency. As the sources are compiled,
+ new entries willbe tracked.
+
+
+ Delegate used to determine whether a particular file should
+ be included in the compacted tlog.
+
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Source that should be removed from the graph
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+
+
+
+ Remove the entry in the input dependency graph corresponding to the rooting marker
+ passed in.
+
+ The root to remove
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+ A to remove as a dependency.
+
+
+
+ Remove the output graph entries for the given source and corresponding outputs
+
+ Source that should be removed from the graph
+ A to remove as a dependency.
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ The rooting marker that should be removed from the graph
+ A to remove as a dependency.
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Source that should be removed from the graph
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Source that should be removed from the graph
+ Output that correspond ot the sources (used for same file processing)
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+ Outputs that correspond ot the sources (used for same file processing)
+
+
+
+ Remove the output graph entries for the given rooting marker
+
+
+ The cache used to store whether each file exists or not.
+
+
+
+ This class is the filetracking log interpreter for .write. tracking logs in canonical form
+ Canonical .write. logs need to be rooted, since the outputs need to be associated with an input.
+
+
+
+
+ Gets the dependency table.
+
+
+
+
+ Constructor
+
+ The .write. tlog files to interpret
+
+
+
+ Constructor
+
+ The task that is using file tracker
+ The .write. tlog files to interpret
+
+
+
+ Constructor
+
+ The task that is using file tracker
+ The .write. tlog files to interpret
+ The output graph is built from the .write. tlogs
+
+
+
+ Internal constructor
+
+ The task that is using file tracker
+ The .write. tlog files to interpret
+ The output graph is built from the .write. tlogs
+
+
+
+ Construct our dependency table for our source files
+
+
+
+
+ Given a set of sources, removes from the dependency graph any roots that share
+ the same outputs as the rooting marker constructed from the given set of sources.
+
+
+ Used when there's a possibility that more than one set of inputs may produce the
+ same output -- this is a way to invalidate any other roots that produce that same
+ outputs, so that the next time the task is run with that other set of inputs, it
+ won't incorrectly believe that it is up-to-date.
+
+ The set of sources that form the rooting marker whose outputs
+ should not be shared by any other rooting marker.
+ An array of the rooting markers that were removed.
+
+
+
+ Remove the specified ouput from the dependency graph for the given source file
+
+ The source file who's output is to be discarded
+ The output path to be removed
+
+
+
+ This method determines the outputs for a source root (as in the contents of a rooting marker)
+
+ The sources to find outputs for
+ Array of outputs for the source
+
+
+
+ This method determines the outputs for a source root (as in the contents of a rooting marker)
+
+ The sources to find outputs for
+ Array of outputs for the source
+
+
+
+ This method determines the outputs for a source root (as in the contents of a rooting marker)
+
+ The sources to find outputs for
+ When set true, this will consider using outputs found in rooting markers that are composed of the sub-root.
+ Array of outputs for the source
+
+
+
+ This method determines the outputs for a source root (as in the contents of a rooting marker)
+
+ List of outputs to populate
+ The source to gather outputs for
+
+
+
+ This method adds computed outputs for the given source key to the output graph
+
+ The source to add outputs for
+ The computed outputs for this source key
+
+
+
+ This method adds computed outputs for the given source key to the output graph
+
+ The source to add outputs for
+ The computed outputs for this source key
+
+
+
+ This method adds computed outputs for the given source key to the output graph
+
+ The source to add outputs for
+ The computed outputs for this source key
+
+
+
+ This method returns the output dictionary for the given source key
+ if non exists, one is created
+
+ The source to retrieve outputs for
+
+
+
+ This method adds a computed output for the given source key to the dictionary specified
+
+ The dictionary to add outputs to
+ The computed outputs for this source key
+
+
+
+ This method will re-write the tlogs from the current output table new entries will
+ be tracked.
+
+
+
+
+ This method will re-write the tlogs from the current output table new entries will
+ be tracked.
+
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+ Outputs that correspond ot the sources (used for same file processing)
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+ Outputs that correspond ot the sources (used for same file processing)
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+ The dependency to remove.
+
+
+
+ Remove the output graph entries for the given source and corresponding outputs
+
+ Source that should be removed from the graph
+ The dependency to remove.
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+ The dependency to remove.
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Source that should be removed from the graph
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Source that should be removed from the graph
+ Output that correspond ot the sources (used for same file processing)
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+
+
+
+ Remove the output graph entries for the given sources and corresponding outputs
+
+ Sources that should be removed from the graph
+ Outputs that correspond ot the sources (used for same file processing)
+
+
+
+ Remove the output graph entries for the given rooting marker
+
+
+ The cache used to store whether each file exists or not.
+
+
+
+ A static cache that will hold the dependency graph as built from tlog files.
+ The cache is keyed on the root marker created from the full paths of the tlog files concerned.
+ As an entry is added to the cache so is the datetime it was added.
+
+
+
+
+ The dictionary that maps the root of the tlog filenames to the dependencytable built from their content
+
+
+
+
+ Determine if a cache entry is up to date
+
+ The cache entry to check
+ true if up to date
+
+
+
+ Get the cached entry for the given tlog set, if the table is out of date it is removed from the cache
+
+ The rooting marker for the set of tlogs
+ The cached table entry
+
+
+
+ Given a set of TLog names, formats a rooting marker from them, that additionally replaces
+ all PIDs and TIDs with "[ID]" so the cache doesn't get overloaded with entries
+ that should be basically the same but have different PIDs or TIDs in the name.
+
+ The set of tlogs to format
+ The normalized rooting marker based on that set of tlogs
+
+
+
+ Given a TLog path, replace all PIDs and TIDs with "[ID]" in the filename, where
+ the typical format of a filename is "tool[.PID][-tool].read/write/command/delete.TID.tlog"
+
+
+ The algorithm used finds all instances of .\d+. and .\d+- in the filename and translates them
+ to .[ID]. and .[ID]- respectively, where "filename" is defined as the part of the path following
+ the final '\' in the path.
+
+ In the VS 2010 C++ project system, there are artificially constructed tlogs that instead follow the
+ pattern "ProjectName.read/write.1.tlog", which means that one result of this change is that such
+ tlogs, should the project name also contain this pattern (e.g. ClassLibrary.1.csproj), will also end up
+ with [ID] being substituted for digits in the project name itself -- so the tlog name would end up being
+ ClassLibrary.[ID].read.[ID].tlog, rather than ClassLibrary.1.read.[ID].tlog. This could potentially
+ cause issues if there are multiple projects differentiated only by the digits in their names; however
+ we believe this is not an interesting scenario to watch for and support, given that the resultant rooting
+ marker is constructed from full paths, so either:
+ - The project directories are also different, and are never substituted, leading to different full paths (e.g.
+ C:\ClassLibrary.1\Debug\ClassLibrary.[ID].read.[ID].tlog and C:\ClassLibrary.2\Debug\ClassLibrary.[ID].read.[ID].tlog)
+ - The project directories are the same, in which case there are two projects that share the same intermediate
+ directory, which has a host of other problems and is explicitly NOT a supported scenario.
+
+ The tlog path to normalize
+ The normalized path
+
+
+
+ EqualityComparer for ITaskItems that only looks at the itemspec
+
+
+
+
+ Returns whether the two ITaskItems are equal, where they are judged to be
+ equal as long as the itemspecs, compared case-insensitively, are equal.
+
+
+
+
+ Returns the hashcode of this ITaskItem. Given that equality is judged solely based
+ on the itemspec, the hash code for this particular comparer also only uses the
+ itemspec to make its determination.
+
+
+
+
+ A cache entry
+
+
+
+
+ Construct a new entry
+
+ The tlog files used to build this dependency table
+ The dependency table to be cached
+
+
+
+ Enumeration to express the type of executable being wrapped by Tracker.exe.
+
+
+
+
+ 32-bit native executable.
+
+
+
+
+ 64-bit native executable.
+
+
+
+
+ A managed executable without a specified bitness.
+
+
+
+
+ A managed executable specifically marked as 32-bit.
+
+
+
+
+ A managed executable specifically marked as 64-bit.
+
+
+
+
+ Use the same bitness as the currently running executable.
+
+
+
+
+ 64-bit native ARM64 executable.
+
+
+
+
+ 64-bit managed ARM64 executable.
+
+
+
+
+ This class contains utility functions to encapsulate launching and logging for the Tracker
+
+
+
+
+ The default path to temp, used to create explicitly short and long paths.
+
+
+ This must be the base system-wide temp path because we use it to filter out I/O of tools outside of our control.
+ Tools running under the tracker may put temp files in the temp base or in a sub-directory of their choosing.
+
+
+
+
+ Stops tracking file accesses.
+
+
+
+
+ Resume tracking file accesses in the current tracking context.
+
+
+
+
+ Set the global thread count, and assign that count to the current thread.
+
+
+
+
+ Starts tracking file accesses.
+
+ The directory into which to write the tracking log files
+ The name of the task calling this function, used to determine the
+ names of the tracking log files
+
+
+
+ Starts tracking file accesses, using the rooting marker in the response file provided. To
+ automatically generate a response file given a rooting marker, call
+ FileTracker.CreateRootingMarkerResponseFile.
+
+ The directory into which to write the tracking log files
+ The name of the task calling this function, used to determine the
+ names of the tracking log files
+ The path to the root marker response file.
+
+
+
+ Stop tracking file accesses and get rid of the current tracking contexts.
+
+
+
+
+ Temporarily suspend tracking of file accesses in the current tracking context.
+
+
+
+
+ Write tracking logs for all contexts and threads.
+
+ The directory into which to write the tracking log files
+ The name of the task calling this function, used to determine the
+ names of the tracking log files
+
+
+
+ Write tracking logs corresponding to the current tracking context.
+
+ The directory into which to write the tracking log files
+ The name of the task calling this function, used to determine the
+ names of the tracking log files
+
+
+
+ Test to see if the specified file is excluded from tracked dependencies
+
+
+ Full path of the file to test
+
+
+
+
+ Test to see if the specified file is under the specified path
+
+
+ Full path of the file to test
+
+
+ Is the file under this full path?
+
+
+
+
+ Construct a rooting marker string from the ITaskItem array of primary sources.
+
+ An containing information about the primary source.
+
+
+
+ Construct a rooting marker string from the ITaskItem array of primary sources.
+
+ An containing information about the primary source.
+ An containing information about the output.
+
+
+
+ Construct a rooting marker string from the ITaskItem array of primary sources.
+
+
+ ITaskItem array of primary sources.
+
+
+
+
+ Construct a rooting marker string from the ITaskItem array of primary sources.
+
+
+ ITaskItem array of primary sources.
+
+ ITaskItem array of outputs.
+
+
+
+ Given a set of source files in the form of ITaskItem, creates a temporary response
+ file containing the rooting marker that corresponds to those sources.
+
+
+ ITaskItem array of primary sources.
+
+ The response file path.
+
+
+
+ Given a rooting marker, creates a temporary response file with that rooting marker
+ in it.
+
+ The rooting marker to put in the response file.
+ The response file path.
+
+
+
+ Prepends the path to the appropriate FileTracker assembly to the PATH
+ environment variable. Used for inproc tracking, or when the .NET Framework may
+ not be on the PATH.
+
+ The old value of PATH
+
+
+
+ Prepends the path to the appropriate FileTracker assembly to the PATH
+ environment variable. Used for inproc tracking, or when the .NET Framework may
+ not be on the PATH.
+
+ The root path for FileTracker.dll. Overrides the toolType if specified.
+ The old value of PATH
+
+
+
+ Searches %PATH% for the location of Tracker.exe, and returns the first
+ path that matches.
+
+ The full path to Tracker.exe, or if a matching path is not found.
+
+
+
+ Determines whether we must track out-of-proc, or whether inproc tracking will work.
+
+ The executable type for the tool being tracked
+ True if we need to track out-of-proc, false if inproc tracking is OK
+
+
+
+ Determines whether we must track out-of-proc, or whether inproc tracking will work.
+
+ The executable type for the tool being tracked
+ An optional assembly name.
+ The name of the cancel event tracker should listen for, or null if there isn't one
+ True if we need to track out-of-proc, false if inproc tracking is OK
+
+
+
+ Given the ExecutableType of the tool being wrapped and information that we
+ know about our current bitness, figures out and returns the path to the correct
+ Tracker.exe.
+
+ The of the tool being wrapped
+
+
+
+ Given the ExecutableType of the tool being wrapped and information that we
+ know about our current bitness, figures out and returns the path to the correct
+ Tracker.exe.
+
+ The of the tool being wrapped
+ The root path for Tracker.exe. Overrides the toolType if specified.
+
+
+
+ Given the ExecutableType of the tool being wrapped and information that we
+ know about our current bitness, figures out and returns the path to the correct
+ FileTracker.dll.
+
+ The of the tool being wrapped
+
+
+
+ Given the ExecutableType of the tool being wrapped and information that we
+ know about our current bitness, figures out and returns the path to the correct
+ FileTracker.dll.
+
+ The of the tool being wrapped
+ The root path for FileTracker.dll. Overrides the toolType if specified.
+
+
+
+ Given a filename (only really meant to support either Tracker.exe or FileTracker.dll), returns
+ the appropriate path for the appropriate file type.
+
+
+
+ The root path for the file. Overrides the toolType if specified.
+
+
+
+ Given a filename (currently only Tracker.exe and FileTracker.dll are supported), return
+ the path to that file.
+
+
+
+
+
+
+
+ This method constructs the correct Tracker.exe response file arguments from its parameters
+
+ The name of the dll that will do the tracking
+ Intermediate directory where tracking logs will be written
+ Rooting marker
+ The arguments as a string
+
+
+
+ This method constructs the correct Tracker.exe response file arguments from its parameters
+
+ The name of the dll that will do the tracking
+ Intermediate directory where tracking logs will be written
+ Rooting marker
+ If a cancel event has been created that Tracker should be listening for, its name is passed here
+ The arguments as a string
+
+
+
+ This method constructs the correct Tracker.exe command arguments from its parameters
+
+ The command to track
+ The command to track's arguments
+ The arguments as a string
+
+
+
+ This method constructs the correct Tracker.exe arguments from its parameters
+
+ The command to track
+ The command to track's arguments
+ The name of the dll that will do the tracking
+ Intermediate directory where tracking logs will be written
+ Rooting marker
+ The arguments as a string
+
+
+
+ This method constructs the correct Tracker.exe arguments from its parameters
+
+ The command to track
+ The command to track's arguments
+ The name of the dll that will do the tracking
+ Intermediate directory where tracking logs will be written
+ Rooting marker
+ If a cancel event has been created that Tracker should be listening for, its name is passed here
+ The arguments as a string
+
+
+
+ Start the process; tracking the command.
+
+ The command to track
+ The command to track's arguments
+ The type of executable the wrapped tool is
+ The name of the dll that will do the tracking
+ Intermediate directory where tracking logs will be written
+ Rooting marker
+ If Tracker should be listening on a particular event for cancellation, pass its name here
+ Process instance
+
+
+
+ Start the process; tracking the command.
+
+ The command to track
+ The command to track's arguments
+ The type of executable the wrapped tool is
+ The name of the dll that will do the tracking
+ Intermediate directory where tracking logs will be written
+ Rooting marker
+ Process instance
+
+
+
+ Start the process; tracking the command.
+
+ The command to track
+ The command to track's arguments
+ The type of executable the wrapped tool is
+ Intermediate directory where tracking logs will be written
+ Rooting marker
+ Process instance
+
+
+
+ Start the process; tracking the command.
+
+ The command to track
+ The command to track's arguments
+ The type of executable the wrapped tool is
+ Rooting marker
+ Process instance
+
+
+
+ Start the process; tracking the command.
+
+ The command to track
+ The command to track's arguments
+ The type of executable the wrapped tool is
+ Process instance
+
+
+
+ Logs a message of the given importance using the specified resource string. To the specified Log.
+
+ This method is not thread-safe.
+ The Log to log to.
+ The importance level of the message.
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a message of the given importance using the specified string.
+
+ This method is not thread-safe.
+ The Log to log to.
+ The importance level of the message.
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a warning using the specified resource string.
+
+ The Log to log to.
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Dependency filter delegate. Used during TLog saves in order for tasks to selectively remove dependencies from the written
+ graph.
+
+ The full path to the dependency file about to be written to the compacted TLog
+ If the file should actually be written to the TLog (true) or not (false)
+
+
+
+ Class used to store and interrogate inputs and outputs recorded by tracking operations.
+
+
+
+
+ Missing files have been detected in the TLog
+
+
+
+
+ The path for the oldest file we have seen
+
+
+
+
+ The time for the oldest file we have seen
+
+
+
+
+ The time for the oldest file we have seen
+
+
+
+
+ The path for the newest file we have seen
+
+
+
+
+ The time for the newest file we have seen
+
+
+
+
+ The time for the newest file we have seen
+
+
+
+
+ Should root markers in the TLog be treated as file accesses, or only as markers?
+
+
+
+
+ Should files in the TLog but no longer exist be skipped or recorded?
+
+
+
+
+ The TLog files that back this structure
+
+
+
+
+ The time of the newest Tlog
+
+
+
+
+ The time of the newest Tlog
+
+
+
+
+ The path of the newest TLog file
+
+
+
+
+ Are all the TLogs that were passed to us actually available on disk?
+
+
+
+
+ Constructor
+
+ The .write. tlog files to interpret
+ The DateTime that should be recorded for missing file.
+
+
+
+ Constructor
+
+ The .write. tlog files to interpret
+ The .tlog files to ignore
+ The DateTime that should be recorded for missing file.
+
+
+
+ Constructor
+
+ The .tlog files to interpret
+ The .tlog files to ignore
+ The DateTime that should be recorded for missing file.
+ The set of paths that contain files that are to be ignored during up to date check, including any subdirectories.
+ Cache to be used for all timestamp/exists comparisons, which can be shared between multiple FlatTrackingData instances.
+
+
+
+ Constructor
+
+ The .tlog files to interpret
+ The .tlog files to ignore
+ The DateTime that should be recorded for missing file.
+ The set of paths that contain files that are to be ignored during up to date check, including any subdirectories.
+ Cache to be used for all timestamp/exists comparisons, which can be shared between multiple FlatTrackingData instances.
+ Add root markers as inputs.
+
+
+
+ Constructor
+
+ The task that is using file tracker
+ The tlog files to interpret
+ The DateTime that should be recorded for missing file.
+
+
+
+ Constructor
+
+ The .write. tlog files to interpret
+ Ignore files that do not exist on disk
+
+
+
+ Constructor
+
+ The task that is using file tracker
+ The tlog files to interpret
+ Ignore files that do not exist on disk
+
+
+
+ Internal constructor
+
+ The task that is using file tracker
+ The local .tlog files.
+ The .tlog files to ignore
+ Ignore files that do not exist on disk
+ The DateTime that should be recorded for missing file.
+ The set of paths that contain files that are to be ignored during up to date check
+
+
+
+ Construct our dependency table for our source files
+
+
+
+
+ Update the current state of entry details for the dependency table
+
+
+
+
+ Test to see if the specified file is excluded from tracked dependency checking
+
+
+ Full path of the file to test
+
+
+ The file is excluded if it is within any of the specified excluded input paths or any subdirectory of the paths.
+ It also assumes the file name is already converted to Uppercase Invariant.
+
+
+
+
+ Record the time and missing state of the entry in the tlog
+
+
+
+
+ This method will re-write the tlogs from the output table
+
+
+
+
+ This method will re-write the tlogs from the current table
+
+
+
+
+ Returns cached value for last write time of file. Update the cache if it is the first
+ time someone asking for that file
+
+
+
+
+ Checks to see if the tracking data indicates that everything is up to date according to UpToDateCheckType.
+ Note: If things are not up to date, then the TLogs are compacted to remove all entries in preparation to
+ re-track execution of work.
+
+ The host
+ UpToDateCheckType
+ The array of read tlogs
+ The array of write tlogs
+
+
+
+
+ Simple check of up to date state according to the tracking data and the UpToDateCheckType.
+ Note: No tracking log compaction will take place when using this overload
+
+ TaskLoggingHelper from the host task
+ UpToDateCheckType to use
+ FlatTrackingData structure containing the inputs
+ FlatTrackingData structure containing the outputs
+
+
+
+
+ Once tracked operations have been completed then we need to compact / finalize the Tlogs based
+ on the success of the tracked execution. If it fails, then we clean out the TLogs. If it succeeds
+ then we clean temporary files from the TLogs and re-write them.
+
+
+
+
+ The possible types of up to date check that we can support
+
+
+
+
+ The input is newer than the output.
+
+
+
+
+ The input or output are newer than the tracking file.
+
+
+
+
+ The input is newer than the tracking file.
+
+
+
+
+ This class contains utility functions to assist with tracking dependencies
+
+
+
+
+ Expand wildcards in the item list.
+
+
+ Array of items expanded
+
+
+
+ This method checks that all the files exist
+
+
+ bool
+
+
+
+ Helper logging class - contains all the logging methods used by tasks.
+ A TaskLoggingHelper object is passed to every task by MSBuild. For tasks that derive
+ from the Task class, it is provided in the Log property.
+ This class is thread safe: tasks can log from any threads.
+
+
+
+
+ public constructor
+
+ task containing an instance of this class
+
+
+
+ Public constructor which can be used by task factories to assist them in logging messages.
+
+
+
+
+ A client sponsor is a class
+ which will respond to a lease renewal request and will
+ increase the lease time allowing the object to stay in memory
+
+
+
+
+ Object to make this class thread-safe.
+
+
+
+
+ Gets the name of the parent task.
+
+ Task name string.
+
+
+
+ Gets the upper-case version of the parent task's name.
+
+ Upper-case task name string.
+
+
+
+ The build engine we are going to log against
+
+
+
+
+ Shortcut property for getting our build engine - we retrieve it from the task instance
+
+
+
+
+ Used to load culture-specific resources. Derived classes should register their resources either during construction, or
+ via this property, if they have localized strings.
+
+
+
+
+ Gets or sets the prefix used to compose help keywords from string resource names.
+
+ The help keyword prefix string.
+
+
+
+ Has the task logged any errors through this logging helper object?
+
+
+
+
+ Extracts the message code (if any) prefixed to the given message string. Message code prefixes must match the
+ following .NET regular expression in order to be recognized: ^\s*[A-Za-z]+\d+:\s*
+ Thread safe.
+
+
+ If this method is given the string "MYTASK1001: This is an error message.", it will return "MYTASK1001" for the
+ message code, and "This is an error message." for the message.
+
+ The message to parse.
+ The message with the code prefix removed (if any).
+ The message code extracted from the prefix, or null if there was no code.
+ Thrown when message is null.
+
+
+
+ Loads the specified resource string and optionally formats it using the given arguments. The current thread's culture
+ is used for formatting.
+
+ Requires the owner task to have registered its resources either via the Task (or TaskMarshalByRef) base
+ class constructor, or the Task.TaskResources (or AppDomainIsolatedTask.TaskResources) property.
+
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ The formatted string.
+ Thrown when resourceName is null.
+ Thrown when the string resource indicated by resourceName does not exist.
+ Thrown when the TaskResources property of the owner task is not set.
+
+
+
+ Formats the given string using the variable arguments passed in. The current thread's culture is used for formatting.
+ Thread safe.
+
+ The string to format.
+ Arguments for formatting.
+ The formatted string.
+ Thrown when unformatted is null.
+
+
+
+ Get the message from resource in task library.
+ Thread safe.
+
+ The resource name.
+ The message from resource.
+
+
+
+ Returns if the build is configured to log all task inputs.
+
+
+
+
+ Returns true if a message of given importance should be logged because it is possible that a logger consuming it exists.
+
+ The importance to check.
+ True if messages of the given importance should be logged, false if it's guaranteed that such messages would be ignored.
+
+
+
+ Logs a message using the specified string.
+ Thread safe.
+
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a message of the given importance using the specified string.
+ Thread safe.
+
+
+ Take care to order the parameters correctly or the other overload will be called inadvertently.
+
+ The importance level of the message.
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a message using the specified string and other message details.
+ Thread safe.
+
+ Description of the warning type (can be null).
+ Message code (can be null)
+ The help keyword for the host IDE (can be null).
+ The path to the file causing the message (can be null).
+ The line in the file causing the message (set to zero if not available).
+ The column in the file causing the message (set to zero if not available).
+ The last line of a range of lines in the file causing the message (set to zero if not available).
+ The last column of a range of columns in the file causing the message (set to zero if not available).
+ Importance of the message.
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a critical message using the specified string and other message details.
+ Thread safe.
+
+ Description of the warning type (can be null).
+ Message code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file causing the message (can be null).
+ The line in the file causing the message (set to zero if not available).
+ The column in the file causing the message (set to zero if not available).
+ The last line of a range of lines in the file causing the message (set to zero if not available).
+ The last column of a range of columns in the file causing the message (set to zero if not available).
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a message using the specified resource string.
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a message of the given importance using the specified resource string.
+ Thread safe.
+
+
+ Take care to order the parameters correctly or the other overload will be called inadvertently.
+
+ The importance level of the message.
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a file generated from the given data.
+
+ The file path relative to the currecnt project.
+ The content of the file.
+
+
+
+ Flatten the inner exception message
+
+ Exception to flatten.
+
+
+
+
+ Small helper for logging the custom ExternalProjectStarted build event
+ Thread safe.
+
+ text message
+ help keyword
+ project name
+ targets we are going to build (empty indicates default targets)
+
+
+
+ Small helper for logging the custom ExternalProjectFinished build event.
+ Thread safe.
+
+ text message
+ help keyword
+ project name
+ true indicates project built successfully
+
+
+
+ Logs the command line for a task's underlying tool/executable/shell command.
+ Thread safe.
+
+ The command line string.
+
+
+
+ Logs the command line for a task's underlying tool/executable/shell
+ command, using the given importance level.
+ Thread safe.
+
+ The importance level of the command line.
+ The command line string.
+
+
+
+ Logs an error using the specified string.
+ Thread safe.
+
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs an error using the specified string and other error details.
+ Thread safe.
+
+ Description of the error type (can be null).
+ The error code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file containing the error (can be null).
+ The line in the file where the error occurs (set to zero if not available).
+ The column in the file where the error occurs (set to zero if not available).
+ The last line of a range of lines in the file where the error occurs (set to zero if not available).
+ The last column of a range of columns in the file where the error occurs (set to zero if not available).
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs an error using the specified string and other error details.
+ Thread safe.
+
+ Description of the error type (can be null).
+ The error code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file containing the error (can be null).
+ The line in the file where the error occurs (set to zero if not available).
+ The column in the file where the error occurs (set to zero if not available).
+ The last line of a range of lines in the file where the error occurs (set to zero if not available).
+ The last column of a range of columns in the file where the error occurs (set to zero if not available).
+ The message string.
+ A link pointing to more information about the error.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs an error using the specified resource string.
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs an error using the specified resource string and other error details.
+ Thread safe.
+
+ The name of the string resource that describes the error type (can be null).
+ The error code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file containing the error (can be null).
+ The line in the file where the error occurs (set to zero if not available).
+ The column in the file where the error occurs (set to zero if not available).
+ The last line of a range of lines in the file where the error occurs (set to zero if not available).
+ The last column of a range of columns in the file where the error occurs (set to zero if not available).
+ The name of the string resource containing the error message.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs an error using the specified resource string.
+ If the message has an error code prefixed to it, the code is extracted and logged with the message. If a help keyword
+ prefix has been provided, a help keyword for the host IDE is also logged with the message. The help keyword is
+ composed by appending the string resource name to the prefix.
+
+ A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the
+ Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.
+
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs an error using the specified resource string and other error details.
+ If the message has an error code prefixed, the code is extracted and logged with the message. If a
+ help keyword prefix has been provided, a help keyword for the host IDE is also logged with the message. The help
+ keyword is composed by appending the error message resource string name to the prefix.
+
+ A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the
+ Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.
+
+ Thread safe.
+
+ The name of the string resource that describes the error type (can be null).
+ The path to the file containing the error (can be null).
+ The line in the file where the error occurs (set to zero if not available).
+ The column in the file where the error occurs (set to zero if not available).
+ The last line of a range of lines in the file where the error occurs (set to zero if not available).
+ The last column of a range of columns in the file where the error occurs (set to zero if not available).
+ The name of the string resource containing the error message.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs an error using the message from the given exception context.
+ No callstack will be shown.
+ Thread safe.
+
+ Exception to log.
+ Thrown when e is null.
+
+
+
+ Logs an error using the message (and optionally the stack-trace) from the given exception context.
+ Thread safe.
+
+ Exception to log.
+ If true, callstack will be appended to message.
+ Thrown when exception is null.
+
+
+
+ Logs an error using the message, and optionally the stack-trace from the given exception, and
+ optionally inner exceptions too.
+ Thread safe.
+
+ Exception to log.
+ If true, callstack will be appended to message.
+ Whether to log exception types and any inner exceptions.
+ File related to the exception, or null if the project file should be logged
+ Thrown when exception is null.
+
+
+
+ Logs a warning using the specified string.
+ Thread safe.
+
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a warning using the specified string and other warning details.
+ Thread safe.
+
+ Description of the warning type (can be null).
+ The warning code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file causing the warning (can be null).
+ The line in the file causing the warning (set to zero if not available).
+ The column in the file causing the warning (set to zero if not available).
+ The last line of a range of lines in the file causing the warning (set to zero if not available).
+ The last column of a range of columns in the file causing the warning (set to zero if not available).
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a warning using the specified string and other warning details.
+ Thread safe.
+
+ Description of the warning type (can be null).
+ The warning code (can be null).
+ The help keyword for the host IDE (can be null).
+ A link pointing to more information about the warning (can be null).
+ The path to the file causing the warning (can be null).
+ The line in the file causing the warning (set to zero if not available).
+ The column in the file causing the warning (set to zero if not available).
+ The last line of a range of lines in the file causing the warning (set to zero if not available).
+ The last column of a range of columns in the file causing the warning (set to zero if not available).
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a warning using the specified resource string.
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a warning using the specified resource string and other warning details.
+ Thread safe.
+
+ The name of the string resource that describes the warning type (can be null).
+ The warning code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file causing the warning (can be null).
+ The line in the file causing the warning (set to zero if not available).
+ The column in the file causing the warning (set to zero if not available).
+ The last line of a range of lines in the file causing the warning (set to zero if not available).
+ The last column of a range of columns in the file causing the warning (set to zero if not available).
+ The name of the string resource containing the warning message.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a warning using the specified resource string.
+ If the message has a warning code prefixed to it, the code is extracted and logged with the message. If a help keyword
+ prefix has been provided, a help keyword for the host IDE is also logged with the message. The help keyword is
+ composed by appending the string resource name to the prefix.
+
+ A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the
+ Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.
+
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a warning using the specified resource string and other warning details.
+ If the message has a warning code, the code is extracted and logged with the message.
+ If a help keyword prefix has been provided, a help keyword for the host IDE is also logged with the message. The help
+ keyword is composed by appending the warning message resource string name to the prefix.
+
+ A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the
+ Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.
+
+ Thread safe.
+
+ The name of the string resource that describes the warning type (can be null).
+ The path to the file causing the warning (can be null).
+ The line in the file causing the warning (set to zero if not available).
+ The column in the file causing the warning (set to zero if not available).
+ The last line of a range of lines in the file causing the warning (set to zero if not available).
+ The last column of a range of columns in the file causing the warning (set to zero if not available).
+ The name of the string resource containing the warning message.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a warning using the message from the given exception context.
+ Thread safe.
+
+ Exception to log.
+ Thrown when exception is null.
+
+
+
+ Logs a warning using the message (and optionally the stack-trace) from the given exception context.
+ Thread safe.
+
+ Exception to log.
+ If true, the exception callstack is appended to the message.
+ Thrown when exception is null.
+
+
+
+ Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that
+ fit a particular (canonical) format -- the remaining lines are treated as messages.
+ Thread safe.
+
+ The file to log from.
+ true, if any errors were logged
+ Thrown when filename is null.
+
+
+
+ Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that
+ fit a particular (canonical) format -- the remaining lines are treated as messages.
+ Thread safe.
+
+ The file to log from.
+ The importance level for messages that are neither errors nor warnings.
+ true, if any errors were logged
+ Thrown when filename is null.
+
+
+
+ Logs errors/warnings/messages for each line of text in the given stream. Errors/warnings are only logged for lines
+ that fit a particular (canonical) format -- the remaining lines are treated as messages.
+ Thread safe.
+
+ The stream to log from.
+ The importance level for messages that are neither errors nor warnings.
+ true, if any errors were logged
+ Thrown when stream is null.
+
+
+
+ Logs an error/warning/message from the given line of text. Errors/warnings are only logged for lines that fit a
+ particular (canonical) format -- all other lines are treated as messages.
+ Thread safe.
+
+ The line of text to log from.
+ The importance level for messages that are neither errors nor warnings.
+ true, if an error was logged
+ Thrown when lineOfText is null.
+
+
+
+ Logs telemetry with the specified event name and properties.
+
+ The event name.
+ The list of properties associated with the event.
+
+
+
+ InitializeLifetimeService is called when the remote object is activated.
+ This method will determine how long the lifetime for the object will be.
+ Thread safe. However, InitializeLifetimeService and MarkAsInactive should
+ only be called in that order, together or not at all, and no more than once.
+
+ The lease object to control this object's lifetime.
+
+
+
+ Notifies this object that its work is done.
+ Thread safe. However, InitializeLifetimeService and MarkAsInactive should
+ only be called in that order, together or not at all, and no more than once.
+
+
+ Indicates to the TaskLoggingHelper that it is no longer needed.
+
+
+
+
+ This class provides access to the assembly's resources.
+
+
+
+
+ Loads the specified resource string, either from the assembly's primary resources, or its shared resources.
+
+ This method is thread-safe.
+
+ The resource string, or null if not found.
+
+
+
+ Gets the assembly's primary resources i.e. the resources exclusively owned by this assembly.
+
+ This property is thread-safe.
+ ResourceManager for primary resources.
+
+
+
+ Gets the assembly's shared resources i.e. the resources this assembly shares with other assemblies.
+
+ This property is thread-safe.
+ ResourceManager for shared resources.
+
+
+
+ Formats the given string using the variable arguments passed in. The current thread's culture is used for formatting.
+
+ This method is thread-safe.
+ The string to format.
+ Arguments for formatting.
+ The formatted string.
+
+
+
+ Loads the specified resource string and optionally formats it using the given arguments. The current thread's culture
+ is used for formatting.
+
+
+ 1) This method requires the owner task to have registered its resources either via the Task (or TaskMarshalByRef) base
+ class constructor, or the Task.TaskResources (or AppDomainIsolatedTask.TaskResources) property.
+ 2) This method is thread-safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ The formatted string.
+
+
+
+ Factory for
+
+
+
+
+ Implementation of file system operations directly over the dot net managed layer
+
+
+
+
+ Implementation of file system operations on windows. Combination of native and managed implementations.
+ TODO Remove this class and replace with WindowsFileSystem. Test perf to ensure no regressions.
+
+
+
+
+ A possibly-recoverable exception wrapping a failed native call. The captures the
+ associated recent error code (). The
+ accounts for the native code as well as a human readable portion.
+
+
+ This is much like , but the message field contains the caller-provided part in addition
+ to the system-provided message (rather than replacing the system provided message).
+
+
+
+
+ Creates an exception representing a native failure (with a corresponding Win32 error code).
+ The exception's includes the error code, a system-provided message describing it,
+ and the provided application-specific message prefix (e.g. "Unable to open log file").
+
+
+
+
+ Creates an exception representing a native failure (with a corresponding Win32 error code).
+ The exception's includes the error code and a system-provided message describing it.
+
+
+
+
+ Returns a human readable error string for a native error code, like Native: Can't access the log file (0x5: Access is denied).
+ The message prefix (e.g. "Can't access the log file") is optional.
+
+
+
+
+ Converts a Win32 error code to HResult
+
+
+
+
+ Handle for a volume iteration as returned by WindowsNative.FindFirstVolumeW />
+
+
+
+
+ Private constructor for the PInvoke marshaller.
+
+
+
+
+
+
+
+ The type of file artifact to search for
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Windows-specific implementation of file system operations using Windows native invocations.
+ TODO For potential extra perf gains, provide native implementations for all IFileSystem methods and stop inheriting from ManagedFileSystem
+
+
+
+
+ Native implementation of file system operations
+
+
+
+
+ Maximum path length.
+
+
+
+
+ ERROR_SUCCESS
+
+
+
+
+ ERROR_FILE_NOT_FOUND
+
+
+
+
+ ERROR_PATH_NOT_FOUND
+
+
+
+
+ ERROR_DIRECTORY
+
+
+
+
+ ERROR_ACCESS_DENIED
+
+
+
+
+ ERROR_NO_MORE_FILES
+
+
+
+
+ Modifies the search condition of PathMatchSpecEx
+
+
+
+
+
+
+
+ The pszSpec parameter points to a single file name pattern to be matched.
+
+
+
+
+ The pszSpec parameter points to a semicolon-delimited list of file name patterns to be matched.
+
+
+
+
+ If PMSF_NORMAL is used, ignore leading spaces in the string pointed to by pszSpec. If PMSF_MULTIPLE is used,
+ ignore leading spaces in each file type contained in the string pointed to by pszSpec. This flag can be combined with PMSF_NORMAL and PMSF_MULTIPLE.
+
+
+
+
+ Status of attempting to enumerate a directory.
+
+
+
+
+ Enumeration of an existent directory succeeded.
+
+
+
+
+ One or more path components did not exist, so the search directory could not be opened.
+
+
+
+
+ A path component in the search path refers to a file. Only directories can be enumerated.
+
+
+
+
+ Directory enumeration could not complete due to denied access to the search directory or a file inside.
+
+
+
+
+ Directory enumeration failed without a well-known status (see ).
+
+
+
+
+ Represents the result of attempting to enumerate a directory.
+
+
+
+
+ Enumerated directory.
+
+
+
+
+ Overall status indication.
+
+
+
+
+ Native error code. Note that an error code other than ERROR_SUCCESS may be present even on success.
+
+
+
+
+
+
+
+ Indicates if enumeration succeeded.
+
+
+
+
+ Throws an exception if the native error code could not be canonicalized (a fairly exceptional circumstance).
+ This is allowed when is .
+
+
+ This is a good default: case when switching on every possible
+
+
+
+
+ Throws an exception if the native error code was corresponds to a known
+ (and enumeration was not successful).
+
+
+
+
+ Creates (but does not throw) an exception for this result. The result must not be successful.
+
+
+
+
+ Win32FindData
+
+
+
+
+ The file attributes of a file
+
+
+
+
+ Specified when a file or directory was created
+
+
+
+
+ Specifies when the file was last read from, written to, or for executable files, run.
+
+
+
+
+ For a file, the structure specifies when the file was last written to, truncated, or overwritten.
+ For a directory, the structure specifies when the directory is created.
+
+
+
+
+ The high-order DWORD value of the file size, in bytes.
+
+
+
+
+ The low-order DWORD value of the file size, in bytes.
+
+
+
+
+ If the dwFileAttributes member includes the FILE_ATTRIBUTE_REPARSE_POINT attribute, this member specifies the reparse point tag.
+
+
+
+
+ Reserved for future use.
+
+
+
+
+ The name of the file.
+
+
+
+
+ An alternative name for the file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A class to help with printline debugging in difficult environments like CI, or when debugging msbuild through other
+ tools like VS or CLI.
+ See example usages in PrintLineDebugger_Tests
+
+
+
+
+ A collection of useful writers
+
+
+
+
+ Implements the rules for finding component directories using the AssemblyFoldersEx scheme.
+
+ This is the normal schema:
+
+ [HKLM | HKCU]\SOFTWARE\MICROSOFT\.NetFramework\
+ v1.0.3705
+ AssemblyFoldersEx
+ Infragistics.GridControl.1.0:
+ @Default = c:\program files\infragistics\grid control\1.0\bin
+ @Description = Infragistics Grid Control for .NET version 1.0
+ 9466
+ @Default = c:\program files\infragistics\grid control\1.0sp1\bin
+ @Description = SP1 for Infragistics Grid Control for .NET version 1.0
+
+
+ The root registry path is the following:
+
+ [HKLM | HKCU]\{AssemblyFoldersBase}\{RuntimeVersion}\{AssemblyFoldersSuffix}
+
+ Where:
+
+ {AssemblyFoldersBase} = Software\Microsoft\[.NetFramework | .NetCompactFramework]
+ {RuntimeVersion} = the runtime version property from the project file
+ {AssemblyFoldersSuffix} = [ PocketPC | SmartPhone | WindowsCE]\AssemblyFoldersEx
+
+
+
+
+
+ The list of directory names found from the registry.
+
+
+
+
+ Set of unique paths to directories found from the registry
+
+
+
+
+ Construct.
+
+ Like Software\Microsoft\[.NetFramework | .NetCompactFramework]
+ The runtime version property from the project file.
+ Like [ PocketPC | SmartPhone | WindowsCE]\AssemblyFoldersEx
+ Operating system version
+ Current platform
+ Used to find registry subkey names.
+ Used to find registry key default values.
+ Architecture to seek.
+ Key object to open.
+
+
+
+ Finds directories for a specific registry key.
+
+ The registry view to examine.
+ The registry hive to examine.
+ Like Software\Microsoft\[.NetFramework | .NetCompactFramework]
+ The runtime version property from the project file.
+ Like [ PocketPC | SmartPhone | WindowsCE]\AssemblyFoldersEx
+ Operating system version
+ Current platform
+ Used to find registry subkey names.
+ Used to find registry key default values.
+ Key object to open.
+
+
+
+ The algorithm for gathering versions from the registry is as follows:
+ 1) targetRuntimeVersion is the target framework version you are targeting
+ 2) versions is a string list from reading the registry, this list is in what ever order the registry returns
+ the keys to us in, this is usually alphabetical.
+
+ We will go through each version string and do the following:
+ 1) Check to see if the string is a version
+ If the string is not a version we will check to see if the string starts with the framework we are targeting,
+ if it does we will add it to a list which will be added at the end
+ of the versions list, if not it gets ignored. We do this to stay compatible to what we have been doing since whidbey.
+
+ If the string is a version
+ We check to see if the version is a valid target framework version. Meaning. It has a Maj.Minor version and may have
+ build, Build is less than or equal to 255 and there is no revision. The reason the build number needs to be less than 255 is because
+ 255 is the largest build number for a target framework version that visual studio 2010 supports. The build number is supposed to
+ represent a service pack on the 4.0 framework.
+
+ If the string is a valid target framework version we check to see we already have a dictionary entry and if not we
+ add one.
+ If the string is not a valid target framework then we will ignore the part of the version which makes it invalid
+ (either the build or the revision, or both) and see where that version would fit in the dictionary as a key and
+ then put the original version string into the list for that entry.
+
+ Since the dictionary is sorted in reverse order to generate the list to return we do the following:
+ Go through the list of dictionary entries
+ For each entry sort the list in reverse alphabetical order and add the entries in their internal list to the listToreturn.
+
+ This way we have a reverse sorted list of all of the version keys.
+
+
+
+
+ Given a candidate version we need to add it to the dictionary of targetFrameworkToRegistry versions. This involves determining if we need to add it to
+ an existing entry or create a new one.
+
+
+
+
+ Get Enumerator
+
+
+
+
+ Get enumerator
+
+
+
+
+ Deserialize the file into an AssemblyFolderCollection.
+
+ Path to the AssemblyFolder.config file.
+ New deserialized collection instance.
+
+
+
+ Name of the Visual Studio (and Blend) process.
+ VS ASP intellisense server fails without Microsoft.VisualStudio.Web.Host. Remove when issue fixed: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/574986
+
+
+
+
+ Name of the MSBuild process(es)
+
+
+
+
+ Name of MSBuild executable files.
+
+
+
+
+ Gets the cached Build Environment instance.
+
+
+
+
+ Find the location of MSBuild.exe based on the current environment.
+
+
+ This defines the order and precedence for various methods of discovering MSBuild and associated toolsets.
+ At a high level, an install under Visual Studio is preferred as the user may have SDKs installed to a
+ specific instance of Visual Studio and build will only succeed if we can discover those. See
+ https://github.com/dotnet/msbuild/issues/1461 for details.
+
+ Build environment.
+
+
+
+ Returns true if processName appears in the processList
+
+ Name of the process
+ List of processes to check
+
+
+
+
+ Resets the current singleton instance (for testing).
+
+
+
+
+ Resets the current singleton instance (for testing).
+
+
+
+
+ Enum which defines which environment / mode MSBuild is currently running.
+
+
+
+
+ Running from Visual Studio directly or from MSBuild installed under an instance of Visual Studio.
+ Toolsets and extensions will be loaded from the Visual Studio instance.
+
+
+
+
+ Running in a standalone toolset mode. All toolsets and extensions paths are relative to the app
+ running and not dependent on Visual Studio. (e.g. dotnet CLI, open source clone of our repo)
+
+
+
+
+ Running without any defined toolsets. Most functionality limited. Likely will not be able to
+ build or evaluate a project. (e.g. reference to Microsoft.*.dll without a toolset definition
+ or Visual Studio instance installed).
+
+
+
+
+ Defines the current environment for build tools.
+
+
+
+
+ Gets the flag that indicates if we are running in a test harness.
+
+
+
+
+ Returns true when the entry point application is MSBuild.exe.
+
+
+
+
+ Returns true when the entry point application is Visual Studio.
+
+
+
+
+ Path to the root of the MSBuild folder (in VS scenarios, MSBuild\Current\bin).
+
+
+
+
+ Path to the MSBuild 32-bit tools directory.
+
+
+
+
+ Path to the MSBuild 64-bit (AMD64) tools directory.
+
+
+
+
+ Path to the ARM64 tools directory.
+ if ARM64 tools are not installed.
+
+
+
+
+ Path to the Sdks folder for this MSBuild instance.
+
+
+
+
+ Full path to the current MSBuild configuration file.
+
+
+
+
+ Full path to current MSBuild.exe.
+
+ This path is likely not the current running process. We may be inside
+ Visual Studio or a test harness. In that case this will point to the
+ version of MSBuild found to be associated with the current environment.
+
+
+
+
+
+ Full path to the current MSBuild tools directory. This will be 32-bit unless
+ we're executing from the 'AMD64' folder.
+
+
+
+
+ Path to the root Visual Studio install directory
+ (e.g. 'C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise')
+
+
+
+
+ MSBuild extensions path. On Standalone this defaults to the MSBuild folder. In
+ VisualStudio mode this folder will be %VSINSTALLDIR%\MSBuild.
+
+
+
+
+ Functions for dealing with the specially formatted errors returned by
+ build tools.
+
+
+ Various tools produce and consume CanonicalErrors in various formats.
+
+ DEVENV Format When Clicking on Items in the Output Window
+ (taken from env\msenv\core\findutil.cpp ParseLocation function)
+
+ v:\dir\file.ext (loc) : msg
+ \\server\share\dir\file.ext(loc):msg
+ url
+
+ loc:
+ (line)
+ (line-line)
+ (line,col)
+ (line,col-col)
+ (line,col,len)
+ (line,col,line,col)
+
+ DevDiv Build Process
+ (taken from tools\devdiv2.def)
+
+ To echo warnings and errors to the build console, the
+ "description block" must be recognized by build. To do this,
+ add a $(ECHO_COMPILING_COMMAND) or $(ECHO_PROCESSING_COMMAND)
+ to the first line of the description block, e.g.
+
+ $(ECHO_COMPILING_CMD) Resgen_$<
+
+ Errors must have the format:
+
+ <text> : error [num]: <msg>
+
+ Warnings must have the format:
+
+ <text> : warning [num]: <msg>
+
+
+
+
+ Represents the parts of a decomposed canonical message.
+
+
+
+
+ Defines the error category\severity level.
+
+
+
+
+ Value used for unspecified line and column numbers, which are 1-relative.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Name of the file or tool (not localized)
+
+
+
+
+ The line number.
+
+
+
+
+ The column number.
+
+
+
+
+ The ending line number.
+
+
+
+
+ The ending column number.
+
+
+
+
+ The category/severity level
+
+
+
+
+ The sub category (localized)
+
+
+
+
+ The error code (not localized)
+
+
+
+
+ The error message text (localized)
+
+
+
+
+ A small custom int conversion method that treats invalid entries as missing (0). This is done to work around tools
+ that don't fully conform to the canonical message format - we still want to salvage what we can from the message.
+
+
+ 'value' converted to int or 0 if it can't be parsed or is negative
+
+
+
+ Decompose an error or warning message into constituent parts. If the message isn't in the canonical form, return null.
+
+ This method is thread-safe, because the Regex class is thread-safe (per MSDN).
+
+ Decomposed canonical message, or null.
+
+
+
+ Contains information about entries in the AssemblyFoldersEx registry keys.
+
+
+
+
+ Constructor
+
+
+
+
+ The registry key to the component
+
+
+
+
+ Target framework version for the registry key
+
+
+
+
+ delegate for System.IO.Directory.GetFiles, used for testing
+
+ Directory path to start search for files in
+ pattern of files to match
+ string array of files which match search pattern
+
+
+
+ delegate for Directory.GetDirectories.
+
+ The path to get directories for.
+ The pattern to search for.
+ An array of directories.
+
+
+
+ Delegate for System.IO.Directory.Exists
+
+ Directory path to check if it exists
+ true if directory exists
+
+
+
+ File exists delegate
+
+ The path to check for existence.
+ 'true' if the file exists.
+
+
+
+ File.Copy delegate
+
+
+
+
+
+
+ File.Delete delegate
+
+
+
+
+
+ File create delegate
+
+ The path to create.
+
+
+
+ This class contains methods that are useful for error checking and validation.
+
+
+
+
+ Throws InternalErrorException.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ Indicates the code path followed should not have been possible.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ Indicates the code path followed should not have been possible.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ Indicates the code path followed should not have been possible.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is null.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The value of the argument.
+ Parameter that should not be null
+
+
+
+ Helper to throw an InternalErrorException when a lock on the specified object is not already held.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The object that should already have been used as a lock.
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is null or zero length.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The value of the argument.
+ Parameter that should not be null or zero length
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is not a rooted path.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ Parameter that should be a rooted path.
+
+
+
+ This method should be used in places where one would normally put
+ an "assert". It should be used to validate that our assumptions are
+ true, where false would indicate that there must be a bug in our
+ code somewhere. This should not be used to throw errors based on bad
+ user input or anything that the user did wrong.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an InvalidOperationException with the specified resource string
+
+ Resource to use in the exception
+ Formatting args.
+
+
+
+ Throws an InvalidOperationException if the given condition is false.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an ArgumentException that can include an inner exception.
+
+ PERF WARNING: calling a method that takes a variable number of arguments
+ is expensive, because memory is allocated for the array of arguments -- do
+ not call this method repeatedly in performance-critical scenarios
+
+
+
+
+ Throws an ArgumentException that can include an inner exception.
+
+ PERF WARNING: calling a method that takes a variable number of arguments
+ is expensive, because memory is allocated for the array of arguments -- do
+ not call this method repeatedly in performance-critical scenarios
+
+
+ This method is thread-safe.
+
+ Can be null.
+
+
+
+
+
+ Throws an ArgumentException if the given condition is false.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an ArgumentException that includes an inner exception, if
+ the given condition is false.
+
+
+ Can be null.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an argument out of range exception.
+
+
+
+
+ Throws an ArgumentOutOfRangeException using the given parameter name
+ if the condition is false.
+
+
+
+
+ Throws an ArgumentNullException if the given string parameter is null
+ and ArgumentException if it has zero length.
+
+
+
+
+ Throws an ArgumentNullException if the given collection is null
+ and ArgumentException if it has zero length.
+
+
+
+
+ Throws an ArgumentException if the given collection is not null but of zero length.
+
+
+
+
+ Throws an ArgumentNullException if the given string parameter is null
+ and ArgumentException if it has zero length.
+
+
+
+
+ Throws an ArgumentException if the string has zero length, unless it is
+ null, in which case no exception is thrown.
+
+
+
+
+ Throws an ArgumentNullException if the given parameter is null.
+
+
+
+
+ Throws an ArgumentNullException if the given parameter is null.
+
+
+
+
+ Verifies the given arrays are not null and have the same length
+
+
+
+
+ A utility that verifies the parameters provided to a standard ICollection.CopyTo call.
+
+ If is null.
+ If falls outside of the bounds .
+ If there is insufficient capacity to copy the collection contents into
+ when starting at .
+
+
+
+ This class implements static methods to assist with unescaping of %XX codes
+ in the MSBuild file format.
+
+
+ PERF: since we escape and unescape relatively frequently, it may be worth caching
+ the last N strings that were (un)escaped
+
+
+
+
+ Optional cache of escaped strings for use when needing to escape in performance-critical scenarios with significant
+ expected string reuse.
+
+
+
+
+ Replaces all instances of %XX in the input string with the character represented
+ by the hexadecimal number XX.
+
+ The string to unescape.
+ If the string should be trimmed before being unescaped.
+ unescaped string
+
+
+
+ Adds instances of %XX in the input string where the char to be escaped appears
+ XX is the hex value of the ASCII code for the char. Interns and caches the result.
+
+
+ NOTE: Only recommended for use in scenarios where there's expected to be significant
+ repetition of the escaped string. Cache currently grows unbounded.
+
+
+
+
+ Adds instances of %XX in the input string where the char to be escaped appears
+ XX is the hex value of the ASCII code for the char.
+
+ The string to escape.
+ escaped string
+
+
+
+ Adds instances of %XX in the input string where the char to be escaped appears
+ XX is the hex value of the ASCII code for the char. Caches if requested.
+
+ The string to escape.
+
+ True if the cache should be checked, and if the resultant string
+ should be cached.
+
+
+
+
+ Before trying to actually escape the string, it can be useful to call this method to determine
+ if escaping is necessary at all. This can save lots of calls to copy around item metadata
+ that is really the same whether escaped or not.
+
+
+
+
+
+
+ Determines whether the string contains the escaped form of '*' or '?'.
+
+
+
+
+
+
+ Convert the given integer into its hexadecimal representation.
+
+ The number to convert, which must be non-negative and less than 16
+ The character which is the hexadecimal representation of .
+
+
+
+ Append the escaped version of the given character to a .
+
+ The to which to append.
+ The character to escape.
+
+
+
+ Append the escaped version of the given string to a .
+
+ The to which to append.
+ The unescaped string.
+
+
+
+ Special characters that need escaping.
+ It's VERY important that the percent character is the FIRST on the list - since it's both a character
+ we escape and use in escape sequences, we can unintentionally escape other escape sequences if we
+ don't process it first. Of course we'll have a similar problem if we ever decide to escape hex digits
+ (that would require rewriting the algorithm) but since it seems unlikely that we ever do, this should
+ be good enough to avoid complicating the algorithm at this point.
+
+
+
+
+ Offers a default string format for Error and Warning events
+
+
+
+
+ Format the error event message and all the other event data into
+ a single string.
+
+ Error to format
+ true to show the project file which issued the event, otherwise false.
+ Properties to Print along with message
+ The formatted message string.
+
+
+
+ Format the warning message and all the other event data into a
+ single string.
+
+ Warning to format
+ true to show the project file which issued the event, otherwise false.
+ Properties to Print along with message
+ The formatted message string.
+
+
+
+ Format the message and all the other event data into a
+ single string.
+
+ Message to format
+ true to show the project file which issued the event, otherwise false.
+ Properties to Print along with message
+ The complete message (including property name) for an environment-derived property
+ The formatted message string.
+
+
+
+ Format the error event message and all the other event data into
+ a single string.
+
+ Error to format
+ The formatted message string.
+
+
+
+ Format the error event message and all the other event data into
+ a single string.
+
+ Error to format
+ true to show the project file which issued the event, otherwise false.
+ The formatted message string.
+
+
+
+ Format the warning message and all the other event data into a
+ single string.
+
+ Warning to format
+ The formatted message string.
+
+
+
+ Format the warning message and all the other event data into a
+ single string.
+
+ Warning to format
+ true to show the project file which issued the event, otherwise false.
+ The formatted message string.
+
+
+
+ Format the message and all the other event data into a
+ single string.
+
+ Message to format
+ The formatted message string.
+
+
+
+ Format the message and all the other event data into a
+ single string.
+
+ Message to format
+ Show project file or not
+ For an EnvironmentVariableReadEventArgs, adds an explanatory note and the name of the variable.
+ The formatted message string.
+
+
+
+ Format the event message and all the other event data into a
+ single string.
+
+ category ("error" or "warning")
+ subcategory
+ event message
+ error or warning code number
+ file name
+ line number (0 if n/a)
+ end line number (0 if n/a)
+ column number (0 if n/a)
+ end column number (0 if n/a)
+ thread id
+ The formatted message string.
+
+
+
+ Format the event message and all the other event data into a
+ single string.
+
+ category ("error" or "warning")
+ subcategory
+ event message
+ error or warning code number
+ file name
+ the project file name
+ line number (0 if n/a)
+ end line number (0 if n/a)
+ column number (0 if n/a)
+ end column number (0 if n/a)
+ thread id
+ log output properties
+ The formatted message string.
+
+
+
+ Splits strings on 'newLines' with tolerance for Everett and Dogfood builds.
+
+ String to split.
+
+
+
+ The kinds of newline breaks we expect.
+
+ Currently we're not supporting "\r".
+
+
+
+ Utility methods for classifying and handling exceptions.
+
+
+
+
+ Gets the location of the directory used for diagnostic log files.
+
+
+
+
+
+ The directory used for diagnostic log files.
+
+
+
+
+ The filename that exceptions will be dumped to
+
+
+
+
+ If the given exception is "ignorable under some circumstances" return false.
+ Otherwise it's "really bad", and return true.
+ This makes it possible to catch(Exception ex) without catching disasters.
+
+ The exception to check.
+ True if exception is critical.
+
+
+
+ If the given exception is file IO related or expected return false.
+ Otherwise, return true.
+
+ The exception to check.
+ True if exception is not IO related or expected otherwise false.
+
+
+
+ Determine whether the exception is file-IO related.
+
+ The exception to check.
+ True if exception is IO related.
+
+
+ Checks if the exception is an XML one.
+ Exception to check.
+ True if exception is related to XML parsing.
+
+
+ Extracts line and column numbers from the exception if it is XML-related one.
+ XML-related exception.
+ Line and column numbers if available, (0,0) if not.
+ This function works around the fact that XmlException and XmlSchemaException are not directly related.
+
+
+
+ If the given exception is file IO related or Xml related return false.
+ Otherwise, return true.
+
+ The exception to check.
+
+
+
+ If the given exception is reflection-related return false.
+ Otherwise, return true.
+
+ The exception to check.
+
+
+
+ Serialization has been observed to throw TypeLoadException as
+ well as SerializationException and IO exceptions. (Obviously
+ it has to do reflection but it ought to be wrapping the exceptions.)
+
+
+
+
+ Returns false if this is a known exception thrown by the registry API.
+
+
+
+
+ Returns false if this is a known exception thrown by function evaluation
+
+
+
+
+ Dump any unhandled exceptions to a file so they can be diagnosed
+
+
+
+
+ Dump the exception information to a file
+
+
+
+
+ Returns the content of any exception dump files modified
+ since the provided time, otherwise returns an empty string.
+
+
+
+ Line and column pair.
+
+
+ Gets or sets line number.
+
+
+ Gets or sets column position.
+
+
+
+ This class contains utility methods for file IO.
+ PERF\COVERAGE NOTE: Try to keep classes in 'shared' as granular as possible. All the methods in
+ each class get pulled into the resulting assembly.
+
+
+ This class contains utility methods for file IO.
+
+
+ Partial class in order to reduce the amount of sharing into different assemblies
+
+
+ This class contains utility methods for file IO.
+ It is in a separate file so that it can be selectively included into an assembly.
+
+
+
+
+ The directory where MSBuild stores cache information used during the build.
+
+
+
+
+ FOR UNIT TESTS ONLY
+ Clear out the static variable used for the cache directory so that tests that
+ modify it can validate their modifications.
+
+
+
+
+ Determines whether the file system is case sensitive.
+ Copied from https://github.com/dotnet/runtime/blob/73ba11f3015216b39cb866d9fb7d3d25e93489f2/src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs#L41-L59
+
+
+
+
+ Copied from https://github.com/dotnet/corefx/blob/056715ff70e14712419d82d51c8c50c54b9ea795/src/Common/src/System/IO/PathInternal.Windows.cs#L61
+ MSBuild should support the union of invalid path chars across the supported OSes, so builds can have the same behaviour crossplatform: https://github.com/dotnet/msbuild/issues/781#issuecomment-243942514
+
+
+
+
+ Copied from https://github.com/dotnet/corefx/blob/387cf98c410bdca8fd195b28cbe53af578698f94/src/System.Runtime.Extensions/src/System/IO/Path.Windows.cs#L18
+ MSBuild should support the union of invalid path chars across the supported OSes, so builds can have the same behaviour crossplatform: https://github.com/dotnet/msbuild/issues/781#issuecomment-243942514
+
+
+
+
+ Retrieves the MSBuild runtime cache directory
+
+
+
+
+ Get the hex hash string for the string
+
+
+
+
+ Get the hash for the assemblyPaths
+
+
+
+
+ Returns whether MSBuild can write to the given directory. Throws for PathTooLongExceptions
+ but not other exceptions.
+
+
+
+
+ Clears the MSBuild runtime cache
+
+
+
+
+ If the given path doesn't have a trailing slash then add one.
+ If the path is an empty string, does not modify it.
+
+ The path to check.
+ A path with a slash.
+
+
+
+ Ensures the path does not have a leading or trailing slash after removing the first 'start' characters.
+
+
+
+
+ Ensures the path does not have a leading slash after removing the first 'start' characters but does end in a slash.
+
+
+
+
+ Ensures the path does not have a trailing slash.
+
+
+
+
+ Ensures the path is enclosed within single quotes.
+
+ The path to check.
+ The path enclosed by quotes.
+
+
+
+ Ensures the path is enclosed within double quotes.
+
+ The path to check.
+ The path enclosed by quotes.
+
+
+
+ Ensures the path is enclosed within quotes.
+
+ The path to check.
+ Indicates if single or double quotes should be used
+ The path enclosed by quotes.
+
+
+
+ Indicates if the given file-spec ends with a slash.
+
+ The file spec.
+ true, if file-spec has trailing slash
+
+
+
+ Indicates if the given character is a slash.
+
+
+ true, if slash
+
+
+
+ Trims the string and removes any double quotes around it.
+
+
+
+
+ Get the directory name of a rooted full path
+
+
+
+
+
+
+ Gets the canonicalized full path of the provided path.
+ Guidance for use: call this on all paths accepted through public entry
+ points that need normalization. After that point, only verify the path
+ is rooted, using ErrorUtilities.VerifyThrowPathRooted.
+ ASSUMES INPUT IS ALREADY UNESCAPED.
+
+
+
+
+ If on Unix, convert backslashes to slashes for strings that resemble paths.
+ The heuristic is if something resembles paths (contains slashes) check if the
+ first segment exists and is a directory.
+ Use a native shared method to massage file path. If the file is adjusted,
+ that qualifies is as a path.
+
+ @baseDirectory is just passed to LooksLikeUnixFilePath, to help with the check
+
+
+
+
+ If on Unix, convert backslashes to slashes for strings that resemble paths.
+ This overload takes and returns ReadOnlyMemory of characters.
+
+
+
+
+ If on Unix, check if the string looks like a file path.
+ The heuristic is if something resembles paths (contains slashes) check if the
+ first segment exists and is a directory.
+
+ If @baseDirectory is not null, then look for the first segment exists under
+ that
+
+
+
+
+ Extracts the directory from the given file-spec.
+
+ The filespec.
+ directory path
+
+
+
+ Determines whether the given assembly file name has one of the listed extensions.
+
+ The name of the file
+ Array of extensions to consider.
+
+
+
+
+ Get the currently executing assembly path
+
+
+
+
+ Determines the full path for the given file-spec.
+ ASSUMES INPUT IS STILL ESCAPED
+
+ The file spec to get the full path of.
+
+ full path
+
+
+
+ A variation of Path.GetFullPath that will return the input value
+ instead of throwing any IO exception.
+ Useful to get a better path for an error message, without the risk of throwing
+ if the error message was itself caused by the path being invalid!
+
+
+
+
+ Compare if two paths, relative to the given currentDirectory are equal.
+ Does not throw IO exceptions. See
+
+
+
+
+
+
+
+
+
+ Normalizes a path for path comparison
+ Does not throw IO exceptions. See
+
+
+
+
+
+ A variation on File.Delete that will throw ExceptionHandling.NotExpectedException exceptions
+
+
+
+
+ A variation on Directory.Delete that will throw ExceptionHandling.NotExpectedException exceptions
+
+
+
+
+ Deletes a directory, ensuring that Directory.Delete does not get a path ending in a slash.
+
+
+ This is a workaround for https://github.com/dotnet/corefx/issues/3780, which clashed with a common
+ pattern in our tests.
+
+
+
+
+ Gets a file info object for the specified file path. If the file path
+ is invalid, or is a directory, or cannot be accessed, or does not exist,
+ it returns null rather than throwing or returning a FileInfo around a non-existent file.
+ This allows it to be called where File.Exists() (which never throws, and returns false
+ for directories) was called - but with the advantage that a FileInfo object is returned
+ that can be queried (e.g., for LastWriteTime) without hitting the disk again.
+
+
+ FileInfo around path if it is an existing /file/, else null
+
+
+
+ Returns if the directory exists
+
+ Full path to the directory in the filesystem
+ The file system
+
+
+
+
+ Returns if the directory exists
+
+ Full path to the file in the filesystem
+ The file system
+
+
+
+
+ If there is a directory or file at the specified path, returns true.
+ Otherwise, returns false.
+ Does not throw IO exceptions, to match Directory.Exists and File.Exists.
+ Unlike calling each of those in turn it only accesses the disk once, which is faster.
+
+
+
+
+ This method returns true if the specified filename is a solution file (.sln) or
+ solution filter file (.slnf); otherwise, it returns false.
+
+
+ Solution filters are included because they are a thin veneer over solutions, just
+ with a more limited set of projects to build, and should be treated the same way.
+
+
+
+
+ Returns true if the specified filename is a VC++ project file, otherwise returns false
+
+
+
+
+ Returns true if the specified filename is a metaproject file (.metaproj), otherwise false.
+
+
+
+
+ Given the absolute location of a file, and a disc location, returns relative file path to that disk location.
+ Throws UriFormatException.
+
+
+ The base path we want to be relative to. Must be absolute.
+ Should not include a filename as the last segment will be interpreted as a directory.
+
+
+ The path we need to make relative to basePath. The path can be either absolute path or a relative path in which case it is relative to the base path.
+ If the path cannot be made relative to the base path (for example, it is on another drive), it is returned verbatim.
+ If the basePath is an empty string, returns the path.
+
+ relative path (can be the full path)
+
+
+
+ Normalizes the path if and only if it is longer than max path,
+ or would be if rooted by the current directory.
+ This may make it shorter by removing ".."'s.
+
+
+
+
+ A variation of Path.IsRooted that not throw any IO exception.
+
+
+
+
+ Get the folder N levels above the given. Will stop and return current path when rooted.
+
+ Path to get the folder above.
+ Number of levels up to walk.
+ Full path to the folder N levels above the path.
+
+
+
+ Combine multiple paths. Should only be used when compiling against .NET 2.0.
+
+ Only use in .NET 2.0. Otherwise, use System.IO.Path.Combine(...)
+
+
+ Root path.
+ Paths to concatenate.
+ Combined path.
+
+
+
+ Replace all backward slashes to forward slashes
+
+
+
+
+ Ensure all slashes are the current platform's slash
+
+
+
+
+
+
+ Locate a file in either the directory specified or a location in the
+ directory structure above that directory.
+
+
+
+
+ Searches for a file based on the specified starting directory.
+
+ The file to search for.
+ An optional directory to start the search in. The default location is the directory
+ of the file containing the property function.
+ The filesystem
+ The full path of the file if it is found, otherwise an empty string.
+
+
+
+ Clears the file existence cache.
+
+
+
+
+ Encapsulates the definitions of the item-spec modifiers a.k.a. reserved item metadata.
+
+
+
+
+ Indicates if the given name is reserved for an item-spec modifier.
+
+
+
+
+ Indicates if the given name is reserved for one of the specific subset of itemspec
+ modifiers to do with the defining project of the item.
+
+
+
+
+ Indicates if the given name is reserved for a derivable item-spec modifier.
+ Derivable means it can be computed given a file name.
+
+ Name to check.
+ true, if name of a derivable modifier
+
+
+
+ Performs path manipulations on the given item-spec as directed.
+ Does not cache the result.
+
+
+
+
+ Performs path manipulations on the given item-spec as directed.
+
+ Supported modifiers:
+ %(FullPath) = full path of item
+ %(RootDir) = root directory of item
+ %(Filename) = item filename without extension
+ %(Extension) = item filename extension
+ %(RelativeDir) = item directory as given in item-spec
+ %(Directory) = full path of item directory relative to root
+ %(RecursiveDir) = portion of item path that matched a recursive wildcard
+ %(Identity) = item-spec as given
+ %(ModifiedTime) = last write time of item
+ %(CreatedTime) = creation time of item
+ %(AccessedTime) = last access time of item
+
+ NOTES:
+ 1) This method always returns an empty string for the %(RecursiveDir) modifier because it does not have enough
+ information to compute it -- only the BuildItem class can compute this modifier.
+ 2) All but the file time modifiers could be cached, but it's not worth the space. Only full path is cached, as the others are just string manipulations.
+
+
+ Methods of the Path class "normalize" slashes and periods. For example:
+ 1) successive slashes are combined into 1 slash
+ 2) trailing periods are discarded
+ 3) forward slashes are changed to back-slashes
+
+ As a result, we cannot rely on any file-spec that has passed through a Path method to remain the same. We will
+ therefore not bother preserving slashes and periods when file-specs are transformed.
+
+ Never returns null.
+
+ The root directory for relative item-specs. When called on the Engine thread, this is the project directory. When called as part of building a task, it is null, indicating that the current directory should be used.
+ The item-spec to modify.
+ The path to the project that defined this item (may be null).
+ The modifier to apply to the item-spec.
+ Full path if any was previously computed, to cache.
+ The modified item-spec (can be empty string, but will never be null).
+ Thrown when the item-spec is not a path.
+
+
+
+ Indicates whether the given path is a UNC or drive pattern root directory.
+ Note: This function mimics the behavior of checking if Path.GetDirectoryName(path) == null.
+
+
+
+
+
+
+ Temporary check for something like http://foo which will end up like c:\foo\bar\http://foo
+ We should either have no colon, or exactly one colon.
+ UNDONE: This is a minimal safe change for Dev10. The correct fix should be to make GetFullPath/NormalizePath throw for this.
+
+
+
+
+ Generates a unique directory name in the temporary folder.
+ Caller must delete when finished.
+
+
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ File will NOT be created.
+ May throw IOException.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ File will NOT be created.
+ May throw IOException.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ If no extension is provided, uses ".tmp".
+ File is guaranteed to be unique.
+ Caller must delete it when finished.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Caller must delete it when finished.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ Caller must delete it when finished.
+ May throw IOException.
+
+
+
+
+ Creates a file with unique temporary file name with a given extension in the specified folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ If folder is null, the temporary folder will be used.
+ Caller must delete it when finished.
+ May throw IOException.
+
+
+
+
+ Functions for matching file names with patterns.
+
+
+
+
+ Cache of the list of invalid path characters, because this method returns a clone (for security reasons)
+ which can cause significant transient allocations
+
+
+
+
+ The Default FileMatcher does not cache directory enumeration.
+
+
+
+
+ The type of entity that GetFileSystemEntries should return.
+
+
+
+
+ Delegate defines the GetFileSystemEntries signature that GetLongPathName uses
+ to enumerate directories on the file system.
+
+ Files, Directories, or Files and Directories
+ The path to search.
+ The file pattern.
+
+
+ An enumerable of filesystem entries.
+
+
+
+ Determines whether the given path has any wild card characters.
+
+
+
+
+ Determines whether the given path has any wild card characters, any semicolons or any property references.
+
+
+
+
+ Determines whether the given path has any property references.
+
+
+
+
+ Get the files and\or folders specified by the given path and pattern.
+
+ Whether Files, Directories or both.
+ The path to search.
+ The pattern to search.
+ The directory for the project within which the call is made
+ If true the project directory should be stripped
+ The file system abstraction to use that implements file system operations
+
+
+
+
+ Returns an enumerable of file system entries matching the specified search criteria. Inaccessible or non-existent file
+ system entries are skipped.
+
+
+
+ The file system abstraction to use that implements file system operations
+ An enumerable of matching file system entries (can be empty).
+
+
+
+ Determine if the given search pattern will match loosely on Windows
+
+ The search pattern to check
+
+
+
+
+ Same as Directory.EnumerateFiles(...) except that files that
+ aren't accessible are skipped instead of throwing an exception.
+
+ Other exceptions are passed through.
+
+ The path.
+ The pattern.
+ The project directory
+
+ The file system abstraction to use that implements file system operations
+ Files that can be accessed.
+
+
+
+ Same as Directory.EnumerateDirectories(...) except that files that
+ aren't accessible are skipped instead of throwing an exception.
+
+ Other exceptions are passed through.
+
+ The path.
+ Pattern to match
+ The file system abstraction to use that implements file system operations
+ Accessible directories.
+
+
+
+ Given a path name, get its long version.
+
+ The short path.
+ The long path.
+
+
+
+ Given a path name, get its long version.
+
+ The short path.
+ Delegate.
+ The long path.
+
+
+
+ Given a filespec, split it into left-most 'fixed' dir part, middle 'wildcard' dir part, and filename part.
+ The filename part may have wildcard characters in it.
+
+ The filespec to be decomposed.
+ Receives the fixed directory part.
+ The wildcard directory part.
+ The filename part.
+
+
+
+ Do most of the grunt work of splitting the filespec into parts.
+ Does not handle post-processing common to the different matching
+ paths.
+
+ The filespec to be decomposed.
+ Receives the fixed directory part.
+ The wildcard directory part.
+ The filename part.
+
+
+
+ Removes the leading ".\" from all of the paths in the array.
+
+ Paths to remove .\ from.
+
+
+
+ Checks if the char is a DirectorySeparatorChar or a AltDirectorySeparatorChar
+
+
+
+
+
+
+ Removes the current directory converting the file back to relative path
+
+ Paths to remove current directory from.
+
+
+
+
+ The filespec.
+
+
+
+
+ Holds the directory pattern for globs like **/{pattern}/**, i.e. when we're looking for a matching directory name
+ regardless of where on the path it is. This field is used only if the wildcard directory part has this shape. In
+ other cases such as **/{pattern1}/**/{pattern2}/**, we don't use this optimization and instead rely on
+ to test if a file path matches the glob or not.
+
+
+
+
+ Wild-card matching.
+
+
+
+
+ If true, then recursion is required.
+
+
+
+
+ The directory to search in
+
+
+
+
+ The remaining, wildcard part of the directory.
+
+
+
+
+ True if SearchData.DirectoryPattern is non-null and we have descended into a directory that matches the pattern.
+
+
+
+
+ Data about a search that does not change as the search recursively traverses directories
+
+
+
+
+ True if a SearchData.DirectoryPattern is specified but we have not descended into a matching directory.
+
+
+
+
+ Get all files that match either the file-spec or the regular expression.
+
+ List of files that gets populated.
+ Information about the search
+
+
+ Patterns to exclude from the results
+ exclude patterns that might activate farther down the directory tree. Keys assume paths are normalized with forward slashes and no trailing slashes
+ Options for tuning the parallelization of subdirectories
+
+
+
+ Given a split file spec consisting of a directory without wildcard characters,
+ a sub-directory containing wildcard characters,
+ and a filename which may contain wildcard characters,
+ create a regular expression that will match that file spec.
+
+ PERF WARNING: this method is called in performance-critical
+ scenarios, so keep it fast and cheap
+
+ The fixed directory part.
+ The wildcard directory part.
+ The filename part.
+ The regular expression string.
+
+
+
+ Determine if the filespec is legal according to the following conditions:
+
+ (1) It is not legal for there to be a ".." after a wildcard.
+
+ (2) By definition, "**" must appear alone between directory slashes.If there is any remaining "**" then this is not
+ a valid filespec.
+
+ True if both parts meet all conditions for a legal filespec.
+
+
+
+ Append the regex equivalents for character sequences in the fixed directory part of a filespec:
+
+ (1) The leading \\ in UNC paths, so that the doubled slash isn't reduced in the last step
+
+ (2) Common filespec characters
+
+
+
+
+ Append the regex equivalents for character sequences in the wildcard directory part of a filespec:
+
+ (1) The leading **\ if existing
+
+ (2) Each occurrence of recursive wildcard \**\
+
+ (3) Common filespec characters
+
+
+
+
+ Append the regex equivalents for character sequences in the filename part of a filespec:
+
+ (1) Trailing dots in file names have to be treated specially.
+ We want:
+
+ *. to match foo
+
+ but 'foo' doesn't have a trailing '.' so we need to handle this while still being careful
+ not to match 'foo.txt' by modifying the generated regex for wildcard characters * and ?
+
+ (2) Common filespec characters
+
+ (3) Ignore the .* portion of any *.* sequence when no trailing dot exists
+
+
+
+
+ Append the regex equivalents for characters common to all filespec parts.
+
+
+
+
+ Given an index at a directory separator,
+ iteratively skip to the end of two sequences:
+
+ (1) \.\ -> \
+ This is an identity, so for example, these two are equivalent,
+
+ dir1\.\dir2 == dir1\dir2
+
+ (2) \\ -> \
+ Double directory separators are treated as a single directory separator,
+ so, for example, this is an identity:
+
+ f:\dir1\\dir2 == f:\dir1\dir2
+
+ The single exemption is for UNC path names, like this:
+
+ \\server\share != \server\share
+
+ This case is handled by isUncPath in
+ a prior step.
+
+
+ The last index of a directory sequence.
+
+
+
+ Given an index at a directory separator or start of a recursive operator,
+ iteratively skip to the end of three sequences:
+
+ (1), (2) Both sequences handled by IndexOfNextNonCollapsibleChar
+
+ (3) \**\**\ -> \**\
+ This is an identity, so for example, these two are equivalent,
+
+ dir1\**\**\ == dir1\**\
+
+ ]
+ If starting at a recursive operator, the last index of a recursive sequence.
+ Otherwise, the last index of a directory sequence.
+
+
+
+
+ Given a filespec, get the information needed for file matching.
+
+ The filespec.
+ Receives the regular expression.
+ Receives the flag that is true if recursion is required.
+ Receives the flag that is true if the filespec is legal.
+
+
+
+ Given a filespec, parse it and construct the regular expression string.
+
+ The filespec.
+ Receives the fixed directory part.
+ Receives the wildcard directory part.
+ Receives the filename part.
+ Receives the flag that is true if recursion is required.
+ Receives the flag that is true if the filespec is legal.
+ hook method to further change the parts
+
+
+
+ The results of a match between a filespec and a file name.
+
+
+
+
+ Default constructor.
+
+
+
+
+ A wildcard (* and ?) matching algorithm that tests whether the input path file name matches against the pattern.
+
+ The path whose file name is matched against the pattern.
+ The pattern.
+
+
+
+ A wildcard (* and ?) matching algorithm that tests whether the input string matches against the pattern.
+
+ String which is matched against the pattern.
+ Pattern against which string is matched.
+
+
+
+ A wildcard (* and ?) matching algorithm that tests whether the input string matches against the pattern.
+
+ String which is matched against the pattern.
+ Pattern against which string is matched.
+
+
+
+ Given a pattern (filespec) and a candidate filename (fileToMatch)
+ return matching information.
+
+ The filespec.
+ The candidate to match against.
+ The result class.
+
+
+
+ The maximum number of tasks that are allowed to run concurrently
+
+
+
+
+ The number of currently available tasks
+
+
+
+
+ The maximum number of tasks that Parallel.ForEach may use
+
+
+
+
+ Given a filespec, find the files that match.
+ Will never throw IO exceptions: if there is no match, returns the input verbatim.
+
+ The project directory.
+ Get files that match the given file spec.
+ Exclude files that match this file spec.
+ The search action, array of files, and Exclude file spec (if applicable).
+
+
+
+ Replace all slashes to the OS slash, collapse multiple slashes into one, trim trailing slashes
+
+ A string
+ The normalized string
+
+
+
+ Returns true if drive enumerating wildcard patterns are detected using the directory and wildcard parts.
+
+ Fixed directory string, portion of file spec info.
+ Wildcard string, portion of file spec info.
+
+
+
+ Returns true if given characters follow a drive pattern without the slash (ex: C:).
+
+ First char from directory part of file spec string.
+ Second char from directory part of file spec string.
+
+
+
+ Returns true if selected characters from the fixed directory and wildcard pattern make up the "{any number of slashes}**" pattern.
+
+ Starting index to begin detecting slashes in directory part of file spec string.
+ Length of directory part of file spec string.
+ Fixed directory string, portion of file spec info.
+ Wildcard string, portion of file spec info.
+
+
+
+ Returns true if the given character is a valid drive letter.
+
+
+ Copied from https://github.com/dotnet/corefx/blob/b8b81a66738bb10ef0790023598396861d92b2c4/src/Common/src/System/IO/PathInternal.Windows.cs#L53-L59
+
+
+
+
+ Skips slash characters in a string.
+
+ The working string
+ Offset in string to start the search in
+ First index that is not a slash. Returns the string's length if end of string is reached
+
+
+
+ Given a filespec, find the files that match.
+ Will never throw IO exceptions: if there is no match, returns the input verbatim.
+
+ The project directory.
+ Get files that match the given file spec.
+ Exclude files that match this file spec.
+ The search action, array of files, and Exclude file spec (if applicable).
+
+
+
+ Returns true if the last component of the given directory path (assumed to not have any trailing slashes)
+ matches the given pattern.
+
+ The path to test.
+ The pattern to test against.
+ True in case of a match (e.g. directoryPath = "dir/subdir" and pattern = "s*"), false otherwise.
+
+
+
+ Returns true if is * or *.*.
+
+ The filename pattern to check.
+
+
+
+ This class contains utility methods for file IO.
+ Separate from FileUtilities because some assemblies may only need the patterns.
+ PERF\COVERAGE NOTE: Try to keep classes in 'shared' as granular as possible. All the methods in
+ each class get pulled into the resulting assembly.
+
+
+
+
+ Indicates whether the specified string follows the pattern drive pattern (for example "C:", "D:").
+
+ Input to check for drive pattern.
+ true if follows the drive pattern, false otherwise.
+
+
+
+ Indicates whether the specified string follows the pattern drive pattern (for example "C:/" or "C:\").
+
+ Input to check for drive pattern with slash.
+ true if follows the drive pattern with slash, false otherwise.
+
+
+
+ Indicates whether the specified string starts with the drive pattern (for example "C:").
+
+ Input to check for drive pattern.
+ true if starts with drive pattern, false otherwise.
+
+
+
+ Indicates whether the specified string starts with the drive pattern (for example "C:/" or "C:\").
+
+ Input to check for drive pattern.
+ true if starts with drive pattern with slash, false otherwise.
+
+
+
+ Indicates whether the specified file-spec comprises exactly "\\server\share" (with no trailing characters).
+
+ Input to check for UNC pattern.
+ true if comprises UNC pattern.
+
+
+
+ Indicates whether the specified file-spec begins with "\\server\share".
+
+ Input to check for UNC pattern.
+ true if starts with UNC pattern.
+
+
+
+ Indicates whether the file-spec begins with a UNC pattern and how long the match is.
+
+ Input to check for UNC pattern.
+ length of the match, -1 if no match.
+
+
+
+ Indicates whether or not the file-spec meets the minimum requirements of a UNC pattern.
+
+ Input to check for UNC pattern minimum requirements.
+ true if the UNC pattern is a minimum length of 5 and the first two characters are be a slash, false otherwise.
+
+
+
+ Used to specify the targeted bitness of the .NET Framework for some methods of FrameworkLocationHelper
+
+
+
+
+ Indicates the .NET Framework that is currently being run under.
+
+
+
+
+ Indicates the 32-bit .NET Framework
+
+
+
+
+ Indicates the 64-bit .NET Framework
+
+
+
+
+ FrameworkLocationHelper provides utility methods for locating .NET Framework and .NET Framework SDK directories and files
+
+
+
+
+ Path to the ToolsVersion definitions in the registry
+
+
+
+
+ By default when a root path is not specified we would like to use the program files directory \ reference assemblies\framework as the root location
+ to generate the reference assembly paths from.
+
+
+
+
+ List the supported .net versions.
+
+
+
+
+ List the supported visual studio versions.
+
+
+ The items must be ordered by the version, because some methods depend on that fact to find the previous visual studio version.
+
+
+
+
+ Define explicit fallback rules for the request to get path of .net framework sdk tools folder.
+ The default rule is fallback to previous VS. However, there are some special cases that need
+ explicit rules, i.e. v4.5.1 on VS12 fallbacks to v4.5 on VS12.
+
+
+ The rules are maintained in a 2-dimensions array. Each row defines a rule. The first column
+ defines the trigger condition. The second column defines the fallback .net and VS versions.
+
+
+
+
+ Because there is no longer a strong 1:1 mapping between FX versions and SDK
+ versions, if we're unable to locate the desired SDK version, we will try to
+ use whichever SDK version is installed by looking at the key pointing to the
+ "latest" version.
+
+ This isn't ideal, but it will allow our tasks to function on any of several
+ related SDKs even if they don't have exactly the same versions.
+
+ NOTE: This returns the path to the root of the fallback SDK
+
+
+
+
+ Because there is no longer a strong 1:1 mapping between FX versions and SDK
+ versions, if we're unable to locate the desired SDK version, we will try to
+ use whichever SDK version is installed by looking at the key pointing to the
+ "latest" version.
+
+ This isn't ideal, but it will allow our tasks to function on any of several
+ related SDKs even if they don't have exactly the same versions.
+
+ NOTE: This explicitly returns the path to the 3.5 tools (bin) under the fallback
+ SDK, to match the data we're pulling from the registry now.
+
+
+
+
+ Because there is no longer a strong 1:1 mapping between FX versions and SDK
+ versions, if we're unable to locate the desired SDK version, we will try to
+ use whichever SDK version is installed by looking at the key pointing to the
+ "latest" version.
+
+ This isn't ideal, but it will allow our tasks to function on any of several
+ related SDKs even if they don't have exactly the same versions.
+
+ NOTE: This explicitly returns the path to the 4.X tools (bin\NetFX 4.0 Tools)
+ under the fallback SDK, to match the data we're pulling from the registry now.
+
+
+
+
+ Check the registry key and value to see if the .net Framework is installed on the machine.
+
+ Registry path to look for the value
+ Key to retrieve the value from
+ True if the registry key is 1 false if it is not there. This method also return true if the complus enviornment variables are set.
+
+
+
+ Heuristic that first considers the current runtime path and then searches the base of that path for the given
+ frameworks version.
+
+ The path to the runtime that is currently executing.
+ Should be something like 'v1.2' that indicates the runtime version we want.
+ Function that checks if directory exists.
+ Delegate to method that can return filesystem entries.
+ .NET framework architecture
+ Will return 'null' if there is no target frameworks on this machine.
+
+
+
+ Determine the 32 bit program files directory, this is used for finding where the reference assemblies live.
+
+
+
+
+ Determine the 64-bit program files directory, used as the basis for MSBuildExtensionsPath64.
+ Returns null if we're not on a 64-bit machine
+
+
+
+
+ Generate the path to the program files reference assembly location by taking in the program files special folder and then
+ using that path to generate the path to the reference assemblies location.
+
+
+
+
+ Given a ToolsVersion, find the path to the build tools folder for that ToolsVersion.
+
+ The ToolsVersion to look up
+ Target build tools architecture.
+ The path to the build tools folder for that ToolsVersion, if it exists, or
+ null otherwise
+
+
+
+ Take the parts of the Target framework moniker and formulate the reference assembly path based on the following pattern:
+ For a framework and version:
+ $(TargetFrameworkRootPath)\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)
+ For a subtype:
+ $(TargetFrameworkRootPath)\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\SubType\$(TargetFrameworkSubType)
+ e.g.NET Framework v4.0 would locate its reference assemblies in:
+ \Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
+ e.g.Silverlight v2.0 would locate its reference assemblies in:
+ \Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v2.0
+ e.g.NET Compact Framework v3.5, subtype PocketPC would locate its reference assemblies in:
+ \Program Files\Reference Assemblies\Microsoft\Framework\.NETCompactFramework\v3.5\SubType\PocketPC
+
+ The path to the reference assembly location
+
+
+
+ Given a path, subtracts the requested number of directories and returns the result.
+
+
+ Internal only so that I can have the unit tests use it too, instead of duplicating the same code
+
+
+
+
+ Look up the path to the build tools directory for the requested ToolsVersion in the .exe.config file of this executable
+
+
+
+
+ Look up the path to the build tools directory in the registry for the requested ToolsVersion and requested architecture
+
+
+
+
+ Will return the path to the dot net framework reference assemblies if they exist under the program files\reference assembies\microsoft\framework directory
+ or null if the directory does not exist.
+
+
+
+
+ Look for the given registry value under the given key.
+
+
+
+
+ Helper method to create an instance of for .net v4.x,
+ because most of attributes are the same for v4.x versions.
+
+ .net framework version.
+ Version of Visual Studio
+
+
+
+
+ The key in registry to indicate the corresponding .net framework in this visual studio.
+ i.e. 'v8.0A' for VS11.
+
+
+
+
+ The version of this visual studio.
+
+
+
+
+ The list of supported .net framework versions in this visual studio.
+
+
+
+
+ The key in registry to indicate the corresponding windows sdk, i.e. "v8.0" for VS11.
+
+
+
+
+ The name in registry to indicate the sdk installation folder path, i.e. "InstallationFolder" for windows v8.0.
+
+
+
+
+ The key in the registry to indicate the corresponding .net framework in this visual studio.
+ i.e. 'v8.0A' for VS11.
+
+
+
+
+ The registry key of this .net framework, i.e. "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" for .net v4.5.
+
+
+
+
+ The name in registry to indicate that this .net framework is installed, i.e. "Install" for .net v4.5.
+
+
+
+
+ The key in registry to indicate the sdk tools folder, i.e. "WinSDK-NetFx40Tools-x86" for .net v4.5.
+
+
+
+
+ The version of visual studio that shipped with this .net framework.
+
+
+
+
+ Does this .net framework include MSBuild?
+
+
+
+
+ Cached paths of .net framework on different architecture.
+
+
+
+
+ Cached paths of .net framework sdk tools folder path on different visual studio version.
+
+
+
+
+ Cached path of the corresponding windows sdk.
+
+
+
+
+ Cached path of .net framework reference assemblies.
+
+
+
+
+ The version of this .net framework.
+
+
+
+
+ The name in registry to indicate the sdk installation folder path, i.e. "InstallationFolder" for .net v4.5.
+
+
+
+
+ Folder prefix, i.e. v4.0 for .net v4.5.
+
+
+
+
+ Get the FrameworkName for this version of the .NET Framework.
+
+
+
+
+ Gets the full registry key of this .net framework Sdk for the given visual studio version.
+ i.e. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86" for .net v4.5 on VS11.
+
+
+
+
+ Gets the full path of .net framework for the given architecture.
+
+
+
+
+ Gets the full path of .net framework sdk tools for the given visual studio version.
+ i.e. "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\" for .net v4.5 on VS11.
+
+
+
+
+ Gets the full path of .net framework sdk.
+ i.e. "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\" for .net v4.5 on VS11.
+
+
+
+
+ Gets the full path of reference assemblies folder.
+ i.e. "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\" for .net v4.5.
+
+
+
+
+ Gets the full path of the corresponding windows sdk shipped with this .net framework.
+ i.e. "C:\Program Files (x86)\Windows Kits\8.0\" for v8.0 (shipped with .net v4.5 and VS11).
+
+
+
+
+ Specialized implementation for legacy .net framework v1.1 and v2.0.
+
+
+
+
+ Gets the full registry key of this .net framework Sdk for the given visual studio version.
+ i.e. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework" for v1.1 and v2.0.
+
+
+
+
+ Gets the full path of .net framework sdk tools for the given visual studio version.
+
+
+
+
+ Gets the full path of .net framework sdk, which is the full path of .net framework sdk tools for v1.1 and v2.0.
+
+
+
+
+ Gets the full path of reference assemblies folder, which is the full path of .net framework for v1.1 and v2.0.
+
+
+
+
+ Specialized implementation for legacy .net framework v3.0 and v3.5.
+
+
+
+
+ Gets the full path of .net framework sdk.
+ i.e. "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\" for .net v3.5 on VS11.
+
+
+
+
+ Gets the full path of reference assemblies folder.
+ i.e. "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\" for v3.5.
+
+
+
+
+ Methods that are invoked on FileTracker.dll in order to handle inproc tracking
+
+
+ We want to P/Invoke to the FileTracker methods, but FileTracker.dll is not guaranteed to be on PATH (since it's
+ in the MSBuild directory), and there is no DefaultDllImportSearchPath that explicitly points to us. Thus, we
+ are sneaking around P/Invoke by manually acquiring the method pointers and calling them ourselves. The vast
+ majority of this code was lifted from ndp\fx\src\CLRCompression\ZLibNative.cs, which does the same thing for
+ that assembly.
+
+
+
+
+ Loads FileTracker.dll into a handle that we can use subsequently to grab the exported methods we're interested in.
+
+
+
+
+ Generic code to grab the function pointer for a function exported by FileTracker.dll, given
+ that function's name, and transform that function pointer into a callable delegate.
+
+
+
+
+ Actually generate all of the delegates that will be called by our public (or rather, internal) surface area methods.
+
+
+
+
+ Static constructor -- generates the delegates for all of the export methods from
+ FileTracker.dll that we care about.
+
+
+
+
+ Given a registry hive and a request view open the base key for that registry location.
+
+
+
+
+ Simplified registry access delegate. Given a baseKey and a subKey, get all of the subkey
+ names.
+
+ The base registry key.
+ The subkey
+ An enumeration of strings.
+
+
+
+ Simplified registry access delegate. Given a baseKey and subKey, get the default value
+ of the subKey.
+
+ The base registry key.
+ The subkey
+ A string containing the default value.
+
+
+
+ Helper methods that simplify registry access.
+
+
+
+
+ Given a baseKey and a subKey, get all of the subkeys names.
+
+ The base registry key.
+ The subkey
+ An enumeration of strings.
+
+
+
+ Given a baseKey and subKey, get the default value of the subKey.
+
+ The base registry key.
+ The subkey
+ A string containing the default value.
+
+
+
+ Given a hive and a hive view open the base key
+ RegistryKey baseKey = RegistryKey.OpenBaseKey(hive, view);
+
+ The hive.
+ The hive view
+ A registry Key for the given baseKey and view
+
+
+
+ This class contains utility methods for dealing with resources.
+
+
+
+
+ Extracts the message code (if any) prefixed to the given string.
+ MSB\d\d\d\d):\s*(?.*)$"
+ Arbitrary codes match "^\s*(?[A-Za-z]+\d+):\s*(?.*)$"
+ ]]>
+ Thread safe.
+
+ Whether to match only MSBuild error codes, or any error code.
+ The string to parse.
+ [out] The message code, or null if there was no code.
+ The string without its message code prefix, if any.
+
+
+
+ Retrieves the MSBuild F1-help keyword for the given resource string. Help keywords are used to index help topics in
+ host IDEs.
+
+ Resource string to get the MSBuild F1-keyword for.
+ The MSBuild F1-help keyword string.
+
+
+
+ Retrieves the contents of the named resource string.
+
+ Resource string name.
+ Resource string contents.
+
+
+
+ Loads the specified string resource and formats it with the arguments passed in. If the string resource has an MSBuild
+ message code and help keyword associated with it, they too are returned.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ This method is thread-safe.
+ [out] The MSBuild message code, or null.
+ [out] The MSBuild F1-help keyword for the host IDE, or null.
+ Resource string to load.
+ Optional arguments for formatting the resource string.
+ The formatted resource string.
+
+
+
+ Looks up a string in the resources, and formats it with the arguments passed in. If the string resource has an MSBuild
+ message code and help keyword associated with it, they are discarded.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ This method is thread-safe.
+ Resource string to load.
+ Optional arguments for formatting the resource string.
+ The formatted resource string.
+
+
+
+ Formats the resource string with the given arguments.
+ Ignores error codes and keywords
+
+
+
+
+
+
+
+ Formats the given string using the variable arguments passed in.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ Thread safe.
+
+ The string to format.
+ Optional arguments for formatting the given string.
+ The formatted string.
+
+
+
+ Verifies that a particular resource string actually exists in the string table. This will only be called in debug
+ builds. It helps catch situations where a dev calls VerifyThrowXXX with a new resource string, but forgets to add the
+ resource string to the string table, or misspells it!
+
+ This method is thread-safe.
+ Resource string to check.
+
+
+
+ Set of methods to deal with versions in the tasks
+
+
+
+
+ Convert a version number like 0.0.0.0 to a Version instance.
+ The method will return null if the string is not a valid value
+
+ Version string to convert to a version object
+
+
+
+ Go though an enumeration and create a sorted list of strings which can be parsed as versions. Keep around the original
+ string because it may contain a v and this would be required to create the correct path on disk if the string was part of a path.
+
+
+
+
+ Convert a version number like 0.0.0.0 to a Version instance.
+
+
+ Should we use Parse to TryParse (parse means we throw an exception, tryparse means we will not).
+
+
+
+ Static accessor for a ReverseVersionGenericComparer
+
+
+
+
+ The Compare implements a reverse comparison
+
+
+
+
+ Static accessor for a ReverseVersionGenericComparer
+
+
+
+
+ The Compare implements a reverse comparison
+
+
+
+
+ The list of directory names found from the config file.
+
+
+
+
+ Construct.
+
+ The path to the config file.
+ The runtime version property from the project file.
+ The to target.
+
+
+
+ Get Enumerator
+
+
+
+
+ Get enumerator
+
+
+
+
+ A dictionary that has copy-on-write semantics.
+ KEYS AND VALUES MUST BE IMMUTABLE OR COPY-ON-WRITE FOR THIS TO WORK.
+
+ The value type.
+
+ Thread safety: for all users, this class is as thread safe as the underlying Dictionary implementation, that is,
+ safe for concurrent readers or one writer from EACH user. It achieves this by locking itself and cloning before
+ any write, if it is being shared - i.e., stopping sharing before any writes occur.
+
+
+ This class must be serializable as it is used for metadata passed to tasks, which may
+ be run in a separate appdomain.
+
+
+
+
+ Empty dictionary with a ,
+ used as the basis of new dictionaries with that comparer to avoid
+ allocating new comparers objects.
+
+
+
+
+ Empty dictionary with ,
+ used as the basis of new dictionaries with that comparer to avoid
+ allocating new comparers objects.
+
+
+
+
+ The backing dictionary.
+ Lazily created.
+
+
+
+
+ Constructor. Consider supplying a comparer instead.
+
+
+
+
+ Constructor taking a specified comparer for the keys
+
+
+
+
+ Serialization constructor, for crossing appdomain boundaries
+
+
+
+
+ Cloning constructor. Defers the actual clone.
+
+
+
+
+ Returns the collection of keys in the dictionary.
+
+
+
+
+ Returns the collection of values in the dictionary.
+
+
+
+
+ Returns the number of items in the collection.
+
+
+
+
+ Returns true if the collection is read-only.
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ Comparer used for keys
+
+
+
+
+ Accesses the value for the specified key.
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ Adds a value to the dictionary.
+
+
+
+
+ Adds several value to the dictionary.
+
+
+
+
+ Returns true if the dictionary contains the specified key.
+
+
+
+
+ Removes the entry for the specified key from the dictionary.
+
+
+
+
+ Attempts to find the value for the specified key in the dictionary.
+
+
+
+
+ Adds an item to the collection.
+
+
+
+
+ Clears the collection.
+
+
+
+
+ Returns true ff the collection contains the specified item.
+
+
+
+
+ Copies all of the elements of the collection to the specified array.
+
+
+
+
+ Remove an item from the dictionary.
+
+
+
+
+ Implementation of generic IEnumerable.GetEnumerator()
+
+
+
+
+ Implementation of IEnumerable.GetEnumerator()
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ Clone, with the actual clone deferred
+
+
+
+
+ Returns true if these dictionaries have the same backing.
+
+
+
+
+ Defines methods to support the comparison of objects for
+ equality over constrained inputs.
+
+
+
+
+ Determines whether the specified objects are equal, factoring in the specified bounds when comparing .
+
+
+
+
+ Returns a hash code for the specified object factoring in the specified bounds.
+
+
+
+
+ Interface allowing items and metadata and properties to go into keyed collections
+
+
+ This can be internal as it is a constraint only on internal collections.
+
+
+
+
+ Returns some value useful for a key in a dictionary
+
+
+
+
+ This is a custom string comparer that has three advantages over the regular
+ string comparer:
+ 1) It can generate hash codes and perform equivalence operations on parts of a string rather than a whole
+ 2) It uses "unsafe" pointers to maximize performance of those operations
+ 3) It takes advantage of limitations on MSBuild Property/Item names to cheaply do case insensitive comparison.
+
+
+
+
+ The processor architecture on which we are running, but default it will be x86
+
+
+
+
+ The default immutable comparer instance.
+
+
+
+
+ Performs the "Equals" operation on two MSBuild property, item or metadata names
+
+
+
+
+ Getting a case insensitive hash code for the msbuild property, item or metadata name
+
+
+
+
+ A read-only wrapper over an empty collection.
+
+
+ Thus this is an omission from the BCL.
+
+ Type of element in the collection
+
+
+
+ Backing live collection
+
+
+
+
+ Private default constructor as this is a singleton
+
+
+
+
+ Get the instance
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Returns true.
+
+
+
+
+ Whether collection is synchronized
+
+
+
+
+ Sync root
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Get an enumerator over an empty collection
+
+
+
+
+ Get an enumerator over an empty collection
+
+
+
+
+ ICollection version of CopyTo
+
+
+
+
+ A special singleton enumerable that enumerates a read-only empty dictionary
+
+ Key
+ Value
+
+
+
+ The single instance
+
+
+
+
+ The single instance
+
+
+
+
+ Private default constructor as this is a singleton
+
+
+
+
+ Get the instance
+
+
+
+
+ Empty returns zero
+
+
+
+
+ Returns true
+
+
+
+
+ Gets empty collection
+
+
+
+
+ Gets empty collection
+
+
+
+
+ Is it fixed size
+
+
+
+
+ Not synchronized
+
+
+
+
+ No sync root
+
+
+
+
+ Keys
+
+
+
+
+ Values
+
+
+
+
+ Keys
+
+
+
+
+ Values
+
+
+
+
+ Indexer
+
+
+
+
+ Get returns null as read-only
+ Set is prohibited and throws.
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Empty returns false
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Empty returns false
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Empty returns false
+
+
+
+
+ Empty does nothing
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Get empty enumerator
+
+
+
+
+ Get empty enumerator
+
+
+
+
+ Add
+
+
+
+
+ Contains
+
+
+
+
+ Enumerator
+
+
+
+
+ Remove
+
+
+
+
+ CopyTo
+
+
+
+
+ A debug only helper class for tracing
+
+
+
+
+ A dictionary of named counters
+
+
+
+
+ Last time logging happened
+
+
+
+
+ How often to log
+
+
+
+
+ A place callers can put something worth logging later
+
+
+
+
+ Short name of the current assembly - to distinguish statics when this type is shared into different assemblies
+
+
+
+
+ Put something in the slot
+
+
+
+
+ Put something in the slot
+
+ The key type.
+ The value type.
+
+
+
+ Increment the named counter, and dump if it's time to do so
+
+
+
+
+ Log the provided items
+
+ The item type.
+
+
+
+ Dump all the named counters, if any
+
+
+
+
+ Helper class for reading toolsets out of the configuration file.
+
+
+
+
+ Lock for process wide ToolsetConfigurationSection section cache
+
+
+
+
+ Process wide ToolsetConfigurationSection section cache
+
+
+
+
+ Class representing the Toolset element
+
+
+ Internal for unit testing only
+
+
+
+
+ ToolsVersion attribute of the element
+
+
+
+
+ Property element collection
+
+
+
+
+ Collection of all the search paths for project imports, per OS
+
+
+
+
+ Class representing all the per-OS search paths for MSBuildExtensionsPath*
+
+
+
+
+ We use this dictionary to track whether or not we've seen a given
+ searchPaths definition before, since the .NET configuration classes
+ won't perform this check without respect for case.
+
+
+
+
+ Type of the collection
+ This has to be public as cannot change access modifier when overriding
+
+
+
+
+ Throw exception if an element with a duplicate key is added to the collection
+
+
+
+
+ Name of the element
+
+
+
+
+ Gets an element with the specified name
+
+ OS of the element
+ element
+
+
+
+ Gets an element based at the specified position
+
+ position
+ element
+
+
+
+ Returns the key value for the given element
+
+ element whose key is returned
+ key
+
+
+
+ Creates a new element of the collection
+
+ Created element
+
+
+
+ overridden so we can track previously seen elements
+
+
+
+
+ overridden so we can track previously seen elements
+
+
+
+
+ Stores the name of the OS in a case-insensitive map
+ so we can detect if it is specified more than once but with
+ different case
+
+
+
+
+ Class representing searchPaths element for a single OS
+
+
+
+
+ OS attribute of the element
+
+
+
+
+ Property element collection
+
+
+
+
+ Class representing collection of property elements
+
+
+
+
+ We use this dictionary to track whether or not we've seen a given
+ property definition before, since the .NET configuration classes
+ won't perform this check without respect for case.
+
+
+
+
+ Collection type
+ This has to be public as cannot change access modifier when overriding
+
+
+
+
+ Throw exception if an element with a duplicate is added
+
+
+
+
+ name of the element
+
+
+
+
+ Gets an element with the specified name
+
+ name of the element
+ element
+
+
+
+ Gets an element at the specified position
+
+ position
+ element
+
+
+
+ Creates a new element
+
+ element
+
+
+
+ overridden so we can track previously seen property names
+
+
+
+
+ overridden so we can track previously seen property names
+
+
+
+
+ Gets the key for the element
+
+ element
+ key
+
+
+
+ Stores the name of the tools version in a case-insensitive map
+ so we can detect if it is specified more than once but with
+ different case
+
+
+
+
+ This class represents property element
+
+
+
+
+ name attribute
+
+
+
+
+ value attribute
+
+
+
+
+ Class representing the collection of toolset elements
+
+
+ Internal for unit testing only
+
+
+
+
+ We use this dictionary to track whether or not we've seen a given
+ toolset definition before, since the .NET configuration classes
+ won't perform this check without respect for case.
+
+
+
+
+ Type of the collection
+ This has to be public as cannot change access modifier when overriding
+
+
+
+
+ Throw exception if an element with a duplicate key is added to the collection
+
+
+
+
+ Name of the element
+
+
+
+
+ Gets an element with the specified name
+
+ toolsVersion of the element
+ element
+
+
+
+ Gets an element based at the specified position
+
+ position
+ element
+
+
+
+ Returns the key value for the given element
+
+ element whose key is returned
+ key
+
+
+
+ Creates a new element of the collection
+
+ Created element
+
+
+
+ overridden so we can track previously seen tools versions
+
+
+
+
+ overridden so we can track previously seen tools versions
+
+
+
+
+ Stores the name of the tools version in a case-insensitive map
+ so we can detect if it is specified more than once but with
+ different case
+
+
+
+
+ This class is used to programmatically read msbuildToolsets section
+ in from the configuration file. An example of application config file:
+
+ <configuration>
+ <msbuildToolsets default="2.0">
+ <toolset toolsVersion="2.0">
+ <property name="MSBuildBinPath" value="D:\windows\Microsoft.NET\Framework\v2.0.x86ret\"/>
+ <property name="SomeOtherProperty" value="SomeOtherPropertyValue"/>
+ </toolset>
+ <toolset toolsVersion="3.5">
+ <property name="MSBuildBinPath" value="D:\windows\Microsoft.NET\Framework\v3.5.x86ret\"/>
+ </toolset>
+ </msbuildToolsets>
+ </configuration>
+
+
+
+ Internal for unit testing only
+
+
+
+
+ toolsVersion element collection
+
+
+
+
+ default attribute on msbuildToolsets element, specifying the default ToolsVersion
+
+
+
+
+ MsBuildOverrideTasksPath attribute on msbuildToolsets element, specifying the path to find msbuildOverrideTasks files
+
+
+
+
+ DefaultOverrideToolsVersion attribute on msbuildToolsets element, specifying the toolsversion that should be used by
+ default to build projects with this version of MSBuild.
+
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Build.xml b/msvc/MSBuild/Current/Bin/Microsoft.Build.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7f7384e3eb13b76ac722c0289f61dcac9d3f9ed3
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Build.xml
@@ -0,0 +1,55453 @@
+
+
+
+ Microsoft.Build
+
+
+
+
+ Factory for
+
+
+
+
+ Implementation of file system operations directly over the dot net managed layer
+
+
+
+
+ Implementation of file system operations on windows. Combination of native and managed implementations.
+ TODO Remove this class and replace with WindowsFileSystem. Test perf to ensure no regressions.
+
+
+
+
+ A possibly-recoverable exception wrapping a failed native call. The captures the
+ associated recent error code (). The
+ accounts for the native code as well as a human readable portion.
+
+
+ This is much like , but the message field contains the caller-provided part in addition
+ to the system-provided message (rather than replacing the system provided message).
+
+
+
+
+ Creates an exception representing a native failure (with a corresponding Win32 error code).
+ The exception's includes the error code, a system-provided message describing it,
+ and the provided application-specific message prefix (e.g. "Unable to open log file").
+
+
+
+
+ Creates an exception representing a native failure (with a corresponding Win32 error code).
+ The exception's includes the error code and a system-provided message describing it.
+
+
+
+
+ Returns a human readable error string for a native error code, like Native: Can't access the log file (0x5: Access is denied).
+ The message prefix (e.g. "Can't access the log file") is optional.
+
+
+
+
+ Converts a Win32 error code to HResult
+
+
+
+
+ Handle for a volume iteration as returned by WindowsNative.FindFirstVolumeW />
+
+
+
+
+ Private constructor for the PInvoke marshaller.
+
+
+
+
+
+
+
+ The type of file artifact to search for
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Windows-specific implementation of file system operations using Windows native invocations.
+ TODO For potential extra perf gains, provide native implementations for all IFileSystem methods and stop inheriting from ManagedFileSystem
+
+
+
+
+ Native implementation of file system operations
+
+
+
+
+ Maximum path length.
+
+
+
+
+ ERROR_SUCCESS
+
+
+
+
+ ERROR_FILE_NOT_FOUND
+
+
+
+
+ ERROR_PATH_NOT_FOUND
+
+
+
+
+ ERROR_DIRECTORY
+
+
+
+
+ ERROR_ACCESS_DENIED
+
+
+
+
+ ERROR_NO_MORE_FILES
+
+
+
+
+ Modifies the search condition of PathMatchSpecEx
+
+
+
+
+
+
+
+ The pszSpec parameter points to a single file name pattern to be matched.
+
+
+
+
+ The pszSpec parameter points to a semicolon-delimited list of file name patterns to be matched.
+
+
+
+
+ If PMSF_NORMAL is used, ignore leading spaces in the string pointed to by pszSpec. If PMSF_MULTIPLE is used,
+ ignore leading spaces in each file type contained in the string pointed to by pszSpec. This flag can be combined with PMSF_NORMAL and PMSF_MULTIPLE.
+
+
+
+
+ Status of attempting to enumerate a directory.
+
+
+
+
+ Enumeration of an existent directory succeeded.
+
+
+
+
+ One or more path components did not exist, so the search directory could not be opened.
+
+
+
+
+ A path component in the search path refers to a file. Only directories can be enumerated.
+
+
+
+
+ Directory enumeration could not complete due to denied access to the search directory or a file inside.
+
+
+
+
+ Directory enumeration failed without a well-known status (see ).
+
+
+
+
+ Represents the result of attempting to enumerate a directory.
+
+
+
+
+ Enumerated directory.
+
+
+
+
+ Overall status indication.
+
+
+
+
+ Native error code. Note that an error code other than ERROR_SUCCESS may be present even on success.
+
+
+
+
+
+
+
+ Indicates if enumeration succeeded.
+
+
+
+
+ Throws an exception if the native error code could not be canonicalized (a fairly exceptional circumstance).
+ This is allowed when is .
+
+
+ This is a good default: case when switching on every possible
+
+
+
+
+ Throws an exception if the native error code was corresponds to a known
+ (and enumeration was not successful).
+
+
+
+
+ Creates (but does not throw) an exception for this result. The result must not be successful.
+
+
+
+
+ Win32FindData
+
+
+
+
+ The file attributes of a file
+
+
+
+
+ Specified when a file or directory was created
+
+
+
+
+ Specifies when the file was last read from, written to, or for executable files, run.
+
+
+
+
+ For a file, the structure specifies when the file was last written to, truncated, or overwritten.
+ For a directory, the structure specifies when the directory is created.
+
+
+
+
+ The high-order DWORD value of the file size, in bytes.
+
+
+
+
+ The low-order DWORD value of the file size, in bytes.
+
+
+
+
+ If the dwFileAttributes member includes the FILE_ATTRIBUTE_REPARSE_POINT attribute, this member specifies the reparse point tag.
+
+
+
+
+ Reserved for future use.
+
+
+
+
+ The name of the file.
+
+
+
+
+ An alternative name for the file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A class to help with printline debugging in difficult environments like CI, or when debugging msbuild through other
+ tools like VS or CLI.
+ See example usages in PrintLineDebugger_Tests
+
+
+
+
+ A collection of useful writers
+
+
+
+
+ Name of the Visual Studio (and Blend) process.
+ VS ASP intellisense server fails without Microsoft.VisualStudio.Web.Host. Remove when issue fixed: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/574986
+
+
+
+
+ Name of the MSBuild process(es)
+
+
+
+
+ Name of MSBuild executable files.
+
+
+
+
+ Gets the cached Build Environment instance.
+
+
+
+
+ Find the location of MSBuild.exe based on the current environment.
+
+
+ This defines the order and precedence for various methods of discovering MSBuild and associated toolsets.
+ At a high level, an install under Visual Studio is preferred as the user may have SDKs installed to a
+ specific instance of Visual Studio and build will only succeed if we can discover those. See
+ https://github.com/dotnet/msbuild/issues/1461 for details.
+
+ Build environment.
+
+
+
+ Returns true if processName appears in the processList
+
+ Name of the process
+ List of processes to check
+
+
+
+
+ Resets the current singleton instance (for testing).
+
+
+
+
+ Resets the current singleton instance (for testing).
+
+
+
+
+ Enum which defines which environment / mode MSBuild is currently running.
+
+
+
+
+ Running from Visual Studio directly or from MSBuild installed under an instance of Visual Studio.
+ Toolsets and extensions will be loaded from the Visual Studio instance.
+
+
+
+
+ Running in a standalone toolset mode. All toolsets and extensions paths are relative to the app
+ running and not dependent on Visual Studio. (e.g. dotnet CLI, open source clone of our repo)
+
+
+
+
+ Running without any defined toolsets. Most functionality limited. Likely will not be able to
+ build or evaluate a project. (e.g. reference to Microsoft.*.dll without a toolset definition
+ or Visual Studio instance installed).
+
+
+
+
+ Defines the current environment for build tools.
+
+
+
+
+ Gets the flag that indicates if we are running in a test harness.
+
+
+
+
+ Returns true when the entry point application is MSBuild.exe.
+
+
+
+
+ Returns true when the entry point application is Visual Studio.
+
+
+
+
+ Path to the root of the MSBuild folder (in VS scenarios, MSBuild\Current\bin).
+
+
+
+
+ Path to the MSBuild 32-bit tools directory.
+
+
+
+
+ Path to the MSBuild 64-bit (AMD64) tools directory.
+
+
+
+
+ Path to the ARM64 tools directory.
+ if ARM64 tools are not installed.
+
+
+
+
+ Path to the Sdks folder for this MSBuild instance.
+
+
+
+
+ Full path to the current MSBuild configuration file.
+
+
+
+
+ Full path to current MSBuild.exe.
+
+ This path is likely not the current running process. We may be inside
+ Visual Studio or a test harness. In that case this will point to the
+ version of MSBuild found to be associated with the current environment.
+
+
+
+
+
+ Full path to the current MSBuild tools directory. This will be 32-bit unless
+ we're executing from the 'AMD64' folder.
+
+
+
+
+ Path to the root Visual Studio install directory
+ (e.g. 'C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise')
+
+
+
+
+ MSBuild extensions path. On Standalone this defaults to the MSBuild folder. In
+ VisualStudio mode this folder will be %VSINSTALLDIR%\MSBuild.
+
+
+
+
+ StringWriter class that allows Encoding to be specified. In the standard StringWriter
+ class only UTF16 is allowed.
+
+
+
+
+ Default ctor (Encoding = UTF8)
+
+
+
+
+ Overload to specify encoding.
+
+
+
+
+ IKeyComparer implementation that compares AssemblyNames for using in Hashtables.
+
+
+
+
+ Comparer for two assembly name extensions
+
+
+
+
+ Comparer for two assembly name extensions
+
+
+
+
+ Comparer for two assembly name extensions
+
+
+
+
+ Comparer for two assembly name extensions
+
+
+
+
+ Should the comparer consider the retargetable flag when doing comparisons
+
+
+
+
+ Private construct so there's only one instance.
+
+
+
+
+ Compare o1 and o2 as AssemblyNames.
+
+
+
+
+ Treat o1 and o2 as AssemblyNames. Are they equal?
+
+
+
+
+ Get a hashcode for AssemblyName.
+
+
+
+
+ Determine if the assembly name extensions are equal
+
+
+
+
+ Get a hashcode for AssemblyName.
+
+
+
+
+ Class defining extension methods for awaitable objects.
+
+
+
+
+ Synchronizes access to the staScheduler field.
+
+
+
+
+ The singleton STA scheduler object.
+
+
+
+
+ Gets the STA scheduler.
+
+
+
+
+ Provides await functionality for ordinary s.
+
+ The handle to wait on.
+ The awaiter.
+
+
+
+ Provides await functionality for an array of ordinary s.
+
+ The handles to wait on.
+ The awaiter.
+
+
+
+ Creates a TPL Task that is marked as completed when a is signaled.
+
+ The handle whose signal triggers the task to be completed. Do not use a here.
+ The timeout (in milliseconds) after which the task will fault with a if the handle is not signaled by that time.
+ A Task that is completed after the handle is signaled.
+
+ There is a (brief) time delay between when the handle is signaled and when the task is marked as completed.
+
+
+
+
+ Creates a TPL Task that is marked as completed when any in the array is signaled.
+
+ The handles whose signals triggers the task to be completed. Do not use a here.
+ The timeout (in milliseconds) after which the task will return a value of WaitTimeout.
+ A Task that is completed after any handle is signaled.
+
+ There is a (brief) time delay between when the handles are signaled and when the task is marked as completed.
+
+
+
+
+ A class which acts as a task scheduler and ensures each scheduled task gets its
+ own STA thread.
+
+
+
+
+ The current queue of tasks.
+
+
+
+
+ Returns the list of queued tasks.
+
+
+
+
+ Queues a task to the scheduler.
+
+
+
+
+ Tries to execute the task immediately. This method will always return false for the STA scheduler.
+
+
+
+
+ Compare the version numbers only for an AssemblyNameExtension and make sure they are in reverse order. This assumes the names are the same.
+
+
+
+
+ A static instance of the comparer for use in a sort method
+
+
+
+
+ Compare x and y by version only.
+
+ Change the return value to sort the values in reverse order.
+
+ If x is greater than y return -1 indicating x is less than y.
+ If x is less than y return 1 indicating x is greater than y.
+ If x and y are equal return 0.
+
+
+
+
+ Functions for dealing with the specially formatted errors returned by
+ build tools.
+
+
+ Various tools produce and consume CanonicalErrors in various formats.
+
+ DEVENV Format When Clicking on Items in the Output Window
+ (taken from env\msenv\core\findutil.cpp ParseLocation function)
+
+ v:\dir\file.ext (loc) : msg
+ \\server\share\dir\file.ext(loc):msg
+ url
+
+ loc:
+ (line)
+ (line-line)
+ (line,col)
+ (line,col-col)
+ (line,col,len)
+ (line,col,line,col)
+
+ DevDiv Build Process
+ (taken from tools\devdiv2.def)
+
+ To echo warnings and errors to the build console, the
+ "description block" must be recognized by build. To do this,
+ add a $(ECHO_COMPILING_COMMAND) or $(ECHO_PROCESSING_COMMAND)
+ to the first line of the description block, e.g.
+
+ $(ECHO_COMPILING_CMD) Resgen_$<
+
+ Errors must have the format:
+
+ <text> : error [num]: <msg>
+
+ Warnings must have the format:
+
+ <text> : warning [num]: <msg>
+
+
+
+
+ Represents the parts of a decomposed canonical message.
+
+
+
+
+ Defines the error category\severity level.
+
+
+
+
+ Value used for unspecified line and column numbers, which are 1-relative.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Name of the file or tool (not localized)
+
+
+
+
+ The line number.
+
+
+
+
+ The column number.
+
+
+
+
+ The ending line number.
+
+
+
+
+ The ending column number.
+
+
+
+
+ The category/severity level
+
+
+
+
+ The sub category (localized)
+
+
+
+
+ The error code (not localized)
+
+
+
+
+ The error message text (localized)
+
+
+
+
+ A small custom int conversion method that treats invalid entries as missing (0). This is done to work around tools
+ that don't fully conform to the canonical message format - we still want to salvage what we can from the message.
+
+
+ 'value' converted to int or 0 if it can't be parsed or is negative
+
+
+
+ Decompose an error or warning message into constituent parts. If the message isn't in the canonical form, return null.
+
+ This method is thread-safe, because the Regex class is thread-safe (per MSDN).
+
+ Decomposed canonical message, or null.
+
+
+
+ Trivial implementation of CommonPrefixLength on spans of characters.
+
+
+
+
+ Adds the missing span-taking overload to .NET Framework version of .
+
+
+
+
+ Adds the missing span-taking overload to .NET Framework version of .
+
+
+
+
+ Adds the missing span-taking overload to .NET Framework version of .
+
+
+
+
+ A result of executing a target or task.
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor
+
+
+
+
+ The overall result of the task execution.
+
+
+
+
+ Dictionary of the final values of the task parameters
+
+
+
+
+ The exception thrown by the task during initialization or execution,
+ if any.
+
+
+
+
+ The name of the resource representing the message to be logged along with the
+ above exception.
+
+
+
+
+ The arguments to be used when formatting ExceptionMessage
+
+
+
+
+ Class for loading tasks
+
+
+
+
+ For saving the assembly that was loaded by the TypeLoader
+ We only use this when the assembly failed to load properly into the appdomain
+
+
+
+
+ Delegate for logging task loading errors.
+
+
+
+
+ Checks if the given type is a task factory.
+
+ This method is used as a type filter delegate.
+ true, if specified type is a task
+
+
+
+ Creates an ITask instance and returns it.
+
+
+
+
+ This is a resolver to help created AppDomains when they are unable to load an assembly into their domain we will help
+ them succeed by providing the already loaded one in the currentdomain so that they can derive AssemblyName info from it
+
+
+
+
+ Check if we added a resolver and remove it
+
+
+
+
+ An enumeration of all the types of BuildEventArgs that can be
+ packaged by this logMessagePacket
+
+
+
+
+ An invalid eventId, used during initialization of a LoggingEventType
+
+
+
+
+ Event is a CustomEventArgs
+
+
+
+
+ Event is a BuildErrorEventArgs
+
+
+
+
+ Event is a BuildFinishedEventArgs
+
+
+
+
+ Event is a BuildMessageEventArgs
+
+
+
+
+ Event is a BuildStartedEventArgs
+
+
+
+
+ Event is a BuildWarningEventArgs
+
+
+
+
+ Event is a ProjectFinishedEventArgs
+
+
+
+
+ Event is a ProjectStartedEventArgs
+
+
+
+
+ Event is a TargetStartedEventArgs
+
+
+
+
+ Event is a TargetFinishedEventArgs
+
+
+
+
+ Event is a TaskStartedEventArgs
+
+
+
+
+ Event is a TaskFinishedEventArgs
+
+
+
+
+ Event is a TaskCommandLineEventArgs
+
+
+
+
+ Event is a TaskParameterEventArgs
+
+
+
+
+ Event is a ProjectEvaluationStartedEventArgs
+
+
+
+
+ Event is a ProjectEvaluationFinishedEventArgs
+
+
+
+
+ Event is a ProjectImportedEventArgs
+
+
+
+
+ Event is a TargetSkippedEventArgs
+
+
+
+
+ Event is a TelemetryEventArgs
+
+
+
+
+ Event is an EnvironmentVariableReadEventArgs
+
+
+
+
+ Event is a ResponseFileUsedEventArgs
+
+
+
+
+ Event is an AssemblyLoadBuildEventArgs
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is
+
+
+
+
+ Event is a
+
+
+
+
+ A packet to encapsulate a BuildEventArg logging message.
+ Contents:
+ Build Event Type
+ Build Event Args
+
+
+
+
+ The packet version, which is based on the CLR version. Cached because querying Environment.Version each time becomes an allocation bottleneck.
+
+
+
+
+ Dictionary of methods used to read BuildEventArgs.
+
+
+
+
+ Dictionary of methods used to write BuildEventArgs.
+
+
+
+
+ Dictionary of assemblies we've added to the resolver.
+
+
+
+
+ The resolver used to load custom event types.
+
+
+
+
+ The object used to synchronize access to shared data.
+
+
+
+
+ Delegate for translating targetfinished events.
+
+
+
+
+ The event type of the buildEventArg based on the
+ LoggingEventType enumeration
+
+
+
+
+ The buildEventArg which is encapsulated by the packet
+
+
+
+
+ The sink id
+
+
+
+
+ Encapsulates the buildEventArg in this packet.
+
+
+
+
+ Constructor for deserialization
+
+
+
+
+ Delegate for translating TargetFinishedEventArgs
+
+
+
+
+ Delegate representing a method on the BuildEventArgs classes used to write to a stream.
+
+
+
+
+ Delegate representing a method on the BuildEventArgs classes used to read from a stream.
+
+
+
+
+ The nodePacket Type, in this case the packet is a Logging Message
+
+
+
+
+ The buildEventArg wrapped by this packet
+
+
+
+
+ The event type of the wrapped buildEventArg
+ based on the LoggingEventType enumeration
+
+
+
+
+ Reads/writes this packet
+
+
+
+
+ Writes the logging packet to the translator.
+
+
+
+
+ Reads the logging packet from the translator.
+
+
+
+
+ Wrapper for Delegate.CreateDelegate with retries.
+
+
+ TODO: Investigate if it would be possible to use one of the overrides of CreateDelegate
+ that doesn't force the delegate to be closed over its first argument, so that we can
+ only create the delegate once per event type and cache it.
+
+
+
+
+ Takes in a id (LoggingEventType as an int) and creates the correct specific logging class
+
+
+
+
+ Based on the type of the BuildEventArg to be wrapped
+ generate an Id which identifies which concrete type the
+ BuildEventArg is.
+
+ Argument to get the type Id for
+ An enumeration entry which represents the type
+
+
+
+ Given a build event that is presumed to be 2.0 (due to its lack of a "WriteToStream" method) and its
+ LoggingEventType, serialize that event to the stream.
+
+
+
+
+ Serializes EnvironmentVariableRead Event argument to the stream. Does not work properly on TaskHosts due to BuildEventContext serialization not being
+ enabled on TaskHosts, but that shouldn't matter, as this should never be called from a TaskHost anyway.
+
+
+
+
+ Write Build Warning Log message into the translator
+
+
+
+
+ Write a Build Error message into the translator
+
+
+
+
+ Write Task Command Line log message into the translator
+
+
+
+
+ Write a "standard" Message Log the translator
+
+
+
+
+ Write a response file used log message into the translator
+
+
+
+
+ Given a build event that is presumed to be 2.0 (due to its lack of a "ReadFromStream" method) and its
+ LoggingEventType, read that event from the stream.
+
+
+
+
+ Read and reconstruct an EnvironmentVariableReadEventArgs from the stream. This message should never be called from a TaskHost, so although the context translation does not work, that's ok.
+
+
+
+
+ Read and reconstruct a BuildWarningEventArgs from the stream
+
+
+
+
+ Read and reconstruct a BuildErrorEventArgs from the stream
+
+
+
+
+ Read and reconstruct a TaskCommandLineEventArgs from the stream
+
+
+
+
+ Read and reconstruct a BuildMessageEventArgs from the stream
+
+
+
+
+ This class contains only static methods, which are used in both the
+ tasks and graph projects in order for two projects to negotiate which platform a projectreference
+ should be built as.
+
+
+
+
+ Class to wrap the saving and restoring of the culture of a threadpool thread
+
+
+
+
+ Queue a threadpool thread and set it to a certain culture.
+
+
+
+
+ Utilities for collections
+
+
+
+
+ Returns a new list containing the input list
+ contents, except for nulls
+
+ Type of list elements
+
+
+
+ Extension method -- combines a TryGet with a check to see that the value is equal.
+
+
+
+
+ This class provides access to the assembly's resources.
+
+
+
+
+ A slot for msbuild.exe to add a resource manager over its own resources, that can also be consulted.
+
+
+
+
+ The internals of the Engine are exposed to MSBuild.exe, so they must share the same AssemblyResources class and
+ ResourceUtilities class that uses it. To make this possible, MSBuild.exe registers its resources here and they are
+ normally consulted last. This assumes that there are no duplicated resource ID's between the Engine and MSBuild.exe.
+ (Actually there are currently two: LoggerCreationError and LoggerNotFoundError.
+ We can't change the resource ID's this late in the cycle and we sometimes want to load the MSBuild.exe ones,
+ because they're a little different. So for that purpose we call GetStringLookingInMSBuildExeResourcesFirst() )
+
+
+
+
+ Loads the specified resource string, either from the assembly's primary resources, or its shared resources.
+
+ This method is thread-safe.
+
+ The resource string, or null if not found.
+
+
+
+ Loads the specified resource string.
+
+ The resource string, or null if not found.
+
+
+
+ Loads the specified resource string, from the Engine or else Shared resources.
+
+ The resource string, or null if not found.
+
+
+
+ Loads the specified resource string, from the MSBuild.exe resources.
+
+ The resource string, or null if not found.
+
+
+
+ This class packages information about how to load a given assembly -- an assembly can be loaded by either its assembly
+ name (strong or weak), or its filename/path.
+
+
+ Uses factory to instantiate correct private class to save space: only one field is ever used of the two.
+
+
+
+
+ This constructor initializes the assembly information.
+
+
+
+
+ Gets the assembly's identity denoted by its strong/weak name.
+
+
+
+
+ Gets the path to the assembly file.
+
+
+
+
+ Get the assembly location
+
+
+
+
+ Computes a hashcode for this assembly info, so this object can be used as a key into
+ a hash table.
+
+
+
+
+ Determines if two AssemblyLoadInfos are effectively the same.
+
+
+
+
+ Assembly represented by name
+
+
+
+
+ Assembly name
+
+
+
+
+ Constructor
+
+
+
+
+ Gets the assembly's identity denoted by its strong/weak name.
+
+
+
+
+ Gets the path to the assembly file.
+
+
+
+
+ Get the assembly location
+
+
+
+
+ Assembly info that uses a file path
+
+
+
+
+ Path to assembly
+
+
+
+
+ Constructor
+
+
+
+
+ Gets the assembly's identity denoted by its strong/weak name.
+
+
+
+
+ Gets the path to the assembly file.
+
+
+
+
+ Get the assembly location
+
+
+
+
+ Specifies the parts of the assembly name to partially match
+
+
+
+
+ Compare SimpleName A.PartialCompare(B,SimpleName) match the simple name on A and B if the simple name on A is not null.
+
+
+
+
+ Compare Version A.PartialCompare(B, Version) match the Version on A and B if the Version on A is not null.
+
+
+
+
+ Compare Culture A.PartialCompare(B, Culture) match the Culture on A and B if the Culture on A is not null.
+
+
+
+
+ Compare PublicKeyToken A.PartialCompare(B, PublicKeyToken) match the PublicKeyToken on A and B if the PublicKeyToken on A is not null.
+
+
+
+
+ When doing a comparison A.PartialCompare(B, Default) compare all fields of A which are not null with B.
+
+
+
+
+ A replacement for AssemblyName that optimizes calls to FullName which is expensive.
+ The assembly name is represented internally by an AssemblyName and a string, conversion
+ between the two is done lazily on demand.
+
+
+
+
+ Set of assemblyNameExtensions that THIS assemblyname was remapped from.
+
+
+
+
+ Construct an unnamed assembly.
+ Private because we want only one of these.
+
+
+
+
+ Construct with AssemblyName.
+
+
+
+
+
+ Construct with string.
+
+
+
+
+
+ Construct from a string, but immediately construct a real AssemblyName.
+ This will cause an exception to be thrown up front if the assembly name
+ isn't well formed.
+
+
+ The string version of the assembly name.
+
+
+ Used when the assembly name comes from a user-controlled source like a project file or config file.
+ Does extra checking on the assembly name and will throw exceptions if something is invalid.
+
+
+
+
+ Ctor for deserializing from state file (binary serialization).
+ This is required because AssemblyName is not Serializable on .NET Core.
+
+
+
+
+
+
+ Ctor for deserializing from state file (custom binary serialization) using translator.
+
+
+
+
+ To be used as a delegate. Gets the AssemblyName of the given file.
+
+
+
+
+
+
+ Run after the object has been deserialized
+
+
+
+
+ Initialize the remapped from structure.
+
+
+
+
+ Create remappedFrom HashSet. Used by deserialization as well.
+
+
+
+
+ Assume there is a string version, create the AssemblyName version.
+
+
+
+
+ Assume there is a string version, create the AssemblyName version.
+
+
+
+
+ The base name of the assembly.
+
+
+
+
+
+ Gets the backing AssemblyName, this can be None.
+
+
+
+
+ The assembly's version number.
+
+
+
+
+
+ Is the assembly a complex name or a simple name. A simple name is where only the name is set
+ a complex name is where the version, culture or publickeytoken is also set
+
+
+
+
+ Does the fullName have the processor architecture defined
+
+
+
+
+ Replace the current version with a new version.
+
+
+
+
+
+ The assembly's Culture
+
+
+
+
+
+ The assembly's retargetable bit
+
+
+
+
+
+ The full name of the original extension we were before being remapped.
+
+
+
+
+ Add an assemblyNameExtension which represents an assembly name which was mapped to THIS assemblyName.
+
+
+
+
+ As an AssemblyName
+
+
+
+
+
+ The assembly's full name.
+
+
+
+
+
+ Get the assembly's public key token.
+
+
+
+
+
+ A special "unnamed" instance of AssemblyNameExtension.
+
+
+
+
+
+ Compare one assembly name to another.
+
+
+
+
+
+
+ Compare one assembly name to another.
+
+
+
+
+ Get a hash code for this assembly name.
+
+
+
+
+
+ Compare two base names as quickly as possible.
+
+
+
+
+
+
+ An implementation of compare that compares two base
+ names as quickly as possible.
+
+
+
+
+
+
+ Compare two basenames.
+
+
+
+
+
+
+
+ Clone this assemblyNameExtension
+
+
+
+
+ Clone the object but mark and mark the cloned object as immutable
+
+
+
+
+
+ Is this object immutable
+
+
+
+
+ Mark this object as immutable
+
+
+
+
+ Compare two assembly names for equality.
+
+
+
+
+
+
+ Interface method for IEquatable<AssemblyNameExtension>
+
+
+
+
+
+
+ Compare two assembly names for equality ignoring version.
+
+
+
+
+
+
+ Compare two assembly names and consider the retargetable flag during the comparison
+
+
+
+
+ Compare two assembly names for equality.
+
+
+
+
+ Allows the comparison of the culture.
+
+
+
+
+ Allows the comparison of just the PublicKeyToken
+
+
+
+
+ Compare two public key tokens.
+
+
+
+
+ Only the unnamed assembly has both null assemblyname and null string.
+
+
+
+
+
+ Given a display name, construct an assembly name.
+
+ The display name.
+ The assembly name.
+
+
+
+ Return a string that has AssemblyName special characters escaped.
+ Those characters are Equals(=), Comma(,), Quote("), Apostrophe('), Backslash(\).
+
+
+ WARNING! This method is not meant as a general purpose escaping method for assembly names.
+ Use only if you really know that this does what you need.
+
+
+
+
+
+
+ Convert to a string for display.
+
+
+
+
+
+ Compare the fields of this with that if they are not null.
+
+
+
+
+ Compare the fields of this with that if they are not null.
+
+
+
+
+ Do a partial comparison between two assembly name extensions.
+ Compare the fields of A and B on the following conditions:
+ 1) A.Field has a non null value
+ 2) The field has been selected in the comparison flags or the default comparison flags are passed in.
+
+ If A.Field is null then we will not compare A.Field and B.Field even when the comparison flag is set for that field unless skipNullFields is false.
+
+
+
+
+ Do a partial comparison between two assembly name extensions.
+ Compare the fields of A and B on the following conditions:
+ 1) A.Field has a non null value
+ 2) The field has been selected in the comparison flags or the default comparison flags are passed in.
+
+ If A.Field is null then we will not compare A.Field and B.Field even when the comparison flag is set for that field unless skipNullFields is false.
+
+
+
+
+ Reads/writes this class
+
+
+
+
+
+ This class encapsulates information about a file that is associated with a build event.
+
+
+
+
+ Creates an instance of this class using the given filename/path.
+ Filename may be an empty string, if there is truly no file associated.
+ This overload may also be used if there is a file but truly no line/column,
+ for example when failing to load a project file.
+
+ IF AN IELEMENTLOCATION IS AVAILABLE, USE THE OVERLOAD ACCEPTING THAT INSTEAD.
+
+
+
+
+
+ Creates an instance of this class using the given location.
+ This does not provide end-line or end-column information.
+ This is the preferred overload.
+
+
+
+
+ Creates an instance of this class using the given filename/path and a line/column of interest in the file.
+
+ IF AN IELEMENTLOCATION IS AVAILABLE, USE THE OVERLOAD ACCEPTING THAT INSTEAD.
+
+
+ Set to zero if not available.
+ Set to zero if not available.
+
+
+
+ Creates an instance of this class using the given filename/path and a range of lines/columns of interest in the file.
+
+ IF AN IELEMENTLOCATION IS AVAILABLE, USE THE OVERLOAD ACCEPTING THAT INSTEAD.
+
+
+ Set to zero if not available.
+ Set to zero if not available.
+ Set to zero if not available.
+ Set to zero if not available.
+
+
+
+ Creates an instance of this class using the information in the given XmlException.
+
+
+
+
+
+ Creates an instance of this class using the information in the given XmlException and file location.
+
+
+
+
+ Gets the filename/path to be associated with some build event.
+
+ The filename/path string.
+
+
+
+ Gets the line number of interest in the file.
+
+ Line number, or zero if not available.
+
+
+
+ Gets the column number of interest in the file.
+
+ Column number, or zero if not available.
+
+
+
+ Gets the last line number of a range of interesting lines in the file.
+
+ Last line number, or zero if not available.
+
+
+
+ Gets the last column number of a range of interesting columns in the file.
+
+ Last column number, or zero if not available.
+
+
+
+ This class contains only static methods, which are useful throughout many
+ of the MSBuild classes and don't really belong in any specific class.
+
+
+
+
+ Converts a string to a bool. We consider "true/false", "on/off", and
+ "yes/no" to be valid boolean representations in the XML.
+
+ The string to convert.
+ Boolean true or false, corresponding to the string.
+
+
+
+ Returns a hex representation of a byte array.
+
+ The bytes to convert
+ A string byte types formated as X2.
+
+
+
+ Returns true if the string can be successfully converted to a bool,
+ such as "on" or "yes"
+
+
+
+
+ Returns true if the string represents a valid MSBuild boolean true value,
+ such as "on", "!false", "yes"
+
+
+
+
+ Returns true if the string represents a valid MSBuild boolean false value,
+ such as "!on" "off" "no" "!true"
+
+
+
+
+ Converts a string like "123.456" into a double. Leading sign is allowed.
+
+
+
+
+ Converts a hex string like "0xABC" into a double.
+
+
+
+
+ Converts a string like "123.456" or "0xABC" into a double.
+ Tries decimal conversion first.
+
+
+
+
+ Returns true if the string is a valid hex number, like "0xABC"
+
+
+
+
+ Returns true if the string is a valid decimal number, like "-123.456"
+
+
+
+
+ Returns true if the string is a valid decimal or hex number
+
+
+
+
+ delegate for System.IO.Directory.GetFiles, used for testing
+
+ Directory path to start search for files in
+ pattern of files to match
+ string array of files which match search pattern
+
+
+
+ delegate for Directory.GetDirectories.
+
+ The path to get directories for.
+ The pattern to search for.
+ An array of directories.
+
+
+
+ Delegate for System.IO.Directory.Exists
+
+ Directory path to check if it exists
+ true if directory exists
+
+
+
+ File exists delegate
+
+ The path to check for existence.
+ 'true' if the file exists.
+
+
+
+ File.Copy delegate
+
+
+
+
+
+
+ File.Delete delegate
+
+
+
+
+
+ File create delegate
+
+ The path to create.
+
+
+
+ This class contains methods that are useful for error checking and validation.
+
+
+
+
+ Throws InternalErrorException.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ Indicates the code path followed should not have been possible.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ Indicates the code path followed should not have been possible.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Throws InternalErrorException.
+ Indicates the code path followed should not have been possible.
+ This is only for situations that would mean that there is a bug in MSBuild itself.
+
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is null.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The value of the argument.
+ Parameter that should not be null
+
+
+
+ Helper to throw an InternalErrorException when a lock on the specified object is not already held.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The object that should already have been used as a lock.
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is null or zero length.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ The value of the argument.
+ Parameter that should not be null or zero length
+
+
+
+ Helper to throw an InternalErrorException when the specified parameter is not a rooted path.
+ This should be used ONLY if this would indicate a bug in MSBuild rather than
+ anything caused by user action.
+
+ Parameter that should be a rooted path.
+
+
+
+ This method should be used in places where one would normally put
+ an "assert". It should be used to validate that our assumptions are
+ true, where false would indicate that there must be a bug in our
+ code somewhere. This should not be used to throw errors based on bad
+ user input or anything that the user did wrong.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an InvalidOperationException with the specified resource string
+
+ Resource to use in the exception
+ Formatting args.
+
+
+
+ Throws an InvalidOperationException if the given condition is false.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an ArgumentException that can include an inner exception.
+
+ PERF WARNING: calling a method that takes a variable number of arguments
+ is expensive, because memory is allocated for the array of arguments -- do
+ not call this method repeatedly in performance-critical scenarios
+
+
+
+
+ Throws an ArgumentException that can include an inner exception.
+
+ PERF WARNING: calling a method that takes a variable number of arguments
+ is expensive, because memory is allocated for the array of arguments -- do
+ not call this method repeatedly in performance-critical scenarios
+
+
+ This method is thread-safe.
+
+ Can be null.
+
+
+
+
+
+ Throws an ArgumentException if the given condition is false.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an ArgumentException that includes an inner exception, if
+ the given condition is false.
+
+
+ Can be null.
+
+
+
+
+ Overload for one string format argument.
+
+
+
+
+ Overload for two string format arguments.
+
+
+
+
+ Overload for three string format arguments.
+
+
+
+
+ Overload for four string format arguments.
+
+
+
+
+ Throws an argument out of range exception.
+
+
+
+
+ Throws an ArgumentOutOfRangeException using the given parameter name
+ if the condition is false.
+
+
+
+
+ Throws an ArgumentNullException if the given string parameter is null
+ and ArgumentException if it has zero length.
+
+
+
+
+ Throws an ArgumentNullException if the given collection is null
+ and ArgumentException if it has zero length.
+
+
+
+
+ Throws an ArgumentException if the given collection is not null but of zero length.
+
+
+
+
+ Throws an ArgumentNullException if the given string parameter is null
+ and ArgumentException if it has zero length.
+
+
+
+
+ Throws an ArgumentException if the string has zero length, unless it is
+ null, in which case no exception is thrown.
+
+
+
+
+ Throws an ArgumentNullException if the given parameter is null.
+
+
+
+
+ Throws an ArgumentNullException if the given parameter is null.
+
+
+
+
+ Verifies the given arrays are not null and have the same length
+
+
+
+
+ A utility that verifies the parameters provided to a standard ICollection.CopyTo call.
+
+ If is null.
+ If falls outside of the bounds .
+ If there is insufficient capacity to copy the collection contents into
+ when starting at .
+
+
+
+ This class implements static methods to assist with unescaping of %XX codes
+ in the MSBuild file format.
+
+
+ PERF: since we escape and unescape relatively frequently, it may be worth caching
+ the last N strings that were (un)escaped
+
+
+
+
+ Optional cache of escaped strings for use when needing to escape in performance-critical scenarios with significant
+ expected string reuse.
+
+
+
+
+ Replaces all instances of %XX in the input string with the character represented
+ by the hexadecimal number XX.
+
+ The string to unescape.
+ If the string should be trimmed before being unescaped.
+ unescaped string
+
+
+
+ Adds instances of %XX in the input string where the char to be escaped appears
+ XX is the hex value of the ASCII code for the char. Interns and caches the result.
+
+
+ NOTE: Only recommended for use in scenarios where there's expected to be significant
+ repetition of the escaped string. Cache currently grows unbounded.
+
+
+
+
+ Adds instances of %XX in the input string where the char to be escaped appears
+ XX is the hex value of the ASCII code for the char.
+
+ The string to escape.
+ escaped string
+
+
+
+ Adds instances of %XX in the input string where the char to be escaped appears
+ XX is the hex value of the ASCII code for the char. Caches if requested.
+
+ The string to escape.
+
+ True if the cache should be checked, and if the resultant string
+ should be cached.
+
+
+
+
+ Before trying to actually escape the string, it can be useful to call this method to determine
+ if escaping is necessary at all. This can save lots of calls to copy around item metadata
+ that is really the same whether escaped or not.
+
+
+
+
+
+
+ Determines whether the string contains the escaped form of '*' or '?'.
+
+
+
+
+
+
+ Convert the given integer into its hexadecimal representation.
+
+ The number to convert, which must be non-negative and less than 16
+ The character which is the hexadecimal representation of .
+
+
+
+ Append the escaped version of the given character to a .
+
+ The to which to append.
+ The character to escape.
+
+
+
+ Append the escaped version of the given string to a .
+
+ The to which to append.
+ The unescaped string.
+
+
+
+ Special characters that need escaping.
+ It's VERY important that the percent character is the FIRST on the list - since it's both a character
+ we escape and use in escape sequences, we can unintentionally escape other escape sequences if we
+ don't process it first. Of course we'll have a similar problem if we ever decide to escape hex digits
+ (that would require rewriting the algorithm) but since it seems unlikely that we ever do, this should
+ be good enough to avoid complicating the algorithm at this point.
+
+
+
+
+ Set of methods to deal with versions in the tasks
+
+
+
+
+ Convert a version number like 0.0.0.0 to a Version instance.
+ The method will return null if the string is not a valid value
+
+ Version string to convert to a version object
+
+
+
+ Go though an enumeration and create a sorted list of strings which can be parsed as versions. Keep around the original
+ string because it may contain a v and this would be required to create the correct path on disk if the string was part of a path.
+
+
+
+
+ Convert a version number like 0.0.0.0 to a Version instance.
+
+
+ Should we use Parse to TryParse (parse means we throw an exception, tryparse means we will not).
+
+
+
+ Static accessor for a ReverseVersionGenericComparer
+
+
+
+
+ The Compare implements a reverse comparison
+
+
+
+
+ Static accessor for a ReverseVersionGenericComparer
+
+
+
+
+ The Compare implements a reverse comparison
+
+
+
+
+ Offers a default string format for Error and Warning events
+
+
+
+
+ Format the error event message and all the other event data into
+ a single string.
+
+ Error to format
+ true to show the project file which issued the event, otherwise false.
+ Properties to Print along with message
+ The formatted message string.
+
+
+
+ Format the warning message and all the other event data into a
+ single string.
+
+ Warning to format
+ true to show the project file which issued the event, otherwise false.
+ Properties to Print along with message
+ The formatted message string.
+
+
+
+ Format the message and all the other event data into a
+ single string.
+
+ Message to format
+ true to show the project file which issued the event, otherwise false.
+ Properties to Print along with message
+ The complete message (including property name) for an environment-derived property
+ The formatted message string.
+
+
+
+ Format the error event message and all the other event data into
+ a single string.
+
+ Error to format
+ The formatted message string.
+
+
+
+ Format the error event message and all the other event data into
+ a single string.
+
+ Error to format
+ true to show the project file which issued the event, otherwise false.
+ The formatted message string.
+
+
+
+ Format the warning message and all the other event data into a
+ single string.
+
+ Warning to format
+ The formatted message string.
+
+
+
+ Format the warning message and all the other event data into a
+ single string.
+
+ Warning to format
+ true to show the project file which issued the event, otherwise false.
+ The formatted message string.
+
+
+
+ Format the message and all the other event data into a
+ single string.
+
+ Message to format
+ The formatted message string.
+
+
+
+ Format the message and all the other event data into a
+ single string.
+
+ Message to format
+ Show project file or not
+ For an EnvironmentVariableReadEventArgs, adds an explanatory note and the name of the variable.
+ The formatted message string.
+
+
+
+ Format the event message and all the other event data into a
+ single string.
+
+ category ("error" or "warning")
+ subcategory
+ event message
+ error or warning code number
+ file name
+ line number (0 if n/a)
+ end line number (0 if n/a)
+ column number (0 if n/a)
+ end column number (0 if n/a)
+ thread id
+ The formatted message string.
+
+
+
+ Format the event message and all the other event data into a
+ single string.
+
+ category ("error" or "warning")
+ subcategory
+ event message
+ error or warning code number
+ file name
+ the project file name
+ line number (0 if n/a)
+ end line number (0 if n/a)
+ column number (0 if n/a)
+ end column number (0 if n/a)
+ thread id
+ log output properties
+ The formatted message string.
+
+
+
+ Splits strings on 'newLines' with tolerance for Everett and Dogfood builds.
+
+ String to split.
+
+
+
+ The kinds of newline breaks we expect.
+
+ Currently we're not supporting "\r".
+
+
+
+ Utility methods for classifying and handling exceptions.
+
+
+
+
+ Gets the location of the directory used for diagnostic log files.
+
+
+
+
+
+ The directory used for diagnostic log files.
+
+
+
+
+ The filename that exceptions will be dumped to
+
+
+
+
+ If the given exception is "ignorable under some circumstances" return false.
+ Otherwise it's "really bad", and return true.
+ This makes it possible to catch(Exception ex) without catching disasters.
+
+ The exception to check.
+ True if exception is critical.
+
+
+
+ If the given exception is file IO related or expected return false.
+ Otherwise, return true.
+
+ The exception to check.
+ True if exception is not IO related or expected otherwise false.
+
+
+
+ Determine whether the exception is file-IO related.
+
+ The exception to check.
+ True if exception is IO related.
+
+
+ Checks if the exception is an XML one.
+ Exception to check.
+ True if exception is related to XML parsing.
+
+
+ Extracts line and column numbers from the exception if it is XML-related one.
+ XML-related exception.
+ Line and column numbers if available, (0,0) if not.
+ This function works around the fact that XmlException and XmlSchemaException are not directly related.
+
+
+
+ If the given exception is file IO related or Xml related return false.
+ Otherwise, return true.
+
+ The exception to check.
+
+
+
+ If the given exception is reflection-related return false.
+ Otherwise, return true.
+
+ The exception to check.
+
+
+
+ Serialization has been observed to throw TypeLoadException as
+ well as SerializationException and IO exceptions. (Obviously
+ it has to do reflection but it ought to be wrapping the exceptions.)
+
+
+
+
+ Returns false if this is a known exception thrown by the registry API.
+
+
+
+
+ Returns false if this is a known exception thrown by function evaluation
+
+
+
+
+ Dump any unhandled exceptions to a file so they can be diagnosed
+
+
+
+
+ Dump the exception information to a file
+
+
+
+
+ Returns the content of any exception dump files modified
+ since the provided time, otherwise returns an empty string.
+
+
+
+ Line and column pair.
+
+
+ Gets or sets line number.
+
+
+ Gets or sets column position.
+
+
+
+ Functions for matching file names with patterns.
+
+
+
+
+ Cache of the list of invalid path characters, because this method returns a clone (for security reasons)
+ which can cause significant transient allocations
+
+
+
+
+ The Default FileMatcher does not cache directory enumeration.
+
+
+
+
+ The type of entity that GetFileSystemEntries should return.
+
+
+
+
+ Delegate defines the GetFileSystemEntries signature that GetLongPathName uses
+ to enumerate directories on the file system.
+
+ Files, Directories, or Files and Directories
+ The path to search.
+ The file pattern.
+
+
+ An enumerable of filesystem entries.
+
+
+
+ Determines whether the given path has any wild card characters.
+
+
+
+
+ Determines whether the given path has any wild card characters, any semicolons or any property references.
+
+
+
+
+ Determines whether the given path has any property references.
+
+
+
+
+ Get the files and\or folders specified by the given path and pattern.
+
+ Whether Files, Directories or both.
+ The path to search.
+ The pattern to search.
+ The directory for the project within which the call is made
+ If true the project directory should be stripped
+ The file system abstraction to use that implements file system operations
+
+
+
+
+ Returns an enumerable of file system entries matching the specified search criteria. Inaccessible or non-existent file
+ system entries are skipped.
+
+
+
+ The file system abstraction to use that implements file system operations
+ An enumerable of matching file system entries (can be empty).
+
+
+
+ Determine if the given search pattern will match loosely on Windows
+
+ The search pattern to check
+
+
+
+
+ Same as Directory.EnumerateFiles(...) except that files that
+ aren't accessible are skipped instead of throwing an exception.
+
+ Other exceptions are passed through.
+
+ The path.
+ The pattern.
+ The project directory
+
+ The file system abstraction to use that implements file system operations
+ Files that can be accessed.
+
+
+
+ Same as Directory.EnumerateDirectories(...) except that files that
+ aren't accessible are skipped instead of throwing an exception.
+
+ Other exceptions are passed through.
+
+ The path.
+ Pattern to match
+ The file system abstraction to use that implements file system operations
+ Accessible directories.
+
+
+
+ Given a path name, get its long version.
+
+ The short path.
+ The long path.
+
+
+
+ Given a path name, get its long version.
+
+ The short path.
+ Delegate.
+ The long path.
+
+
+
+ Given a filespec, split it into left-most 'fixed' dir part, middle 'wildcard' dir part, and filename part.
+ The filename part may have wildcard characters in it.
+
+ The filespec to be decomposed.
+ Receives the fixed directory part.
+ The wildcard directory part.
+ The filename part.
+
+
+
+ Do most of the grunt work of splitting the filespec into parts.
+ Does not handle post-processing common to the different matching
+ paths.
+
+ The filespec to be decomposed.
+ Receives the fixed directory part.
+ The wildcard directory part.
+ The filename part.
+
+
+
+ Removes the leading ".\" from all of the paths in the array.
+
+ Paths to remove .\ from.
+
+
+
+ Checks if the char is a DirectorySeparatorChar or a AltDirectorySeparatorChar
+
+
+
+
+
+
+ Removes the current directory converting the file back to relative path
+
+ Paths to remove current directory from.
+
+
+
+
+ The filespec.
+
+
+
+
+ Holds the directory pattern for globs like **/{pattern}/**, i.e. when we're looking for a matching directory name
+ regardless of where on the path it is. This field is used only if the wildcard directory part has this shape. In
+ other cases such as **/{pattern1}/**/{pattern2}/**, we don't use this optimization and instead rely on
+ to test if a file path matches the glob or not.
+
+
+
+
+ Wild-card matching.
+
+
+
+
+ If true, then recursion is required.
+
+
+
+
+ The directory to search in
+
+
+
+
+ The remaining, wildcard part of the directory.
+
+
+
+
+ True if SearchData.DirectoryPattern is non-null and we have descended into a directory that matches the pattern.
+
+
+
+
+ Data about a search that does not change as the search recursively traverses directories
+
+
+
+
+ True if a SearchData.DirectoryPattern is specified but we have not descended into a matching directory.
+
+
+
+
+ Get all files that match either the file-spec or the regular expression.
+
+ List of files that gets populated.
+ Information about the search
+
+
+ Patterns to exclude from the results
+ exclude patterns that might activate farther down the directory tree. Keys assume paths are normalized with forward slashes and no trailing slashes
+ Options for tuning the parallelization of subdirectories
+
+
+
+ Given a split file spec consisting of a directory without wildcard characters,
+ a sub-directory containing wildcard characters,
+ and a filename which may contain wildcard characters,
+ create a regular expression that will match that file spec.
+
+ PERF WARNING: this method is called in performance-critical
+ scenarios, so keep it fast and cheap
+
+ The fixed directory part.
+ The wildcard directory part.
+ The filename part.
+ The regular expression string.
+
+
+
+ Determine if the filespec is legal according to the following conditions:
+
+ (1) It is not legal for there to be a ".." after a wildcard.
+
+ (2) By definition, "**" must appear alone between directory slashes.If there is any remaining "**" then this is not
+ a valid filespec.
+
+ True if both parts meet all conditions for a legal filespec.
+
+
+
+ Append the regex equivalents for character sequences in the fixed directory part of a filespec:
+
+ (1) The leading \\ in UNC paths, so that the doubled slash isn't reduced in the last step
+
+ (2) Common filespec characters
+
+
+
+
+ Append the regex equivalents for character sequences in the wildcard directory part of a filespec:
+
+ (1) The leading **\ if existing
+
+ (2) Each occurrence of recursive wildcard \**\
+
+ (3) Common filespec characters
+
+
+
+
+ Append the regex equivalents for character sequences in the filename part of a filespec:
+
+ (1) Trailing dots in file names have to be treated specially.
+ We want:
+
+ *. to match foo
+
+ but 'foo' doesn't have a trailing '.' so we need to handle this while still being careful
+ not to match 'foo.txt' by modifying the generated regex for wildcard characters * and ?
+
+ (2) Common filespec characters
+
+ (3) Ignore the .* portion of any *.* sequence when no trailing dot exists
+
+
+
+
+ Append the regex equivalents for characters common to all filespec parts.
+
+
+
+
+ Given an index at a directory separator,
+ iteratively skip to the end of two sequences:
+
+ (1) \.\ -> \
+ This is an identity, so for example, these two are equivalent,
+
+ dir1\.\dir2 == dir1\dir2
+
+ (2) \\ -> \
+ Double directory separators are treated as a single directory separator,
+ so, for example, this is an identity:
+
+ f:\dir1\\dir2 == f:\dir1\dir2
+
+ The single exemption is for UNC path names, like this:
+
+ \\server\share != \server\share
+
+ This case is handled by isUncPath in
+ a prior step.
+
+
+ The last index of a directory sequence.
+
+
+
+ Given an index at a directory separator or start of a recursive operator,
+ iteratively skip to the end of three sequences:
+
+ (1), (2) Both sequences handled by IndexOfNextNonCollapsibleChar
+
+ (3) \**\**\ -> \**\
+ This is an identity, so for example, these two are equivalent,
+
+ dir1\**\**\ == dir1\**\
+
+ ]
+ If starting at a recursive operator, the last index of a recursive sequence.
+ Otherwise, the last index of a directory sequence.
+
+
+
+
+ Given a filespec, get the information needed for file matching.
+
+ The filespec.
+ Receives the regular expression.
+ Receives the flag that is true if recursion is required.
+ Receives the flag that is true if the filespec is legal.
+
+
+
+ Given a filespec, parse it and construct the regular expression string.
+
+ The filespec.
+ Receives the fixed directory part.
+ Receives the wildcard directory part.
+ Receives the filename part.
+ Receives the flag that is true if recursion is required.
+ Receives the flag that is true if the filespec is legal.
+ hook method to further change the parts
+
+
+
+ The results of a match between a filespec and a file name.
+
+
+
+
+ Default constructor.
+
+
+
+
+ A wildcard (* and ?) matching algorithm that tests whether the input path file name matches against the pattern.
+
+ The path whose file name is matched against the pattern.
+ The pattern.
+
+
+
+ A wildcard (* and ?) matching algorithm that tests whether the input string matches against the pattern.
+
+ String which is matched against the pattern.
+ Pattern against which string is matched.
+
+
+
+ A wildcard (* and ?) matching algorithm that tests whether the input string matches against the pattern.
+
+ String which is matched against the pattern.
+ Pattern against which string is matched.
+
+
+
+ Given a pattern (filespec) and a candidate filename (fileToMatch)
+ return matching information.
+
+ The filespec.
+ The candidate to match against.
+ The result class.
+
+
+
+ The maximum number of tasks that are allowed to run concurrently
+
+
+
+
+ The number of currently available tasks
+
+
+
+
+ The maximum number of tasks that Parallel.ForEach may use
+
+
+
+
+ Given a filespec, find the files that match.
+ Will never throw IO exceptions: if there is no match, returns the input verbatim.
+
+ The project directory.
+ Get files that match the given file spec.
+ Exclude files that match this file spec.
+ The search action, array of files, and Exclude file spec (if applicable).
+
+
+
+ Replace all slashes to the OS slash, collapse multiple slashes into one, trim trailing slashes
+
+ A string
+ The normalized string
+
+
+
+ Returns true if drive enumerating wildcard patterns are detected using the directory and wildcard parts.
+
+ Fixed directory string, portion of file spec info.
+ Wildcard string, portion of file spec info.
+
+
+
+ Returns true if given characters follow a drive pattern without the slash (ex: C:).
+
+ First char from directory part of file spec string.
+ Second char from directory part of file spec string.
+
+
+
+ Returns true if selected characters from the fixed directory and wildcard pattern make up the "{any number of slashes}**" pattern.
+
+ Starting index to begin detecting slashes in directory part of file spec string.
+ Length of directory part of file spec string.
+ Fixed directory string, portion of file spec info.
+ Wildcard string, portion of file spec info.
+
+
+
+ Returns true if the given character is a valid drive letter.
+
+
+ Copied from https://github.com/dotnet/corefx/blob/b8b81a66738bb10ef0790023598396861d92b2c4/src/Common/src/System/IO/PathInternal.Windows.cs#L53-L59
+
+
+
+
+ Skips slash characters in a string.
+
+ The working string
+ Offset in string to start the search in
+ First index that is not a slash. Returns the string's length if end of string is reached
+
+
+
+ Given a filespec, find the files that match.
+ Will never throw IO exceptions: if there is no match, returns the input verbatim.
+
+ The project directory.
+ Get files that match the given file spec.
+ Exclude files that match this file spec.
+ The search action, array of files, and Exclude file spec (if applicable).
+
+
+
+ Returns true if the last component of the given directory path (assumed to not have any trailing slashes)
+ matches the given pattern.
+
+ The path to test.
+ The pattern to test against.
+ True in case of a match (e.g. directoryPath = "dir/subdir" and pattern = "s*"), false otherwise.
+
+
+
+ Returns true if is * or *.*.
+
+ The filename pattern to check.
+
+
+
+ This class contains utility methods for file IO.
+ PERF\COVERAGE NOTE: Try to keep classes in 'shared' as granular as possible. All the methods in
+ each class get pulled into the resulting assembly.
+
+
+ This class contains utility methods for file IO.
+ It is in a separate file so that it can be selectively included into an assembly.
+
+
+ This class contains utility methods for file IO.
+
+
+ Partial class in order to reduce the amount of sharing into different assemblies
+
+
+
+
+ The directory where MSBuild stores cache information used during the build.
+
+
+
+
+ FOR UNIT TESTS ONLY
+ Clear out the static variable used for the cache directory so that tests that
+ modify it can validate their modifications.
+
+
+
+
+ Determines whether the file system is case sensitive.
+ Copied from https://github.com/dotnet/runtime/blob/73ba11f3015216b39cb866d9fb7d3d25e93489f2/src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs#L41-L59
+
+
+
+
+ Copied from https://github.com/dotnet/corefx/blob/056715ff70e14712419d82d51c8c50c54b9ea795/src/Common/src/System/IO/PathInternal.Windows.cs#L61
+ MSBuild should support the union of invalid path chars across the supported OSes, so builds can have the same behaviour crossplatform: https://github.com/dotnet/msbuild/issues/781#issuecomment-243942514
+
+
+
+
+ Copied from https://github.com/dotnet/corefx/blob/387cf98c410bdca8fd195b28cbe53af578698f94/src/System.Runtime.Extensions/src/System/IO/Path.Windows.cs#L18
+ MSBuild should support the union of invalid path chars across the supported OSes, so builds can have the same behaviour crossplatform: https://github.com/dotnet/msbuild/issues/781#issuecomment-243942514
+
+
+
+
+ Retrieves the MSBuild runtime cache directory
+
+
+
+
+ Get the hex hash string for the string
+
+
+
+
+ Get the hash for the assemblyPaths
+
+
+
+
+ Returns whether MSBuild can write to the given directory. Throws for PathTooLongExceptions
+ but not other exceptions.
+
+
+
+
+ Clears the MSBuild runtime cache
+
+
+
+
+ If the given path doesn't have a trailing slash then add one.
+ If the path is an empty string, does not modify it.
+
+ The path to check.
+ A path with a slash.
+
+
+
+ Ensures the path does not have a leading or trailing slash after removing the first 'start' characters.
+
+
+
+
+ Ensures the path does not have a leading slash after removing the first 'start' characters but does end in a slash.
+
+
+
+
+ Ensures the path does not have a trailing slash.
+
+
+
+
+ Ensures the path is enclosed within single quotes.
+
+ The path to check.
+ The path enclosed by quotes.
+
+
+
+ Ensures the path is enclosed within double quotes.
+
+ The path to check.
+ The path enclosed by quotes.
+
+
+
+ Ensures the path is enclosed within quotes.
+
+ The path to check.
+ Indicates if single or double quotes should be used
+ The path enclosed by quotes.
+
+
+
+ Indicates if the given file-spec ends with a slash.
+
+ The file spec.
+ true, if file-spec has trailing slash
+
+
+
+ Indicates if the given character is a slash.
+
+
+ true, if slash
+
+
+
+ Trims the string and removes any double quotes around it.
+
+
+
+
+ Get the directory name of a rooted full path
+
+
+
+
+
+
+ Gets the canonicalized full path of the provided path.
+ Guidance for use: call this on all paths accepted through public entry
+ points that need normalization. After that point, only verify the path
+ is rooted, using ErrorUtilities.VerifyThrowPathRooted.
+ ASSUMES INPUT IS ALREADY UNESCAPED.
+
+
+
+
+ If on Unix, convert backslashes to slashes for strings that resemble paths.
+ The heuristic is if something resembles paths (contains slashes) check if the
+ first segment exists and is a directory.
+ Use a native shared method to massage file path. If the file is adjusted,
+ that qualifies is as a path.
+
+ @baseDirectory is just passed to LooksLikeUnixFilePath, to help with the check
+
+
+
+
+ If on Unix, convert backslashes to slashes for strings that resemble paths.
+ This overload takes and returns ReadOnlyMemory of characters.
+
+
+
+
+ If on Unix, check if the string looks like a file path.
+ The heuristic is if something resembles paths (contains slashes) check if the
+ first segment exists and is a directory.
+
+ If @baseDirectory is not null, then look for the first segment exists under
+ that
+
+
+
+
+ Extracts the directory from the given file-spec.
+
+ The filespec.
+ directory path
+
+
+
+ Determines whether the given assembly file name has one of the listed extensions.
+
+ The name of the file
+ Array of extensions to consider.
+
+
+
+
+ Get the currently executing assembly path
+
+
+
+
+ Determines the full path for the given file-spec.
+ ASSUMES INPUT IS STILL ESCAPED
+
+ The file spec to get the full path of.
+
+ full path
+
+
+
+ A variation of Path.GetFullPath that will return the input value
+ instead of throwing any IO exception.
+ Useful to get a better path for an error message, without the risk of throwing
+ if the error message was itself caused by the path being invalid!
+
+
+
+
+ Compare if two paths, relative to the given currentDirectory are equal.
+ Does not throw IO exceptions. See
+
+
+
+
+
+
+
+
+
+ Normalizes a path for path comparison
+ Does not throw IO exceptions. See
+
+
+
+
+
+ A variation on File.Delete that will throw ExceptionHandling.NotExpectedException exceptions
+
+
+
+
+ A variation on Directory.Delete that will throw ExceptionHandling.NotExpectedException exceptions
+
+
+
+
+ Deletes a directory, ensuring that Directory.Delete does not get a path ending in a slash.
+
+
+ This is a workaround for https://github.com/dotnet/corefx/issues/3780, which clashed with a common
+ pattern in our tests.
+
+
+
+
+ Gets a file info object for the specified file path. If the file path
+ is invalid, or is a directory, or cannot be accessed, or does not exist,
+ it returns null rather than throwing or returning a FileInfo around a non-existent file.
+ This allows it to be called where File.Exists() (which never throws, and returns false
+ for directories) was called - but with the advantage that a FileInfo object is returned
+ that can be queried (e.g., for LastWriteTime) without hitting the disk again.
+
+
+ FileInfo around path if it is an existing /file/, else null
+
+
+
+ Returns if the directory exists
+
+ Full path to the directory in the filesystem
+ The file system
+
+
+
+
+ Returns if the directory exists
+
+ Full path to the file in the filesystem
+ The file system
+
+
+
+
+ If there is a directory or file at the specified path, returns true.
+ Otherwise, returns false.
+ Does not throw IO exceptions, to match Directory.Exists and File.Exists.
+ Unlike calling each of those in turn it only accesses the disk once, which is faster.
+
+
+
+
+ This method returns true if the specified filename is a solution file (.sln) or
+ solution filter file (.slnf); otherwise, it returns false.
+
+
+ Solution filters are included because they are a thin veneer over solutions, just
+ with a more limited set of projects to build, and should be treated the same way.
+
+
+
+
+ Returns true if the specified filename is a VC++ project file, otherwise returns false
+
+
+
+
+ Returns true if the specified filename is a metaproject file (.metaproj), otherwise false.
+
+
+
+
+ Given the absolute location of a file, and a disc location, returns relative file path to that disk location.
+ Throws UriFormatException.
+
+
+ The base path we want to be relative to. Must be absolute.
+ Should not include a filename as the last segment will be interpreted as a directory.
+
+
+ The path we need to make relative to basePath. The path can be either absolute path or a relative path in which case it is relative to the base path.
+ If the path cannot be made relative to the base path (for example, it is on another drive), it is returned verbatim.
+ If the basePath is an empty string, returns the path.
+
+ relative path (can be the full path)
+
+
+
+ Normalizes the path if and only if it is longer than max path,
+ or would be if rooted by the current directory.
+ This may make it shorter by removing ".."'s.
+
+
+
+
+ A variation of Path.IsRooted that not throw any IO exception.
+
+
+
+
+ Get the folder N levels above the given. Will stop and return current path when rooted.
+
+ Path to get the folder above.
+ Number of levels up to walk.
+ Full path to the folder N levels above the path.
+
+
+
+ Combine multiple paths. Should only be used when compiling against .NET 2.0.
+
+ Only use in .NET 2.0. Otherwise, use System.IO.Path.Combine(...)
+
+
+ Root path.
+ Paths to concatenate.
+ Combined path.
+
+
+
+ Replace all backward slashes to forward slashes
+
+
+
+
+ Ensure all slashes are the current platform's slash
+
+
+
+
+
+
+ Locate a file in either the directory specified or a location in the
+ directory structure above that directory.
+
+
+
+
+ Searches for a file based on the specified starting directory.
+
+ The file to search for.
+ An optional directory to start the search in. The default location is the directory
+ of the file containing the property function.
+ The filesystem
+ The full path of the file if it is found, otherwise an empty string.
+
+
+
+ Clears the file existence cache.
+
+
+
+
+ Generates a unique directory name in the temporary folder.
+ Caller must delete when finished.
+
+
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ File will NOT be created.
+ May throw IOException.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ File will NOT be created.
+ May throw IOException.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ If no extension is provided, uses ".tmp".
+ File is guaranteed to be unique.
+ Caller must delete it when finished.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Caller must delete it when finished.
+
+
+
+
+ Generates a unique temporary file name with a given extension in the temporary folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ Caller must delete it when finished.
+ May throw IOException.
+
+
+
+
+ Creates a file with unique temporary file name with a given extension in the specified folder.
+ File is guaranteed to be unique.
+ Extension may have an initial period.
+ If folder is null, the temporary folder will be used.
+ Caller must delete it when finished.
+ May throw IOException.
+
+
+
+
+ Encapsulates the definitions of the item-spec modifiers a.k.a. reserved item metadata.
+
+
+
+
+ Indicates if the given name is reserved for an item-spec modifier.
+
+
+
+
+ Indicates if the given name is reserved for one of the specific subset of itemspec
+ modifiers to do with the defining project of the item.
+
+
+
+
+ Indicates if the given name is reserved for a derivable item-spec modifier.
+ Derivable means it can be computed given a file name.
+
+ Name to check.
+ true, if name of a derivable modifier
+
+
+
+ Performs path manipulations on the given item-spec as directed.
+ Does not cache the result.
+
+
+
+
+ Performs path manipulations on the given item-spec as directed.
+
+ Supported modifiers:
+ %(FullPath) = full path of item
+ %(RootDir) = root directory of item
+ %(Filename) = item filename without extension
+ %(Extension) = item filename extension
+ %(RelativeDir) = item directory as given in item-spec
+ %(Directory) = full path of item directory relative to root
+ %(RecursiveDir) = portion of item path that matched a recursive wildcard
+ %(Identity) = item-spec as given
+ %(ModifiedTime) = last write time of item
+ %(CreatedTime) = creation time of item
+ %(AccessedTime) = last access time of item
+
+ NOTES:
+ 1) This method always returns an empty string for the %(RecursiveDir) modifier because it does not have enough
+ information to compute it -- only the BuildItem class can compute this modifier.
+ 2) All but the file time modifiers could be cached, but it's not worth the space. Only full path is cached, as the others are just string manipulations.
+
+
+ Methods of the Path class "normalize" slashes and periods. For example:
+ 1) successive slashes are combined into 1 slash
+ 2) trailing periods are discarded
+ 3) forward slashes are changed to back-slashes
+
+ As a result, we cannot rely on any file-spec that has passed through a Path method to remain the same. We will
+ therefore not bother preserving slashes and periods when file-specs are transformed.
+
+ Never returns null.
+
+ The root directory for relative item-specs. When called on the Engine thread, this is the project directory. When called as part of building a task, it is null, indicating that the current directory should be used.
+ The item-spec to modify.
+ The path to the project that defined this item (may be null).
+ The modifier to apply to the item-spec.
+ Full path if any was previously computed, to cache.
+ The modified item-spec (can be empty string, but will never be null).
+ Thrown when the item-spec is not a path.
+
+
+
+ Indicates whether the given path is a UNC or drive pattern root directory.
+ Note: This function mimics the behavior of checking if Path.GetDirectoryName(path) == null.
+
+
+
+
+
+
+ Temporary check for something like http://foo which will end up like c:\foo\bar\http://foo
+ We should either have no colon, or exactly one colon.
+ UNDONE: This is a minimal safe change for Dev10. The correct fix should be to make GetFullPath/NormalizePath throw for this.
+
+
+
+
+ This class contains utility methods for file IO.
+ Separate from FileUtilities because some assemblies may only need the patterns.
+ PERF\COVERAGE NOTE: Try to keep classes in 'shared' as granular as possible. All the methods in
+ each class get pulled into the resulting assembly.
+
+
+
+
+ Indicates whether the specified string follows the pattern drive pattern (for example "C:", "D:").
+
+ Input to check for drive pattern.
+ true if follows the drive pattern, false otherwise.
+
+
+
+ Indicates whether the specified string follows the pattern drive pattern (for example "C:/" or "C:\").
+
+ Input to check for drive pattern with slash.
+ true if follows the drive pattern with slash, false otherwise.
+
+
+
+ Indicates whether the specified string starts with the drive pattern (for example "C:").
+
+ Input to check for drive pattern.
+ true if starts with drive pattern, false otherwise.
+
+
+
+ Indicates whether the specified string starts with the drive pattern (for example "C:/" or "C:\").
+
+ Input to check for drive pattern.
+ true if starts with drive pattern with slash, false otherwise.
+
+
+
+ Indicates whether the specified file-spec comprises exactly "\\server\share" (with no trailing characters).
+
+ Input to check for UNC pattern.
+ true if comprises UNC pattern.
+
+
+
+ Indicates whether the specified file-spec begins with "\\server\share".
+
+ Input to check for UNC pattern.
+ true if starts with UNC pattern.
+
+
+
+ Indicates whether the file-spec begins with a UNC pattern and how long the match is.
+
+ Input to check for UNC pattern.
+ length of the match, -1 if no match.
+
+
+
+ Indicates whether or not the file-spec meets the minimum requirements of a UNC pattern.
+
+ Input to check for UNC pattern minimum requirements.
+ true if the UNC pattern is a minimum length of 5 and the first two characters are be a slash, false otherwise.
+
+
+
+ Used to specify the targeted bitness of the .NET Framework for some methods of FrameworkLocationHelper
+
+
+
+
+ Indicates the .NET Framework that is currently being run under.
+
+
+
+
+ Indicates the 32-bit .NET Framework
+
+
+
+
+ Indicates the 64-bit .NET Framework
+
+
+
+
+ FrameworkLocationHelper provides utility methods for locating .NET Framework and .NET Framework SDK directories and files
+
+
+
+
+ Path to the ToolsVersion definitions in the registry
+
+
+
+
+ By default when a root path is not specified we would like to use the program files directory \ reference assemblies\framework as the root location
+ to generate the reference assembly paths from.
+
+
+
+
+ List the supported .net versions.
+
+
+
+
+ List the supported visual studio versions.
+
+
+ The items must be ordered by the version, because some methods depend on that fact to find the previous visual studio version.
+
+
+
+
+ Define explicit fallback rules for the request to get path of .net framework sdk tools folder.
+ The default rule is fallback to previous VS. However, there are some special cases that need
+ explicit rules, i.e. v4.5.1 on VS12 fallbacks to v4.5 on VS12.
+
+
+ The rules are maintained in a 2-dimensions array. Each row defines a rule. The first column
+ defines the trigger condition. The second column defines the fallback .net and VS versions.
+
+
+
+
+ Because there is no longer a strong 1:1 mapping between FX versions and SDK
+ versions, if we're unable to locate the desired SDK version, we will try to
+ use whichever SDK version is installed by looking at the key pointing to the
+ "latest" version.
+
+ This isn't ideal, but it will allow our tasks to function on any of several
+ related SDKs even if they don't have exactly the same versions.
+
+ NOTE: This returns the path to the root of the fallback SDK
+
+
+
+
+ Because there is no longer a strong 1:1 mapping between FX versions and SDK
+ versions, if we're unable to locate the desired SDK version, we will try to
+ use whichever SDK version is installed by looking at the key pointing to the
+ "latest" version.
+
+ This isn't ideal, but it will allow our tasks to function on any of several
+ related SDKs even if they don't have exactly the same versions.
+
+ NOTE: This explicitly returns the path to the 3.5 tools (bin) under the fallback
+ SDK, to match the data we're pulling from the registry now.
+
+
+
+
+ Because there is no longer a strong 1:1 mapping between FX versions and SDK
+ versions, if we're unable to locate the desired SDK version, we will try to
+ use whichever SDK version is installed by looking at the key pointing to the
+ "latest" version.
+
+ This isn't ideal, but it will allow our tasks to function on any of several
+ related SDKs even if they don't have exactly the same versions.
+
+ NOTE: This explicitly returns the path to the 4.X tools (bin\NetFX 4.0 Tools)
+ under the fallback SDK, to match the data we're pulling from the registry now.
+
+
+
+
+ Check the registry key and value to see if the .net Framework is installed on the machine.
+
+ Registry path to look for the value
+ Key to retrieve the value from
+ True if the registry key is 1 false if it is not there. This method also return true if the complus enviornment variables are set.
+
+
+
+ Heuristic that first considers the current runtime path and then searches the base of that path for the given
+ frameworks version.
+
+ The path to the runtime that is currently executing.
+ Should be something like 'v1.2' that indicates the runtime version we want.
+ Function that checks if directory exists.
+ Delegate to method that can return filesystem entries.
+ .NET framework architecture
+ Will return 'null' if there is no target frameworks on this machine.
+
+
+
+ Determine the 32 bit program files directory, this is used for finding where the reference assemblies live.
+
+
+
+
+ Determine the 64-bit program files directory, used as the basis for MSBuildExtensionsPath64.
+ Returns null if we're not on a 64-bit machine
+
+
+
+
+ Generate the path to the program files reference assembly location by taking in the program files special folder and then
+ using that path to generate the path to the reference assemblies location.
+
+
+
+
+ Given a ToolsVersion, find the path to the build tools folder for that ToolsVersion.
+
+ The ToolsVersion to look up
+ Target build tools architecture.
+ The path to the build tools folder for that ToolsVersion, if it exists, or
+ null otherwise
+
+
+
+ Take the parts of the Target framework moniker and formulate the reference assembly path based on the following pattern:
+ For a framework and version:
+ $(TargetFrameworkRootPath)\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)
+ For a subtype:
+ $(TargetFrameworkRootPath)\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\SubType\$(TargetFrameworkSubType)
+ e.g.NET Framework v4.0 would locate its reference assemblies in:
+ \Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
+ e.g.Silverlight v2.0 would locate its reference assemblies in:
+ \Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v2.0
+ e.g.NET Compact Framework v3.5, subtype PocketPC would locate its reference assemblies in:
+ \Program Files\Reference Assemblies\Microsoft\Framework\.NETCompactFramework\v3.5\SubType\PocketPC
+
+ The path to the reference assembly location
+
+
+
+ Given a path, subtracts the requested number of directories and returns the result.
+
+
+ Internal only so that I can have the unit tests use it too, instead of duplicating the same code
+
+
+
+
+ Look up the path to the build tools directory for the requested ToolsVersion in the .exe.config file of this executable
+
+
+
+
+ Look up the path to the build tools directory in the registry for the requested ToolsVersion and requested architecture
+
+
+
+
+ Will return the path to the dot net framework reference assemblies if they exist under the program files\reference assembies\microsoft\framework directory
+ or null if the directory does not exist.
+
+
+
+
+ Look for the given registry value under the given key.
+
+
+
+
+ Helper method to create an instance of for .net v4.x,
+ because most of attributes are the same for v4.x versions.
+
+ .net framework version.
+ Version of Visual Studio
+
+
+
+
+ The key in registry to indicate the corresponding .net framework in this visual studio.
+ i.e. 'v8.0A' for VS11.
+
+
+
+
+ The version of this visual studio.
+
+
+
+
+ The list of supported .net framework versions in this visual studio.
+
+
+
+
+ The key in registry to indicate the corresponding windows sdk, i.e. "v8.0" for VS11.
+
+
+
+
+ The name in registry to indicate the sdk installation folder path, i.e. "InstallationFolder" for windows v8.0.
+
+
+
+
+ The key in the registry to indicate the corresponding .net framework in this visual studio.
+ i.e. 'v8.0A' for VS11.
+
+
+
+
+ The registry key of this .net framework, i.e. "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" for .net v4.5.
+
+
+
+
+ The name in registry to indicate that this .net framework is installed, i.e. "Install" for .net v4.5.
+
+
+
+
+ The key in registry to indicate the sdk tools folder, i.e. "WinSDK-NetFx40Tools-x86" for .net v4.5.
+
+
+
+
+ The version of visual studio that shipped with this .net framework.
+
+
+
+
+ Does this .net framework include MSBuild?
+
+
+
+
+ Cached paths of .net framework on different architecture.
+
+
+
+
+ Cached paths of .net framework sdk tools folder path on different visual studio version.
+
+
+
+
+ Cached path of the corresponding windows sdk.
+
+
+
+
+ Cached path of .net framework reference assemblies.
+
+
+
+
+ The version of this .net framework.
+
+
+
+
+ The name in registry to indicate the sdk installation folder path, i.e. "InstallationFolder" for .net v4.5.
+
+
+
+
+ Folder prefix, i.e. v4.0 for .net v4.5.
+
+
+
+
+ Get the FrameworkName for this version of the .NET Framework.
+
+
+
+
+ Gets the full registry key of this .net framework Sdk for the given visual studio version.
+ i.e. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86" for .net v4.5 on VS11.
+
+
+
+
+ Gets the full path of .net framework for the given architecture.
+
+
+
+
+ Gets the full path of .net framework sdk tools for the given visual studio version.
+ i.e. "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\" for .net v4.5 on VS11.
+
+
+
+
+ Gets the full path of .net framework sdk.
+ i.e. "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\" for .net v4.5 on VS11.
+
+
+
+
+ Gets the full path of reference assemblies folder.
+ i.e. "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\" for .net v4.5.
+
+
+
+
+ Gets the full path of the corresponding windows sdk shipped with this .net framework.
+ i.e. "C:\Program Files (x86)\Windows Kits\8.0\" for v8.0 (shipped with .net v4.5 and VS11).
+
+
+
+
+ Specialized implementation for legacy .net framework v1.1 and v2.0.
+
+
+
+
+ Gets the full registry key of this .net framework Sdk for the given visual studio version.
+ i.e. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework" for v1.1 and v2.0.
+
+
+
+
+ Gets the full path of .net framework sdk tools for the given visual studio version.
+
+
+
+
+ Gets the full path of .net framework sdk, which is the full path of .net framework sdk tools for v1.1 and v2.0.
+
+
+
+
+ Gets the full path of reference assemblies folder, which is the full path of .net framework for v1.1 and v2.0.
+
+
+
+
+ Specialized implementation for legacy .net framework v3.0 and v3.5.
+
+
+
+
+ Gets the full path of .net framework sdk.
+ i.e. "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\" for .net v3.5 on VS11.
+
+
+
+
+ Gets the full path of reference assemblies folder.
+ i.e. "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\" for v3.5.
+
+
+
+
+ Represents the location information for error reporting purposes. This is normally used to
+ associate a run-time error with the original XML.
+ This is not used for arbitrary errors from tasks, which store location in a BuildXXXXEventArgs.
+ All implementations should be IMMUTABLE.
+ This is not public because the current implementation only provides correct data for unedited projects.
+ DO NOT make it public without considering a solution to this problem.
+
+
+
+
+ The file from which this particular element originated. It may
+ differ from the ProjectFile if, for instance, it was part of
+ an import or originated in a targets file.
+ Should always have a value.
+ If not known, returns empty string.
+
+
+
+
+ The line number where this element exists in its file.
+ The first line is numbered 1.
+ Zero indicates "unknown location".
+
+
+
+
+ The column number where this element exists in its file.
+ The first column is numbered 1.
+ Zero indicates "unknown location".
+
+
+
+
+ The location in a form suitable for replacement
+ into a message.
+
+
+
+
+ This class packages information about a type loaded from an assembly: for example,
+ the GenerateResource task class type or the ConsoleLogger logger class type.
+
+
+
+
+ Creates an instance of this class for the given type.
+
+ The Type to be loaded
+ Information used to load the assembly
+ The assembly which has been loaded, if any
+ Whether this type was loaded via MetadataLoadContext
+ type of an ITaskItem
+
+
+
+ Gets whether there's a LoadInSeparateAppDomain attribute on this type.
+
+
+
+
+ Gets whether there's a STAThread attribute on the Execute method of this type.
+
+
+
+
+ Gets whether this type implements MarshalByRefObject.
+
+
+
+
+ Determines if the task has a hardcoded requirement for STA thread usage.
+
+
+
+
+ Gets the type that was loaded from an assembly.
+
+ The loaded type.
+
+
+
+ If we loaded an assembly for this type.
+ We use this information to help created AppDomains to resolve types that it could not load successfully
+
+
+
+
+ Assembly-qualified names for properties. Only has a value if this type was loaded using MetadataLoadContext.
+
+
+
+
+ Gets the assembly the type was loaded from.
+
+ The assembly info for the loaded type.
+
+
+
+ Methods that are invoked on FileTracker.dll in order to handle inproc tracking
+
+
+ We want to P/Invoke to the FileTracker methods, but FileTracker.dll is not guaranteed to be on PATH (since it's
+ in the MSBuild directory), and there is no DefaultDllImportSearchPath that explicitly points to us. Thus, we
+ are sneaking around P/Invoke by manually acquiring the method pointers and calling them ourselves. The vast
+ majority of this code was lifted from ndp\fx\src\CLRCompression\ZLibNative.cs, which does the same thing for
+ that assembly.
+
+
+
+
+ Loads FileTracker.dll into a handle that we can use subsequently to grab the exported methods we're interested in.
+
+
+
+
+ Generic code to grab the function pointer for a function exported by FileTracker.dll, given
+ that function's name, and transform that function pointer into a callable delegate.
+
+
+
+
+ Actually generate all of the delegates that will be called by our public (or rather, internal) surface area methods.
+
+
+
+
+ Static constructor -- generates the delegates for all of the export methods from
+ FileTracker.dll that we care about.
+
+
+
+
+ This class contains methods that are useful for error checking and
+ validation of project files.
+
+
+ FUTURE: This class could except an optional inner exception to put in the
+ InvalidProjectFileException, which could make debugging a host easier in some circumstances.
+
+
+
+
+ This method is used to flag errors in the project file being processed.
+ Do NOT use this method in place of ErrorUtilities.VerifyThrow(), because
+ ErrorUtilities.VerifyThrow() is used to flag internal/programming errors.
+
+ The condition to check.
+ The of the element.
+ The resource string for the error message.
+
+
+
+ Overload for one string format argument.
+
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+ Overload for one string format argument.
+
+ The condition to check.
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+ Overload for two string format arguments.
+
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+
+ Overload for three string format arguments.
+
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+
+
+ Overload for four string format arguments.
+
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+
+
+
+ Overload for if there are more than four string format arguments.
+
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+ Overload for two string format arguments.
+
+ The condition to check.
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+
+ Overload for three string format arguments.
+
+ The condition to check.
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+
+
+ Overload for four string format arguments.
+
+ The condition to check.
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+
+
+
+ This method is used to flag errors in the project file being processed.
+ Do NOT use this method in place of ErrorUtilities.VerifyThrow(), because
+ ErrorUtilities.VerifyThrow() is used to flag internal/programming errors.
+
+ The condition to check.
+ The resource string for the
+ error sub-category (can be null).
+ The of the element.
+ The resource string for the error message.
+
+
+
+ Overload for one string format argument.
+
+ The condition to check.
+ The resource string for the
+ error sub-category (can be null).
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+ Overload for two string format arguments.
+
+ The condition to check.
+ The resource string for the
+ error sub-category (can be null).
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+
+ Overload for three string format arguments.
+
+ The condition to check.
+ The resource string for the
+ error sub-category (can be null).
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+
+
+ Overload for four string format arguments.
+
+ The condition to check.
+ The resource string for the
+ error sub-category (can be null).
+ The of the element.
+ The resource string for the error message.
+
+
+
+
+
+
+
+ Throws an InvalidProjectFileException using the given data.
+
+ PERF WARNING: calling a method that takes a variable number of arguments
+ is expensive, because memory is allocated for the array of arguments -- do
+ not call this method repeatedly in performance-critical scenarios
+
+
+ The resource string for the
+ error sub-category (can be null).
+ The of the element.
+ The resource string for the error message.
+ Extra arguments for formatting the error message.
+
+
+
+ This class contains methods that are useful for error checking and validation of project files.
+
+
+
+
+ This method is used to flag errors in the project file being processed. Do NOT use this method in place of
+ ErrorUtilities.VerifyThrow(), because ErrorUtilities.VerifyThrow() is used to flag internal/programming errors.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ The invalid project file.
+ The resource string for the error message.
+ Extra arguments for formatting the error message.
+
+
+
+ This method is used to flag errors in the project file being processed. Do NOT use this method in place of
+ ErrorUtilities.VerifyThrow(), because ErrorUtilities.VerifyThrow() is used to flag internal/programming errors.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ The invalid project file.
+ Any inner exception. May be null.
+ The resource string for the error message.
+ Extra arguments for formatting the error message.
+
+
+
+ This method is used to flag errors in the project file being processed. Do NOT use this method in place of
+ ErrorUtilities.VerifyThrow(), because ErrorUtilities.VerifyThrow() is used to flag internal/programming errors.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ The condition to check.
+ The invalid project file.
+ The resource string for the error message.
+ Extra arguments for formatting the error message.
+
+
+
+ This method is used to flag errors in the project file being processed. Do NOT use this method in place of
+ ErrorUtilities.VerifyThrow(), because ErrorUtilities.VerifyThrow() is used to flag internal/programming errors.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ The resource string for the error sub-category (can be null).
+ The invalid project file.
+ The resource string for the error message.
+ Extra arguments for formatting the error message.
+
+
+
+ This method is used to flag errors in the project file being processed. Do NOT use this method in place of
+ ErrorUtilities.VerifyThrow(), because ErrorUtilities.VerifyThrow() is used to flag internal/programming errors.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ The condition to check.
+ The resource string for the error sub-category (can be null).
+ The invalid project file.
+ The resource string for the error message.
+ Extra arguments for formatting the error message.
+
+
+
+ This method is used to flag errors in the project file being processed. Do NOT use this method in place of
+ ErrorUtilities.VerifyThrow(), because ErrorUtilities.VerifyThrow() is used to flag internal/programming errors.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ The condition to check.
+ The resource string for the error sub-category (can be null).
+ The invalid project file.
+ The inner .
+ The resource string for the error message.
+ Extra arguments for formatting the error message.
+
+
+
+ This class is used to save MSBuild project files. It contains special handling for MSBuild notations that are not saved
+ correctly by the XML DOM's default save mechanism.
+
+
+
+
+ Creates an instance of this class using the specified TextWriter.
+
+
+
+
+
+ Creates an instance of this class using the specified file.
+
+
+ If null, defaults to UTF-8 and omits encoding attribute from processing instruction.
+
+
+
+ Initializes settings for the project to be saved.
+
+
+
+
+ Initializes settings for the project to be saved.
+
+
+ If null, XML declaration is not written.
+
+
+
+ Writes item vector transforms embedded in the given string without escaping '->' into "->".
+
+
+
+
+
+ Override method in order to omit the xml declaration tag in certain cases. The tag will be written if:
+ - The tag was present in the file/stream loaded.
+ - The Encoding is specified and not default (UTF8)
+
+
+
+
+ This class contains utility methods for dealing with resources.
+
+
+
+
+ Extracts the message code (if any) prefixed to the given string.
+ MSB\d\d\d\d):\s*(?.*)$"
+ Arbitrary codes match "^\s*(?[A-Za-z]+\d+):\s*(?.*)$"
+ ]]>
+ Thread safe.
+
+ Whether to match only MSBuild error codes, or any error code.
+ The string to parse.
+ [out] The message code, or null if there was no code.
+ The string without its message code prefix, if any.
+
+
+
+ Retrieves the MSBuild F1-help keyword for the given resource string. Help keywords are used to index help topics in
+ host IDEs.
+
+ Resource string to get the MSBuild F1-keyword for.
+ The MSBuild F1-help keyword string.
+
+
+
+ Retrieves the contents of the named resource string.
+
+ Resource string name.
+ Resource string contents.
+
+
+
+ Loads the specified string resource and formats it with the arguments passed in. If the string resource has an MSBuild
+ message code and help keyword associated with it, they too are returned.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ This method is thread-safe.
+ [out] The MSBuild message code, or null.
+ [out] The MSBuild F1-help keyword for the host IDE, or null.
+ Resource string to load.
+ Optional arguments for formatting the resource string.
+ The formatted resource string.
+
+
+
+ Looks up a string in the resources, and formats it with the arguments passed in. If the string resource has an MSBuild
+ message code and help keyword associated with it, they are discarded.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ This method is thread-safe.
+ Resource string to load.
+ Optional arguments for formatting the resource string.
+ The formatted resource string.
+
+
+
+ Formats the resource string with the given arguments.
+ Ignores error codes and keywords
+
+
+
+
+
+
+
+ Formats the given string using the variable arguments passed in.
+
+ PERF WARNING: calling a method that takes a variable number of arguments is expensive, because memory is allocated for
+ the array of arguments -- do not call this method repeatedly in performance-critical scenarios
+
+ Thread safe.
+
+ The string to format.
+ Optional arguments for formatting the given string.
+ The formatted string.
+
+
+
+ Verifies that a particular resource string actually exists in the string table. This will only be called in debug
+ builds. It helps catch situations where a dev calls VerifyThrowXXX with a new resource string, but forgets to add the
+ resource string to the string table, or misspells it!
+
+ This method is thread-safe.
+ Resource string to check.
+
+
+
+ This class is used to load types from their assemblies.
+
+
+
+
+ Cache to keep track of the assemblyLoadInfos based on a given type filter.
+
+
+
+
+ Cache to keep track of the assemblyLoadInfos based on a given type filter for assemblies which are to be loaded for reflectionOnlyLoads.
+
+
+
+
+ Type filter for this typeloader
+
+
+
+
+ Constructor.
+
+
+
+
+ Given two type names, looks for a partial match between them. A partial match is considered valid only if it occurs on
+ the right side (tail end) of the name strings, and at the start of a class or namespace name.
+
+
+ 1) Matches are case-insensitive.
+ 2) .NET conventions regarding namespaces and nested classes are respected, including escaping of reserved characters.
+
+
+ "Csc" and "csc" ==> exact match
+ "Microsoft.Build.Tasks.Csc" and "Microsoft.Build.Tasks.Csc" ==> exact match
+ "Microsoft.Build.Tasks.Csc" and "Csc" ==> partial match
+ "Microsoft.Build.Tasks.Csc" and "Tasks.Csc" ==> partial match
+ "MyTasks.ATask+NestedTask" and "NestedTask" ==> partial match
+ "MyTasks.ATask\\+NestedTask" and "NestedTask" ==> partial match
+ "MyTasks.CscTask" and "Csc" ==> no match
+ "MyTasks.MyCsc" and "Csc" ==> no match
+ "MyTasks.ATask\.Csc" and "Csc" ==> no match
+ "MyTasks.ATask\\\.Csc" and "Csc" ==> no match
+
+ true, if the type names match exactly or partially; false, if there is no match at all
+
+
+
+ Load an assembly given its AssemblyLoadInfo
+
+
+
+
+
+
+ Loads the specified type if it exists in the given assembly. If the type name is fully qualified, then a match (if
+ any) is unambiguous; otherwise, if there are multiple types with the same name in different namespaces, the first type
+ found will be returned.
+
+
+
+
+ Loads the specified type if it exists in the given assembly. If the type name is fully qualified, then a match (if
+ any) is unambiguous; otherwise, if there are multiple types with the same name in different namespaces, the first type
+ found will be returned.
+
+ The loaded type, or null if the type was not found.
+
+
+
+ Loads the specified type if it exists in the given assembly. If the type name is fully qualified, then a match (if
+ any) is unambiguous; otherwise, if there are multiple types with the same name in different namespaces, the first type
+ found will be returned.
+
+
+
+
+ Given a type filter and an asssemblyInfo object keep track of what types in a given assembly which match the type filter.
+ Also, use this information to determine if a given TypeName is in the assembly which is pointed to by the AssemblyLoadInfo object.
+
+ This type represents a combination of a type filter and an assemblyInfo object.
+
+
+
+
+ Lock to prevent two threads from using this object at the same time.
+ Since we fill up internal structures with what is in the assembly
+
+
+
+
+ Type filter to pick the correct types out of an assembly
+
+
+
+
+ Assembly load information so we can load an assembly
+
+
+
+
+ What is the type for the given type name, this may be null if the typeName does not map to a type.
+
+
+
+
+ List of public types in the assembly which match the type filter and their corresponding types
+
+
+
+
+ Have we scanned the public types for this assembly yet.
+
+
+
+
+ Assembly, if any, that we loaded for this type.
+ We use this information to set the LoadedType.LoadedAssembly so that this object can be used
+ to help created AppDomains to resolve those that it could not load successfully
+
+
+
+
+ Given a type filter, and an assembly to load the type information from determine if a given type name is in the assembly or not.
+
+
+
+
+ Determine if a given type name is in the assembly or not. Return null if the type is not in the assembly
+
+
+
+
+ Scan the assembly pointed to by the assemblyLoadInfo for public types. We will use these public types to do partial name matching on
+ to find tasks, loggers, and task factories.
+
+
+
+
+ Shared Visual Studio related constants
+
+
+
+
+ This is the version number of the most recent solution file format
+ we will read. It will be the version number used in solution files
+ by the latest version of Visual Studio.
+
+
+
+
+ This is the version number of the latest version of Visual Studio.
+
+
+ We use it for the version of the VC PIA we try to load and to find
+ Visual Studio registry hive that we use to find where vcbuild.exe might be.
+
+
+
+
+ Contains the names of the known attributes in the XML project file.
+
+
+
+
+ Returns true if and only if the specified attribute is one of the attributes that the engine specifically recognizes
+ on a task and treats in a special way.
+
+
+ true, if given attribute is a reserved task attribute
+
+
+
+ Checks if the specified attribute is a reserved task attribute with incorrect casing.
+
+
+ true, if the given attribute is reserved and badly cased
+
+
+
+ Indicates if the specified attribute cannot be used for batching targets.
+
+
+ true, if a target cannot batch on the given attribute
+
+
+
+ Returns true if the given string is a valid member of the MSBuildRuntimeValues set
+
+
+
+
+ Returns true if the given string is a valid member of the MSBuildArchitectureValues set
+
+
+
+
+ Compares two members of MSBuildRuntimeValues, returning true if they count as a match, and false otherwise.
+
+
+
+
+ Given two MSBuildRuntime values, returns the concrete result of merging the two. If the merge fails, the merged runtime
+ string is returned null, and the return value of the method is false. Otherwise, if the merge succeeds, the method returns
+ true with the merged runtime value. E.g.:
+ "CLR4" + "CLR2" = null (false)
+ "CLR2" + "don't care" = "CLR2" (true)
+ "current runtime" + "CLR4" = "CLR4" (true)
+ "current runtime" + "don't care" = "CLR4" (true)
+ If both specify "don't care", then defaults to the current runtime -- CLR4.
+ A null or empty string is interpreted as "don't care".
+
+
+
+
+ Compares two members of MSBuildArchitectureValues, returning true if they count as a match, and false otherwise.
+
+
+
+
+ Given an MSBuildRuntime value that may be non-explicit -- e.g. "CurrentRuntime" or "Any" --
+ return the specific MSBuildRuntime value that it would map to in this case. If it does not map
+ to any known runtime, just return it as is -- maybe someone else knows what to do with it; if
+ not, they'll certainly have more context on logging or throwing the error.
+
+
+
+
+ Given two MSBuildArchitecture values, returns the concrete result of merging the two. If the merge fails, the merged architecture
+ string is returned null, and the return value of the method is false. Otherwise, if the merge succeeds, the method returns
+ true with the merged architecture value. E.g.:
+ "x86" + "x64" = null (false)
+ "x86" + "don't care" = "x86" (true)
+ "current architecture" + "x86" = "x86" (true) on a 32-bit process, and null (false) on a 64-bit process
+ "current architecture" + "don't care" = "x86" (true) on a 32-bit process, and "x64" (true) on a 64-bit process
+ A null or empty string is interpreted as "don't care".
+ If both specify "don't care", then defaults to whatever the current process architecture is.
+
+
+
+
+ Returns the MSBuildArchitecture value corresponding to the current process' architecture.
+
+
+ Revisit if we ever run on something other than Intel.
+
+
+
+
+ Returns the MSBuildRuntime value corresponding to the current process' runtime.
+
+
+
+
+ Given an MSBuildArchitecture value that may be non-explicit -- e.g. "CurrentArchitecture" or "Any" --
+ return the specific MSBuildArchitecture value that it would map to in this case. If it does not map
+ to any known architecture, just return it as is -- maybe someone else knows what to do with it; if
+ not, they'll certainly have more context on logging or throwing the error.
+
+
+
+
+ Contains the names of the known elements in the XML project file.
+
+
+
+
+ This class contains utility methods for XML manipulation.
+
+
+
+
+ This method renames an XML element. Well, actually you can't directly
+ rename an XML element using the DOM, so what you have to do is create
+ a brand new XML element with the new name, and copy over all the attributes
+ and children. This method returns the new XML element object.
+ If the name is the same, does nothing and returns the element passed in.
+
+
+
+ Can be null if global namespace.
+ new/renamed element
+
+
+
+ Verifies that a name is valid for the name of an item, property, or piece of metadata.
+ If it isn't, throws an ArgumentException indicating the invalid character.
+
+
+ Note that our restrictions are more stringent than the XML Standard's restrictions.
+
+ ArgumentException
+ name to validate
+
+
+
+ Verifies that a name is valid for the name of an item, property, or piece of metadata.
+ If it isn't, throws an InvalidProjectException indicating the invalid character.
+
+
+ Note that our restrictions are more stringent than the XML Standard's restrictions.
+
+
+
+
+ Verifies that a name is valid for the name of an item, property, or piece of metadata.
+ If it isn't, throws an InvalidProjectException indicating the invalid character.
+
+
+ Note that our restrictions are more stringent than the XML Standard's restrictions.
+
+
+
+
+ Indicates if the given name is valid as the name of an item, property or metadatum.
+
+
+ Note that our restrictions are more stringent than those of the XML Standard.
+
+
+ true, if name is valid
+
+
+
+ Finds the location of the first invalid character, if any, in the name of an
+ item, property, or piece of metadata. Returns the location of the first invalid character, or -1 if there are none.
+ Valid names must match this pattern: [A-Za-z_][A-Za-z_0-9\-.]*
+ Note, this is a subset of all possible valid XmlElement names: we use a subset because we also
+ have to match this same set in our regular expressions, and allowing all valid XmlElement name
+ characters in a regular expression would be impractical.
+
+
+ Note that our restrictions are more stringent than the XML Standard's restrictions.
+ PERF: This method has to be as fast as possible, as it's called when any item, property, or piece
+ of metadata is constructed.
+
+
+
+
+ Defines methods to support the comparison of objects for
+ equality over constrained inputs.
+
+
+
+
+ Determines whether the specified objects are equal, factoring in the specified bounds when comparing .
+
+
+
+
+ Returns a hash code for the specified object factoring in the specified bounds.
+
+
+
+
+ A read-only wrapper over an empty collection.
+
+
+ Thus this is an omission from the BCL.
+
+ Type of element in the collection
+
+
+
+ Backing live collection
+
+
+
+
+ Private default constructor as this is a singleton
+
+
+
+
+ Get the instance
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Returns true.
+
+
+
+
+ Whether collection is synchronized
+
+
+
+
+ Sync root
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Get an enumerator over an empty collection
+
+
+
+
+ Get an enumerator over an empty collection
+
+
+
+
+ ICollection version of CopyTo
+
+
+
+
+ Interface allowing items and metadata and properties to go into keyed collections
+
+
+ This can be internal as it is a constraint only on internal collections.
+
+
+
+
+ Returns some value useful for a key in a dictionary
+
+
+
+
+ The extensions class for ConcurrentQueue<T>
+
+
+
+
+ The dequeue method.
+
+ The type contained within the queue
+
+
+
+ The extensions class for ConcurrentStack<T>
+
+
+
+
+ The peek method.
+
+ The type contained within the stack.
+
+
+
+ The pop method.
+
+ The type contained within the stack.
+
+
+
+ A simple string interner designed for IPC.
+
+
+ This interner works by providing a way to convert strings to integer IDs. When used as a form of compression,
+ clients will intern their strings and record the set of IDs returned, then transmit those IDs instead of the
+ original strings. The interner itself is also transmitted ahead of time, with the IDs, allowing
+ reconstruction of the original strings. This ensures each string is transmitted exactly once.
+
+
+
+
+ Index used for null strings.
+
+
+
+
+ Index used for empty strings.
+
+
+
+
+ The map used to intern strings for serialization. This map doesn't exist when the strings
+ are deserialized (it is not needed.)
+
+
+
+
+ The list of strings by ID.
+
+
+
+
+ Constructor to be used during serialization.
+
+
+
+
+ Constructor to be used during deserialization.
+
+
+ Intern cannot be used on this interner if it came from serialization, since we do
+ not reconstruct the interning dictionary.
+
+
+
+
+ Interns the specified string.
+
+ The string to intern.
+ The index representing the string.
+
+
+
+ Retrieves a string corresponding to the provided index.
+
+ The index.
+ The corresponding string.
+
+
+
+ The translator, for serialization.
+
+
+
+
+ Implementation notes:
+ This uses an array-based implementation similar to , using a buckets array
+ to map hash values to the Slots array. Items in the Slots array that hash to the same value
+ are chained together through the "next" indices.
+
+ The capacity is always prime; so during resizing, the capacity is chosen as the next prime
+ greater than double the last capacity.
+
+ The underlying data structures are lazily initialized. Because of the observation that,
+ in practice, hashtables tend to contain only a few elements, the initial capacity is
+ set very small (3 elements) unless the ctor with a collection is used.
+
+ The +/- 1 modifications in methods that add, check for containment, etc allow us to
+ distinguish a hash code of 0 from an uninitialized bucket. This saves us from having to
+ reset each bucket to -1 when resizing. See Contains, for example.
+
+ Set methods such as UnionWith, IntersectWith, ExceptWith, and SymmetricExceptWith modify
+ this set.
+
+ Some operations can perform faster if we can assume "other" contains unique elements
+ according to this equality comparer. The only times this is efficient to check is if
+ other is a hashset. Note that checking that it's a hashset alone doesn't suffice; we
+ also have to check that the hashset is using the same equality comparer. If other
+ has a different equality comparer, it will have unique elements according to its own
+ equality comparer, but not necessarily according to ours. Therefore, to go these
+ optimized routes we check that other is a hashset using the same equality comparer.
+
+ A HashSet with no elements has the properties of the empty set. (See IsSubset, etc. for
+ special empty set checks.)
+
+ A couple of methods have a special case if other is this (e.g. SymmetricExceptWith).
+ If we didn't have these checks, we could be iterating over the set and modifying at
+ the same time.
+
+
+
+
+
+ Implementation Notes:
+ Since resizes are relatively expensive (require rehashing), this attempts to minimize
+ the need to resize by setting the initial capacity based on size of collection.
+
+
+
+
+ Implementation Notes:
+ Since resizes are relatively expensive (require rehashing), this attempts to minimize
+ the need to resize by setting the initial capacity based on size of collection.
+
+
+
+
+ Add item to this hashset. This is the explicit implementation of the
+ interface. The other Add method returns bool indicating whether item was added.
+
+ item to add
+
+
+
+ Remove all items from this set. This clears the elements but not the underlying
+ buckets and slots array. Follow this call by TrimExcess to release these.
+
+
+
+
+ Checks if this hashset contains the item
+
+ item to check for containment
+ true if item contained; false if not
+
+
+
+ Gets the item if any with the given name
+
+ key to check for containment
+ true if item contained; false if not
+
+
+
+ Gets the item if any with the given name
+
+ key to check for containment
+ The position of the substring within .
+ The maximum number of characters in the to lookup.
+ true if item contained; false if not
+
+
+
+ Gets the item if any with the given name
+
+ item to check for containment
+ The position of the substring within .
+ The maximum number of characters in the to lookup.
+ true if item contained; false if not
+
+
+
+ Copy items in this hashset to array, starting at arrayIndex
+
+ array to add items to
+ index to start at
+
+
+
+ Remove entry that compares equal to T
+
+
+
+
+ Remove item from this hashset
+
+ item to remove
+ true if removed; false if not (i.e. if the item wasn't in the HashSet)
+
+
+
+ Number of elements in this hashset
+
+
+
+
+ Whether this is readonly
+
+
+
+
+ Permanently prevent changes to the set.
+
+
+
+
+ Add item to this HashSet.
+ *** MSBUILD NOTE: Always added - overwrite semantics
+
+
+
+
+ Take the union of this HashSet with other. Modifies this set.
+
+ Implementation note: GetSuggestedCapacity (to increase capacity in advance avoiding
+ multiple resizes ended up not being useful in practice; quickly gets to the
+ point where it's a wasteful check.
+
+ enumerable with items to add
+
+
+
+ Sets the capacity of this list to the size of the list (rounded up to nearest prime),
+ unless count is 0, in which case we release references.
+
+ This method can be used to minimize a list's memory overhead once it is known that no
+ new elements will be added to the list. To completely clear a list and release all
+ memory referenced by the list, execute the following statements:
+
+ list.Clear();
+ list.TrimExcess();
+
+
+
+
+ Initializes buckets and slots arrays. Uses suggested capacity by finding next prime
+ greater than or equal to capacity.
+
+
+
+
+
+ Expand to new capacity. New capacity is next prime greater than or equal to suggested
+ size. This is called when the underlying array is filled. This performs no
+ defragmentation, allowing faster execution; note that this is reasonable since
+ AddEvenIfPresent attempts to insert new elements in re-opened spots.
+
+
+
+
+ Adds value to HashSet if not contained already
+ Returns true if added and false if already present
+ ** MSBUILD: Modified so that it DOES add even if present. It will return false in that case, though.**
+
+ value to find
+
+
+
+
+ Equality comparer against another of this type.
+ Compares entries by reference - not merely by using the comparer on the key
+
+
+
+
+ Copies this to an array. Used for DebugView
+
+
+
+
+
+ Workaround Comparers that throw ArgumentNullException for GetHashCode(null).
+
+
+ hash code
+
+
+
+ ABOUT:
+ Helps with operations that rely on bit marking to indicate whether an item in the
+ collection should be added, removed, visited already, etc.
+
+ BitHelper doesn't allocate the array; you must pass in an array or ints allocated on the
+ stack or heap. ToIntArrayLength() tells you the int array size you must allocate.
+
+ USAGE:
+ Suppose you need to represent a bit array of length (i.e. logical bit array length)
+ BIT_ARRAY_LENGTH. Then this is the suggested way to instantiate BitHelper:
+ ***************************************************************************
+ int intArrayLength = BitHelper.ToIntArrayLength(BIT_ARRAY_LENGTH);
+ BitHelper bitHelper;
+ if (intArrayLength less than stack alloc threshold)
+ int* m_arrayPtr = stackalloc int[intArrayLength];
+ bitHelper = new BitHelper(m_arrayPtr, intArrayLength);
+ else
+ int[] m_arrayPtr = new int[intArrayLength];
+ bitHelper = new BitHelper(m_arrayPtr, intArrayLength);
+ ***************************************************************************
+
+ IMPORTANT:
+ The second ctor args, length, should be specified as the length of the int array, not
+ the logical bit array. Because length is used for bounds checking into the int array,
+ it's especially important to get this correct for the stackalloc version. See the code
+ samples above; this is the value gotten from ToIntArrayLength().
+
+ The length ctor argument is the only exception; for other methods -- MarkBit and
+ IsMarked -- pass in values as indices into the logical bit array, and it will be mapped
+ to the position within the array of ints.
+
+ FUTURE OPTIMIZATIONS:
+ A method such as FindFirstMarked/Unmarked Bit would be useful for callers that operate
+ on a bit array and then need to loop over it. In particular, if it avoided visiting
+ every bit, it would allow good perf improvements when the bit array is sparse.
+
+
+
+
+ Instantiates a BitHelper with a heap alloc'd array of ints
+
+ int array to hold bits
+ length of int array
+
+
+
+ Instantiates a BitHelper with a heap alloc'd array of ints
+
+ int array to hold bits
+ length of int array
+
+
+
+ Mark bit at specified position
+
+
+
+
+ Is bit at specified position marked?
+
+
+
+
+ How many ints must be allocated to represent n bits. Returns (n+31)/32, but
+ avoids overflow
+
+
+
+
+
+
+ Debug view for HashSet
+
+
+
+
+
+ Duplicated because internal to mscorlib
+
+
+
+
+ Gets the item with the given name.
+
+ key to check for containment.
+ The item (if contained).
+ Thrown if no item with the given name is present in the collection.
+
+
+
+ Gets the item if any with the given name.
+
+ key to check for containment.
+ The position of the substring within .
+ The maximum number of characters in the to lookup.
+ The item (if contained).
+ Thrown if no item with the given name is present in the collection.
+
+
+
+ Copies the contents of this HashSet into the provided array.
+
+ The array into which the contents of this HashSet will be copied.
+
+
+
+ Copies the contents of this HashSet into the provided array.
+
+ The array into which the contents of this HashSet will be copied.
+ The index within where the first item will be placed.
+ The number of items from HashSet to copy into .
+
+
+
+ Take the union of this HashSet with other. Modifies this set.
+
+ Implementation note: GetSuggestedCapacity (to increase capacity in advance avoiding
+ multiple resizes ended up not being useful in practice; quickly gets to the
+ point where it's a wasteful check.
+
+ enumerable with items to add
+
+
+
+ Sets the capacity of this list to the size of the list (rounded up to nearest prime),
+ unless count is 0, in which case we release references.
+
+ This method can be used to minimize a list's memory overhead once it is known that no
+ new elements will be added to the list. To completely clear a list and release all
+ memory referenced by the list, execute the following statements:
+
+ list.Clear();
+ list.TrimExcess();
+
+
+
+
+ Enumerable that uses a provided Converter delegate to
+ convert each item from a backing enumerator as it is returned.
+
+ Type of underlying enumerator
+ Type returned
+
+
+
+ Enumerable behind this one
+
+
+
+
+ Converter delegate used on each item in the backing enumerable as it is returned
+
+
+
+
+ Constructor
+
+
+
+
+ Gets the converting enumerator
+
+
+
+
+ IEnumerable version of GetEnumerator
+
+
+
+
+ Enumerable that uses a provided Converter delegate to
+ convert each item from a backing enumerator as it is returned.
+
+ Type of underlying enumerator
+ Type returned
+
+
+
+ Enumerator behind this one
+
+
+
+
+ Converter delegate used on each item in the backing enumerator as it is returned
+
+
+
+
+ Constructor
+
+
+
+
+ Get the current element, converted
+
+
+
+
+ Get the current element, converted
+
+
+
+
+ Move to the next element
+
+
+
+
+ Reset the enumerator
+
+
+
+
+ Dispose of the enumerator
+
+
+
+
+ A class which implements IEnumerable by creating a copy of the backing collection.
+
+
+ is thread safe for concurrent access.
+
+ The type contained in the backing collection.
+ The type of items being enumerated.
+
+
+
+ The backing collection.
+
+
+
+
+ The object used to synchronize access for copying.
+
+
+
+
+ The function to translate items in the backing collection to the resulting type.
+
+
+
+
+ Constructor.
+
+ The collection which serves as a source for enumeration.
+ The object used to synchronize access for copying.
+ function to translate items in the backing collection to the resulting type.
+
+
+
+ Returns an enumerator over the collection.
+
+ The enumerator.
+
+
+
+ Returns an numerator over the collection.
+
+ The enumerator.
+
+
+
+ A dictionary that has copy-on-write semantics.
+ KEYS AND VALUES MUST BE IMMUTABLE OR COPY-ON-WRITE FOR THIS TO WORK.
+
+ The value type.
+
+ Thread safety: for all users, this class is as thread safe as the underlying Dictionary implementation, that is,
+ safe for concurrent readers or one writer from EACH user. It achieves this by locking itself and cloning before
+ any write, if it is being shared - i.e., stopping sharing before any writes occur.
+
+
+ This class must be serializable as it is used for metadata passed to tasks, which may
+ be run in a separate appdomain.
+
+
+
+
+ Empty dictionary with a ,
+ used as the basis of new dictionaries with that comparer to avoid
+ allocating new comparers objects.
+
+
+
+
+ Empty dictionary with ,
+ used as the basis of new dictionaries with that comparer to avoid
+ allocating new comparers objects.
+
+
+
+
+ The backing dictionary.
+ Lazily created.
+
+
+
+
+ Constructor. Consider supplying a comparer instead.
+
+
+
+
+ Constructor taking a specified comparer for the keys
+
+
+
+
+ Serialization constructor, for crossing appdomain boundaries
+
+
+
+
+ Cloning constructor. Defers the actual clone.
+
+
+
+
+ Returns the collection of keys in the dictionary.
+
+
+
+
+ Returns the collection of values in the dictionary.
+
+
+
+
+ Returns the number of items in the collection.
+
+
+
+
+ Returns true if the collection is read-only.
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ Comparer used for keys
+
+
+
+
+ Accesses the value for the specified key.
+
+
+
+
+ IDictionary implementation
+
+
+
+
+ Adds a value to the dictionary.
+
+
+
+
+ Adds several value to the dictionary.
+
+
+
+
+ Returns true if the dictionary contains the specified key.
+
+
+
+
+ Removes the entry for the specified key from the dictionary.
+
+
+
+
+ Attempts to find the value for the specified key in the dictionary.
+
+
+
+
+ Adds an item to the collection.
+
+
+
+
+ Clears the collection.
+
+
+
+
+ Returns true ff the collection contains the specified item.
+
+
+
+
+ Copies all of the elements of the collection to the specified array.
+
+
+
+
+ Remove an item from the dictionary.
+
+
+
+
+ Implementation of generic IEnumerable.GetEnumerator()
+
+
+
+
+ Implementation of IEnumerable.GetEnumerator()
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ IDictionary implementation.
+
+
+
+
+ Clone, with the actual clone deferred
+
+
+
+
+ Returns true if these dictionaries have the same backing.
+
+
+
+
+ A dictionary of unordered property or metadata name/value pairs, with copy-on-write semantics.
+
+ The copy-on-write semantics are only possible if the contained type is immutable, which currently
+ means it can only be used for ProjectMetadataInstance's.
+ USE THIS DICTIONARY ONLY FOR IMMUTABLE TYPES. OTHERWISE USE PROPERTYDICTIONARY.
+
+
+
+ The value that this adds over IDictionary<string, T> is:
+ - supports copy on write
+ - enforces that key = T.Name
+ - default enumerator is over values
+ - (marginal) enforces the correct key comparer
+
+ Really a Dictionary<string, T> where the key (the name) is obtained from IKeyed.Key.
+ Is not observable, so if clients wish to observe modifications they must mediate them themselves and
+ either not expose this collection or expose it through a readonly wrapper.
+
+ This collection is safe for concurrent readers and a single writer.
+
+ Property or Metadata class type to store
+
+
+
+ Backing dictionary
+
+
+
+
+ Creates empty dictionary
+
+
+
+
+ Cloning constructor, with deferred cloning semantics
+
+
+
+
+ Accessor for the list of property names
+
+
+
+
+ Accessor for the list of properties
+
+
+
+
+ Whether the collection is read-only.
+
+
+
+
+ Returns the number of properties in the collection.
+
+
+
+
+ Get the property with the specified name, or null if none exists.
+ Sets the property with the specified name, overwriting it if already exists.
+
+
+ Unlike Dictionary<K,V>[K], the getter returns null instead of throwing if the key does not exist.
+ This better matches the semantics of property, which are considered to have a blank value if they
+ are not defined.
+
+
+
+
+ Returns true if a property with the specified name is present in the collection,
+ otherwise false.
+
+
+
+
+ Empties the collection
+
+
+
+
+ Gets an enumerator over all the properties in the collection
+ Enumeration is in undefined order
+
+
+
+
+ Get an enumerator over entries
+
+
+
+
+ Compares two property dictionaries for equivalence. They are equal if each contains the same properties with the
+ same values as the other, unequal otherwise.
+
+ The dictionary to which this should be compared
+ True if they are equivalent, false otherwise.
+
+
+
+ Adds a property
+
+
+
+
+ Returns true if the dictionary contains the key
+
+
+
+
+ Attempts to retrieve the a property.
+
+
+
+
+ Adds a property
+
+
+
+
+ Checks for a property in the collection
+
+
+
+
+ Not implemented
+
+
+
+
+ Removes a property from the collection
+
+
+
+
+ Get an enumerator over the entries.
+
+
+
+
+ Removes any property with the specified name.
+ Returns true if the property was in the collection, otherwise false.
+
+
+
+
+ Add the specified property to the collection.
+ Overwrites any property with the same name already in the collection.
+ To remove a property, use Remove(...) instead.
+
+
+
+
+ Adds the specified properties to this dictionary.
+
+ An enumerator over the properties to add.
+
+
+
+ Clone. As we're copy on write, this
+ should be cheap.
+
+
+
+
+ This is a custom string comparer that has three advantages over the regular
+ string comparer:
+ 1) It can generate hash codes and perform equivalence operations on parts of a string rather than a whole
+ 2) It uses "unsafe" pointers to maximize performance of those operations
+ 3) It takes advantage of limitations on MSBuild Property/Item names to cheaply do case insensitive comparison.
+
+
+
+
+ The processor architecture on which we are running, but default it will be x86
+
+
+
+
+ The default immutable comparer instance.
+
+
+
+
+ Performs the "Equals" operation on two MSBuild property, item or metadata names
+
+
+
+
+ Getting a case insensitive hash code for the msbuild property, item or metadata name
+
+
+
+
+ Tools for working with Hashtables.
+
+
+
+
+ Compares the given hashtables.
+
+ May be null
+ May be null
+
+ -1, if first hashtable is "less than" the second one
+ 0, if hashtables have identical keys and equivalent (case-insensitive) values
+ +1, if first hashtable is "greater than" the second one
+
+
+
+
+ Represents an that supports use of an
+ .
+
+ The type of the values in the dictionary. The key is assumed
+ to always be .
+
+
+
+ Get the value with the specified key or null if it is not present.
+ The key used for lookup is the substring of
+ starting at and ending at
+ (e.g. if the key is just the first character in , then
+ the value for should be 0 and the value for
+ should also be 0.)
+
+ A string that contains the key of the item to retrieve.
+ The start index of the substring of that contains the key.
+ The end index of the substring of that contains the key.
+ If it's found, the item whose key matches the calculated substring. Null otherwise.
+
+
+
+ Number of items in total, for debugging purposes.
+
+
+
+
+ Get the item types that have at least one item in this collection.
+
+
+ KeyCollection<K> is already a read only collection, so no protection
+ is necessary.
+
+
+
+
+ Returns the item list for a particular item type,
+ creating and adding a new item list if necessary.
+ Does not throw if there are no items of this type.
+ This is a read-only list.
+ If the result is not empty it is a live list.
+ Use AddItem or RemoveItem to modify items in this project.
+ Using the return value from this in a multithreaded situation is unsafe.
+
+
+
+
+ Empty the collection.
+
+
+
+
+ Returns an enumerable which copies the underlying data on read.
+
+
+
+
+ Enumerates item lists per each item type under the lock.
+
+
+ A delegate that accepts the item type string and a list of items of that type.
+ Will be called for each item type in the list.
+
+
+
+
+ Whether the provided item is in this table or not.
+
+
+
+
+ Add a new item to the collection, at the
+ end of the list of other items with its key.
+
+
+
+
+ Adds each new item to the collection, at the
+ end of the list of other items with the same key.
+
+
+
+
+ Removes an item, if it is in the collection.
+ Returns true if it was found, otherwise false.
+
+
+ If a list is emptied, removes the list from the enclosing collection
+ so it can be garbage collected.
+
+
+
+
+ Replaces an existing item with a new item. This is necessary to preserve the original ordering semantics of Lookup.GetItems
+ when items with metadata modifications are being returned. See Dev10 bug 480737.
+ If the item is not found, does nothing.
+
+ The item to be replaced.
+ The replacement item.
+
+
+
+ Add the set of items specified to this dictionary.
+
+ An enumerator over the items to remove.
+
+
+
+ Add the set of items specified, all sharing an item type, to this dictionary.
+
+
+ This is a little faster than ImportItems where all the items have the same item type.
+
+
+
+
+ Remove the set of items specified from this dictionary
+
+ An enumerator over the items to remove.
+
+
+
+ Special method used for batching buckets.
+ Adds an explicit marker indicating there are no items for the specified item type.
+ In the general case, this is redundant, but batching buckets use this to indicate that they are
+ batching over the item type, but their bucket does not contain items of that type.
+ See HasEmptyMarker.
+
+
+
+
+ Special method used for batching buckets.
+ Lookup can call this to see whether there was an explicit marker placed indicating that
+ there are no items of this type. See comment on AddEmptyMarker.
+
+
+
+
+ Collection of items that allows a list of all items of a specified type to be
+ retrieved in O(1), and specific items to be added, removed, or checked for in O(1).
+ All items of a particular type can also be removed in O(1).
+ Items are ordered with respect to all other items of their type.
+
+
+ Really a Dictionary<string, ICollection<T>> where the key (the item type) is obtained from IKeyed.Key
+ Is not observable, so if clients wish to observe modifications they must mediate them themselves and
+ either not expose this collection or expose it through a readonly wrapper.
+ At various places in this class locks are taken on the backing collection. The reason for this is to allow
+ this class to be asynchronously enumerated. This is accomplished by the CopyOnReadEnumerable which will
+ lock the backing collection when it does its deep cloning. This prevents asynchronous access from corrupting
+ the state of the enumeration until the collection has been fully copied.
+
+ Item class type to store
+
+
+
+ Dictionary of item lists used as a backing store.
+ An empty list should never be stored in here unless it is an empty marker.
+ See AddEmptyMarker.
+ This collection provides quick access to the ordered set of items of a particular type.
+
+
+
+
+ Dictionary of items in the collection, to speed up Contains,
+ Remove, and Replace. For those operations, we look up here,
+ then modify the other dictionary to match.
+
+
+
+
+ Constructor for an empty collection.
+
+
+
+
+ Constructor for an empty collection taking an initial capacity
+ for the number of distinct item types
+
+
+
+
+ Constructor for an collection holding items from a specified enumerable.
+
+
+
+
+ Number of items in total, for debugging purposes.
+
+
+
+
+ Get the item types that have at least one item in this collection
+
+
+ KeyCollection<K> is already a read only collection, so no protection
+ is necessary.
+
+
+
+
+ Returns the item list for a particular item type,
+ creating and adding a new item list if necessary.
+ Does not throw if there are no items of this type.
+ This is a read-only list.
+ If the result is not empty it is a live list.
+ Use AddItem or RemoveItem to modify items in this project.
+ Using the return value from this in a multithreaded situation is unsafe.
+
+
+
+
+ Empty the collection
+
+
+
+
+ Returns an enumerable which copies the underlying data on read.
+
+
+
+
+ Gets an enumerator over the items in the collection
+
+
+
+
+ Get an enumerator over entries
+
+
+
+
+ Enumerates item lists per each item type under the lock.
+
+
+ A delegate that accepts the item type string and a list of items of that type.
+ Will be called for each item type in the list.
+
+
+
+
+ Returns all of the items for the specified type.
+ If there are no items of this type, returns an empty list.
+ Using the return from this method in a multithreaded scenario is unsafe.
+
+ The item type to return
+ The list of matching items.
+
+
+
+ Whether the provided item is in this table or not.
+
+
+
+
+ Add a new item to the collection, at the
+ end of the list of other items with its key.
+
+
+
+
+ Removes an item, if it is in the collection.
+ Returns true if it was found, otherwise false.
+
+
+ If a list is emptied, removes the list from the enclosing collection
+ so it can be garbage collected.
+
+
+
+
+ Replaces an exsting item with a new item. This is necessary to preserve the original ordering semantics of Lookup.GetItems
+ when items with metadata modifications are being returned. See Dev10 bug 480737.
+ If the item is not found, does nothing.
+
+ The item to be replaced.
+ The replacement item.
+
+
+
+ Add the set of items specified to this dictionary
+
+ An enumerator over the items to remove.
+
+
+
+ Add the set of items specified, all sharing an item type, to this dictionary.
+
+
+ This is a little faster than ImportItems where all the items have the same item type.
+
+
+
+
+ Remove the set of items specified from this dictionary
+
+ An enumerator over the items to remove.
+
+
+
+ Special method used for batching buckets.
+ Adds an explicit marker indicating there are no items for the specified item type.
+ In the general case, this is redundant, but batching buckets use this to indicate that they are
+ batching over the item type, but their bucket does not contain items of that type.
+ See HasEmptyMarker.
+
+
+
+
+ Special method used for batching buckets.
+ Lookup can call this to see whether there was an explicit marker placed indicating that
+ there are no items of this type. See comment on AddEmptyMarker.
+
+
+
+
+ Custom enumerator that allows enumeration over all the items in the collection
+ as though they were in a single list.
+ All items of a type are returned consecutively in their correct order.
+ However the order in which item types are returned is not defined.
+
+
+
+
+ Enumerator over lists
+
+
+
+
+ Enumerator over items in the current list
+
+
+
+
+ Constructs an item enumerator over a list enumerator
+
+
+
+
+ Get the current item
+
+ Undefined if enumerator is before or after collection: we return null.
+
+
+
+ Implementation of IEnumerator.Current, which unlike IEnumerator>T<.Current throws
+ if there is no current object
+
+
+
+
+ Move to the next object if any,
+ otherwise returns false
+
+
+
+
+ Reset the enumerator
+
+
+
+
+ IDisposable implementation.
+
+
+
+
+ Get an item enumerator over the next list with items in it
+
+
+
+
+ Interface indicating a type is immutable, to constrain generic types.
+
+
+ This can be internal as it is a constraint only on internal collections.
+
+
+
+
+ A dictionary that can hold more than one distinct value with the same key.
+ All keys must have at least one value: null values are currently rejected.
+
+
+ Order of values for a key is not defined but is currently the order of add.
+ A variation could store the values in a HashSet, for different tradeoffs.
+
+ Type of key
+ Type of value
+
+
+
+ Backing dictionary
+
+
+
+
+ Number of values over all keys
+
+
+
+
+ Constructor taking a specified comparer for the keys
+
+
+
+
+ Number of keys
+
+
+
+
+ Number of values over all keys
+
+
+
+
+ return keys in the dictionary
+
+
+
+
+ Enumerator over values that have the specified key.
+
+
+
+
+ Add a single value under the specified key.
+ Value may not be null.
+
+
+
+
+ Removes an entry with the specified key and value.
+ Returns true if found, false otherwise.
+
+
+
+
+ Empty the collection
+
+
+
+
+ List capable of holding 0-n items.
+ Uses less memory than List for less than 2 items.
+
+ Type of the value
+
+
+
+ Entry - either a TT or a list of TT.
+
+
+
+
+ Constructor taking the initial object
+
+
+
+
+ Number of entries in this multivalue.
+
+
+
+
+ Enumerable over the values.
+
+
+
+
+ Enumerable over the values.
+
+
+
+
+ Add a value.
+ Does not verify the value is not already present.
+
+
+
+
+ Remove a value.
+ Returns true if the value existed, otherwise false.
+
+
+
+
+ Interface allowing values of things to be gotten.
+
+
+ This can be internal as it is a constraint only on internal collections.
+
+
+
+
+ Returns some value of a thing
+
+
+
+
+ A dictionary of unordered property or metadata name/value pairs.
+
+
+ The value that this adds over IDictionary<string, T> is:
+ - enforces that key = T.Name
+ - default enumerator is over values
+ - (marginal) enforces the correct key comparer
+ - potentially makes copy on write possible
+
+ Really a Dictionary<string, T> where the key (the name) is obtained from IKeyed.Key.
+ Is not observable, so if clients wish to observe modifications they must mediate them themselves and
+ either not expose this collection or expose it through a readonly wrapper.
+ At various places in this class locks are taken on the backing collection. The reason for this is to allow
+ this class to be asynchronously enumerated. This is accomplished by the CopyOnReadEnumerable which will
+ lock the backing collection when it does its deep cloning. This prevents asynchronous access from corrupting
+ the state of the enumeration until the collection has been fully copied.
+
+ Since we use the mutable ignore case comparer we need to make sure that we lock our self before we call the comparer since the comparer can call back
+ into this dictionary which could cause a deadlock if another thread is also accessing another method in the dictionary.
+
+ Property or Metadata class type to store
+
+
+
+ Backing dictionary
+
+
+
+
+ Creates empty dictionary
+
+
+
+
+ Creates empty dictionary, optionally specifying initial capacity
+
+
+
+
+ Create a new dictionary from an enumerator
+
+
+
+
+ Creates empty dictionary, specifying a comparer
+
+
+
+
+ Create a new dictionary from an enumerator
+
+
+
+
+ Initializes a new instance of the class.
+
+ The collection of properties to use.
+
+
+
+ Accessor for the list of property names
+
+
+
+
+ Accessor for the list of properties
+
+
+
+
+ Returns the number of properties in the collection
+
+
+
+
+ Whether the collection is read-only.
+
+
+
+
+ Returns the number of property in the collection.
+
+
+
+
+ Get the property with the specified name, or null if none exists.
+ Sets the property with the specified name, overwriting it if already exists.
+
+
+ Unlike Dictionary<K,V>[K], the getter returns null instead of throwing if the key does not exist.
+ This better matches the semantics of property, which are considered to have a blank value if they
+ are not defined.
+
+
+
+
+ Get the property with the specified name, or null if none exists.
+ Sets the property with the specified name, overwriting it if already exists.
+
+
+ Unlike Dictionary<K,V>[K], the getter returns null instead of throwing if the key does not exist.
+ This better matches the semantics of property, which are considered to have a blank value if they
+ are not defined.
+
+
+
+
+ Returns an enumerable which copies the underlying data on read.
+
+
+
+
+ Returns true if a property with the specified name is present in the collection,
+ otherwise false.
+
+
+
+
+ Empties the collection
+
+
+
+
+ Gets an enumerator over all the properties in the collection
+ Enumeration is in undefined order
+
+
+
+
+ Get an enumerator over entries
+
+
+
+
+ Compares two property dictionaries for equivalence. They are equal if each contains the same properties with the
+ same values as the other, unequal otherwise.
+
+ The dictionary to which this should be compared
+ True if they are equivalent, false otherwise.
+
+
+
+ Get the property with the specified name or null if it is not present
+
+
+
+
+ Get the property with the specified name or null if it is not present.
+ Name is the segment of the provided string with the provided start and end indexes.
+
+
+
+
+
+
+
+ Adds a property
+
+
+
+
+ Returns true if the dictionary contains the key
+
+
+
+
+ Removes a property
+
+
+
+
+ Attempts to retrieve the a property.
+
+
+
+
+ Adds a property
+
+
+
+
+ Clears the property collection
+
+
+
+
+ Checks for a property in the collection
+
+
+
+
+ Not implemented
+
+
+
+
+ Removes a property from the collection
+
+
+
+
+ Get an enumerator over the entries.
+
+
+
+
+ Removes any property with the specified name.
+ Returns true if the property was in the collection, otherwise false.
+
+
+
+
+ Add the specified property to the collection.
+ Overwrites any property with the same name already in the collection.
+ To remove a property, use Remove(...) instead.
+
+
+
+
+ Adds the specified properties to this dictionary.
+
+ An enumerator over the properties to add.
+
+
+
+ Removes the specified properties from this dictionary
+
+ An enumerator over the properties to remove.
+
+
+
+ Helper to convert into a read-only dictionary of string, string.
+ TODO: for performance, consider switching to returning IDictionary
+ and returning ArrayDictionary if lookup of results is not needed.
+
+
+
+
+ A read-only live wrapper over a collection.
+ It does not prevent modification of the values themselves.
+
+
+ There is a type with the same name in the BCL, but it is actually a ReadOnlyList and does not accept an ICollection>T<.
+ Thus this is an omission from the BCL.
+
+ Type of element in the collection
+
+
+
+ Backing live enumerable.
+ May be a collection.
+
+
+
+
+ Construct a read only wrapper around the current contents
+ of the IEnumerable, or around the backing collection if the
+ IEnumerable is in fact a collection.
+
+
+
+
+ Return the number of items in the backing collection
+
+
+
+
+ Returns true.
+
+
+
+
+ Whether collection is synchronized
+
+
+
+
+ Sync root
+
+
+
+
+ Get a backing ICollection.
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Pass through for underlying collection
+
+
+ NOTE: This does NOT cause a copy into a List, since the
+ backing enumerable suffices.
+
+
+
+
+ Pass through for underlying collection
+
+
+ NOTE: This does NOT cause a copy into a List, since the
+ backing enumerable suffices.
+
+
+
+
+ ICollection version of CopyTo
+
+
+
+
+ Implementation of a dictionary which acts as a read-only wrapper on another dictionary, but
+ converts values as they are accessed to another type.
+
+ The backing dictionary's key type.
+ The backing dictionary's value type.
+ The desired value type.
+
+
+
+ The backing dictionary.
+
+
+
+
+ The delegate used to convert values.
+
+
+
+
+ Constructor.
+
+
+
+
+ Returns the collection of keys in the dictionary.
+
+
+
+
+ Returns the collection of values in the dictionary.
+
+
+
+
+ Returns the number of items in the collection.
+
+
+
+
+ Returns true if the collection is read-only.
+
+
+
+
+ Accesses the value for the specified key.
+
+
+
+
+ Adds a value to the dictionary.
+
+
+
+
+ Returns true if the dictionary contains the specified key.
+
+
+
+
+ Removes the entry for the specified key from the dictionary.
+
+
+
+
+ Attempts to find the value for the specified key in the dictionary.
+
+
+
+
+ Adds an item to the collection.
+
+
+
+
+ Clears the collection.
+
+
+
+
+ Returns true ff the collection contains the specified item.
+
+
+
+
+ Copies all of the elements of the collection to the specified array.
+
+
+
+
+ Remove an item from the dictionary.
+
+
+
+
+ Implementation of generic IEnumerable.GetEnumerator()
+
+
+
+
+ Implementation of IEnumerable.GetEnumerator()
+
+
+
+
+ Delegate used by ConvertingEnumerable
+
+
+
+
+ Dictionary that does not prevent values from being garbage collected.
+
+ Type of key
+ Type of value, without the WeakReference wrapper.
+
+
+
+ The dictionary used internally to store the keys and values.
+
+
+
+
+ Improvised capacity. See comment in item setter.
+
+
+
+
+ Constructor for a collection using the default key comparer
+
+
+
+
+ Constructor taking a specified comparer for the keys
+
+
+
+
+ Count of entries.
+ Some entries may represent keys or values that have already been garbage collected.
+ To clean these out call .
+
+
+
+
+ Return keys
+
+
+
+
+ Obtains the value for a given key.
+
+
+ If we find the entry but its value's target is null, we take the opportunity
+ to remove the entry, as if the GC had done it.
+
+
+
+
+ Whether there is a key present with the specified key
+
+
+ As usual, don't just call Contained as the wrapped value may be null.
+
+
+
+
+ Attempts to get the value for the provided key.
+ Returns true if the key is found, otherwise false.
+
+
+ If we find the entry but its value's target is null, we take the opportunity
+ to remove the entry, as if the GC had done it.
+
+
+
+
+ Removes an entry with the specified key.
+ Returns true if found, false otherwise.
+
+
+
+
+ Remove any entries from the dictionary that represent keys
+ that have been garbage collected.
+
+ The number of entries removed.
+
+
+
+ Empty the collection
+
+
+
+
+ Lightweight, read-only IDictionary implementation using two arrays
+ and O(n) lookup.
+ Requires specifying capacity at construction and does not
+ support reallocation to increase capacity.
+
+ Type of keys
+ Type of values
+
+
+
+ A special singleton enumerable that enumerates a read-only empty dictionary
+
+ Key
+ Value
+
+
+
+ The single instance
+
+
+
+
+ The single instance
+
+
+
+
+ Private default constructor as this is a singleton
+
+
+
+
+ Get the instance
+
+
+
+
+ Empty returns zero
+
+
+
+
+ Returns true
+
+
+
+
+ Gets empty collection
+
+
+
+
+ Gets empty collection
+
+
+
+
+ Is it fixed size
+
+
+
+
+ Not synchronized
+
+
+
+
+ No sync root
+
+
+
+
+ Keys
+
+
+
+
+ Values
+
+
+
+
+ Keys
+
+
+
+
+ Values
+
+
+
+
+ Indexer
+
+
+
+
+ Get returns null as read-only
+ Set is prohibited and throws.
+
+
+
+
+ Pass through for underlying collection
+
+
+
+
+ Empty returns false
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Empty returns false
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Empty returns false
+
+
+
+
+ Empty does nothing
+
+
+
+
+ Prohibited on read only collection: throws
+
+
+
+
+ Get empty enumerator
+
+
+
+
+ Get empty enumerator
+
+
+
+
+ Add
+
+
+
+
+ Contains
+
+
+
+
+ Enumerator
+
+
+
+
+ Remove
+
+
+
+
+ CopyTo
+
+
+
+
+ Given a string of semi-colon delimited name=value pairs, this method parses it and creates
+ a hash table containing the property names as keys and the property values as values.
+
+ true on success, false on failure.
+
+
+
+ Given a string of semi-colon delimited name=value pairs, this method parses it and creates
+ a hash table containing the property names as keys and the property values as values.
+ This method escapes any special characters found in the property values, in case they
+ are going to be passed to a method (such as that expects the appropriate escaping to have happened
+ already.
+
+ true on success, false on failure.
+
+
+
+ A very simple class that holds two strings, a property name and property value.
+
+
+
+
+ Property name
+
+
+
+
+ Property value fragments. Join with semicolon to get the final value.
+
+
+
+
+ TaskHostConfiguration contains information needed for the task host to
+ configure itself for to execute a particular task.
+
+
+
+
+ The node id (of the parent node, to make the logging work out)
+
+
+
+
+ The startup directory
+
+
+
+
+ The process environment.
+
+
+
+
+ The culture
+
+
+
+
+ The UI culture.
+
+
+
+
+ The AppDomainSetup that we may want to use on AppDomainIsolated tasks.
+
+
+
+
+ Line number where the instance of this task is defined.
+
+
+
+
+ Column number where the instance of this task is defined.
+
+
+
+
+ Project file where the instance of this task is defined.
+
+
+
+
+ ContinueOnError flag for this particular task.
+
+
+
+
+ Name of the task to be executed on the task host.
+
+
+
+
+ Location of the assembly containing the task to be executed.
+
+
+
+
+ Whether task inputs are logged.
+
+
+
+
+ The set of parameters to apply to the task prior to execution.
+
+
+
+
+ Constructor
+
+ The ID of the node being configured.
+ The startup directory for the task being executed.
+ The set of environment variables to apply to the task execution process.
+ The culture of the thread that will execute the task.
+ The UI culture of the thread that will execute the task.
+ The AppDomainSetup that may be used to pass information to an AppDomainIsolated task.
+ The line number of the location from which this task was invoked.
+ The column number of the location from which this task was invoked.
+ The project file from which this task was invoked.
+ Flag to continue with the build after a the task failed
+ Name of the task.
+ Location of the assembly the task is to be loaded from.
+ Whether task inputs are logged.
+ Parameters to apply to the task.
+ global properties for the current project.
+ Warning codes to be treated as errors for the current project.
+ Warning codes not to be treated as errors for the current project.
+ Warning codes to be treated as messages for the current project.
+
+
+
+ Constructor for deserialization.
+
+
+
+
+ The node id
+
+
+
+
+ The startup directory
+
+
+
+
+ The process environment.
+
+
+
+
+ The culture
+
+
+
+
+ The UI culture.
+
+
+
+
+ The AppDomain configuration bytes that we may want to use to initialize
+ AppDomainIsolated tasks.
+
+
+
+
+ Line number where the instance of this task is defined.
+
+
+
+
+ Column number where the instance of this task is defined.
+
+
+
+
+ ContinueOnError flag for this particular task
+
+
+
+
+ Project file where the instance of this task is defined.
+
+
+
+
+ Name of the task to execute.
+
+
+
+
+ Path to the assembly to load the task from.
+
+
+
+
+ Returns if the build is configured to log all task inputs.
+
+
+
+
+ Parameters to set on the instantiated task prior to execution.
+
+
+
+
+ Gets the global properties for the current project.
+
+
+
+
+ The NodePacketType of this NodePacket
+
+
+
+
+ Translates the packet to/from binary form.
+
+ The translator to use.
+
+
+
+ Factory for deserialization.
+
+
+
+
+ TaskHostTaskCancelled informs the task host that the task it is
+ currently executing has been canceled.
+
+
+
+
+ Constructor
+
+
+
+
+ The type of this NodePacket
+
+
+
+
+ Translates the packet to/from binary form.
+
+ The translator to use.
+
+
+
+ Factory for deserialization.
+
+
+
+
+ How the task completed -- successful, failed, or crashed
+
+
+
+
+ Task execution succeeded
+
+
+
+
+ Task execution failed
+
+
+
+
+ Task crashed during initialization steps -- loading the task,
+ validating or setting the parameters, etc.
+
+
+
+
+ Task crashed while being executed
+
+
+
+
+ Task crashed after being executed
+ -- Getting outputs, etc
+
+
+
+
+ TaskHostTaskComplete contains all the information the parent node
+ needs from the task host on completion of task execution.
+
+
+
+
+ Result of the task's execution.
+
+
+
+
+ If the task threw an exception during its initialization or execution,
+ save it here.
+
+
+
+
+ If there's an additional message that should be attached to the error
+ logged beyond "task X failed unexpectedly", save it here. May be null.
+
+
+
+
+ If the message saved in taskExceptionMessage requires arguments, save
+ them here. May be null.
+
+
+
+
+ The set of parameters / values from the task after it finishes execution.
+
+
+
+
+ The process environment at the end of task execution.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The result of the task's execution.
+ The file accesses reported by the task.
+ The build process environment as it was at the end of the task's execution.
+
+
+
+ For deserialization.
+
+
+
+
+ Result of the task's execution.
+
+
+
+
+ If the task threw an exception during its initialization or execution,
+ save it here.
+
+
+
+
+ If there's an additional message that should be attached to the error
+ logged beyond "task X failed unexpectedly", put it here. May be null.
+
+
+
+
+ If there are arguments that need to be formatted into the message being
+ sent, set them here. May be null.
+
+
+
+
+ Task parameters and their values after the task has finished.
+
+
+
+
+ The process environment.
+
+
+
+
+ The type of this packet.
+
+
+
+
+ Gets the file accesses reported by the task.
+
+
+
+
+ Translates the packet to/from binary form.
+
+ The translator to use.
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Used to receive link status updates from an endpoint.
+
+ The endpoint invoking the delegate.
+ The current status of the link.
+
+
+
+ Used to receive data from a node
+
+ The endpoint invoking the delegate.
+ The packet received.
+
+
+
+ The connection status of a link between the NodeEndpoint on the host and the NodeEndpoint
+ on the peer.
+
+
+
+
+ The connection has never been started.
+
+
+
+
+ The connection is active, the most recent data has been successfully sent, and the
+ node is responding to pings.
+
+
+
+
+ The connection has failed and been terminated.
+
+
+
+
+ The connection could not be made/timed out.
+
+
+
+
+ This interface represents one end of a connection between the INodeProvider and a Node.
+ Implementations of this interface define the actual mechanism by which data is communicated.
+
+
+
+
+ Raised when the status of the node's link has changed.
+
+
+
+
+ The current link status for this endpoint.
+
+
+
+
+ Waits for the remote node to establish a connection.
+
+ The factory used to deserialize packets.
+ Only one of Listen() or Connect() may be called on an endpoint.
+
+
+
+ Instructs the node to connect to its peer endpoint.
+
+ The factory used to deserialize packets.
+
+
+
+ Instructs the node to disconnect from its peer endpoint.
+
+
+
+
+ Sends a data packet to the node.
+
+ The packet to be sent.
+
+
+
+ Called when we are about to send last packet to finalize graceful disconnection with client.
+ This is needed to handle race condition when both client and server is gracefully about to close connection.
+
+
+
+
+ This is an implementation of INodeEndpoint for the out-of-proc nodes. It acts only as a client.
+
+
+
+
+ The size of the buffers to use for named pipes
+
+
+
+
+ The current communication status of the node.
+
+
+
+
+ The pipe client used by the nodes.
+
+
+
+
+ Object used as a lock source for the async data
+
+
+
+
+ Set when a packet is available in the packet queue
+
+
+
+
+ Set when the asynchronous packet pump should terminate
+
+
+
+
+ True if this side is gracefully disconnecting.
+ In such case we have sent last packet to client side and we expect
+ client will soon broke pipe connection - unless server do it first.
+
+
+
+
+ The thread which runs the asynchronous packet pump
+
+
+
+
+ The factory used to create and route packets.
+
+
+
+
+ The asynchronous packet queue.
+
+
+ Operations on this queue must be synchronized since it is accessible by multiple threads.
+ Use a lock on the packetQueue itself.
+
+
+
+
+ Per-node shared read buffer.
+
+
+
+
+ A way to cache a byte array when writing out packets
+
+
+
+
+ A binary writer to help write into
+
+
+
+
+ Raised when the link status has changed.
+
+
+
+
+ Returns the link status of this node.
+
+
+
+
+ Causes this endpoint to wait for the remote endpoint to connect
+
+ The factory used to create packets.
+
+
+
+ Causes this node to connect to the matched endpoint.
+
+ The factory used to create packets.
+
+
+
+ Shuts down the link
+
+
+
+
+ Sends data to the peer endpoint.
+
+ The packet to send.
+
+
+
+ Called when we are about to send last packet to finalize graceful disconnection with client.
+
+
+
+
+ Instantiates an endpoint to act as a client
+
+
+
+
+ Returns the host handshake for this node endpoint
+
+
+
+
+ Updates the current link status if it has changed and notifies any registered delegates.
+
+ The status the node should now be in.
+
+
+
+ Invokes the OnLinkStatusChanged event in a thread-safe manner.
+
+ The new status of the endpoint link.
+
+
+
+ This does the actual work of changing the status and shutting down any threads we may have for
+ disconnection.
+
+
+
+
+ Adds a packet to the packet queue when asynchronous mode is enabled.
+
+ The packet to be transmitted.
+
+
+
+ Initializes the packet pump thread and the supporting events as well as the packet queue.
+
+
+
+
+ This method handles the asynchronous message pump. It waits for messages to show up on the queue
+ and calls FireDataAvailable for each such packet. It will terminate when the terminate event is
+ set.
+
+
+
+
+ Enumeration of all of the packet types used for communication.
+
+
+
+
+ Notifies the Node to set a configuration for a particular build. This is sent before
+ any BuildRequests are made and will not be sent again for a particular build. This instructs
+ the node to prepare to receive build requests.
+
+ Contains:
+ Build ID
+ Environment variables
+ Logging Services Configuration
+ Node ID
+ Default Global Properties
+ Toolset Definition Locations
+ Startup Directory
+ UI Culture Information
+ App Domain Configuration XML
+
+
+
+
+ A BuildRequestConfiguration object.
+ When sent TO a node, this informs the node of a build configuration.
+ When sent FROM a node, this requests a BuildRequestConfigurationResponse to map the configuration to the
+ appropriate global configuration ID.
+
+ Contents:
+ Configuration ID
+ Project Filename
+ Project Properties
+ Project Tools Version
+
+
+
+
+ A response to a request to map a build configuration
+
+ Contents:
+ Node Configuration ID
+ Global Configuration ID
+
+
+
+
+ Information about a project that has been loaded by a node.
+
+ Contents:
+ Global Configuration ID
+ Initial Targets
+ Default Targets
+
+
+
+
+ Packet used to inform the scheduler that a node's active build request is blocked.
+
+ Contents:
+ Build Request ID
+ Active Targets
+ Blocked Target, if any
+ Child Requests, if any
+
+
+
+
+ Packet used to unblocked a blocked request on a node.
+
+ Contents:
+ Build Request ID
+ Build Results for child requests, if any.
+
+
+
+
+ A BuildRequest object
+
+ Contents:
+ Build Request ID
+ Configuration ID
+ Project Instance ID
+ Targets
+
+
+
+
+ A BuildResult object
+
+ Contents:
+ Build ID
+ Project Instance ID
+ Targets
+ Outputs (per Target)
+ Results (per Target)
+
+
+
+
+ A logging message.
+
+ Contents:
+ Build Event Type
+ Build Event Args
+
+
+
+
+ Informs the node that the build is complete.
+
+ Contents:
+ Prepare For Reuse
+
+
+
+
+ Reported by the node (or node provider) when a node has terminated. This is the final packet that will be received
+ from a node.
+
+ Contents:
+ Reason
+
+
+
+
+ Notifies the task host to set the task-specific configuration for a particular task execution.
+ This is sent in place of NodeConfiguration and gives the task host all the information it needs
+ to set itself up and execute the task that matches this particular configuration.
+
+ Contains:
+ Node ID (of parent MSBuild node, to make the logging work out)
+ Startup directory
+ Environment variables
+ UI Culture information
+ App Domain Configuration XML
+ Task name
+ Task assembly location
+ Parameter names and values to set to the task prior to execution
+
+
+
+
+ Informs the parent node that the task host has finished executing a
+ particular task. Does not need to contain identifying information
+ about the task, because the task host will only ever be connected to
+ one parent node at a a time, and will only ever be executing one task
+ for that node at any one time.
+
+ Contents:
+ Task result (success / failure)
+ Resultant parameter values (for output gathering)
+
+
+
+
+ Message sent from the node to its paired task host when a task that
+ supports ICancellableTask is cancelled.
+
+ Contents:
+ (nothing)
+
+
+
+
+ Message sent from a node when it needs to have an SDK resolved.
+
+
+
+
+ Message sent back to a node when an SDK has been resolved.
+
+
+
+
+ Message sent from a node when a task is requesting or returning resources from the scheduler.
+
+
+
+
+ Message sent back to a node informing it about the resource that were granted by the scheduler.
+
+
+
+
+ Message sent from a node reporting a file access.
+
+
+
+
+ Message sent from a node reporting process data.
+
+
+
+
+ Command in form of MSBuild command line for server node - MSBuild Server.
+ Keep this enum value constant intact as this is part of contract with dotnet CLI
+
+
+
+
+ Response from server node command
+ Keep this enum value constant intact as this is part of contract with dotnet CLI
+
+
+
+
+ Info about server console activity.
+ Keep this enum value constant intact as this is part of contract with dotnet CLI
+
+
+
+
+ Command to cancel ongoing build.
+ Keep this enum value constant intact as this is part of contract with dotnet CLI
+
+
+
+
+ This interface represents a packet which may be transmitted using an INodeEndpoint.
+ Implementations define the serialized form of the data.
+
+
+
+
+ The type of the packet. Used to reconstitute the packet using the correct factory.
+
+
+
+
+ A delegate representing factory methods used to re-create packets deserialized from a stream.
+
+ The translator containing the packet data.
+ The packet reconstructed from the stream.
+
+
+
+ This interface represents an object which is used to reconstruct packet objects from
+ binary data.
+
+
+
+
+ Registers the specified handler for a particular packet type.
+
+ The packet type.
+ The factory for packets of the specified type.
+ The handler to be called when packets of the specified type are received.
+
+
+
+ Unregisters a packet handler.
+
+ The packet type.
+
+
+
+ Takes a serializer, deserializes the packet and routes it to the appropriate handler.
+
+ The node from which the packet was received.
+ The packet type.
+ The translator containing the data from which the packet should be reconstructed.
+
+
+
+ Routes the specified packet
+
+ The node from which the packet was received.
+ The packet to route.
+
+
+
+ Objects which wish to receive packets from the NodePacketRouter must implement this interface.
+
+
+
+
+ This method is invoked by the NodePacketRouter when a packet is received and is intended for
+ this recipient.
+
+ The node from which the packet was received.
+ The packet.
+
+
+
+ Implementation of INodePacketFactory as a helper class for classes which expose this interface publicly.
+
+
+
+
+ Mapping of packet types to factory information.
+
+
+
+
+ Constructor
+
+
+
+
+ Registers a packet handler
+
+
+
+
+ Unregisters a packet handler.
+
+
+
+
+ Creates and routes a packet with data from a binary stream.
+
+
+
+
+ Routes the specified packet.
+
+
+
+
+ A record for a packet factory
+
+
+
+
+ The handler to invoke when the packet is deserialized.
+
+
+
+
+ The method used to construct a packet from a translator stream.
+
+
+
+
+ Constructor.
+
+
+
+
+ Creates a packet from a binary stream and sends it to the registered handler.
+
+
+
+
+ Routes the packet to the correct destination.
+
+
+
+
+ The NodeBuildComplete packet is used to indicate to a node that it should clean up its current build and
+ possibly prepare for node reuse.
+
+
+
+
+ Flag indicating if the node should prepare for reuse after cleanup.
+
+
+
+
+ Constructor.
+
+
+
+
+ Private constructor for translation
+
+
+
+
+ Flag indicating if the node should prepare for reuse.
+
+
+
+
+ The packet type
+
+
+
+
+ Translates the packet to/from binary form.
+
+ The translator to use.
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Reasons why the node shut down.
+
+
+
+
+ The node shut down because it was requested to shut down.
+
+
+
+
+ The node shut down because of an error.
+
+
+
+
+ The node shut down because the connection failed.
+
+
+
+
+ Implementation of INodePacket for the packet informing the build manager than a node has shut down.
+ This is the last packet the BuildManager will receive from a Node, and as such can be used to trigger
+ any appropriate cleanup behavior.
+
+
+
+
+ The reason the node shut down.
+
+
+
+
+ The exception - if any.
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor for deserialization
+
+
+
+
+ Returns the packet type.
+
+
+
+
+ The reason for shutting down.
+
+
+
+
+ The exception, if any.
+
+
+
+
+ Serializes or deserializes a packet.
+
+
+
+
+ Factory method for deserialization
+
+
+
+
+ Helper logging class - contains all the logging methods used by tasks.
+ A TaskLoggingHelper object is passed to every task by MSBuild. For tasks that derive
+ from the Task class, it is provided in the Log property.
+ This class is thread safe: tasks can log from any threads.
+
+
+
+
+ public constructor
+
+ task containing an instance of this class
+
+
+
+ Public constructor which can be used by task factories to assist them in logging messages.
+
+
+
+
+ A client sponsor is a class
+ which will respond to a lease renewal request and will
+ increase the lease time allowing the object to stay in memory
+
+
+
+
+ Object to make this class thread-safe.
+
+
+
+
+ Gets the name of the parent task.
+
+ Task name string.
+
+
+
+ Gets the upper-case version of the parent task's name.
+
+ Upper-case task name string.
+
+
+
+ The build engine we are going to log against
+
+
+
+
+ Shortcut property for getting our build engine - we retrieve it from the task instance
+
+
+
+
+ Used to load culture-specific resources. Derived classes should register their resources either during construction, or
+ via this property, if they have localized strings.
+
+
+
+
+ Gets or sets the prefix used to compose help keywords from string resource names.
+
+ The help keyword prefix string.
+
+
+
+ Has the task logged any errors through this logging helper object?
+
+
+
+
+ Extracts the message code (if any) prefixed to the given message string. Message code prefixes must match the
+ following .NET regular expression in order to be recognized: ^\s*[A-Za-z]+\d+:\s*
+ Thread safe.
+
+
+ If this method is given the string "MYTASK1001: This is an error message.", it will return "MYTASK1001" for the
+ message code, and "This is an error message." for the message.
+
+ The message to parse.
+ The message with the code prefix removed (if any).
+ The message code extracted from the prefix, or null if there was no code.
+ Thrown when message is null.
+
+
+
+ Loads the specified resource string and optionally formats it using the given arguments. The current thread's culture
+ is used for formatting.
+
+ Requires the owner task to have registered its resources either via the Task (or TaskMarshalByRef) base
+ class constructor, or the Task.TaskResources (or AppDomainIsolatedTask.TaskResources) property.
+
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ The formatted string.
+ Thrown when resourceName is null.
+ Thrown when the string resource indicated by resourceName does not exist.
+ Thrown when the TaskResources property of the owner task is not set.
+
+
+
+ Formats the given string using the variable arguments passed in. The current thread's culture is used for formatting.
+ Thread safe.
+
+ The string to format.
+ Arguments for formatting.
+ The formatted string.
+ Thrown when unformatted is null.
+
+
+
+ Get the message from resource in task library.
+ Thread safe.
+
+ The resource name.
+ The message from resource.
+
+
+
+ Returns if the build is configured to log all task inputs.
+
+
+
+
+ Returns true if a message of given importance should be logged because it is possible that a logger consuming it exists.
+
+ The importance to check.
+ True if messages of the given importance should be logged, false if it's guaranteed that such messages would be ignored.
+
+
+
+ Logs a message using the specified string.
+ Thread safe.
+
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a message of the given importance using the specified string.
+ Thread safe.
+
+
+ Take care to order the parameters correctly or the other overload will be called inadvertently.
+
+ The importance level of the message.
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a message using the specified string and other message details.
+ Thread safe.
+
+ Description of the warning type (can be null).
+ Message code (can be null)
+ The help keyword for the host IDE (can be null).
+ The path to the file causing the message (can be null).
+ The line in the file causing the message (set to zero if not available).
+ The column in the file causing the message (set to zero if not available).
+ The last line of a range of lines in the file causing the message (set to zero if not available).
+ The last column of a range of columns in the file causing the message (set to zero if not available).
+ Importance of the message.
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a critical message using the specified string and other message details.
+ Thread safe.
+
+ Description of the warning type (can be null).
+ Message code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file causing the message (can be null).
+ The line in the file causing the message (set to zero if not available).
+ The column in the file causing the message (set to zero if not available).
+ The last line of a range of lines in the file causing the message (set to zero if not available).
+ The last column of a range of columns in the file causing the message (set to zero if not available).
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a message using the specified resource string.
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a message of the given importance using the specified resource string.
+ Thread safe.
+
+
+ Take care to order the parameters correctly or the other overload will be called inadvertently.
+
+ The importance level of the message.
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a file generated from the given data.
+
+ The file path relative to the currecnt project.
+ The content of the file.
+
+
+
+ Flatten the inner exception message
+
+ Exception to flatten.
+
+
+
+
+ Small helper for logging the custom ExternalProjectStarted build event
+ Thread safe.
+
+ text message
+ help keyword
+ project name
+ targets we are going to build (empty indicates default targets)
+
+
+
+ Small helper for logging the custom ExternalProjectFinished build event.
+ Thread safe.
+
+ text message
+ help keyword
+ project name
+ true indicates project built successfully
+
+
+
+ Logs the command line for a task's underlying tool/executable/shell command.
+ Thread safe.
+
+ The command line string.
+
+
+
+ Logs the command line for a task's underlying tool/executable/shell
+ command, using the given importance level.
+ Thread safe.
+
+ The importance level of the command line.
+ The command line string.
+
+
+
+ Logs an error using the specified string.
+ Thread safe.
+
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs an error using the specified string and other error details.
+ Thread safe.
+
+ Description of the error type (can be null).
+ The error code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file containing the error (can be null).
+ The line in the file where the error occurs (set to zero if not available).
+ The column in the file where the error occurs (set to zero if not available).
+ The last line of a range of lines in the file where the error occurs (set to zero if not available).
+ The last column of a range of columns in the file where the error occurs (set to zero if not available).
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs an error using the specified string and other error details.
+ Thread safe.
+
+ Description of the error type (can be null).
+ The error code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file containing the error (can be null).
+ The line in the file where the error occurs (set to zero if not available).
+ The column in the file where the error occurs (set to zero if not available).
+ The last line of a range of lines in the file where the error occurs (set to zero if not available).
+ The last column of a range of columns in the file where the error occurs (set to zero if not available).
+ The message string.
+ A link pointing to more information about the error.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs an error using the specified resource string.
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs an error using the specified resource string and other error details.
+ Thread safe.
+
+ The name of the string resource that describes the error type (can be null).
+ The error code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file containing the error (can be null).
+ The line in the file where the error occurs (set to zero if not available).
+ The column in the file where the error occurs (set to zero if not available).
+ The last line of a range of lines in the file where the error occurs (set to zero if not available).
+ The last column of a range of columns in the file where the error occurs (set to zero if not available).
+ The name of the string resource containing the error message.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs an error using the specified resource string.
+ If the message has an error code prefixed to it, the code is extracted and logged with the message. If a help keyword
+ prefix has been provided, a help keyword for the host IDE is also logged with the message. The help keyword is
+ composed by appending the string resource name to the prefix.
+
+ A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the
+ Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.
+
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs an error using the specified resource string and other error details.
+ If the message has an error code prefixed, the code is extracted and logged with the message. If a
+ help keyword prefix has been provided, a help keyword for the host IDE is also logged with the message. The help
+ keyword is composed by appending the error message resource string name to the prefix.
+
+ A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the
+ Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.
+
+ Thread safe.
+
+ The name of the string resource that describes the error type (can be null).
+ The path to the file containing the error (can be null).
+ The line in the file where the error occurs (set to zero if not available).
+ The column in the file where the error occurs (set to zero if not available).
+ The last line of a range of lines in the file where the error occurs (set to zero if not available).
+ The last column of a range of columns in the file where the error occurs (set to zero if not available).
+ The name of the string resource containing the error message.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs an error using the message from the given exception context.
+ No callstack will be shown.
+ Thread safe.
+
+ Exception to log.
+ Thrown when e is null.
+
+
+
+ Logs an error using the message (and optionally the stack-trace) from the given exception context.
+ Thread safe.
+
+ Exception to log.
+ If true, callstack will be appended to message.
+ Thrown when exception is null.
+
+
+
+ Logs an error using the message, and optionally the stack-trace from the given exception, and
+ optionally inner exceptions too.
+ Thread safe.
+
+ Exception to log.
+ If true, callstack will be appended to message.
+ Whether to log exception types and any inner exceptions.
+ File related to the exception, or null if the project file should be logged
+ Thrown when exception is null.
+
+
+
+ Logs a warning using the specified string.
+ Thread safe.
+
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a warning using the specified string and other warning details.
+ Thread safe.
+
+ Description of the warning type (can be null).
+ The warning code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file causing the warning (can be null).
+ The line in the file causing the warning (set to zero if not available).
+ The column in the file causing the warning (set to zero if not available).
+ The last line of a range of lines in the file causing the warning (set to zero if not available).
+ The last column of a range of columns in the file causing the warning (set to zero if not available).
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a warning using the specified string and other warning details.
+ Thread safe.
+
+ Description of the warning type (can be null).
+ The warning code (can be null).
+ The help keyword for the host IDE (can be null).
+ A link pointing to more information about the warning (can be null).
+ The path to the file causing the warning (can be null).
+ The line in the file causing the warning (set to zero if not available).
+ The column in the file causing the warning (set to zero if not available).
+ The last line of a range of lines in the file causing the warning (set to zero if not available).
+ The last column of a range of columns in the file causing the warning (set to zero if not available).
+ The message string.
+ Optional arguments for formatting the message string.
+ Thrown when message is null.
+
+
+
+ Logs a warning using the specified resource string.
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a warning using the specified resource string and other warning details.
+ Thread safe.
+
+ The name of the string resource that describes the warning type (can be null).
+ The warning code (can be null).
+ The help keyword for the host IDE (can be null).
+ The path to the file causing the warning (can be null).
+ The line in the file causing the warning (set to zero if not available).
+ The column in the file causing the warning (set to zero if not available).
+ The last line of a range of lines in the file causing the warning (set to zero if not available).
+ The last column of a range of columns in the file causing the warning (set to zero if not available).
+ The name of the string resource containing the warning message.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a warning using the specified resource string.
+ If the message has a warning code prefixed to it, the code is extracted and logged with the message. If a help keyword
+ prefix has been provided, a help keyword for the host IDE is also logged with the message. The help keyword is
+ composed by appending the string resource name to the prefix.
+
+ A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the
+ Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.
+
+ Thread safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a warning using the specified resource string and other warning details.
+ If the message has a warning code, the code is extracted and logged with the message.
+ If a help keyword prefix has been provided, a help keyword for the host IDE is also logged with the message. The help
+ keyword is composed by appending the warning message resource string name to the prefix.
+
+ A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the
+ Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.
+
+ Thread safe.
+
+ The name of the string resource that describes the warning type (can be null).
+ The path to the file causing the warning (can be null).
+ The line in the file causing the warning (set to zero if not available).
+ The column in the file causing the warning (set to zero if not available).
+ The last line of a range of lines in the file causing the warning (set to zero if not available).
+ The last column of a range of columns in the file causing the warning (set to zero if not available).
+ The name of the string resource containing the warning message.
+ Optional arguments for formatting the loaded string.
+ Thrown when messageResourceName is null.
+
+
+
+ Logs a warning using the message from the given exception context.
+ Thread safe.
+
+ Exception to log.
+ Thrown when exception is null.
+
+
+
+ Logs a warning using the message (and optionally the stack-trace) from the given exception context.
+ Thread safe.
+
+ Exception to log.
+ If true, the exception callstack is appended to the message.
+ Thrown when exception is null.
+
+
+
+ Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that
+ fit a particular (canonical) format -- the remaining lines are treated as messages.
+ Thread safe.
+
+ The file to log from.
+ true, if any errors were logged
+ Thrown when filename is null.
+
+
+
+ Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that
+ fit a particular (canonical) format -- the remaining lines are treated as messages.
+ Thread safe.
+
+ The file to log from.
+ The importance level for messages that are neither errors nor warnings.
+ true, if any errors were logged
+ Thrown when filename is null.
+
+
+
+ Logs errors/warnings/messages for each line of text in the given stream. Errors/warnings are only logged for lines
+ that fit a particular (canonical) format -- the remaining lines are treated as messages.
+ Thread safe.
+
+ The stream to log from.
+ The importance level for messages that are neither errors nor warnings.
+ true, if any errors were logged
+ Thrown when stream is null.
+
+
+
+ Logs an error/warning/message from the given line of text. Errors/warnings are only logged for lines that fit a
+ particular (canonical) format -- all other lines are treated as messages.
+ Thread safe.
+
+ The line of text to log from.
+ The importance level for messages that are neither errors nor warnings.
+ true, if an error was logged
+ Thrown when lineOfText is null.
+
+
+
+ Logs telemetry with the specified event name and properties.
+
+ The event name.
+ The list of properties associated with the event.
+
+
+
+ InitializeLifetimeService is called when the remote object is activated.
+ This method will determine how long the lifetime for the object will be.
+ Thread safe. However, InitializeLifetimeService and MarkAsInactive should
+ only be called in that order, together or not at all, and no more than once.
+
+ The lease object to control this object's lifetime.
+
+
+
+ Notifies this object that its work is done.
+ Thread safe. However, InitializeLifetimeService and MarkAsInactive should
+ only be called in that order, together or not at all, and no more than once.
+
+
+ Indicates to the TaskLoggingHelper that it is no longer needed.
+
+
+
+
+ Helper logging class for tasks, used for dealing with two resource streams.
+
+
+
+
+ public constructor
+
+
+
+
+ Used to load culture-specific resources. Derived classes should register their resources either during construction, or
+ via this property, if they have localized strings.
+
+
+
+
+ Loads the specified resource string and optionally formats it using the given arguments. The current thread's culture
+ is used for formatting.
+
+
+ 1) This method requires the owner task to have registered its resources either via the Task (or TaskMarshalByRef) base
+ class constructor, or the "Task.TaskResources" (or "AppDomainIsolatedTask.TaskResources") property.
+ 2) This method is thread-safe.
+
+ The name of the string resource to load.
+ Optional arguments for formatting the loaded string.
+ The formatted string.
+ Thrown when resourceName is null.
+ Thrown when the string resource indicated by resourceName does not exist.
+ Thrown when the TaskResources property of the owner task is not set.
+
+
+
+ Type of parameter, used to figure out how to serialize it.
+
+
+
+
+ Parameter is null.
+
+
+
+
+ Parameter is of a type described by a .
+
+
+
+
+ Parameter is an array of a type described by a .
+
+
+
+
+ Parameter is a value type. Note: Must be .
+
+
+
+
+ Parameter is an array of value types. Note: Must be .
+
+
+
+
+ Parameter is an ITaskItem.
+
+
+
+
+ Parameter is an array of ITaskItems.
+
+
+
+
+ An invalid parameter -- the value of this parameter contains the exception
+ that is thrown when trying to access it.
+
+
+
+
+ Wrapper for task parameters, to allow proper serialization even
+ in cases where the parameter is not .NET serializable.
+
+
+
+
+ The TaskParameterType of the wrapped parameter.
+
+
+
+
+ The of the wrapped parameter if it's a primitive type.
+
+
+
+
+ The actual task parameter that we're wrapping
+
+
+
+
+ Create a new TaskParameter
+
+
+
+
+ Constructor for deserialization.
+
+
+
+
+ The TaskParameterType of the wrapped parameter.
+
+
+
+
+ The of the wrapper parameter if it's a primitive or array of primitives.
+
+
+
+
+ The actual task parameter that we're wrapping.
+
+
+
+
+ TaskParameter's ToString should just pass through to whatever it's wrapping.
+
+
+
+
+ Serialize / deserialize this item.
+
+
+
+
+ Overridden to give this class infinite lease time. Otherwise we end up with a limited
+ lease (5 minutes I think) and instances can expire if they take long time processing.
+
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Creates a new ITaskItem with the contents of the old one.
+
+
+
+
+ Serialize / deserialize this item.
+
+
+
+
+ Serialize / deserialize this item.
+
+
+
+
+ Write the given ITaskItem, using the given write translator
+
+
+
+
+ Read an ITaskItem into the given parameter, using the given read translator
+
+
+
+
+ Writes out the boolean which says if this object is null or not.
+
+ The nullable type to translate.
+
+
+
+ Serializes or deserializes a primitive type value wrapped by this .
+
+
+
+
+ Serializes or deserializes an array of primitive type values wrapped by this .
+
+
+
+
+ Serializes or deserializes the value type instance wrapped by this .
+
+
+ The value type is converted to/from string using the class. Note that we require
+ task parameter types to be so this conversion is guaranteed to work for parameters
+ that have made it this far.
+
+
+
+
+ Serializes or deserializes the value type array instance wrapped by this .
+
+
+ The array is assumed to be non-null.
+
+
+
+
+ Super simple ITaskItem derivative that we can use as a container for read items.
+
+
+
+
+ The item spec
+
+
+
+
+ The full path to the project that originally defined this item.
+
+
+
+
+ The custom metadata
+
+
+
+
+ Cache for fullpath metadata
+
+
+
+
+ Constructor for serialization
+
+
+
+
+ Gets or sets the item "specification" e.g. for disk-based items this would be the file path.
+
+
+ This should be named "EvaluatedInclude" but that would be a breaking change to this interface.
+
+ The item-spec string.
+
+
+
+ Gets the names of all the metadata on the item.
+ Includes the built-in metadata like "FullPath".
+
+ The list of metadata names.
+
+
+
+ Gets the number of pieces of metadata on the item. Includes
+ both custom and built-in metadata. Used only for unit testing.
+
+ Count of pieces of metadata.
+
+
+
+ Returns the escaped version of this item's ItemSpec
+
+
+
+
+ Allows the values of metadata on the item to be queried.
+
+ The name of the metadata to retrieve.
+ The value of the specified metadata.
+
+
+
+ Allows a piece of custom metadata to be set on the item.
+
+ The name of the metadata to set.
+ The metadata value.
+
+
+
+ Allows the removal of custom metadata set on the item.
+
+ The name of the metadata to remove.
+
+
+
+ Allows custom metadata on the item to be copied to another item.
+
+
+ RECOMMENDED GUIDELINES FOR METHOD IMPLEMENTATIONS:
+ 1) this method should NOT copy over the item-spec
+ 2) if a particular piece of metadata already exists on the destination item, it should NOT be overwritten
+ 3) if there are pieces of metadata on the item that make no semantic sense on the destination item, they should NOT be copied
+
+ The item to copy metadata to.
+
+
+
+ Get the collection of custom metadata. This does not include built-in metadata.
+
+
+ RECOMMENDED GUIDELINES FOR METHOD IMPLEMENTATIONS:
+ 1) this method should return a clone of the metadata
+ 2) writing to this dictionary should not be reflected in the underlying item.
+
+ Dictionary of cloned metadata
+
+
+
+ Overridden to give this class infinite lease time. Otherwise we end up with a limited
+ lease (5 minutes I think) and instances can expire if they take long time processing.
+
+
+
+
+ Returns the escaped value of the requested metadata name.
+
+
+
+
+ Sets the exact metadata value given to the metadata name requested.
+
+
+
+
+ Returns a dictionary containing all metadata and their escaped forms.
+
+
+
+
+ Provide a class which can verify the correct type for both input and output parameters.
+
+
+
+
+ Is the parameter type a valid scalar input value
+
+
+
+
+ Is the passed in parameterType a valid vector input parameter
+
+
+
+
+ Is the passed in value type assignable to an ITask or Itask[] object
+
+
+
+
+ Is the passed parameter a valid value type output parameter
+
+
+
+
+ Is the parameter type a valid scalar or value type input parameter
+
+
+
+
+ Is the parameter type a valid scalar or value type output parameter
+
+
+
+
+ This class provides helper methods to adapt from to
+ .
+
+
+
+
+ Translates an object implementing which does not expose a
+ public parameterless constructor.
+
+ The reference type.
+ The translator
+ The value to be translated.
+ The factory method used to instantiate values of type T.
+
+
+
+ This is a helper class to install an AssemblyResolver event handler in whatever AppDomain this class is created in.
+
+
+
+
+ This public default constructor is needed so that instances of this class can be created by NDP.
+
+
+
+
+ Initializes the instance.
+
+
+
+
+
+ Installs an AssemblyResolve handler in the current AppDomain. This class can be created in any AppDomain,
+ so it's possible to create an AppDomain, create an instance of this class in it and use this method to install
+ an event handler in that AppDomain. Since the event handler instance is stored internally, this method
+ should only be called once before a corresponding call to RemoveHandler (not that it would make sense to do
+ anything else).
+
+
+
+
+ Removes the event handler.
+
+
+
+
+ This is an assembly resolution handler necessary for fixing up types instantiated in different
+ AppDomains and loaded with a Assembly.LoadFrom equivalent call. See comments in TaskEngine.ExecuteTask
+ for more details.
+
+
+
+
+
+
+
+ Overridden to give this class infinite lease time. Otherwise we end up with a limited
+ lease (5 minutes I think) and instances can expire if they take long time processing.
+
+
+
+
+ Target console configuration.
+ If console output is redirected to other process console, like for example MSBuild Server does,
+ we need to know property of target/final console at which our output will be rendered.
+ If console is rendered at current process Console, we grab properties from Console and/or by WinAPI.
+
+
+
+
+ Get or set current target console configuration provider.
+
+
+
+
+ Buffer width of destination Console.
+ Console loggers are supposed, on Windows OS, to be wrapping to avoid output trimming.
+ -1 console buffer width can't be obtained.
+
+
+
+
+ True if console output accept ANSI colors codes.
+ False if output is redirected to non screen type such as file or nul.
+
+
+
+
+ Background color of client console, -1 if not detectable
+ Some platforms do not allow getting current background color. There
+ is not way to check, but not-supported exception is thrown. Assume
+ black, but don't crash.
+
+
+
+
+ True if console output is screen. It is expected that non screen output is post-processed and often does not need wrapping and coloring.
+ False if output is redirected to non screen type such as file or nul.
+
+
+
+
+ Console configuration needed for proper Console logging.
+
+
+
+
+ Buffer width of destination Console.
+ Console loggers are supposed, on Windows OS, to be wrapping to avoid output trimming.
+ -1 console buffer width can't be obtained.
+
+
+
+
+ True if console output accept ANSI colors codes.
+ False if output is redirected to non screen type such as file or nul.
+
+
+
+
+ True if console output is screen. It is expected that non screen output is post-processed and often does not need wrapping and coloring.
+ False if output is redirected to non screen type such as file or nul.
+
+
+
+
+ Background color of client console, -1 if not detectable
+ Some platforms do not allow getting current background color. There
+ is not way to check, but not-supported exception is thrown. Assume
+ black, but don't crash.
+
+
+
+
+ Console configuration of current process Console.
+
+
+
+
+ When set, we'll try reading background color.
+
+
+
+
+ Console configuration of target Console at which we will render output.
+ It is supposed to be Console from other process to which output from this process will be redirected.
+
+
+
+
+ Constructor for deserialization
+
+
+
+
+ Intended to be used in the nodes, during a build, where a base LoggingContext is created when the node
+ initializes for a build (this is the public constructor.) When a new project, target batch
+ or task batch is started, the appropriate method on the current LoggingContext is invoked
+ and a new LoggingContext is returned. This new LoggingContext should be used for all
+ subsequent logging within the subcontext.
+
+
+
+
+ True if this context comes from the in-proc node.
+
+
+
+
+ Constructs the logging context from a logging service and an event context.
+
+ The logging service to use
+ The event context
+ Flag indicating if this context belongs to an in-proc node.
+
+
+
+
+
+
+ Flag indicating if the context is being used for the in-proc node.
+
+
+
+
+ Log an error based on an exception during the execution of a task
+
+ The exception wich is to be logged
+ The file in which the error occurred
+ The task in which the error occurred
+
+
+
+ This object encapsulates the logging service plus the current BuildEventContext and
+ hides the requirement to pass BuildEventContexts to the logging service or query the
+ host for the logging service all of the time.
+
+
+
+
+ The logging service to which this context is attached
+
+
+
+
+ The build event context understood by the logging service.
+
+
+
+
+ True if this context is still valid (i.e. hasn't been "finished")
+
+
+
+
+ Constructs the logging context from a logging service and an event context.
+
+ The logging service to use
+ The event context
+
+
+
+ Constructs a logging context from another logging context. This is used primarily in
+ the constructors for other logging contexts to populate the logging service parameter,
+ while the event context will come from a call into the logging service itself.
+
+ The context from which this context is being created.
+
+
+
+ Retrieves the logging service
+
+
+
+
+ Retrieves the build event context
+ UNDONE: (Refactor) We eventually want to remove this because all logging should go
+ through a context object. This exists only so we can make certain
+ logging calls in code which has not yet been fully refactored.
+
+
+
+
+ Returns true if the context is still valid, false if the
+ appropriate 'Finished' call has been invoked.
+
+
+
+
+ Helper method to create a message build event from a string resource and some parameters
+
+ Importance level of the message
+ string within the resource which indicates the format string to use
+ string resource arguments
+
+
+
+ Helper method to create a message build event from a string resource and some parameters
+
+ Importance level of the message
+ The file in which the event occurred
+ string within the resource which indicates the format string to use
+ string resource arguments
+
+
+
+ Helper method to create a message build event from a string
+
+ Importance level of the message
+ message to log
+
+
+
+ Helper method to create a message build event from a string
+
+ Importance level of the message
+ Message to log
+ Format string arguments
+
+
+
+ Log an error
+
+ The file in which the error occurred
+ The resource name for the error
+ Parameters for the resource string
+
+
+
+ Log an error
+
+ The resource name which indicates the subCategory
+ The file in which the error occurred
+ The resource name for the error
+ Parameters for the resource string
+
+
+
+ Log an error
+
+ The resource name which indicates the subCategory
+ Error code
+ Help keyword
+ The file in which the error occurred
+ Error message
+
+
+
+ Log an invalid project file exception
+
+ The invalid Project File Exception which is to be logged
+
+
+
+ Log an error based on an exception
+
+ The exception wich is to be logged
+ The file in which the error occurred
+ The string resource which has the formatting string for the error
+ The arguments for the error message
+
+
+
+ Log a warning
+
+ The subcategory resource name
+ The file in which the warning occurred
+ The string resource which contains the formatted warning string
+ parameters for the string resource
+
+
+
+ Log a warning based on a text message
+
+ The subcategory resource name
+ Warning code
+ Help keyword
+ The file in which the warning occurred
+ The message to be logged as a warning
+
+
+
+ Will Log a build Event. Will also take into account OnlyLogCriticalEvents when determining if to drop the event or to log it.
+
+ The event to log
+
+
+
+ Log an error based on an exception
+
+ The exception to be logged
+ The file in which the error occurred
+
+
+
+ Logs a file to be included in the binary logger
+
+ Path to response file
+
+
+
+ Delegate to a method which will transport the packet accross the wire.
+
+ A node packet to send accross the wire
+
+
+
+ This class will consume the BuildEventArgs forwarded by the EventRedirectorToSink class.
+ The sink will then create a packet and then pass this along to the transport layer to be
+ sent back to the build manager.
+
+
+
+
+ Delegate to a method which accepts a INodePacket and send the packet to where it needs to go
+
+
+
+
+ Create the sink which will consume a buildEventArg
+ Create a INodePacket and send it to the transport component
+
+ A delegate which takes an INodePacket and sends the packet to where it needs to go
+ Send data delegate is null
+
+
+
+ Provide a friendly name for the sink to make it easier to differentiate during
+ debugging and display
+
+
+
+
+ Has the sink logged the BuildStartedEvent. This is important to know because we only want to log the build started event once
+
+
+
+
+ Has the sink logged the BuildFinishedEvent. This is important to know because we only want to log the build finished event once
+
+
+
+
+ This property is ignored by this event sink and relies on the receiver to treat warnings as errors.
+
+
+
+
+ This property is ignored by this event sink and relies on the receiver to treat warnings as errors.
+
+
+
+
+ This property is ignored by this event sink and relies on the receiver to treat warnings as low importance messages.
+
+
+
+
+ This property is ignored by this event sink and relies on the receiver to treat warnings as low importance messages.
+
+
+
+
+ This property is ignored by this event sink and relies on the receiver to keep track of whether or not any errors have been logged.
+
+
+
+
+ This method should not be used since we need the sinkID
+
+
+
+
+ Consumes the buildEventArg and creates a logMessagePacket
+
+ Build event to package into a INodePacket
+ The sink identifier.
+ buildEvent is null
+
+
+
+ Dispose of any resources the sink is holding onto.
+
+
+
+
+ Logger that forwards events to loggers registered with the LoggingServices
+
+
+
+
+ An IEventRedirector which will redirect any events forwarded from the logger. The eventRedirector determines where the events will
+ be redirected.
+
+
+
+
+ The nodeId of the node on which the logger is currently running.
+
+
+
+
+ Verbosity of the logger, in the central forwarding logger this is currently ignored
+
+
+
+
+ Logging Parameters
+
+
+
+
+ Initialize the logger with an eventSource and a node count.
+ The logger will register and listen to anyEvents on the eventSource.
+ The node count is for informational purposes. The logger may want to take different
+ actions depending on how many nodes there are in the system.
+
+ Event source which the logger will register with to receive events
+ Number of nodes the system was started with
+
+
+
+ Initialize the logger. The logger will register with AnyEventRaised on the eventSource
+
+ eventSource which the logger will register on to listen for events
+ EventSource is null
+
+
+
+ Shuts down the logger. This will null out the buildEventRedirector
+
+
+
+
+ Forwards any event raised to the BuildEventRedirector, this redirector will send the event on a path which will
+ take it to a logger.
+
+ Who sent the message, this is not used
+ BuildEvent to forward
+
+
+
+ Will redirect events from forwarding loggers to the a IBuildEventSink, many redirectors may redirect to one sink.
+
+
+
+
+ The Id of the central logger to which this event should be forwarded
+
+
+
+
+ The sink which will consume the messages
+
+
+
+
+ Initalize this class with a central logger id identifying the central logger to which
+ these events should consumed by. The redirector will send the messages to the registered sink to
+ be consumed
+
+ Id which will be attached to the build event arguments to indicate which logger the events came from
+ sink which will initially consume the events
+ Eventsink is null
+ LoggerId is less than 0
+
+
+
+ This method is called by the node loggers to forward the events to cenral logger
+
+ Build event to forward
+ BuildEvent is null
+
+
+
+ This class raises events on behalf of the build engine to all registered loggers.
+
+
+
+
+ This event is raised to log a message.
+
+
+
+
+ This event is raised to log an error.
+
+
+
+
+ This event is raised to log a warning.
+
+
+
+
+ this event is raised to log the start of a build
+
+
+
+
+ this event is raised to log the end of a build
+
+
+
+
+ this event is raised to log the start of a project build
+
+
+
+
+ this event is raised to log the end of a project build
+
+
+
+
+ this event is raised to log the start of a target build
+
+
+
+
+ this event is raised to log the end of a target build
+
+
+
+
+ this event is raised to log the start of task execution
+
+
+
+
+ this event is raised to log the end of task execution
+
+
+
+
+ this event is raised to log a custom event
+
+
+
+
+ this event is raised to log build status events, such as
+ build/project/target/task started/stopped
+
+
+
+
+ This event is raised to log that some event has
+ occurred. It is raised on every event.
+
+
+
+
+ This event is raised to log telemetry.
+
+
+
+
+ Provide a friendly name for the sink to make it easier to differentiate during
+ debugging and display
+
+
+
+
+ Has the sink logged the BuildStartedEvent. This is important to know because we only want to log the build started event once
+
+
+
+
+ Has the sink logged the BuildFinishedEvent. This is important to know because we only want to log the build finished event once
+
+
+
+
+ Should evaluation events include generated metaprojects?
+
+
+
+
+ Should evaluation events include profiling information?
+
+
+
+
+ Should task events include task inputs?
+
+
+
+
+ Determines whether properties and items should be logged on
+ instead of
+
+
+
+
+ Raises the given event to all registered loggers.
+ This method casts the events extracted from the queue to a more specific type.
+
+ BuildEventArgs
+ Note this is not used in the eventsource sink
+
+
+
+ Raises the given event to all registered loggers.
+ This method casts the events extracted from the queue to a more specific type.
+
+
+
+
+ Shutdown and displose of any resource this object is holding onto.
+
+
+
+
+ Clears out all events.
+
+
+
+
+ Raises a message event to all registered loggers.
+
+ sender of the event
+ BuildMessageEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises an error event to all registered loggers.
+
+ sender of the event
+ BuildErrorEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a warning event to all registered loggers.
+
+ sender of the event
+ BuildWarningEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a "build started" event to all registered loggers.
+
+ sender of the event
+ BuildStartedEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a "build finished" event to all registered loggers.
+
+ sender of the event
+ BuildFinishedEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a "project build started" event to all registered loggers.
+
+ sender of the event
+ ProjectStartedEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a "project build finished" event to all registered loggers.
+
+ sender of the event
+ ProjectFinishedEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a "target build started" event to all registered loggers.
+
+ sender of the event
+ TargetStartedEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a "target build finished" event to all registered loggers.
+
+ sender of the event
+ TargetFinishedEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a "task execution started" event to all registered loggers.
+
+ sender of the event
+ TaskStartedEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a "task finished executing" event to all registered loggers.
+
+ sender of the event
+ TaskFinishedEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a custom event to all registered loggers.
+
+ sender of the event
+ CustomBuildEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a catch-all build status event to all registered loggers.
+
+ sender of the event
+ BuildStatusEventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises a catch-all build event to all registered loggers.
+
+ sender of the event
+ Build EventArgs
+ When EventHandler raises an logger exception the LoggerException is rethrown
+ Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException
+ ExceptionHandling.IsCriticalException exceptions will not be wrapped
+
+
+
+ Raises the a telemetry event to all registered loggers.
+
+
+
+
+ Delegate for an event which will take an exception and raise it on the registered event handlers.
+
+ Exception to be raised with registered event handlers
+
+
+
+ Interface representing logging services in the build system.
+ Implementations should be thread-safe.
+
+
+
+
+ When there is an exception on the logging thread, we do not want to throw the exception from there
+ instead we would like the exception to be thrown on the engine thread as this is where hosts expect
+ to see the exception. This event will transport the exception from the loggingService to the engine
+ which will register on this event.
+
+
+
+
+ Raised when a ProjectStarted event is about to be sent to the loggers.
+
+
+
+
+ Raised when a ProjectFinished event has just been sent to the loggers.
+
+
+
+
+ Provide the current state of the loggingService.
+ Is it Inistantiated
+ Has it been Initialized
+ Is it starting to shutdown
+ Has it shutdown
+
+
+
+
+ Returns the synchronous/asynchronous mode for the logging service.
+
+
+
+
+ When true, only log critical events such as warnings and errors. Has to be in here for API compat
+
+
+
+
+ Number of nodes in the system when it was initially started
+
+
+
+
+ Enumerator over all registered loggers.
+
+
+
+
+ The list of descriptions which describe how to create forwarding loggers on a node.
+ This is used by the node provider to get a list of registered descriptions so that
+ they can be transmitted to child nodes.
+
+
+
+
+ Return an array which contains the logger type names
+ this can be used to display which loggers are registered on the node
+
+
+
+
+ Return an array which contains the sink names
+ this can be used to display which sinks are on the node
+
+
+
+
+ List of properties to serialize from the child node
+
+
+
+
+ Should all properties be serialized from the child to the parent process
+
+
+
+
+ Is the logging running on a remote node
+
+
+
+
+ Set of warnings to treat as errors. An empty non-null set will treat all warnings as errors.
+
+
+
+
+ Set of warnings to not treat as errors. Only has any effect if WarningsAsErrors is non-null but empty.
+
+
+
+
+ A list of warnings to treat as low importance messages.
+
+
+
+
+ Should evaluation events include generated metaprojects?
+
+
+
+
+ Should evaluation events include profiling information?
+
+
+
+
+ Should properties and items be logged on
+ instead of ?
+
+
+
+
+ Should task events include task inputs?
+
+
+
+
+ Returns the minimum logging importance that must be logged because there is a possibility that
+ at least one registered logger consumes it.
+
+
+
+
+ Adds a set of warning codes to treat as low importance messages for the specified project instance ID.
+
+ A to associate with the list of warning codes.
+ The list of warning codes to treat as low importance messsages.
+
+
+
+ Adds a set of warning codes to treat as errors for the specified project instance ID.
+
+ A to associate with the list of warning codes.
+ The list of warning codes to treat as errors.
+
+
+
+ Adds a set of warning codes to not treat as errors for the specified project instance ID.
+
+ A to associate with the list of warning codes.
+ The list of warning codes not to treat as errors.
+
+
+
+ Determines if the specified submission has logged an errors.
+
+ The ID of the build submission. A value of "0" means that an error was logged outside of any build submission.
+ true if the build submission logged an errors, otherwise false.
+
+
+
+ Get the warnings that will be promoted to errors for the specified context.
+
+ The build context through which warnings will be logged as errors.
+ A collection of warning codes that should be treated as errors.
+
+
+
+ Get the warnings that will not be promoted to error for the specified context.
+
+ The build context through which warnings will not be logged as errors.
+ A collection of warning codes that should not be treated as errors.
+
+
+
+ Get the warnings that will be demoted to messages for the specified context.
+
+ The build context through which warnings will be logged as errors.
+ A collection of warning codes that should be treated as messages.
+
+
+
+ Allows the registering of an ICentralLogger and a forwarding logger pair
+
+ Central logger which is to receive the events created by the forwarding logger
+ A description of the forwarding logger
+ True if the central and forwarding loggers were registered. False if the central logger or the forwarding logger were already registered
+
+
+
+ Register an logger which expects all logging events from the system
+
+ The logger to register.
+ True if the central was registered. False if the central logger was already registered
+
+
+
+ Clear out all registered loggers so that none are registered.
+
+
+
+
+ In order to setup the forwarding loggers on a node, we need to take in the logger descriptions and initialize them.
+ The method will create a forwarding logger, an eventRedirector which will redirect all forwarded messages to the forwardingLoggerSink.
+ All forwarding loggers will use the same forwardingLoggerSink.
+
+ Collection of logger descriptions which we would like to use to create a set of forwarding loggers on a node
+ The buildEventSink which the fowarding loggers will forward their events to
+ The id of the node the logging services is on
+ When forwardingLoggerSink is null
+ When loggerDescriptions is null
+
+
+
+ Helper method to create a message build event from a string resource and some parameters
+
+ Event context which describes where in the build the message came from
+ Importance level of the message
+ string within the resource which indicates the format string to use
+ string resource arguments
+
+
+
+ Helper method to create a message build event from a string
+
+ Event context which describes where in the build the message came from
+ Importance level of the message
+ message to log
+
+
+
+ Log a comment from a format string and arguments
+
+ Event context information which describes who is logging the event
+ How important is the message, this will determine which verbosities the message will show up on.
+ The higher the importance the lower the verbosity needs to be for the message to be seen
+ Message to log
+ Message formatting arguments
+ BuildEventContext is null
+ Message is null
+
+
+
+ Will Log a build Event. Will also take into account OnlyLogCriticalEvents when determining if to drop the event or to log it.
+
+
+
+
+ Log an error
+
+ The event context information as to where the error occurred
+ The file in which the error occurred
+ The resource name for the error
+ Parameters for the resource string
+
+
+
+ Log an error
+
+ The event context for where the error occurred
+ The resource name which indicates the subCategory
+ The file in which the error occurred
+ The resource name for the error
+ Parameters for the resource string
+
+
+
+ Log an error
+
+ The event context for where the error occurred
+ The resource name which indicates the subCategory
+ Error code
+ Help keyword
+ The file in which the error occurred
+ Error message
+
+
+
+ Log an invalid project file exception
+
+ The event context for where the error occurred
+ The invalid Project File Exception which is to be logged
+
+
+
+ Log an error based on an exception
+
+ The event context for where the error occurred
+ The exception wich is to be logged
+ The file in which the error occurred
+
+
+
+ Log an error based on an exception during the execution of a task
+
+ The event context for where the error occurred
+ The exception wich is to be logged
+ The file in which the error occurred
+ The task in which the error occurred
+
+
+
+ Log an error based on an exception
+
+ The event context for where the error occurred
+ The exception wich is to be logged
+ The file in which the error occurred
+ The string resource which has the formatting string for the error
+ The arguments for the error message
+
+
+
+ Log a warning based on an exception
+
+ The event context for where the warning occurred
+ The exception to be logged as a warning
+ The file in which the warning occurred
+ The task in which the warning occurred
+
+
+
+ Log a warning
+
+ The event context for where the warning occurred
+ The subcategory resource name
+ The file in which the warning occurred
+ The string resource which contains the formatted warning string
+ parameters for the string resource
+
+
+
+ Log a warning based on a text message
+
+ The event context for where the warning occurred
+ The subcategory resource name
+ Warning code
+ Help keyword
+ The file in which the warning occurred
+ The message to be logged as a warning
+
+
+
+ Log the start of the build
+
+
+
+
+ Log the completion of a build
+
+ Did the build succeed or not
+
+
+
+ Create an evaluation context, by generating a new evaluation id.
+
+ The node id
+ The submission id
+
+
+
+
+ Create a project cache context, by generating a new project context id.
+
+ The submission id
+ The evaluation id
+ The project instance id
+ Project file being built
+
+
+
+
+ Logs that a project evaluation has started
+
+ The event context to use for logging
+ Project file being built
+ The evaluation event context for the project.
+
+
+
+ Logs that a project evaluation has finished
+
+ Event context for the project.
+ Project file being built
+ Global properties used for the evaluation.
+ Properties produced by the evaluation.
+ Items produced by the evaluation.
+ Profiler results if evaluation profiling was enabled.
+ BuildEventContext is null
+
+
+
+ Log that a project has started
+
+ The logging context of the node which is building this project.
+ The id of the build submission.
+ The id of the project configuration which is about to start
+ The build context of the parent project which asked this project to build
+ The project file path of the project about to be built
+ The entrypoint target names for this project
+ The initial properties of the project
+ The initial items of the project
+ EvaluationId of the project instance
+ The project context id
+ The BuildEventContext to use for this project.
+
+
+
+ Log that the project has finished
+
+ The build context of the project which has just finished
+ The path to the projec file which was just built
+ Did the build succeede or not
+
+
+
+ Log that a target has started
+
+ The build event context of the project spawning this target.
+ The name of the target which is about to start
+ The project file which is being built
+ The file in which the target is defined - typically a .targets file
+ The name of the parent target.
+ The reason the parent target built the target.
+ The target build event context
+
+
+
+ Log that a target has finished
+
+ The event context of the target which has just completed
+ The name of the target which has just completed
+ The project file which the target was being run in
+ The file in which the target is defined - typically a .targets file
+ Did the target finish successfully or not
+ List of target outputs for the target, right now this is for all batches and only is on the last target finished event
+
+
+
+ Log that a task is about to start
+
+ The event context of the task.
+ The name of the task
+ The project file which is being built
+ The file in which the task is defined - typically a .targets file
+
+
+
+ Log that a task is about to start
+
+ The event context of the target which is spawning this task.
+ The name of the task
+ The project file which is being built
+ The file in which the task is defined - typically a .targets file
+ The line number in the file where the task invocation is located.
+ The column number in the file where the task invocation is located.
+ The task build event context
+
+
+
+ Log that a task has just completed
+
+ The event context of the task which has just finished
+ The name of the task
+ The project file which is being built
+ The file in which the task is defined - typically a .targets file
+ True of the task finished successfully, false otherwise.
+
+
+
+ Logs telemetry.
+
+ The event context of the task which sent the telemetry.
+ The event name.
+ The list of properties associated with the event.
+
+
+
+ Helper method to create an event for including files. Typically response files
+
+ Event context information which describes where is the event getting logged
+ Full path to the response file
+
+
+
+ Acts as an endpoint for a buildEventArg. The objects which implement this interface are intended to consume the BuildEventArg.
+
+
+
+
+ Provide a the sink a friendly name which can be used to distinguish sinks in memory
+ and for display
+
+
+
+
+ Has the sink logged the BuildStartedEvent. This is important to know because we only want to log the build started event once
+
+
+
+
+ Has the sink logged the BuildFinishedEvent. This is important to know because we only want to log the build finished event once
+
+
+
+
+ Entry point for a sink to consume an event.
+
+ The event to be consumed by the sink.
+ Sink where the message should go to, this is really only used for the transport sink
+
+
+
+ Entry point for a sink to consume an event.
+
+
+
+
+ Shuts down the sink and any resources it may be holding
+
+
+
+
+ What is the mode of the logger, should there be a thread
+ processing the buildEvents and raising them on the filters and sinks
+ or should they be done synchronously
+
+
+
+
+ Events are processed synchronously
+
+
+
+
+ A thread is started which will process build events by raising them on a filter event source
+ or on the correct sink.
+
+
+
+
+ What is the current state of the logging service
+
+
+
+
+ When the logging service has been instantiated but not yet initialized through a call
+ to initializecomponent
+
+
+
+
+ The logging service has been initialized through a call to initialize component
+
+
+
+
+ The logging service is in the process of starting to shutdown.
+
+
+
+
+ The logging service completly shutdown
+
+
+
+
+ Logging services is used as a helper class to assist logging messages in getting to the correct loggers.
+
+
+ Partial class half of LoggingService which contains the Logging methods.
+
+
+
+
+ The default maximum size for the logging event queue.
+
+
+
+
+ Lock for the nextProjectId
+
+
+
+
+ A cached reflection accessor for an internal member.
+
+
+ We use a BindingFlags.Public flag here because the getter is public, so although the setter is internal,
+ it is only discoverable with Reflection using the Public flag (go figure!)
+
+
+
+
+ A cached reflection accessor for an internal member.
+
+
+ We use a BindingFlags.Public flag here because the getter is public, so although the setter is internal,
+ it is only discoverable with Reflection using the Public flag (go figure!)
+
+
+
+
+ The mapping of build request configuration ids to project file names.
+
+
+
+
+ The current state of the logging service
+
+
+
+
+ Use to optimize away status messages. When this is set to true, only "critical"
+ events like errors are logged. Default is false
+
+
+
+
+ Contains a dictionary of loggerId's and the sink which the logger (of the given Id) is expecting to consume its messages
+
+
+
+
+ A list of ILoggers registered with the LoggingService
+
+
+
+
+ A list of LoggerDescriptions which describe how to create a forwarding logger on a node. These are
+ passed to each node as they are created so that the forwarding loggers can be registered on them.
+
+
+
+
+ The event source to which filters will listen to get the build events which are logged to the logging service through the
+ logging helper methods. Ie LogMessage and LogMessageEvent
+
+
+
+
+ Index into the eventSinkDictionary which indicates which sink is the sink for any logger registered through RegisterLogger
+
+
+
+
+ What is the Id for the next logger registered with the logging service.
+ This Id is unique for this instance of the loggingService.
+
+
+
+
+ The number of nodes in the system. Loggers may take different action depending on how many nodes are in the system.
+
+
+
+
+ Component host for this component which is used to get system parameters and other initialization information.
+
+
+
+
+ The IConfigCache instance obtained from componentHost (stored here to avoid repeated dictionary lookups).
+
+
+
+
+ The next project ID to assign when a project evaluation started event is received.
+
+
+
+
+ The next project ID to assign when a project started event is received.
+
+
+
+
+ The next target ID to assign when a target started event is received.
+
+
+
+
+ The next task ID to assign when a task started event is received.
+
+
+
+
+ What node is this logging service running on
+
+
+
+
+ Whether to include evaluation metaprojects in events.
+
+
+
+
+ Whether to include evaluation profiles in events.
+
+
+
+
+ Whether properties and items should be logged on
+ instead of .
+
+
+
+
+ Whether to include task inputs in task events.
+
+
+
+
+ A list of build submission IDs that have logged errors. If an error is logged outside of a submission, the submission ID is .
+
+
+
+
+ A list of warnings to treat as errors for an associated . If an empty set, all warnings are treated as errors.
+
+
+
+
+ A list of warnings to not to be promoted to errors for an associated .
+
+
+
+
+ A list of warnings to treat as messages for an associated .
+
+
+
+
+ The minimum message importance that must be logged because there is a possibility that a logger consumes it.
+ Null means that the optimization is disabled or no relevant logger has been registered.
+
+
+
+
+ Queue for asynchronous event processing.
+
+
+
+
+ Event set when message is consumed from queue.
+
+
+
+
+ Event set when queue become empty.
+
+
+
+
+ Even set when message is added into queue.
+
+
+
+
+ CTS for stopping logging event processing.
+
+
+
+
+ Task which pump/process messages from
+
+
+
+
+ The queue size above which the queue will close to messages from remote nodes.
+ This value should be selected such that during normal builds it is never reached.
+ It should also be low enough that we do not accumulate enough messages to cause
+ virtual memory exhaustion in extremely large builds.
+
+
+
+
+ By default our logMode is Asynchronous. We do this
+ because we are hoping it will make the system
+ more responsive when there are a large number of logging messages
+
+
+
+
+ Initialize an instance of a loggingService.
+
+ Should the events be processed synchronously or asynchronously
+ The node identifier.
+
+
+
+ When there is an exception on the logging thread, we do not want to throw the exception from there
+ instead we would like the exception to be thrown on the engine thread as this is where hosts expect
+ to see the exception. This event will transport the exception from the loggingService to the engine
+ which will register on this event.
+
+
+
+
+ Raised when a ProjectStarted event is about to be sent to the loggers.
+
+
+
+
+ Raised when a ProjectFinished event has just been sent to the loggers.
+
+
+
+
+ Properties we need to serialize from the child node
+
+
+
+
+ Should all properties be serialized from the child to the parent node
+
+
+
+
+ Is the logging running on a remote node
+
+
+
+
+ Gets the next project evaluation id.
+
+ This property is thread-safe
+
+
+
+ Gets the next project id.
+
+ This property is thread-safe
+
+
+
+ Gets the next target id.
+
+ This property is thread-safe
+
+
+
+ Gets the next task id.
+
+ This property is thread-safe
+
+
+
+ Provide the current state of the loggingService.
+ Is it Inistantiated
+ Has it been Initialized
+ Is it starting to shutdown
+ Has it shutdown
+
+
+
+
+ Use to optimize away status messages. When this is set to true, only "critical"
+ events like errors are logged.
+
+
+
+
+ Number of nodes in the system when the system is initially started
+
+
+
+
+ Gets or sets a value that will error when the build process fails an up-to-date check.
+
+
+
+
+ The list of descriptions which describe how to create forwarding loggers on a node.
+ This is used by the node provider to get a list of registered descriptions so that
+ they can be transmitted to child nodes.
+
+
+
+
+ Enumerator over all registered loggers.
+
+
+
+
+ What type of logging mode is the logger running under.
+ Is it Synchronous or Asynchronous
+
+
+
+
+ Get of warnings to treat as errors. An empty non-null set will treat all warnings as errors.
+
+
+
+
+ Get of warnings to not treat as errors. Only has any effect if WarningsAsErrors is empty but not null.
+
+
+
+
+ A list of warnings to treat as low importance messages.
+
+
+
+
+ Should evaluation events include generated metaprojects?
+
+
+
+
+ Should evaluation events include profiling information?
+
+
+
+
+ Should task events include task inputs?
+
+
+
+
+ Should properties and items be logged on
+ instead of ?
+
+
+
+
+ Determines if the specified submission has logged an errors.
+
+ The ID of the build submission. A value of "0" means that an error was logged outside of any build submission.
+ true if the build submission logged an errors, otherwise false.
+
+
+
+ Returns a collection of warnings to be logged as errors for the specified build context.
+
+ The build context through which warnings will be logged as errors.
+
+
+
+
+
+ Returns a collection of warnings not to be logged as errors for the specified build context.
+
+ The build context through which warnings will be kept as warnings.
+
+
+
+
+
+ Returns a collection of warnings to be demoted to messages for the specified build context.
+
+ The build context through which warnings will be logged as messages.
+
+
+
+
+
+ Helper method that unifies the logic for GetWarningsAsErrors, GetWarningsNotAsErrors, and GetWarningsAsMessages.
+ Specifically, this method returns a collection of codes that, within the context of a particular project, should
+ be treated specially. These tend to come from setting the associated properties in the project file. These are
+ added to previously known codes as necessary.
+
+ The specific context in which to consider special treatment for warnings.
+ A dictionary of all warnings to be treated special by for which projects.
+ Warning codes we already know should be promoted, demoted, or not promoted as relevant.
+
+
+
+
+ Adds warning codes that should be treated as errors to the known set.
+
+ The context in which to consider possible warnings to be promoted.
+ Codes to promote
+
+
+
+ Adds warning codes that should not be treated as errors even if WarnAsError is empty (specifying that all warnings should be promoted).
+
+ The context in which to consider warnings not to be promoted.
+ Codes not to promote
+
+
+
+ Adds warning codes that should be treated as messages.
+
+ The context in which to consider warnings to be demoted.
+ Codes to demote
+
+
+
+ Adds warning codes to be treated or not treated as warnings or errors to the set of project-specific codes.
+
+ Dictionary with what warnings are currently known (by project) that we will add to.
+ Context for the project to be added
+ Codes to add
+
+
+
+ Return an array which contains the logger type names
+ this can be used to display which loggers are registered on the node
+
+
+
+
+ Return an array which contains the sink names
+ this can be used to display which sinks are on the node
+
+
+
+
+ Returns the minimum logging importance that must be logged because there is a possibility that
+ at least one registered logger consumes it.
+
+
+
+
+ Create an instance of a LoggingService using the specified mode.
+ This method is used by the object factories to create instances of components.
+
+ Should the logger component created be synchronous or asynchronous
+ The identifier of the node.
+ An instantiated LoggingService as a IBuildComponent
+
+
+
+ NotThreadSafe, this method should only be called from the component host thread
+ Called by the build component host when a component is first initialized.
+
+ The component host for this object
+ When buildComponentHost is null
+ Service has already shutdown
+
+
+
+ NotThreadSafe, this method should only be called from the component host thread
+ Called by the build component host when the component host is about to shutdown.
+ 1. Shutdown forwarding loggers so that any events they have left to forward can get into the queue
+ 2. Terminate the logging thread
+ 3. Null out sinks and the filter event source so that no more events can get to the central loggers
+ 4. Shutdown the central loggers
+
+ Service has already shutdown
+ A logger may throw a logger exception when shutting down
+ A logger will wrap other exceptions (except ExceptionHandling.IsCriticalException exceptions) in a InternalLoggerException if it crashes during shutdown
+
+
+
+ Will receive a logging packet and send it to the correct
+ sink which is registered to the LoggingServices.
+ PacketReceived should be called from a single thread.
+
+ The node from which the packet was received.
+ A LogMessagePacket
+ Packet is null
+ Packet is not a NodePacketType.LogMessage
+
+
+
+ Serializing unknown CustomEvent which has to use unsecure BinaryFormatter by TranslateDotNet.
+ Since BinaryFormatter is going to be deprecated, log warning so users can use new Extended*EventArgs instead of custom
+ EventArgs derived from existing EventArgs.
+
+
+
+
+ Register an instantiated logger which implements the ILogger interface. This logger will be registered to a specific event
+ source (the central logger event source) which will receive all logging messages for a given build.
+ This should not be used on a node, Loggers are not to be registered on a child node.
+
+ ILogger
+ True if the logger has been registered successfully. False if the logger was not registered due to it already being registered before
+ If logger is null
+
+
+
+ Clear out all registered loggers so that none are registered.
+ If no loggers are registered, does nothing.
+
+
+ UNDONE: (Logging) I don't like the semantics of this. Why should unregistering imply shutting down? VS actually calls it before registering any loggers.
+ Also, why not just have ShutdownComponent? Or call this Shutdown or Dispose?
+
+
+
+
+ Register a distributed logger. This involves creating a new eventsource sink
+ and associating this with the central logger. In addition the sinkId needs
+ to be put in the loggerDescription so that nodes know what they need to
+ tag onto the event so that the message goes to the correct logger.
+
+ The central logger is initialized before the distributed logger
+
+ Central logger to receive messages from the forwarding logger, This logger cannot have been registered before
+ Logger description which describes how to create the forwarding logger, the logger description cannot have been used before
+ True if the distributed and central logger were registered, false if they either were already registered
+ If forwardingLogger is null
+ If a logger exception is thrown while creating or initializing the distributed or central logger
+ If any exception (other than a loggerException)is thrown while creating or initializing the distributed or central logger, we will wrap these exceptions in an InternalLoggerException
+
+
+
+ In order to setup the forwarding loggers on a node, we need to take in the logger descriptions and initialize them.
+ The method will create a forwarding logger, an eventRedirector which will redirect all forwarded messages to the forwardingLoggerSink.
+ All forwarding loggers will use the same forwardingLoggerSink.
+
+ Collection of logger descriptions which we would like to use to create a set of forwarding loggers on a node
+ The buildEventSink which the fowarding loggers will forward their events to
+ The id of the node the logging services is on
+ When forwardingLoggerSink is null
+ When loggerDescriptions is null
+
+
+
+ Will Log a build Event. Will also take into account OnlyLogCriticalEvents when determining
+ if to drop the event or to log it.
+
+ Only the following events will be logged if OnlyLogCriticalEvents is true:
+ CustomEventArgs
+ BuildErrorEventArgs
+ BuildWarningEventArgs
+
+ BuildEvent to log
+ buildEvent is null
+
+
+
+ This method will be called from multiple threads in asynchronous mode.
+
+ Determine where to send the buildevent either to the filters or to a specific sink.
+ When in Asynchronous mode the event should to into the logging queue (as long as we are initialized).
+ In Synchronous mode the event should be routed to the correct sink or logger right away
+
+ BuildEventArgs to process
+ buildEvent is null
+
+
+
+ Wait for the logging messages in the logging queue to be completely processed.
+ This is required because for Logging build finished or when the component is to shutdown
+ we need to make sure we process all of the events before the build finished event is raised
+ and we need to make sure we process all of the logging events before we shutdown the component.
+
+
+
+
+ Adds data to the EventArgs of the log packet that the main node is aware of, but doesn't
+ get serialized for perf reasons.
+
+
+
+
+ Create a logging thread to process the logging queue.
+
+
+
+
+ Clean resources used for logging event processing queue.
+
+
+
+
+ Create a logging thread to process the logging queue
+
+
+
+
+ Shutdown an ILogger
+ Rethrow LoggerExceptions
+ Wrap all other exceptions in an InternalLoggerException
+
+ Logger to shutdown
+ Any exception comming from a logger during shutdown that is not a LoggerException is wrapped in an InternalLoggerException and thrown
+ Errors during logger shutdown may throw a LoggerException, in this case the exception is re-thrown
+
+
+
+ Create an event source to which the distributed (filter loggers) can attach to and listen
+ for logging events. This event source will consume events which are logged against
+ the logging service and raise them on itself.
+
+
+
+
+ The logging services thread loop. This loop will wait until the logging queue has build events.
+ When this happens the thread will start to process the queue items by raising the build event
+ on either a filter event source or a sink depending on where the message is supposed to go.
+
+ WaitHandle returns something other than 0 or 1
+
+
+
+ Route the event to the correct location, this is mostly used by the logging thread since it may have a buildevent or a tuple.
+
+
+
+
+ Route the build event to the correct filter or sink depending on what the sinId is in the build event.
+
+
+
+
+ Route the build event to the filter
+
+ Build event that needs to be routed to the correct filter or sink.
+
+
+
+ Initializes the logger and adds it to the list of loggers maintained by the engine.
+ This method is not expected to be called from multiple threads
+
+ A logger exception thrown by a logger when its initialize call is made
+ Any exceptions from initializing the logger which are not loggerExceptions are caught and wrapped in a InternalLoggerException
+ Any exception which is a ExceptionHandling.IsCriticalException will not be wrapped
+
+
+
+ Updates based on the given .
+
+ The newly registered logger.
+
+ This method contains knowledge about several logger classes used by MSBuild. The goal is to optimize common scenarios,
+ such as building on the command line with normal or minimum verbosity. If the user registers an external custom logger,
+ we will fall back to "minimum importance" == Low because we don't know how the logger processes messages, therefore we
+ must feed it everything.
+
+
+
+
+ When an exception is raised in the logging thread, we do not want the application to terminate right away.
+ Whidbey and orcas msbuild have the logger exceptions occurring on the engine thread so that the host can
+ catch and deal with these exceptions as they may occur somewhat frequently due to user generated loggers.
+ This method will raise the exception on a delegate to which the engine is registered to. This delegate will
+ send the exception to the engine so that it can be raised on the engine thread.
+
+ Exception to raise to event handlers
+
+
+
+ Raise the project started event, if necessary.
+
+
+
+
+ Raise the project finished event, if necessary.
+
+
+
+
+ Get the project name from a context ID. Throw an exception if it's not found.
+
+
+
+
+ Determines if the specified warning should be treated as a low importance message.
+
+ A that specifies the warning.
+ true if the warning should be treated as a low importance message, otherwise false.
+
+
+
+ Determines if the specified warning should be treated as an error.
+
+ A that specifies the warning.
+ true if the warning should be treated as an error, otherwise false.
+
+
+
+ Logs a comment (BuildMessageEventArgs) with a certain MessageImportance level
+
+ Event context information which describes who is logging the event
+ How important is the message, this will determine which verbosities the message will show up on.
+ The higher the importance the lower the verbosity needs to be for the message to be seen
+ String which identifies the message in the string resx
+ Arguments for the format string indexed by messageResourceName
+ MessageResourceName is null
+
+
+
+ Log a comment
+
+ Event context information which describes who is logging the event
+ How important is the message, this will determine which verbosities the message will show up on.
+ The higher the importance the lower the verbosity needs to be for the message to be seen
+ Message to log
+ BuildEventContext is null
+ Message is null
+
+
+
+ Log a comment
+
+ Event context information which describes who is logging the event
+ How important is the message, this will determine which verbosities the message will show up on.
+ The higher the importance the lower the verbosity needs to be for the message to be seen
+ Message to log
+ Message formatting arguments
+ BuildEventContext is null
+ Message is null
+
+
+
+ Logs an error with all registered loggers using the specified resource string.
+
+ Event context information which describes who is logging the event
+ File information where the error happened
+ String key to find the correct string resource
+ Arguments for the string resource
+
+
+
+ Logs an error
+
+ Event context information which describes who is logging the event
+ Can be null.
+ File information about where the error happened
+ String index into the string.resx file
+ Arguments for the format string in the resource file
+ MessageResourceName is null
+
+
+
+ Logs an error with a given message
+
+ Event context information which describes who is logging the event
+ Can be null.
+ Can be null.
+ Can be null.
+ File information about where the error happened
+ Error message which will be displayed
+ File is null
+ Message is null
+
+
+
+ Logs an error regarding an invalid project file . Since this method may be multiple times for the same InvalidProjectException
+ we do not want to log the error multiple times. Once the exception has been logged we set a flag on the exception to note that
+ it has already been logged.
+
+ Event context information which describes who is logging the event
+ Exception which is causing the error
+ InvalidProjectFileException is null
+ BuildEventContext is null
+
+
+
+ Logs an error regarding an unexpected build failure
+ This will include a stack dump.
+
+ BuildEventContext of the error
+ Exception wihch caused the build error
+ Provides file information about where the build error happened
+
+
+
+ Logs an error regarding an unexpected task failure.
+ This will include a stack dump.
+
+ BuildEventContext of the error
+ Exceptionm which caused the error
+ File information which indicates which file the error is happening in
+ Task which the error is happening in
+ TaskName is null
+
+
+
+ Logs an error regarding an unexpected failure using the specified resource string.
+ This will include a stack dump.
+
+ BuildEventContext of the error
+ Exception which will be used to generate the error message
+ File information which describes where the error happened
+ String name for the resource string to be used
+ Arguments for messageResourceName
+ MessageResourceName is null
+
+
+
+ Logs an warning regarding an unexpected task failure
+ This will include a stack dump.
+
+ Event context information which describes who is logging the event
+ The exception to be used to create the warning text
+ The file information which indicates where the warning happened
+ Name of the task which the warning is being raised from
+
+
+
+ Logs a warning using the specified resource string.
+
+ Event context information which describes who is logging the event
+ Can be null.
+ File information which describes where the warning happened
+ String name for the resource string to be used
+ Arguments for messageResourceName
+
+
+
+ Logs a warning
+
+ Event context information which describes who is logging the event
+ Subcategory resource Name. Can be null.
+ The warning code of the message. Can be null.
+ Help keyword for the message. Can be null.
+ The file information which will describe where the warning happened
+ Warning message to log
+
+
+
+ Logs that the build has started
+
+
+
+
+ Logs that the build has finished
+
+ Did the build pass or fail
+
+
+
+
+
+
+
+
+
+
+
+
+ Logs that a project evaluation has finished
+
+ Event context for the project.
+ Project file being built
+ Global properties used for the evaluation.
+ Properties produced by the evaluation.
+ Items produced by the evaluation.
+ Profiler results if evaluation profiling was enabled.
+ BuildEventContext is null
+
+
+
+ Logs that a project build has started
+
+ The event context of the node which is spawning this project.
+ The id of the submission.
+ The id of the project configuration which is about to start
+ BuildEventContext of the project who is requesting "projectFile" to build
+ Project file to build
+ Target names to build
+ Initial property list
+ Initial items list
+ EvaluationId of the project instance
+ The project context id
+ The build event context for the project.
+ parentBuildEventContext is null
+ projectBuildEventContext is null
+
+
+
+ Logs that a project has finished
+
+ Event context for the project.
+ Project file being built
+ Did the project pass or fail
+ BuildEventContext is null
+
+
+
+ Logs that a target started
+
+ Event context for the project spawning this target
+ Name of target
+ Project file being built
+ Project file which contains the target
+ The name of the parent target.
+ The reason the parent target built the target.
+ The build event context for the target.
+ BuildEventContext is null
+
+
+
+ Logs that a target has finished.
+
+ Event context for the target
+ Target which has just finished
+ Project file being built
+ Project file which contains the target
+ Did the target pass or fail
+ Target outputs for the target.
+ BuildEventContext is null
+
+
+
+ Logs that task execution has started.
+
+ Event context for the task
+ Task Name
+ Project file being built
+ Project file which contains the task
+ BuildEventContext is null
+
+
+
+ Logs that task execution has started.
+
+ Event context for the target spawning this task.
+ Task Name
+ Project file being built
+ Project file which contains the task
+ The line number in the file where the task invocation is located.
+ The column number in the file where the task invocation is located.
+ The build event context for the task.
+ BuildEventContext is null
+
+
+
+ Logs that a task has finished executing.
+
+ Event context for the task
+ Name of the task
+ Project which is being processed
+ Project file which contains the task
+ Did the task pass or fail
+ BuildEventContext is null
+
+
+
+ Logs a telemetry event.
+
+ Event context information which describes who is logging the event
+ The event name.
+ The list of properties assocated with the event.
+
+
+
+ Logs a file to include in the binlogs
+
+ Event context information which describes who is logging the event
+ Full path to response file
+
+
+
+ Factory to create components of the type LoggingService
+
+
+
+
+ What kind of LoggerMode are the logging services when created.
+ They could be Synchronous or Asynchronous
+
+
+
+
+ What node is this logging service being created on.
+
+
+
+
+ Tell the factory what kind of logging services is should create
+
+ Synchronous or Asynchronous
+ The node identifier.
+
+
+
+ Create an instance of a LoggingService and returns is as an IBuildComponent
+
+ An instance of a LoggingService as a IBuildComponent
+
+
+
+ The logging context for an entire node.
+
+
+
+
+ Used to create the initial, base logging context for the node.
+
+ The logging service to use.
+ The
+ true if this is an in-process node, otherwise false.
+
+
+
+ Log the completion of a build
+
+ Did the build succeed or not
+
+
+
+ Log that a project has started if it has no parent (the first project)
+
+ The build request entry for this project.
+ The BuildEventContext to use for this project.
+
+
+
+ Log that a project has started if it is serviced from the cache
+
+ The build request.
+ The configuration used to build the request.
+ The BuildEventContext to use for this project.
+
+
+
+ Logs the project started/finished pair for projects which are skipped entirely because all
+ of their results are available in the cache.
+
+
+
+
+ A logging context for a project.
+
+
+
+
+ The project's full path
+
+
+
+
+ Constructs a project logging context.
+
+
+
+
+ Constructs a project logging context.
+
+
+
+
+ Constructs a project logging contexts.
+
+
+
+
+ Log that the project has finished
+
+ Did the build succeede or not
+
+
+
+ Log that a target has started
+
+
+
+
+ A logging context for building a specific target within a project.
+
+
+
+
+ Should target outputs be logged also.
+
+
+
+
+ The project to which this target is attached.
+
+
+
+
+ The target being built.
+
+
+
+
+ Creates a new target logging context from an existing project context and target.
+
+
+
+
+ Constructor used to support out-of-proc task host (proxy for in-proc logging service.)
+
+
+
+
+ Should target outputs be logged also.
+
+
+
+
+ Retrieves the project logging context.
+
+
+
+
+ Retrieves the target.
+
+
+
+
+ Log that a target has finished
+
+
+
+
+ Log that a task is about to start
+
+
+
+
+ An enumerable wrapper for items that clones items as they are requested,
+ so that writes have no effect on the items.
+
+
+ This class is designed to be passed to loggers.
+ The expense of copying items is only incurred if and when
+ a logger chooses to enumerate over it.
+
+
+
+
+ Enumerable that this proxies
+
+
+
+
+ Constructor
+
+ Enumerator this class should proxy
+
+
+
+ Returns an enumerator that provides copies of the items
+ in the backing store.
+ Each dictionary entry has key of the item type and value of an ITaskItem.
+ Type of the enumerator is imposed by backwards compatibility for ProjectStartedEvent.
+
+
+
+
+ Returns an enumerator that provides copies of the items
+ in the backing store.
+
+
+
+
+ A logging context representing a task being built.
+
+
+
+
+ The target context in which this task is being built.
+
+
+
+
+ The task instance
+
+
+
+
+ The name of the task
+
+
+
+
+ Constructs a task logging context from a parent target context and a task node.
+
+
+
+
+ Constructor used to support out-of-proc task host (proxy for in-proc logging service.)
+
+
+
+
+ Retrieves the target logging context.
+
+
+
+
+ Retrieves the task node.
+
+
+
+
+ Retrieves the task node.
+
+
+
+
+ Log that a task has just completed
+
+
+
+
+ Log a warning based on an exception
+
+ The exception to be logged as a warning
+ The file in which the warning occurred
+ The task in which the warning occurred
+
+
+
+ Gets or sets the level of detail to show in the event log.
+
+ Verbosity level.
+
+
+
+ Gets or sets the number of MSBuild processes participating in the build. If greater than 1,
+ include the node ID
+
+
+
+
+ The console logger takes a single parameter to suppress the output of the errors
+ and warnings summary at the end of a build.
+
+ null
+
+
+
+ Suppresses the display of project headers. Project headers are
+ displayed by default unless this property is set.
+
+ This is only needed by the IDE logger.
+
+
+
+ Suppresses the display of error and warnings summary.
+ If null, user has made no indication.
+
+
+
+
+ Provide access to the write hander delegate so that it can be redirected
+ if necessary (e.g. to a file)
+
+
+
+
+ Parses out the logger parameters from the Parameters string.
+
+
+
+
+ An implementation of IComparer useful for comparing the keys
+ on DictionaryEntry's
+
+ Uses CurrentCulture for display purposes
+
+
+
+ An implementation of IComparer useful for comparing the ItemSpecs
+ on ITaskItem's
+
+ Uses CurrentCulture for display purposes
+
+
+
+ Indents the given string by the specified number of spaces.
+
+ String to indent.
+ Depth to indent.
+
+
+
+ Splits strings on 'newLines' with tolerance for Everett and Dogfood builds.
+
+ String to split.
+
+
+
+ Writes a newline to the log.
+
+
+
+
+ Writes a line from a resource string to the log, using the default indentation.
+
+
+
+
+
+
+ Writes a line from a resource string to the log, using the specified indentation.
+
+
+
+
+ Writes to the log, using the default indentation. Does not
+ terminate with a newline.
+
+
+
+
+ If requested, display a performance summary at the end of the build. This
+ shows how much time (and # hits) were spent inside of each project, target,
+ and task.
+
+
+
+
+ Writes to the log, using the specified indentation. Does not
+ terminate with a newline.
+
+
+
+
+ Writes a line to the log, using the default indentation.
+
+
+
+
+
+ Writes a line to the log, using the specified indentation.
+
+
+
+
+ Check to see what kind of device we are outputting the log to, is it a character device, a file, or something else
+ this can be used by loggers to modify their outputs based on the device they are writing to
+
+
+
+
+ Determines whether the current verbosity setting is at least the value
+ passed in.
+
+
+
+
+ Returns the minimum logger verbosity required to log a message with the given importance.
+
+ The message importance.
+ True if the message should be rendered using lighter colored text.
+ The logger verbosity required to log a message of the given .
+
+
+
+ Sets foreground color to color specified
+
+
+
+
+ Resets the color
+
+
+
+
+ Sets foreground color to color specified using ANSI escape codes
+
+ foreground color
+
+
+
+ Resets the color using ANSI escape codes
+
+
+
+
+ Changes the foreground color to black if the foreground is the
+ same as the background. Changes the foreground to white if the
+ background is black.
+
+ foreground color for black
+ current background
+
+
+
+ Does nothing, meets the ColorSetter delegate type
+
+ foreground color (is ignored)
+
+
+
+ Does nothing, meets the ColorResetter delegate type
+
+
+
+
+ Writes out the list of property names and their values.
+ This could be done at any time during the build to show the latest
+ property values, using the cached reference to the list from the
+ appropriate ProjectStarted event.
+
+ List of properties
+
+
+
+ Writes out the environment as seen on build started.
+
+
+
+
+ Generate a list which contains the properties referenced by the properties
+ enumerable object
+
+
+
+
+ Write the environment of the build as was captured on the build started event.
+
+
+
+
+ Writes out the list of item specs and their metadata.
+ This could be done at any time during the build to show the latest
+ items, using the cached reference to the list from the
+ appropriate ProjectStarted event.
+
+
+
+
+ Extract the Items from the enumerable object and return a sorted list containing these items
+
+
+
+
+ Dump the initial items provided.
+ Overridden in ParallelConsoleLogger.
+
+
+
+
+ Returns a performance counter for a given scope (either task name or target name)
+ from the given table.
+
+ Task name or target name.
+ Table that has tasks or targets.
+
+
+
+
+ Display the timings for each counter in the dictionary.
+
+
+
+
+
+ Records performance information consumed by a task or target.
+
+
+
+
+ Construct.
+
+
+
+
+
+ Name of the scope.
+
+
+
+
+ Total number of calls so far.
+
+
+
+
+ Total accumulated time so far.
+
+
+
+
+ Whether or not this scope was reentered. Timing information is not recorded in these cases.
+
+
+
+
+ Whether or not this task or target is executing right now.
+
+
+
+
+ Returns an IComparer that will put performance counters
+ in descending order by elapsed time.
+
+
+
+
+ Private IComparer class for sorting performance counters
+ in descending order by elapsed time.
+
+
+
+
+ Compare two PerformanceCounters.
+
+
+
+
+
+
+
+ Signs up the console logger for all build events.
+
+ Available events.
+
+
+
+ Apply a logger parameter.
+ parameterValue may be null, if there is no parameter value.
+
+
+
+
+ Apply the verbosity value
+
+
+
+
+ Time the build started
+
+
+
+
+ Delegate used to change text color.
+
+
+
+
+ Delegate used to reset text color
+
+
+
+
+ Number of spaces that each level of indentation is worth
+
+
+
+
+ Keeps track of the current indentation level.
+
+
+
+
+ The kinds of newline breaks we expect.
+
+ Currently we're not supporting "\r".
+
+
+
+ Visual separator for projects. Line length was picked arbitrarily.
+
+
+
+
+ Console logger parameters delimiters.
+
+
+
+
+ Console logger parameter value split character.
+
+
+
+
+ When true, accumulate performance numbers.
+
+
+
+
+ When true, show the list of item and property values at the start of each project
+
+
+
+
+ Should the target output items be displayed
+
+
+
+
+ When true, suppresses all messages except for warnings. (And possibly errors, if showOnlyErrors is true.)
+
+
+
+
+ When true, suppresses all messages except for errors. (And possibly warnings, if showOnlyWarnings is true.)
+
+
+
+
+ When true the environment block supplied by the build started event should be printed out at the start of the build
+
+
+
+
+ When true, indicates that the logger should tack the project file onto the end of errors and warnings.
+
+
+
+
+ Since logging messages are processed serially, we can use a single StringBuilder wherever needed.
+ It should not be done directly, but rather through the interface methods.
+
+
+
+
+ Number of errors encountered in this build
+
+
+
+
+ Number of warnings encountered in this build
+
+
+
+
+ A list of the errors that have occurred during this build.
+
+
+
+
+ A list of the warnings that have occurred during this build.
+
+
+
+
+ Accumulated project performance information.
+
+
+
+
+ Accumulated target performance information.
+
+
+
+
+ Accumulated task performance information.
+
+
+
+
+
+
+
+
+
+ Since logging messages are processed serially, we can reuse a single StringBuilder wherever needed.
+
+
+
+
+ Acquired StringBuilder must be returned before next use.
+ Unbalanced releases are not supported.
+
+
+
+
+ This class will throw an exception when it receives any event except for the build started or build finished event
+ this logger is good to use if a distributed logger is attached but does not want to forward any events
+
+
+
+
+ Helper class to indent all the lines of a potentially multi-line string with
+ minimal CPU and memory overhead.
+
+
+ is a functional replacement for the following code:
+
+ string IndentString(string s, int indent)
+ {
+ string[] newLines = { "\r\n", "\n" };
+ string[] subStrings = s.Split(newLines, StringSplitOptions.None);
+
+ StringBuilder result = new StringBuilder(
+ (subStrings.Length * indent) +
+ (subStrings.Length * Environment.NewLine.Length) +
+ s.Length);
+
+ for (int i = 0; i < subStrings.Length; i++)
+ {
+ result.Append(' ', indent).Append(subStrings[i]);
+ result.AppendLine();
+ }
+
+ return result.ToString();
+ }
+
+ On net472, benchmarks show that the optimized version runs in about 50-60% of the time
+ and has about 15% of the memory overhead of the code that it replaces.
+
+ On net7.0, the optimized version runs in about 45-55% of the time and has about 30%
+ of the memory overhead of the code that it replaces.
+
+
+
+
+
+ Stores and manages projects and targets events for logging purposes
+
+
+
+
+ Adds a new project to the list of project started events which have been fired
+
+
+
+
+ Adds a new target to the list of project started events which have been fired
+
+
+
+
+ Get a call stack of event contexts for a starting point event context
+
+
+
+
+ Set an error flag on all projects in the call stack of a given event context
+
+
+
+
+ Retrieve the project call stack based on the starting point of buildEventContext e
+
+
+
+
+ Get a deferred project started event based on a given event context
+
+
+
+
+ Get a deferred target started event based on a given event context
+
+
+
+
+ Will remove a project started event from the list of deferred project started events
+
+
+
+
+ Will remove a project started event from the list of deferred project started events
+
+
+
+
+ Compares two event contexts on ProjectContextId and NodeId only
+
+
+
+
+ Compares two event contexts based on the ProjectContextId, NodeId, and TargetId only
+
+
+
+
+ This class stands in for a full project started event because it contains only the
+ minimum amount of inforomation needed for the logger
+
+
+
+
+ This class stands in for a full target started event because it contains only the
+ minimum amount of inforomation needed for the logger
+
+
+
+
+ This class is used as a key to group warnings and errors by the project entry point and the target they
+ error or warning was in
+
+
+
+
+ Structure that holds both project and entrypoint keys
+
+
+
+
+ Output the projectKey or the projectKey and the entrypointKey depending on the verbosity level of the logger
+
+
+
+
+ The default of he ToString method should be to output the projectKey or the projectKey and the entrypointKey depending if a
+ entry point key exists or not
+
+
+
+
+
+ This class implements the default logger that outputs event data
+ to the console (stdout).
+
+ This class is not thread safe.
+
+
+
+ Associate a (nodeID and project_context_id) to a target framework.
+
+
+
+
+ Default constructor.
+
+
+
+
+ Create a logger instance with a specific verbosity. This logs to
+ the default console.
+
+
+
+
+ Initializes the logger, with alternate output handlers.
+
+
+
+
+ Check to see if the console is going to a char output such as a console,printer or com port, or if it going to a file
+
+
+
+
+ Allows the logger to take action based on a parameter passed on when initializing the logger
+
+
+
+
+ Keep track of the last event displayed so target names can be displayed at the correct time
+
+
+
+
+ Reset the states of per-build member variables
+ VSW#516376
+
+
+
+
+ Handler for build started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for build finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ At the end of the build, repeats the errors and warnings that occurred
+ during the build, and displays the error count and warning count.
+ Does this in a "flat" style, without context.
+
+
+
+
+ At the end of the build, repeats the errors and warnings that occurred
+ during the build, and displays the error count and warning count.
+ Does this in a "nested" style.
+
+
+
+
+ Handler for project started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ In case the items are stored on ProjectEvaluationFinishedEventArgs
+ (new behavior), we first store the value per evaluation, and then
+ in ProjectStarted, find the value from the project's evaluation
+ and use that.
+
+
+
+
+ Handler for project finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Writes out the list of property names and their values.
+ This could be done at any time during the build to show the latest
+ property values, using the cached reference to the list from the
+ appropriate ProjectStarted event.
+
+ A object containing information about the build event.
+ List of properties
+
+
+
+ Write the environment strings to the console.
+
+
+
+
+ Writes out the list of item specs and their metadata.
+ This could be done at any time during the build to show the latest
+ items, using the cached reference to the list from the
+ appropriate ProjectStarted event.
+
+ A object containing information about the build event.
+ List of items
+
+
+
+ Handler for target started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for target finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for task started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for task finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Finds the LogOutProperty string to be printed in messages.
+
+ Build event to extract context information from.
+
+
+
+ Prints an error event
+
+
+
+
+ Prints a warning event
+
+
+
+
+ Prints a message event
+
+
+
+
+ Prints out a message event to the console
+
+
+
+
+ Writes a message to the console, aligned and formatted to fit within the console width
+
+ Message to be formatted to fit on the console
+ Has the prefix(timestamp or key been written)
+
+
+
+ Writes a message to the console, aligned and formatted to fit within the console width
+
+ Message to be formatted to fit on the console
+ Has the prefix(timestamp or key been written)
+ An amount to adjust the prefix by.
+
+
+
+ Write message taking into account whether or not the prefix (timestamp and key) have already been written on the line
+
+
+
+
+ Will display the target started event which was deferred until the first visible message for the target is ready to be displayed
+
+
+
+
+ Will display the project started event which was deferred until the first visible message for the project is ready to be displayed
+
+
+
+
+ Prints a custom event
+
+
+
+
+ Writes message contextual information for each message displayed on the console
+
+
+
+
+ Extract the full project key from the BuildEventContext
+
+
+
+
+ Returns a performance counter for a given scope (either task name or target name)
+ from the given table.
+
+ Task name or target name.
+ Table that has tasks or targets.
+
+
+
+ Stores and calculates the performance numbers for the different events
+
+
+
+
+ Add a started event to the performance counter, by adding the event this sets the start time of the performance counter
+
+
+
+
+ Add a finished event to the performance counter, so perf numbers can be calculated
+
+
+
+
+ Print out the performance counter message
+
+
+
+
+ Align output to multiple lines so no logged test is lost due to limited .
+ During alignment optional prefix/indent is applied.
+
+
+ This class is not thread safe.
+
+
+
+
+ Constructor.
+
+ Console buffer width. -1 if unknown/unlimited
+ Whether messages are aligned/wrapped into console buffer width
+
+
+
+
+ Based on bufferWidth split message into multiple lines and indent if needed.
+ TAB character are interpreted by standard Console logic.
+
+ Input message. May contains tabs and new lines. Both \r\n and \n is supported but replaced into current environment new line.
+ true if message already contains prefix (message context, timestamp, etc...).
+ Width of the prefix. Every line in result string will be indented by this number of spaces except 1st line with already written prefix.
+ Aligned message ready to be written to Console
+
+ For optimization purposes this method uses single instance. This makes this method non thread safe.
+ Calling side is expected this usage is non-concurrent. This shall not be an issue as it is expected that writing into Console shall be serialized anyway.
+
+
+
+
+ Append aligned and indented message lines into running .
+
+
+
+
+ Utility helper functions for formatting logger output.
+
+
+
+
+ Formats the timestamp in the log as Hours:Minutes:Seconds.Milliseconds
+
+
+
+
+ Formats a timespan for logger output.
+
+
+ String representation of time-span.
+
+
+
+ Default constructor.
+
+
+
+
+ Create a logger instance with a specific verbosity. This logs to
+ the default console.
+
+ Verbosity level.
+
+
+
+ Initializes the logger, with alternate output handlers.
+
+
+
+
+
+
+
+
+ Reset the states of per-build member variables
+ VSW#516376
+
+
+
+
+ Handler for build started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for build finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ At the end of the build, repeats the errors and warnings that occurred
+ during the build, and displays the error count and warning count.
+
+
+
+
+ Handler for project started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for project finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for target started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for target finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for task started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for task finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Prints an error event
+
+
+
+
+ Prints a warning event
+
+
+
+
+ Prints a message event
+
+
+
+
+ Prints a custom event
+
+
+
+
+ Writes project started messages.
+
+
+
+
+ Displays the text for a project started message.
+
+ current project file
+ previous project file
+ targets that are being invoked
+ indentation level
+
+
+
+ Writes target started messages.
+
+
+
+
+ Determines the currently building project file.
+
+ name of project file currently being built
+
+
+
+ Displays project started and target started messages that
+ are shown only when the associated project or target produces
+ output.
+
+
+
+
+ Marks the current frame to indicate that an error or warning
+ occurred during it.
+
+
+
+
+ Checks the condition passed in. If it's false, it emits an error message to the console
+ indicating that there's a problem with the console logger. These "problems" should
+ never occur in the real world after we ship, unless there's a bug in the MSBuild
+ engine such that events aren't getting paired up properly. So the messages don't
+ really need to be localized here, since they're only for our own benefit, and have
+ zero value to a customer.
+
+
+
+
+
+
+
+ This enumeration represents the kinds of context that can be
+ stored in the context stack.
+
+
+
+
+ This struct represents context information about a single
+ target or project.
+
+
+
+
+ Initializes a new instance of the struct with all fields specified.
+
+ the type of the this frame
+ display state. true indicates this frame has been displayed to the user
+ indentation level for this frame
+ frame id
+ targets to execute, in the case of a project frame
+ the file name where the target is defined
+ parent project file
+
+
+
+ Indicates if project or target frame.
+
+
+
+
+ Set to true to indicate the user has seen a message about this frame.
+
+
+
+
+ The number of tabstops to indent this event when it is eventually displayed.
+
+
+
+
+ A string associated with this frame -- should be a target name
+ or a project file.
+
+
+
+
+ For a TargetStarted or a ProjectStarted event, this field tells us
+ the name of the *parent* project file that was responsible.
+
+
+
+
+ Stores the TargetNames from the ProjectStarted event. Null for Target frames.
+
+
+
+
+ For TargetStarted events, this stores the filename where the Target is defined
+ (e.g., Microsoft.Common.targets). This is different than the project that is
+ being built.
+ For ProjectStarted events, this is null.
+
+
+
+
+ True if there were errors/warnings during the project or target frame.
+
+
+
+
+ The FrameStack class represents a (lifo) stack of Frames.
+
+
+
+
+ The frames member is contained by FrameStack and does
+ all the heavy lifting for FrameStack.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Remove and return the top element in the stack.
+
+ Thrown when stack is empty.
+
+
+
+ Returns, but does not remove, the top of the stack.
+
+
+
+
+ Push(f) adds f to the top of the stack.
+
+ a frame to push
+
+
+
+ Constant property that indicates the number of elements
+ in the stack.
+
+
+
+
+ s.IsEmpty() is true iff s.Count == 0
+
+
+
+
+ contextStack is the only interesting state in the console
+ logger. The context stack contains a sequence of frames
+ denoting current and previous containing projects and targets
+
+
+
+
+ The queue of packets we have received but which have not yet been processed.
+
+
+
+
+ Set when packet pump receive packets and put them to .
+
+
+
+
+ Set when the packet pump terminates.
+
+
+
+
+ Exception appeared when the packet pump unexpectedly terminates (due to connection problems or because of deserialization issues).
+
+
+
+
+ Set when packet pump should shutdown.
+
+
+
+
+ The packet factory.
+
+
+
+
+ The memory stream for a read buffer.
+
+
+
+
+ The thread which runs the asynchronous packet pump
+
+
+
+
+ The stream from where to read packets.
+
+
+
+
+ The binary translator for reading packets.
+
+
+
+
+ True if this side is gracefully disconnecting.
+ In such case we have sent last packet to server side and we expect
+ it will soon broke pipe connection - unless client do it first.
+
+
+
+
+ Registers a packet handler.
+
+ The packet type for which the handler should be registered.
+ The factory used to create packets.
+ The handler for the packets.
+
+
+
+ Unregisters a packet handler.
+
+ The type of packet for which the handler should be unregistered.
+
+
+
+ Deserializes and routes a packer to the appropriate handler.
+
+ The node from which the packet was received.
+ The packet type.
+ The translator to use as a source for packet data.
+
+
+
+ Routes a packet to the appropriate handler.
+
+ The node id from which the packet was received.
+ The packet to route.
+
+
+
+ Called when a packet has been received.
+
+ The node from which the packet was received.
+ The packet.
+
+
+
+ Initializes the packet pump thread.
+
+
+
+
+ Stops the packet pump thread.
+
+
+
+
+ This method handles the packet pump reading. It will terminate when the terminate event is
+ set.
+
+
+ Instead of throwing an exception, puts it in and raises event .
+
+
+
+
+ Signalize that from now on we expect server will break connected named pipe.
+
+
+
+
+ Identify the .NET host of the current process.
+
+ The full path to the executable hosting the current process, or null if running on Full Framework on Windows.
+
+
+
+ Creates a new MSBuild process
+
+
+
+
+ This is an implementation of out-of-proc server node endpoint.
+
+
+
+
+ Instantiates an endpoint to act as a client
+
+ The name of the pipe to which we should connect.
+
+
+
+
+ Returns the host handshake for this node endpoint
+
+
+
+
+ Defines a cache for registered task objects.
+
+
+
+
+ Disposes of all of the objects with the specified lifetime.
+
+
+
+
+ Registers a task object with the specified key and lifetime.
+
+
+
+
+ Gets a previously registered task object.
+
+
+
+
+ Unregisters a task object.
+
+
+
+
+ This is a cache of objects which are registered to be disposed of at a specified time.
+
+
+
+
+ The cache for AppDomain lifetime objects.
+
+
+
+
+ The cache for Build lifetime objects.
+
+
+
+
+ Static constructor which registers a callback to dispose of AppDomain-lifetime cache objects.
+
+
+
+
+ Disposes of all of the cached objects registered with the specified lifetime.
+
+
+
+
+ Registers a task object with the specified key and lifetime.
+
+
+
+
+ Gets a previously registered task object.
+
+
+
+
+ Unregisters a previously registered task object.
+
+
+
+
+ Returns true if a collection is not yet created or if it has no content.
+
+
+
+
+ Returns the collection associated with a particular lifetime.
+
+
+
+
+ Gets the lazy cache for the specified lifetime.
+
+
+
+
+ Cleans up a cache collection.
+
+
+
+
+ This is a cache of objects which are registered to be disposed of at a specified time.
+
+
+
+
+ Finalizes an instance of the class.
+
+
+
+
+ Initialize the build component.
+
+
+
+
+ Shuts down the build component.
+
+
+
+
+ Implementation of Dispose pattern.
+
+
+
+
+ Component factory.
+
+
+
+
+ Implementation of Dispose pattern.
+
+
+
+
+ Logging context and helpers for evaluation logging
+
+
+
+
+ Log that the project has finished
+
+
+
+
+ Represents an exception that occurs when an SdkResolver throws an unhandled exception.
+
+
+
+
+ A subclass of which creates resolver manifests and SDK resolvers only once and
+ then returns cached results.
+
+
+
+
+ Cached list of default resolvers. Set eagerly.
+
+
+
+
+ Cached manifest -> resolver dictionary. Populated lazily.
+
+
+
+
+ Cached list of all resolvers. Set lazily.
+
+
+
+
+ Cached list of all resolver manifests. Set lazily.
+
+
+
+
+ A lock object protecting and .
+
+
+
+
+ A static instance of .
+
+
+ The set of available SDK resolvers is expected to be fixed for the given MSBuild installation so it should be safe to use
+ a static instance as opposed to creating or for each
+ instance.
+
+
+
+
+ Initializes a new instance by setting .
+
+
+
+
+ Resets the cached state, intended for tests only.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default SDK resolver for compatibility with VS2017 RTM.
+
+ Default Sdk folder will to:
+ 1) MSBuildSDKsPath environment variable if defined
+ 2) When in Visual Studio, (VSRoot)\MSBuild\Sdks\
+ 3) Outside of Visual Studio (MSBuild Root)\Sdks\
+
+
+
+
+
+ An interface for services which resolve SDKs.
+
+
+
+
+ A method to use when sending packets to a remote host.
+
+
+
+
+ Clears the cache for the specified build submission ID.
+
+ The build submission ID to clear from the cache.
+
+
+
+ Clear the entire cache
+
+
+
+
+ Resolves the full path to the specified SDK.
+
+ The build submission ID that the resolution request is for.
+ The containing information about the referenced SDK.
+ The to use when logging messages during resolution.
+ The of the element which referenced the SDK.
+ The full path to the solution file, if any, that is resolving the SDK.
+ The full path to the project file that is resolving the SDK.
+ Indicates whether or not the resolver is allowed to be interactive.
+ Indicates whether or not the resolver is running in Visual Studio.
+ Whether to throw an exception should the SDK fail to be resolved.
+ An containing information about the resolved SDK. If no resolver was able to resolve it, then == false.
+
+
+
+ An implementation of that is hosted in an out-of-proc node for multi-proc builds. This instance of the service
+ sends requests to the main node that SDK resolution is handled in a central location. This instance is registered in
+ using a factory so that parameters can be passed to the constructor. This service caches responses for a given build so that it can avoid sending
+ a packet where possible. The cache is always in effect here because the out-of-proc node is only used for builds.
+
+ Since this object is a registered , it is a singleton for the main process. To get an instance of it, you
+ must have access to an and call and pass .
+
+
+
+
+ The cache of responses which is cleared between builds.
+
+
+
+
+ An event to signal when a response has been received.
+
+
+
+
+ An object used to store the last response from a remote node. Since evaluation is single threaded, this object is only set one at a time.
+
+
+
+
+ Initializes a new instance of the OutOfProcNodeSdkResolverService class.
+
+ A to use when sending packets to the main node.
+
+
+
+
+
+
+
+
+
+
+
+
+ Handles a response from the main node.
+
+
+
+
+
+ A factory used when creating a which can pass parameters to its constructor. Our
+ dependency inject cannot pass parameters to constructors so this factory is used as a middle man.
+
+
+
+
+ Stores the SendPacket delegate to use.
+
+
+
+
+ An internal implementation of .
+
+
+
+
+ Stores the cache in a set of concurrent dictionaries. The main dictionary is by build submission ID and the inner dictionary contains a case-insensitive SDK name and the cached .
+
+
+
+
+ An internal implementation of .
+
+
+
+
+ Find all files that are to be considered SDK Resolvers. Pattern will match
+ Root\SdkResolver\(ResolverName)\(ResolverName).dll.
+
+
+
+
+
+
+
+ Serialization contract for an SDK Resolver manifest
+
+
+
+
+ Sdk resolver manifest display name.
+
+
+ This field should be used only for logging purposes. Do not use for any actual processing, unless that are tests.
+
+
+
+
+ Path for resolvers dll location.
+
+
+
+
+ Regex which matches all the sdk names that could be resolved by the resolvers associated with given manifest.
+
+
+
+
+ The time-out interval for the name pattern regex in milliseconds.
+
+
+ This number should notify us when the name matching regex executes unreasonable amount of time (for example, have an infinite recursive regex expression).
+ One should avoid to put such a regex into a resolver's xml and we want to catch this situation early. Half a second seems to be a reasonable time in which regex should finish.
+
+
+
+
+ Deserialize the file into an SdkResolverManifest.
+
+ Path to the manifest xml file.
+ Path to the directory containing the manifest.
+ New deserialized collection instance.
+
+
+
+ Represents an SDK resolver request which is serialized and sent between nodes. This is mostly a wrapper around
+ with an additional implementation.
+
+
+
+
+ An implementation of that is hosted in the main node for multi-proc builds. This instance of the service
+ handles requests from out-of-proc nodes so that SDK resolution is handled in a central location. This instance is registered in
+ and can be overridden for different contexts. This service calls the to do any actual SDK resolution
+ because the is used for stand-alone evaluations where there is no build context available so caching
+ is not an option.
+
+ Since this object is a registered , it is a singleton for the main process. To get an instance of it, you
+ must have access to an and call and pass .
+
+
+
+
+ A factory which is registered to create an instance of this class.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The main implementation of which resolves SDKs. This class is the central location for all SDK resolution and is used
+ directly by the main node and non-build evaluations and is used indirectly by the out-of-proc node when it sends requests to the main node.
+
+
+
+
+ Stores the singleton instance for a particular process.
+
+
+
+
+ A lock object used for this class.
+
+
+
+
+ Stores resolver state by build submission ID.
+
+
+
+
+ Stores the list of SDK resolvers which were loaded.
+
+
+ Need it for supporting the ChangeWave less than . Remove when move out Wave17_4.
+
+
+
+
+ Stores the loaded SDK resolvers, mapped to the manifest from which they came.
+
+
+
+
+ Stores the list of manifests of specific SDK resolvers which could be loaded.
+
+
+
+
+ Stores the list of manifests of general SDK resolvers which could be loaded.
+
+
+
+
+ Stores an which can load registered SDK resolvers.
+
+
+ Unless the 17.10 changewave is disabled, we use a singleton instance because the set of SDK resolvers
+ is not expected to change during the lifetime of the process.
+
+
+
+
+ Gets the current instance of for this process.
+
+
+
+
+
+
+
+ Determines if the is the same as the specified version. If the object has null for the version,
+ this method will always return true since null can match any version.
+
+ An object.
+ The version to compare.
+ true if the specified SDK reference has the same version as the specified result, otherwise false.
+
+
+
+
+
+
+
+
+
+ Resolves the sdk in two passes. First pass consists of all specific resolvers (i.e. resolvers with pattern), which match the sdk name.
+ The resolvers are ordered by the priority in first pass and are tried until one of them succeeds.
+ If the first pass is unsuccessful, on the second pass all the general resolvers (i.e. resolvers without pattern), ordered by their priority, are tried one after one.
+ After that, if the second pass is unsuccessful, sdk resolution is unsuccessful.
+
+
+
+
+ Used for unit tests only. This is currently only called through reflection in Microsoft.Build.Engine.UnitTests.TransientSdkResolution.CallResetForTests
+
+ An to use for loading SDK resolvers.
+ Explicit set of SdkResolvers to use for all SDK resolution.
+
+
+
+ A base class for "hosted" ISdkResolverService implementations which are registered by an .
+
+
+
+
+ An event to signal for waiting threads when the is being shut down.
+
+
+
+
+ The current which is hosting this component.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An internal implementation of .
+
+
+
+
+ An internal implementation of .
+
+
+
+
+ Part of BuildTelemetry which is collected on client and needs to be sent to server,
+ so server can log BuildTelemetry once it is finished.
+
+
+
+
+ Constructor for deserialization
+
+
+
+
+ Contains all of the information necessary for a entry node to run a command line.
+
+
+
+
+ Retrieves the packet type.
+
+
+
+
+ Command line including arguments
+
+
+
+
+ The startup directory
+
+
+
+
+ The process environment.
+
+
+
+
+ The culture
+
+
+
+
+ The UI culture.
+
+
+
+
+ Console configuration of Client.
+
+
+
+
+ Part of BuildTelemetry which is collected on client and needs to be sent to server,
+ so server can log BuildTelemetry once it is finished.
+
+
+
+
+ Private constructor for deserialization
+
+
+
+
+ Translates the packet to/from binary form.
+
+ The translator to use.
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Packet type.
+
+
+
+
+ Console output for the message
+
+
+
+
+ Private constructor for deserialization
+
+
+
+
+ Packet type.
+ This has to be in sync with
+
+
+
+
+ Private constructor for deserialization
+
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Helper class for maintaining the component collection
+
+
+
+
+ The build component factories.
+
+
+
+
+ The host used to initialize components.
+
+
+
+
+ Constructor.
+
+
+
+
+ The creation pattern to use for this component.
+
+
+
+
+ The component should be created as a singleton.
+
+
+
+
+ A new instance of the component should be created with every request.
+
+
+
+
+ Registers the default factories.
+
+
+
+
+ Shuts down all factories registered to this component factory collection.
+
+
+
+
+ Shuts down a specific singleton component.
+
+
+
+
+ Registers a factory to replace one of the defaults. Creation pattern is inherited from the original.
+
+ The type which is created by this factory.
+ The factory to be registered.
+
+
+
+ Registers a factory to replace one of the defaults. Creation pattern is inherited from the original.
+
+ The type which is created by this factory.
+ The instance to be registered.
+
+
+
+ Adds a factory.
+
+ The type which is created by this factory.
+ Delegate which is responsible for creating the Component.
+ Creation pattern.
+
+
+
+ Gets an instance of the specified component type from the host.
+
+ The component type to be retrieved
+ The component
+
+
+
+ A helper class wrapping build components.
+
+
+
+
+ The factory used to construct instances of the component.
+
+
+
+
+ The singleton instance for components which adhere to the singleton pattern.
+
+
+
+
+ Constructor.
+
+
+
+
+ Constructor for existing singleton.
+
+
+
+
+ Retrieves the component type.
+
+
+
+
+ Retrieves the creation pattern.
+
+
+
+
+ Gets an instance of the component.
+
+
+
+
+ Shuts down the single instance for this component type.
+
+
+
+
+ This class implements the "CallTarget" task, which invokes other targets within the same
+ project file. Marked RunInMTA because we do not want this task to ever be invoked explicitly
+ on the STA if the RequestBuilder is running on another thread, as this will cause thread
+ id validation checks to fail.
+
+
+
+
+ The task logging helper
+
+
+
+
+ A list of targets to build. This is a required parameter. If you want to build the
+ default targets, use the task and pass in Projects=$(MSBuildProjectFile).
+
+ Array of target names.
+
+
+
+ Outputs of the targets built in each project.
+
+ Array of output items.
+
+
+
+ When this is true, instead of calling the engine once to build all the targets (for each project),
+ we would call the engine once per target (for each project). The benefit of this is that
+ if one target fails, you can still continue with the remaining targets.
+
+
+
+
+ Deprecated. Does nothing.
+
+
+
+
+ The host object, from ITask
+
+
+
+
+ Instructs the MSBuild engine to build one or more targets in the current project.
+
+ true if all targets built successfully; false if any target fails
+
+
+
+ The factory
+
+
+
+
+ Constructor
+
+
+
+
+ Returns the factory name
+
+
+
+
+ Returns the task type.
+
+
+
+
+ Initialize the factory.
+
+
+
+
+ Gets all of the parameters on the task.
+
+
+
+
+ Creates an instance of the task.
+
+
+
+
+ Cleanup for the task.
+
+
+
+
+ Helper class to convert ItemGroup parameters to a string value for logging.
+
+
+
+
+ The default character limit for logging parameters. 10k is somewhat arbitrary, see https://github.com/dotnet/msbuild/issues/4907.
+
+
+
+
+ The default parameter limit for logging. 200 is somewhat arbitrary, see https://github.com/dotnet/msbuild/pull/5210.
+
+
+
+
+ by itself doesn't have the implementation
+ to materialize the Message as that's a declaration assembly. We inject the logic
+ here.
+
+
+
+
+ Gets a text serialized value of a parameter for logging.
+
+
+
+
+ Given an object wrapping a scalar value that will be set on a task,
+ returns a suitable string to log its value, with a trailing newline.
+ First line is already indented.
+ Indent of any subsequent line should be 12 spaces.
+
+
+
+
+ This class implements the "MSBuild" task, which hands off child project files to the MSBuild engine to be built.
+
+
+
+
+ Enum describing the behavior when a project doesn't exist on disk.
+
+
+
+
+ Default when unset by user.
+
+
+
+
+ Skip the project if there is no file on disk.
+
+
+
+
+ Error if the project does not exist on disk.
+
+
+
+
+ Build even if the project does not exist on disk.
+
+
+
+
+
+ The build engine, from ITask
+
+
+
+
+
+ The host object, from ITask
+
+
+
+
+ A list of property name/value pairs to apply as global properties to
+ the child project.
+ A typical input: "propname1=propvalue1", "propname2=propvalue2", "propname3=propvalue3".
+
+
+ The fact that this is a string[] makes the following illegal:
+
+ The engine fails on this because it doesn't like item lists being concatenated with string
+ constants when the data is being passed into an array parameter. So the workaround is to
+ write this in the project file:
+
+
+
+
+
+ Gets or sets a semicolon-delimited list of global properties to remove.
+
+
+
+
+ The targets to build in each project specified by the property.
+
+ Array of target names.
+
+
+
+ The projects to build.
+
+ Array of project items.
+
+
+
+ Outputs of the targets built in each project.
+
+ Array of output items.
+
+
+
+ Indicates if the paths of target output items should be rebased relative to the calling project.
+
+ true, if target output item paths should be rebased
+
+
+
+ Forces the task to stop building the remaining projects as soon as any of
+ them fail.
+
+
+
+
+ When this is true, instead of calling the engine once to build all the targets (for each project),
+ we would call the engine once per target (for each project). The benefit of this is that
+ if one target fails, you can still continue with the remaining targets.
+
+
+
+
+ Value of ToolsVersion to use when building projects passed to this task.
+
+
+
+
+ When this is true we call the engine with all the projects at once instead of
+ calling the engine once per project
+
+
+
+
+ If true the project will be unloaded once the operation is completed
+
+
+
+
+ Deprecated. Does nothing.
+
+
+
+
+ When this is true, project files that do not exist on the disk will be skipped. By default,
+ such projects will cause an error.
+
+
+
+
+ Un-escape Targets, Properties (including Properties and AdditionalProperties as Project item metadata)
+ will be un-escaped before processing. e.g. %3B (an escaped ';') in the string for any of them will
+ be treated as if it were an un-escaped ';'
+
+
+
+
+ If set, MSBuild will skip the targets specified in this build request if they are not defined in the
+ to build. This only applies to this build request (if another target calls the
+ "missing target" later this will still result in an error).
+
+ This could be useful when implementing a breaking protocol change between projects or stubbing behavior
+ which may not make sense in all project types (e.g. Restore).
+
+
+
+
+
+ Instructs the MSBuild engine to build one or more project files whose locations are specified by the
+ property.
+
+ true if all projects build successfully; false if any project fails
+
+
+
+ Build projects which have not been skipped. This will be done in parallel
+
+
+
+
+ Expand and re-construct arrays of all targets and properties
+
+
+
+
+ The state enumeration for SchedulableRequests.
+
+
+
+
+ This request has been submitted but has never been scheduled so it has executed no tasks and does not currently have an
+ entry residing on any node. There may be multiple requests with the same global request id in this state.
+
+
+
+
+ This request may continue executing. It already has an entry on a node. There may only ever be one request with a given
+ global request id in this state.
+
+
+
+
+ This request is currently executing tasks on its node. In this case it will be the only task executing on the node -
+ all other tasks are either Ready or Blocked. There may only ever be one request with a given global request id in this state.
+
+
+
+
+ This request is currently blocked on one or more requests which must complete before it may continue. There may only ever be one
+ request with a given global request id in this state.
+
+
+
+
+ This request has yielded control of the node while it is running a long-running out-of-process program. Any number of tasks on a
+ node may be in the yielding state.
+
+
+
+
+ This request has completed and removed from the system.
+
+
+
+
+ A representation of a BuildRequest and associated data used by the Scheduler to track work being done by the build system.
+ SchedulableRequests implicitly form a directed acyclic graph showing the blocking/blocked relationship between the requests
+ known to the system at any given time. These associations are updated by the BlockByRequest, UnblockWithResult and ResumeExecution
+ methods. These methods, along with Complete, cause state changes which the SchedulingData object will record. That data can be
+ queried to determine the state of any request or node in the system.
+
+
+
+
+ The request collection to which this belongs.
+
+
+
+
+ The current state.
+
+
+
+
+ The node to which this request is assigned.
+
+
+
+
+ The BuildRequest this class represents.
+
+
+
+
+ The schedulable request which issued this request.
+
+
+
+
+ The list of targets which were actively building at the time we were blocked.
+
+
+
+
+ The requests which must complete before we can continue executing. Indexed by global request id and node request id.
+ Each global request id may have multiple requests which map to it, but they will have separate node request ids.
+
+
+
+
+ The requests which cannot continue until we have finished executing.
+
+
+
+
+ The time this request was created.
+
+
+
+
+ The time this request started building.
+
+
+
+
+ The time this request was completed.
+
+
+
+
+ Records of the amount of time spent in each of the states.
+
+
+
+
+ Constructor.
+
+
+
+
+ The current state of the request.
+
+
+
+
+ The underlying BuildRequest.
+
+
+
+
+ The request which issued this request.
+
+
+
+
+ Returns the node to which this request is assigned.
+
+
+
+
+ The set of active targets.
+
+
+
+
+ The target we are blocked on
+
+
+
+
+ Gets a count of the requests we are blocked by.
+
+
+
+
+ Gets the set of requests for which we require results before we may proceed.
+
+
+
+
+ Gets a count of the requests we are blocking.
+
+
+
+
+ Gets the set of requests which cannot proceed because they are waiting for results from us.
+
+
+
+
+ The time this request was created.
+
+
+
+
+ The time this request started building.
+
+
+
+
+ The time this request was completed.
+
+
+
+
+ Number of cores granted as part of running the build request.
+
+
+
+
+ Gets the amount of time we spent in the specified state.
+
+
+
+
+ Inticates the request is yielding the node.
+
+
+
+
+ Indicates the request is ready to reacquire the node.
+
+
+
+
+ Marks this request as being blocked by the specified request. Establishes the correct relationships between the requests.
+
+ The request which is blocking this one.
+ The list of targets this request was currently building at the time it became blocked.
+ Target that we are blocked on which is being built by
+
+
+
+ Indicates that there are partial results (project producing the result is still running) which can be used to unblock this request. Updates the relationships between requests.
+
+
+
+
+ Indicates that there are results which can be used to unblock this request. Updates the relationships between requests.
+
+
+
+
+ Resumes execution of the request on the specified node.
+
+
+
+
+ Completes this request.
+
+
+
+
+ Removes an unscheduled request.
+
+
+
+
+ Verifies that the current state is as expected.
+
+
+
+
+ Verifies that the current state is as expected.
+
+
+
+
+ Change to the specified state. Update internal counters.
+
+
+
+
+ Detects a circular dependency. Throws a CircularDependencyException if one exists. Circular dependencies can occur
+ under the following conditions:
+ 1. If the blocking request's global request ID appears in the ancestor chain (Direct).
+ 2. If a request appears in the ancestor chain and has a different global request ID but has an active target that
+ matches one of the targets specified in the blocking request (Direct).
+ 3. If the blocking request exists elsewhere as a blocked request with the same global request ID, and one of its children
+ (recursively) matches this request's global request ID (Indirect).
+ 4. If the blocking request's configuration is part of another request elsewhere which is also blocked, and that request
+ is building targets this blocking request is building, and one of that blocked request's children (recursively)
+ matches this request's global request ID (Indirect).
+
+
+
+
+ Detects a circular dependency where the request which is about to block us is already blocked by us, usually as a result
+ of it having been previously scheduled in a multiproc scenario, but before this request was able to execute.
+
+
+ Let A be 'this' project and B be 'blockingRequest' (the request which is going to block A.)
+ An indirect circular dependency exists if there is a dependency path from B to A. If there is no
+ existing blocked request B' with the same global request id as B, then there can be no path from B to A because B is a brand new
+ request with no other dependencies. If there is an existing blocked request B' with the same global request ID as B, then we
+ walk the set of dependencies recursively searching for A. If A is found, we have a circular dependency.
+
+
+
+
+ Build our ancestor list then throw the circular dependency error.
+
+
+
+
+ Detects a circular dependency where the blocking request is in our direct ancestor chain.
+
+
+
+
+ Removes associations with all blocking requests and throws an exception.
+
+
+
+
+ Removes the association between this request and the one we are blocked by.
+
+
+
+
+ A key for blocking requests combining the global request and node request ids.
+
+
+
+
+ The global request id.
+
+
+
+
+ The request id known to the node.
+
+
+
+
+ Constructor over a request.
+
+
+
+
+ Constructor over a result.
+
+
+
+
+ Equals override.
+
+
+
+
+ GetHashCode override.
+
+
+
+
+ Manages full tracking activation and suspension.
+
+
+
+
+ The default name of the MSBuild property to read for the relative path to the full tracking .tlog files.
+ If this property isn't set in the project, full tracking is turned off.
+
+
+
+
+ The full path to where full tracking .tlog files should be written.
+
+
+
+
+ A value indicating whether this instance is tracking a full tracking suspension
+ (as opposed to activation).
+
+
+
+
+ The name of the task as given to FileTracker.dll.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ The state of the object regarding whether it is actively tracking or suspending tracking.
+
+
+
+
+ No tracking or suspension operation is in effect as a result of this instance.
+
+
+
+
+ This instance has invoked full tracking.
+
+
+
+
+ This instance has suspended full tracking.
+
+
+
+
+ Disposes the FullTracking object, causing full tracking to end, or resume,
+ depending on how this object was created.
+
+
+
+
+ Starts full tracking.
+
+ taskLoggingContext.TargetLoggingContext.Target.Name
+ taskNode.Name
+ buildRequestEntry.ProjectRootDirectory
+ buildRequestEntry.RequestConfiguration.Project.PropertiesToBuildWith
+
+ An object that will stop full tracking when disposed.
+
+
+
+
+ Suspends full tracking.
+
+ An object that will resume full tracking when disposed.
+
+
+
+ Disposes the FullTracking object, causing full tracking to end, or resume,
+ depending on how this object was created.
+
+
+
+
+ Gets the task name to pass to Tracker.
+
+
+
+
+ This class manages the set of schedulable requests. In concert with SchedulableRequest, it tracks all relationships
+ between requests in the system, verifies state change validity and provides efficient methods for querying request relationships.
+
+
+
+
+ Maps global request Id to an executing request.
+
+
+
+
+ Maps global request Id to a blocked request.
+
+
+
+
+ Maps global request Id to a blocked request.
+
+
+
+
+ Maps global request Id to a ready request.
+
+
+
+
+ Holds all of the unscheduled requests.
+
+
+
+
+ Maps a schedulable request directly to the node holding it in the linked list. This allows us to perform an O(1) operation to
+ remove the node from the linked list without exposing the list directly.
+
+
+
+
+ Maps node id to the requests scheduled on it.
+
+
+
+
+ Maps a node id to the currently executing request, if any.
+
+
+
+
+ Maps a node id to those requests which are ready to execute, if any.
+
+
+
+
+ Maps a node id to the set of configurations assigned to it.
+
+
+
+
+ Maps a configuration id to the node to which it is assigned.
+
+
+
+
+ Maps a configuration id to the requests which apply to it.
+
+
+
+
+ The sum of number of cores explicitly granted to all build requests.
+
+
+
+
+ This is the hierarchy of build requests as they were created.
+
+
+
+
+ The sequence of events which have taken place during this build.
+
+
+
+
+ The current time for events. This is set by the scheduler when it does a scheduling cycle in response to an event.
+
+
+
+
+ Constructor.
+
+
+
+
+ Retrieves all of the build events.
+
+
+
+
+ Retrieves all of the executing requests.
+
+
+
+
+ Gets a count of all executing requests.
+
+
+
+
+ Retrieves all of the ready requests.
+
+
+
+
+ Gets a count of all the ready requests.
+
+
+
+
+ Gets the total number of cores granted to executing and yielding build requests.
+
+
+
+
+ Retrieves all of the blocked requests.
+
+
+
+
+ Gets a count of all of the blocked requests.
+
+
+
+
+ Retrieves all of the yielded requests.
+
+
+
+
+ Gets a count of all of the yielded requests.
+
+
+
+
+ Retrieves all of the unscheduled requests.
+
+
+
+
+ Gets a count of all the unscheduled requests.
+
+
+
+
+ Enumerates the unscheduled requests which don't have other instances scheduled already.
+
+
+
+
+ Gets all of the configurations for this build.
+
+
+
+
+
+ Gets or sets the current event time.
+
+
+
+
+ Creates a new request and adds it to the system
+
+
+ New requests always go on the front of the queue, because we prefer to build the projects we just received first (depth first, absent
+ any particular scheduling algorithm such as in the single-proc case.)
+
+
+
+
+ Updates the state of the specified request.
+
+
+
+
+ Gets the requests assigned to a particular configuration.
+
+
+
+
+ Retrieves the number of requests which exist in the system that are attributed to the specified configuration.
+
+
+
+
+ Retrieves a request which is currently executing.
+
+
+
+
+ Retrieves a request which is currently blocked.
+
+
+
+
+ Retrieves a request which is currently blocked, or null if there is none.
+
+
+
+
+ Retrieves a request which is currently yielding.
+
+
+
+
+ Retrieves a request which is ready to continue executing.
+
+
+
+
+ Retrieves a request which has been assigned to a node and is in the executing, yielding, blocked, or ready states.
+
+
+
+
+ Returns true if the specified node has an executing request, false otherwise.
+
+
+
+
+ Returns the number of configurations assigned to the specified node.
+
+
+
+
+ Gets the request currently executing on the node.
+
+
+
+
+ Determines if the specified request is currently scheduled.
+
+
+
+
+ Retrieves the count all of the requests scheduled to the specified node.
+
+
+
+
+ Retrieves all of the requests scheduled to the specified node.
+
+
+
+
+ Retrieves all of the ready requests on the specified node.
+
+
+
+
+ Retrieves a set of build requests which have the specified parent. If root is null, this will retrieve all of the
+ top-level requests.
+
+
+
+
+ Returns the node id to which this request should be assigned based on its configuration.
+
+ The node if one has been assigned for this configuration, otherwise -1.
+
+
+
+ Returns true if the request can be scheduled to the specified node.
+
+
+
+
+ Explicitly grants CPU cores to a request.
+
+
+
+
+ Explicitly removes previously granted CPU cores from a request.
+
+
+
+
+ Unassigns the node associated with a particular configuration.
+
+
+ The operation is only valid when there are no scheduled requests for this configuration.
+
+
+
+
+ Gets a schedulable request with the specified global request id if it is currently scheduled.
+
+
+
+
+ Verifies that the request is scheduled and in the expected state.
+
+
+
+
+ A scheduling event.
+
+
+
+
+ The time the event took place.
+
+
+
+
+ The request involved in the event.
+
+
+
+
+ The state of the request before the event.
+
+
+
+
+ The state of the request as a result of the event.
+
+
+
+
+ Constructor.
+
+
+
+
+ The time the event took place.
+
+
+
+
+ The request involved in the event.
+
+
+
+
+ The state of the request before the event.
+
+
+
+
+ The state of the request as a result of the event.
+
+
+
+
+ The MSBuild Scheduler
+
+
+
+
+ The invalid node id
+
+
+
+
+ ID used to indicate that the results for a particular configuration may at one point
+ have resided on this node, but currently do not and will need to be transferred back
+ in order to be used.
+
+
+
+
+ The in-proc node id
+
+
+
+
+ The virtual node, used when a request is initially given to the scheduler.
+
+
+
+
+ If MSBUILDCUSTOMSCHEDULER = CustomSchedulerForSQL, the default multiplier for the amount by which
+ the count of configurations on any one node can exceed the average configuration count is 1.1 --
+ + 10%.
+
+
+
+
+ Content of the environment variable MSBUILDSCHEDULINGUNLIMITED
+
+
+
+
+ If MSBUILDSCHEDULINGUNLIMITED is set, this flag will make AtSchedulingLimit() always return false
+
+
+
+
+ If MSBUILDNODELIMITOFFSET is set, this will add an offset to the limit used in AtSchedulingLimit()
+
+
+
+
+ The result of calling NativeMethodsShared.GetLogicalCoreCount() unless overriden with MSBUILDCORELIMIT.
+
+
+
+
+ The weight of busy nodes in GetAvailableCoresForExplicitRequests().
+
+
+
+
+ { nodeId -> NodeInfo }
+ A list of nodes we know about. For the non-distributed case, there will be no more nodes than the
+ maximum specified on the command-line.
+
+
+
+
+ The number of inproc nodes that can be created without hitting the
+ node limit.
+
+
+
+
+ The number of out-of-proc nodes that can be created without hitting the
+ node limit.
+
+
+
+
+ The collection of all requests currently known to the system.
+
+
+
+
+ A queue of RequestCores requests waiting for at least one core to become available.
+
+
+
+
+ The component host.
+
+
+
+
+ The configuration cache.
+
+
+
+
+ The results cache.
+
+
+
+
+ The next ID to assign for a global request id.
+
+
+
+
+ Flag indicating that we are supposed to dump the scheduler state to the disk periodically.
+
+
+
+
+ Flag used for debugging by forcing all scheduling to go out-of-proc.
+
+
+
+
+ The path into which debug files will be written.
+
+
+
+
+ If MSBUILDCUSTOMSCHEDULER = CustomSchedulerForSQL, the user may also choose to set
+ MSBUILDCUSTOMSCHEDULERFORSQLCONFIGURATIONLIMITMULTIPLIER to the value by which they want
+ the max configuration count for any one node to exceed the average configuration count.
+ If that env var is not set, or is set to an invalid value (negative, less than 1, non-numeric)
+ then we use the default value instead.
+
+
+
+
+ The plan.
+
+
+
+
+ If MSBUILDCUSTOMSCHEDULER is set, contains the requested scheduling algorithm
+
+
+
+
+ Constructor.
+
+
+
+
+ In the circumstance where we want to specify the scheduling algorithm via the secret environment variable
+ MSBUILDCUSTOMSCHEDULING, the scheduling algorithm used will be assigned to a delegate of this type.
+
+
+
+
+ Retrieves the minimum configuration id which can be assigned that won't conflict with those in the scheduling plan.
+
+
+
+
+ Returns true if the specified configuration is currently in the scheduler.
+
+ The configuration id
+ True if the specified configuration is already building.
+
+
+
+ Gets a configuration id from the plan which matches the specified path.
+
+ The path.
+ The configuration id which has been assigned to this path.
+
+
+
+ Retrieves the request executing on a node.
+
+
+
+
+ Reports that the specified request has become blocked and cannot proceed.
+
+
+
+
+ Informs the scheduler of a specific result.
+
+
+
+
+ Signals that a node has been created.
+
+ Information about the nodes which were created.
+ A new set of scheduling actions to take.
+
+
+
+ Signals that the build has been aborted by the specified node.
+
+ The node which reported the failure.
+
+
+
+ Resets the scheduler.
+
+
+
+
+ Writes out the detailed summary of the build.
+
+ The id of the submission which is at the root of the build.
+
+
+
+ Requests CPU resources.
+
+
+
+
+ Returns CPU resources.
+
+
+
+
+ Initializes the component with the specified component host.
+
+ The component host.
+
+
+
+ Shuts down the component.
+
+
+
+
+ Factory for component construction.
+
+
+
+
+ Updates the state of a request based on its desire to yield or reacquire control of its node.
+
+
+
+
+ Attempts to schedule unassigned requests to free nodes.
+
+ The list which should be populated with responses from the scheduling.
+
+
+
+ Determines which requests to assign to available nodes.
+
+
+ This is where all the real scheduling decisions take place. It should not be necessary to edit functions outside of this
+ to alter how scheduling occurs.
+
+
+
+
+ Reads in the scheduling plan if one exists and has not previously been read; returns true if the scheduling plan
+ both exists and is valid, or false otherwise.
+
+
+
+
+ Assigns requests to nodes based on those which refer to the most other projects.
+
+
+
+
+ Assigns requests to nodes based on those which have the most plan time.
+
+
+
+
+ Assigns requests preferring those which are traversal projects as determined by filename.
+
+
+
+
+ Proxy build requests should be really cheap (only return properties and items) and it's not worth
+ paying the IPC cost and re-evaluating them on out of proc nodes (they are guaranteed to be evaluated in the Scheduler process).
+
+
+
+
+ Returns true if the request is for a traversal project. Traversals are used to find more work.
+
+
+
+
+ Assigns requests to nodes attempting to ensure each node has the same number of configurations assigned to it.
+
+
+
+
+ Assigns requests with the smallest file sizes first.
+
+
+
+
+ Assigns requests with the largest file sizes first.
+
+
+
+
+ Assigns requests preferring the ones which have the most other requests waiting on them using the transitive closure.
+
+
+
+
+ Assigns requests preferring those with the most requests waiting on them, but only counting those requests which are
+ directly waiting, as opposed to the transitive closure.
+
+
+
+
+ Assigns requests on a first-come, first-serve basis.
+
+
+
+
+ Custom scheduler for the SQL folks to solve a performance problem with their builds where they end up with a few long-running
+ requests on all but one node, and then a very large number of short-running requests on that one node -- which is by design for
+ our current scheduler, but makes it so that later in the build, when these configurations are re-entered with new requests, the
+ build becomes essentially serial because so many of the configurations are tied to that one node.
+
+ Fixes that problem by intentionally choosing to refrain from assigning new configurations to idle nodes if those idle nodes already
+ have more than their fair share of the existing configurations assigned to them.
+
+
+
+
+ Assigns the specified request to the specified node.
+
+
+
+
+ Returns the maximum number of cores that can be returned from a RequestCores() call at the moment.
+
+
+
+
+ Returns true if we are at the limit of work we can schedule.
+
+
+
+
+ Returns true if a request can be scheduled to a node, false otherwise.
+
+
+
+
+ Adds CreateNode responses to satisfy all the affinities in the list of requests, with the following constraints:
+
+ a) Issue no more than one response to create an inproc node, and aggressively issues as many requests for an out-of-proc node
+ as there are requests to assign to them.
+
+ b) Don't exceed the max node count, *unless* there isn't even one node of the necessary affinity yet. (That means that even if there's a max
+ node count of e.g., 3, and we have already created 3 out of proc nodes, we will still create an inproc node if affinity requires it; if
+ we didn't, the build would jam.)
+
+ Returns true if there is a pending response to create a new node.
+
+
+
+
+ Marks the specified request and all of its ancestors as having aborted.
+
+
+
+
+ Marks the request as being blocked by another request which is currently building a target whose results we need to proceed.
+
+
+
+
+ Marks the parent as blocked waiting for results from a results transfer.
+
+
+
+
+ Marks the request as being blocked by new requests whose results we must get before we can proceed.
+
+
+
+
+ Resumes executing a request which was in the Ready state for the specified node, if any.
+
+
+
+
+ Attempts to get results from the cache for this request. If results are available, reports them to the
+ correct node. If that action causes the parent to become ready and its node is idle, the parent is
+ resumed.
+
+
+
+
+ Satisfies pending resource requests. Requests are pulled from the queue in FIFO fashion and granted as many cores
+ as possible, optimizing for maximum number of cores granted to a single request, not for maximum number of satisfied
+ requests.
+
+
+
+
+ Determines which work is available which must be assigned to the nodes. This includes:
+ 1. Ready requests - those requests which can immediately resume executing.
+ 2. Requests which can continue because results are now available but we haven't distributed them.
+
+
+
+
+ Attempts to get a result from the cache to satisfy the request, and returns the appropriate response if possible.
+
+
+
+ True if caches misses are allowed, false otherwise
+
+
+
+ Records the result to the current cache if its config isn't in the override cache.
+
+ The result to potentially record in the current cache.
+
+
+
+ Gets the appropriate ScheduleResponse for a result, either to complete a submission or to report to a node.
+
+
+
+
+ Logs the project started/finished pair for projects which are skipped entirely because all
+ of their results are available in the cache.
+
+
+
+
+ This method determines how many requests are waiting for this request, taking into account the full tree of all requests
+ in all dependency chains which are waiting.
+
+
+
+
+ Gets the node affinity for the specified request.
+
+
+
+
+ Iterates through the set of available nodes and checks whether any of them is
+ capable of servicing this request or any of the requests that it is blocked
+ by (regardless of whether they are currently available to do so).
+
+
+
+
+ Determines if we have a matching request somewhere, and if so, assigns the same request ID. Otherwise
+ assigns a new request id.
+
+
+ UNDONE: (Performance) This algorithm should be modified so we don't have to iterate over all of the
+ requests to find a matching one. A HashSet with proper equality semantics and a good hash code for the BuildRequest
+ would speed this considerably, especially for large numbers of projects in a build.
+
+ The request whose ID should be assigned
+
+
+
+ Writes the graph representation of how the nodes were utilized.
+
+
+
+
+ Writes a single line of node utilization information.
+
+
+
+
+ Recursively dumps the build information for the specified hierarchy
+
+
+
+
+ Method used for debugging purposes.
+
+
+
+
+ Dumps the current state of the scheduler.
+
+
+
+
+ Dumps all of the configurations.
+
+
+
+
+ Dumps all of the requests.
+
+
+
+
+ Dumps the hierarchy of requests.
+
+
+
+
+ Dumps the state of a request.
+
+
+
+
+ Dumps detailed information about a request.
+
+
+
+
+ Write out the scheduling information so the next time we can read the plan back in and use it.
+
+
+
+
+ Retrieves the scheduling plan from the previous run.
+
+
+
+
+ Exception thrown when a circular dependency is detected in the Scheduler.
+
+
+
+
+ The ancestors which led to this circular dependency.
+
+
+
+
+ The request which caused the circular dependency.
+
+
+
+
+ Constructor.
+
+
+
+
+ Gets an enumeration of the ancestors which led to this circular dependency.
+
+
+
+
+ Gets the request which caused the circular dependency.
+
+
+
+
+ Class used to track time accumulated during scheduling.
+
+
+
+
+ The time the current counter started.
+
+
+
+
+ The accumulated time for this counter.
+
+
+
+
+ Constructor.
+
+
+
+
+ Retrieve the accumulated time.
+
+
+
+
+ Start the timer.
+
+
+
+
+ End the timer and update the accumulated time.
+
+
+
+
+ A SchedulingPlan contains timing and relationship information for a build which has already occurred. This data can then be
+ used by subsequent builds to determine how best to distribute work among several nodes.
+
+
+
+
+ The configuration cache.
+
+
+
+
+ The active scheduling data.
+
+
+
+
+ Mapping of project full paths to plan configuration data.
+
+
+
+
+ Mapping of configuration ids to plan configuration data.
+
+
+
+
+ Mapping of configuration ids to the set of configurations which were traversed to get to this configuration.
+
+
+
+
+ Constructor.
+
+
+
+
+ Returns true if a valid plan was read, false otherwise.
+
+
+
+
+ Returns the largest configuration id known to the plan.
+
+
+
+
+ Writes a plan for the specified submission id.
+
+
+
+
+ Reads a plan for the specified submission Id.
+
+
+
+
+ Returns the config id for the config specified by the path, if any.
+
+ The config id if one exists, otherwise BuildRequestConfiguration.InvalidConfigurationId
+
+
+
+ Gets the name of the plan file for a specified submission.
+
+
+
+
+ Analyzes the plan data which has been read.
+
+
+
+
+ Writes out configuration in order of the greatest total plan time.
+
+
+
+
+ Writes out configs in order of most immediate references.
+
+
+
+
+ Writes out configs in order of how often they are seen in the hierarchy.
+
+
+
+
+ This method finds all of the paths which lead to any given project
+
+
+
+
+ Recursively visits all nodes in the hierarchy.
+
+
+
+
+ Finds projects in order of expense and displays the paths leading to them.
+
+
+
+
+ Reads the hierarchy from a plan file.
+
+
+
+
+ Reads the accumulated time and path information for each configuration from the plan file.
+
+
+
+
+ Retrieves the root request for the specified submission id.
+
+ The request if one exists, otherwise null.
+
+
+
+ Writes out all of the dependencies for a specified request, recursively.
+
+
+
+
+ Recursively accumulates the amount of time spent in each configuration.
+
+
+
+
+ The data associated with a config as read from a build plan.
+
+
+
+
+ The configuration id.
+
+
+
+
+ The full path to the project.
+
+
+
+
+ The amount of time spent in the configuration.
+
+
+
+
+ The total time of all of the references.
+
+
+
+
+ The set of references.
+
+
+
+
+ The set of referrers.
+
+
+
+
+ Constructor.
+
+
+
+
+ Gets the configuration id.
+
+
+
+
+ Gets the configuration's full path.
+
+
+
+
+ Gets the configuration's accumulated time.
+
+
+
+
+ Gets the configuration's accumulated time for all of its references.
+
+
+
+
+ Retrieves the total time for this configuration, which includes the time spent on its references.
+
+
+
+
+ Retrieves the number of references this configuration has.
+
+
+
+
+ Retrieves the references from this configuration.
+
+
+
+
+ Retrieves the number of configurations which refer to this one.
+
+
+
+
+ Retrieves the configurations which refer to this one.
+
+
+
+
+ Adds the specified configuration as a reference.
+
+
+
+
+ Applies the specified duration offset to the configurations which refer to this one.
+
+
+
+
+ A struct representing the uniquely-identifying portion of a BuildRequestConfiguration. Used for lookups.
+
+
+
+
+ Constructor over a BuildRequestConfiguration.
+
+
+
+
+ Constructor over a Project.
+
+
+
+
+ Constructor taking individual arguments.
+
+
+
+
+ The full path to the project to build.
+
+
+
+
+ The tools version specified for the configuration.
+ Always specified.
+ May have originated from a /tv switch, or an MSBuild task,
+ or a Project tag, or the default.
+
+
+
+
+ The set of global properties which should be used when building this project.
+
+
+
+
+ This override is used to provide a hash code for storage in dictionaries and the like.
+
+
+ If two objects are Equal, they must have the same hash code, for dictionaries to work correctly.
+ Two configurations are Equal if their global properties are equivalent, not necessary reference equals.
+ So only include filename and tools version in the hashcode.
+
+ A hash code
+
+
+
+ Determines object equality
+
+ The object to compare with
+ True if they contain the same data, false otherwise
+
+
+
+ Equality of the configuration is the product of the equality of its members.
+
+ The other configuration to which we will compare ourselves.
+ True if equal, false otherwise.
+
+
+
+ Compares this object with another for equality
+
+ The object with which to compare this one.
+ True if the objects contain the same data, false otherwise.
+
+
+
+ The type of response.
+
+
+
+
+ There were no matching results, or some implicit targets need to be built.
+
+
+
+
+ All explicit and implicit targets have results.
+
+
+
+
+ Container for results of IResultsCache.SatisfyRequest
+
+
+
+
+ The results type.
+
+
+
+
+ The actual results, if the request was satisfied.
+
+
+
+
+ The subset of explicit targets which must be built because there are no results for them in the cache.
+
+
+
+
+ Constructor.
+
+ The response type.
+
+
+
+ This is an implementation of INodeEndpoint for the out-of-proc nodes. It acts only as a client.
+
+
+
+
+ Instantiates an endpoint to act as a client.
+
+ Whether this node may be reused for a later build.
+ Whether this node is low priority.
+
+
+
+ Returns the host handshake for this node endpoint.
+
+
+
+
+ The NodeManager class is responsible for marshalling data to/from the NodeProviders and organizing the
+ creation of new nodes on request.
+
+
+
+
+ The node provider for the in-proc node.
+
+
+
+
+ The node provider for out-of-proc nodes.
+
+
+
+
+ The build component host.
+
+
+
+
+ Mapping of manager-produced node IDs to the provider hosting the node.
+
+
+
+
+ The packet factory used to translate and route packets
+
+
+
+
+ The next node id to assign to a node.
+
+
+
+
+ The nodeID for the inproc node.
+
+
+
+
+ Flag indicating when the nodes have been shut down.
+ BUGBUG: This is a fix which corrects an RI blocking BVT failure. The real fix must be determined before RTM.
+ This must be investigated and resolved before RTM. The apparent issue is that a design-time build has already called EndBuild
+ through the BuildManagerAccessor, and the nodes are shut down. Shortly thereafter, the solution build manager comes through and calls EndBuild, which throws
+ another Shutdown packet in the queue, and causes the following build to stop prematurely. This is all timing related - not every sequence of builds seems to
+ cause the problem, probably due to the order in which the packet queue gets serviced relative to other threads.
+
+ It appears that the problem is that the BuildRequestEngine is being invoked in a way that causes a shutdown packet to appear to overlap with a build request packet.
+ Interactions between the in-proc node communication thread and the shutdown mechanism must be investigated to determine how BuildManager.EndBuild is allowing itself
+ to return before the node has indicated it is actually finished.
+
+
+
+
+ Tracks whether ShutdownComponent has been called.
+
+
+
+
+ Constructor.
+
+
+
+
+ Creates a node on an available NodeProvider, if any..
+
+ The configuration to use for the remote node.
+ The to use.
+ Number of nodes to be reused ot created.
+ A NodeInfo describing the node created, or null if none could be created.
+
+
+
+ Sends data to the specified node.
+
+ The node.
+ The packet to send.
+
+
+
+ Shuts down all of the connected managed nodes.
+
+ Flag indicating if nodes should prepare for reuse.
+
+
+
+ Shuts down all of managed nodes permanently.
+
+
+
+
+ Initializes the component
+
+ The component host
+
+
+
+ Shuts down the component.
+
+
+
+
+ Reset the state of objects in the node manager which need to be reset between builds.
+
+
+
+
+ Registers the specified handler for a particular packet type.
+
+ The packet type.
+ The factory for packets of the specified type.
+ The handler to be called when packets of the specified type are received.
+
+
+
+ Unregisters a packet handler.
+
+ The packet type.
+
+
+
+ Takes a serializer, deserializes the packet and routes it to the appropriate handler.
+
+ The node from which the packet was received.
+ The packet type.
+ The translator containing the data from which the packet should be reconstructed.
+
+
+
+ Routes the specified packet. This is called by the Inproc node directly since it does not have to do any deserialization
+
+ The node from which the packet was received.
+ The packet to route.
+
+
+
+ Factory for component creation.
+
+
+
+
+ We have received the node shutdown packet for this node, we should remove it from our list of providers.
+
+
+
+
+ Attempts to create a node on the specified machine using the specified provider.
+
+ The provider used to create the node.
+ The to use.
+ Number of nodes to be reused ot created.
+ List of created nodes.
+
+
+
+ The NodeManager class is responsible for marshalling data to/from the NodeProviders and organizing the
+ creation of new nodes on request.
+
+
+
+
+ The node provider for task hosts.
+
+
+
+
+ The build component host.
+
+
+
+
+ Tracks whether ShutdownComponent has been called.
+
+
+
+
+ Constructor.
+
+
+
+
+ Creates a node on an available NodeProvider, if any..
+ Not used - base class implementation is reused instead.
+
+
+
+
+ Sends data to the specified node.
+
+ The node.
+ The packet to send.
+
+
+
+ Shuts down all of the connected managed nodes.
+
+ Flag indicating if nodes should prepare for reuse.
+
+
+
+ Shuts down all of the managed nodes permanently.
+
+
+
+
+ Initializes the component
+
+ The component host
+
+
+
+ Shuts down the component.
+
+
+
+
+ Reset the state of objects in the node manager which need to be reset between builds.
+
+
+
+
+ Registers the specified handler for a particular packet type.
+
+ The packet type.
+ The factory for packets of the specified type.
+ The handler to be called when packets of the specified type are received.
+
+
+
+ Unregisters a packet handler.
+
+ The packet type.
+
+
+
+ Takes a serializer, deserializes the packet and routes it to the appropriate handler.
+
+ The node from which the packet was received.
+ The packet type.
+ The translator containing the data from which the packet should be reconstructed.
+
+
+
+ Routes the specified packet. This is called by the Inproc node directly since it does not have to do any deserialization
+
+ The node from which the packet was received.
+ The packet to route.
+
+
+
+ Factory for component creation.
+
+
+
+
+ A packet to encapsulate a BuildEventArg logging message.
+ Contents:
+ Build Event Type
+ Build Event Args
+
+
+
+
+ Encapsulates the buildEventArg in this packet.
+
+
+
+
+ Constructor for deserialization
+
+
+
+
+ Factory for serialization
+
+
+
+
+ Translate the TargetOutputs for the target finished event.
+
+
+
+
+ An exception representing the case where a TaskHost node failed to launch.
+ This may happen for example when the TaskHost binary is corrupted.
+
+
+ If you add fields to this class, add a custom serialization constructor and override GetObjectData().
+
+
+
+
+ Constructs a standard NodeFailedToLaunchException.
+
+
+
+
+ Constructs a standard NodeFailedToLaunchException.
+
+
+
+
+ Constructor for deserialization.
+
+
+
+
+ Gets the error code (if any) associated with the exception message.
+
+ Error code string, or null.
+
+
+
+ Gets the error code (if any) associated with the exception message.
+
+ Error code string, or null.
+
+
+
+ ISerializable method which we must override since Exception implements this interface
+ If we ever add new members to this class, we'll need to update this.
+
+
+
+
+ This is the packet which is sent in response to a build configuration ID request. When the node generates a new configuration which it has
+ never seen before, it gives that configuration a temporary, "unresolved" configuration id. The node then asks the Build Request Manager
+ for the "resolved" configuration id, which is global to all nodes in the system. This packet maps the unresolved to the resolved
+ configuration id. Once this packet is received, the node engine can then continue processing requests associated with the configuration.
+
+
+
+
+ The configuration ID assigned by the node
+
+
+
+
+ The configuration ID assigned by the build manager.
+
+
+
+
+ The results node assigned to this configuration
+
+
+
+
+ Constructor for non-deserialization initialization.
+
+ The node-assigned configuration id
+ The build manager-assigned configuration id
+ The result node identifier.
+
+
+
+ Constructor for deserialization
+
+
+
+
+ Returns the node-assigned configuration id
+
+
+
+
+ Returns the build manager assigned configuration id
+
+
+
+
+ Returns the results node for the global configuration.
+
+
+
+
+ INodePacket property. Returns the packet type.
+
+
+
+
+ Reads/writes this packet
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ The BuildRequestEngine is responsible for managing the building of projects on a given node. It
+ receives build requests, reports results and deals with BuildRequestConfiguration transactions.
+ As it runs on its own thread, all BuildRequestEngine operations are asynchronous.
+
+
+ Internally, the BuildRequestEngine manages the requests in the form of BuildRequestEntry objects.
+ Each of these maintains the complete state of a build request, accumulating results until completion.
+ The EngineLoop method is the separate thread proc which handles state changes for BuildRequestEntries
+ and shutting down. However, each RequestBuilder can call back into the BuildRequestEngine (via events)
+ to cause new requests to be submitted. See .
+
+
+
+
+ The starting unresolved configuration id assigned by the engine.
+
+
+
+
+ The starting build request id
+
+
+
+
+ The current engine status
+
+
+
+
+ Ths component host
+
+
+
+
+ The work queue.
+
+
+
+
+ The list of current requests the engine is working on.
+
+
+
+
+ Mapping of global request ids to the request entries.
+
+
+
+
+ The list of requests currently waiting to be submitted from RequestBuilders.
+
+
+
+
+ The next available local unresolved configuration Id
+
+
+
+
+ The next available build request Id
+
+
+
+
+ The global configuration cache
+
+
+
+
+ The list of unresolved configurations
+
+
+
+
+ The logging context for the node
+
+
+
+
+ Flag indicating if we should trace.
+
+
+
+
+ The path where we will store debug files
+
+
+
+
+ Forces caching of all configurations and results.
+
+
+
+
+ Constructor
+
+
+
+
+ Raised when a request has completed.
+
+
+
+
+ Raised when a request is resumed by the engine itself.
+
+
+
+
+ Raised when a new request is generated.
+
+
+
+
+ Raised when the engine's status has changed.
+
+
+
+
+ Raised when a configuration needs its ID resolved.
+
+
+
+
+ Raised when an unexpected exception occurs.
+
+
+
+
+ Raised when resources are requested.
+
+
+
+
+ Returns the current engine status.
+
+
+
+
+ Prepares the build request engine to run a build.
+
+ The logging context to use.
+
+ Called by the Node. Non-overlapping with other calls from the Node.
+
+
+
+ Cleans up after a build but leaves the engine thread running. Aborts
+ any outstanding requests. Blocks until the engine has cleaned up
+ everything. After this method is called, InitializeForBuild may be
+ called to start a new build, or the component may be shut down.
+
+
+ Called by the Node. Non-overlapping with other calls from the Node.
+
+
+
+
+ Adds a new build request to the request queue.
+
+ The request to be added.
+
+ Called by the Node. Non-overlapping with other calls from the Node.
+
+
+
+
+ Reports a build result to the engine, allowing it to satisfy outstanding requests. This result
+ is reported to each entry, allowing it the opportunity to determine for itself if the
+ result applies.
+
+ Information needed to unblock the engine.
+
+ Called by the Node. Non-overlapping with other calls from the Node.
+
+
+
+
+ Notifies the engine of a resource response granting the node resources.
+
+ The resource response.
+
+
+
+ Reports a configuration response to the request, allowing it to satisfy outstanding requests.
+
+
+ The configuration response.
+
+ Called by the Node. Non-overlapping with other calls from the Node.
+
+
+
+
+ Sets the build component host for this object.
+
+ The host.
+
+
+
+ Called to terminate the functions of this component
+
+
+
+
+ Class factory for component creation.
+
+
+
+
+ Called when a build request entry has a state change. We should re-evaluate our requests when this happens.
+
+ The entry raising the event.
+ The event's new state.
+
+
+
+ Raises the OnRequestComplete event.
+
+ The request which completed.
+ The result for the request
+
+
+
+ Raises the OnRequestResumed event.
+
+ The request being resumed.
+
+
+
+ Raises the OnEngineException event.
+
+ The exception being thrown.
+
+
+
+ Raises the OnNewRequest event.
+
+ Information about what is blocking the current request.
+
+
+
+ Raises the OnStatusChanged event.
+
+ The new engine status.
+
+
+
+ Raises the OnNewConfigurationRequest event.
+
+ The configuration which needs resolving.
+
+
+
+ Changes the engine's status and raises the OnStatsChanged event.
+
+ The new engine status.
+
+
+
+ This method examines the current list of requests to determine if any requests should change
+ state, possibly reactivating a previously inactive request or removing a now-completed
+ request from the list.
+
+
+
+
+ Check the amount of memory we are using and, if we exceed the threshold, unload cacheable items.
+
+
+ Since this causes synchronous I/O and a stop-the-world GC, it can be very expensive. If
+ something other than build results is taking up the bulk of the memory space, it may not
+ free any space. That's caused customer reports of VS hangs resulting from build requests
+ that are very slow because something in VS is taking all of the memory, but every
+ project build is slowed down by this codepath. To mitigate this, don't perform these
+ checks in devenv.exe. On the command line, 32-bit MSBuild may still need to cache build
+ results on very large builds, but build results are much more likely to be the bulk of
+ memory usage there.
+
+
+
+
+ Makes the specified build request entry the active one, loading the project if necessary.
+
+ The entry to activate.
+
+
+
+ Returns an unused request builder if there are any, or creates a new one.
+
+ An IRequestBuilder to use.
+
+
+
+ Starts to terminate any builder associated with the entry and clean it up in preparation for removal.
+
+ The entry to be deactivated
+
+
+
+ Waits for the builders until they are terminated.
+
+ The entry to be deactivated
+
+
+
+ Raised when the active request needs to build new requests.
+
+ The request issuing the requests.
+ The requests being issued.
+ Called by the RequestBuilder (implicitly through an event). Non-overlapping with other RequestBuilders.
+
+
+
+ Called when the request builder needs to block on another request.
+
+
+ Called by the RequestBuilder (implicitly through an event). Non-overlapping with other RequestBuilders.
+
+
+
+ Called when the request builder needs to request resources.
+
+
+
+
+ Dequeue some requests from the unsubmitted request queue and submit them.
+
+
+
+
+ This method is responsible for evaluating whether we have enough information to make the request of the Build Manager,
+ or if we need to obtain additional configuration information. It then issues either configuration
+ requests or build requests, or both as needed.
+
+ The BuildRequestEntry which is making the request
+ The array of "child" build requests to be issued.
+
+ When we receive a build request, we first have to determine if we already have a configuration which matches the
+ one used by the request. We do this because everywhere we deal with requests and results beyond this function, we
+ use configuration ids, which are assigned once by the Build Manager and are global to the system. If we do
+ not have a global configuration id, we can't check to see if we already have build results for the request, so we
+ cannot send the request out. Thus, first we determine the configuration id.
+
+ Assuming we don't have the global configuration id locally, we will send the configuration to the Build Manager.
+ It will look up or assign the global configuration id and send it back to us.
+
+ Once we have the global configuration id, we can then look up results locally. If we have enough results to fulfill
+ the request, we give them back to the request, otherwise we have to forward the request to the Build Mangager
+ for scheduling.
+
+
+
+
+ Retrieves a new configuration ID
+
+ The next unused local configuration ID.
+
+
+
+ Retrieves a new build request ID
+
+ The next build request ID.
+
+
+
+ This method forms a configuration request from an unresolved configuration and posts it to the
+ Build Manager.
+
+ The configuration to be mapped.
+
+
+
+ Sends a build request to the Build Manager for scheduling
+
+ The information about why the request is blocked.
+
+
+
+ Queue an action to be run in the engine.
+
+ The action to execute.
+ true if this is the last task for this queue, otherwise false.
+ This method will return false if an attempt is made to schedule an action after the queue has been shut down.
+
+
+
+ Method used for debugging purposes.
+
+
+
+
+ Struct used to contain information about requests submitted by the RequestBuilder.
+
+
+
+
+ The global request id on which we are blocking
+
+
+
+
+ The target on which we are blocking
+
+
+
+
+ The issuing request
+
+
+
+
+ The new requests to issue
+
+
+
+
+ Create a new unsubmitted request entry
+
+ The build request originating these requests.
+ The new requests to be issued.
+
+
+
+ Create a new unsubmitted request entry
+
+ The build request originating these requests.
+ The request on which we are blocked.
+ The target on which we are blocked.
+
+
+
+ Delegate is called when the state for a build request entry has changed.
+
+ The entry whose state has changed.
+ The new state value.
+
+
+
+ The set of states in which a build request entry can be.
+
+
+
+
+ There should only ever be one entry in the Active state. This is the request which is
+ being actively built by the engine - i.e. it has a running task thread. All other requests
+ must be in one of the other states. When in this state, the outstandingRequest and
+ receivedResult members must be null.
+
+ Transitions:
+ Waiting: When an msbuild callback is made the active build request needs to wait
+ for the results in order to continue to process.
+ Complete: The build request has generated all of the required results.
+
+
+
+
+ This state means the node has received all of the results needed to continue processing this
+ request. When this state is set, the receivedResult member of this entry must be non-null.
+ The request engine can continue it at some later point when it is no longer busy.
+ Any number of entries may be in this state.
+
+ Transitions:
+ Active: The build request engine picks this ready request to process.
+
+
+
+
+ This state means the node is waiting for results from outstanding build requests. When this
+ state is set, the outstandingRequest or outstandingConfiguration members of the entry
+ must be non-null.
+
+ Transitions:
+ Ready: All of the results which caused the build request to wait have been received
+
+
+
+
+ This state means the request has completed and results are available. The engine will remove
+ the request from the list and the results will be returned to the node for processing.
+
+ Transitions: None, this is the final state of the build request
+
+
+
+
+ BuildRequestEntry holds a build request and associated state data.
+
+
+
+
+ Mapping of Build Request Configurations to Build Requests waiting for configuration resolution.
+
+
+
+
+ The set of requests to issue. This holds all of the requests as we prepare them. Once their configurations
+ have all been resolved, we will issue them to the Scheduler in the order received.
+
+
+
+
+ The list of unresolved configurations we need to issue.
+
+
+
+
+ Mapping of nodeRequestIDs to Build Requests waiting for results.
+
+
+
+
+ Mapping of nodeRequestIDs to Build Results.
+
+
+
+
+ The ID of the request we are blocked waiting for.
+
+
+
+
+ The object used to build this request.
+
+
+
+
+ The project's root directory.
+
+
+
+
+ Creates a build request entry from a build request.
+
+ The originating build request.
+ The build request configuration.
+
+
+
+ Raised when the state changes.
+
+
+
+
+ Returns the object used to lock for synchronization of long-running operations.
+
+
+
+
+ Returns the root directory for the project being built by this request.
+
+
+
+
+ Returns the current state of the build request.
+
+
+
+
+ Returns the request which originated this entry.
+
+
+
+
+ Returns the build request configuration
+
+
+
+
+ Returns the overall result for this request.
+
+
+
+
+ Returns the request builder.
+
+
+
+
+ Informs the entry that it has configurations which need to be resolved.
+
+ The configuration to be resolved.
+
+
+
+ Waits for a result from a request.
+
+ The build request
+
+
+
+ Signals that we are waiting for a specific blocking request to finish.
+
+
+
+
+ Waits for a result from a request which previously had an unresolved configuration.
+
+ The id of the unresolved configuration.
+ The id of the resolved configuration.
+ True if all unresolved configurations have been resolved, false otherwise.
+
+
+
+ Returns the set of build requests which should be issued to the scheduler.
+
+
+
+
+ Returns the list of unresolved configurations to issue.
+
+
+
+
+ Returns the list of currently active targets.
+
+
+
+
+ This reports a result for a request on which this entry was waiting.
+ PERF: Once we have fixed up all the result reporting, we can probably
+ optimize this. See the comment in BuildRequestEngine.ReportBuildResult.
+
+ The result for the request.
+
+
+
+ Unblocks an entry which was waiting for a specific global request id.
+
+
+
+
+ Marks the entry as active and returns all of the results needed to continue.
+ Results are returned as { nodeRequestId -> BuildResult }
+
+ The results for all previously pending requests, or null if there were none.
+
+
+
+ Starts to cancel the current request.
+
+
+
+
+ Waits for the current request until it's canceled.
+
+
+
+
+ Marks this entry as complete and sets the final results.
+
+ The result of the build.
+
+
+
+ Adds a request to the set of waiting requests.
+
+
+
+
+ Updates the state of this entry.
+
+ The new state for this entry.
+
+
+
+ This class represents a build request as it would be received from an MSBuild callback. Such requests have
+ configurations which have not yet been assigned a global configuration ID, and therefore must be resolved
+ with the build manager before a formal request can be sent.
+
+
+ This class is called "Fully Qualified" because it completely and directly specifies all of the configuration information.
+ A standard Build Request only specifies the configuration id, so to get the configuration requires an additional lookup
+ in a configuration cache.
+
+
+
+
+ Initializes a build request.
+
+ The configuration to use for the request.
+ The set of targets to build.
+ Whether or not to wait for the results of this request.
+ Whether to skip the constraints of static graph isolation.
+ Flags specified for the build request.
+
+
+
+ Returns the configuration for this request.
+
+
+
+
+ Returns the set of targets to be satisfied for this request.
+
+
+
+
+ Returns true if this request must wait for its results in order to complete.
+
+
+
+
+ The set of flags specified in the BuildRequestData for this request.
+
+
+
+
+ Implementation of the equality operator.
+
+ The left hand argument
+ The right hand argument
+ True if the objects are equivalent, false otherwise.
+
+
+
+ Implementation of the inequality operator.
+
+ The left-hand argument
+ The right-hand argument
+ True if the objects are not equivalent, false otherwise.
+
+
+
+ Returns the hash code for this object.
+
+ The hash code
+
+
+
+ Determines equivalence between this object and another.
+
+ The object to which this one should be compared.
+ True if the objects are equivalent, false otherwise.
+
+
+
+ Determines equivalence with another object of the same type.
+
+ The other object with which to compare this one.
+ True if the objects are equivalent, false otherwise.
+
+
+
+ Delegate invoked to create a configuration
+
+
+
+
+ An interfacing representing a build request configuration cache.
+
+
+
+
+ Returns the configuration with the specified id.
+
+ The configuration id.
+ The configuration with the specified id.
+
+
+
+ Adds the configuration to the cache.
+
+ The configuration to add.
+
+
+
+ Removes the specified configuration from the cache.
+
+ The id of the configuration to remove.
+
+
+
+ Gets the cached configuration which matches the specified configuration
+
+ The configuration to match.
+ The matching configuration if any, null otherwise.
+
+
+
+ Gets the cached configuration which matches the specified configuration
+
+ The configuration metadata to match.
+ The matching configuration if any, null otherwise.
+
+
+
+ Gets a matching configuration. If no such configration exists, one is created and optionally loaded.
+
+ The configuration metadata to match.
+ Callback to be invoked if the configuration does not exist.
+ True if the configuration should also be loaded.
+ The matching configuration if any, null otherwise.
+
+
+
+ Returns true if a configuration with the specified id exists in the cache.
+
+ The configuration id to check.
+
+ True if there is a configuration with the specified id, false otherwise.
+
+
+
+
+ Clears out the configurations
+
+
+
+
+ Clear non explicltly loaded configurations.
+
+ The configuration ids which have been cleared.
+
+
+
+ Check whether the config cache has more items that the predefined threshold
+
+
+
+
+ Unloads any configurations not in use.
+
+ True if any configurations were cached, false otherwise.
+
+
+
+ Implementation of the results cache.
+
+
+
+
+ The table of all build results. This table is indexed by configuration id and
+ contains BuildResult objects which have all of the target information.
+
+
+
+
+ Creates an empty results cache.
+
+
+
+
+ Returns the internal cache for testing purposes.
+
+
+
+
+ Adds the specified build result to the cache
+
+ The result to add.
+
+
+
+ Clears the results for the specified build.
+
+
+
+
+ Retrieves the results for the specified build request.
+
+ The request for which results should be retrieved.
+ The build results for the specified request.
+
+
+
+ Retrieves the results for the specified configuration
+
+ The configuration for which results should be returned.
+ The results, if any
+
+
+
+ Attempts to satisfy the request from the cache. The request can be satisfied only if:
+ 1. All specified targets in the request have successful results in the cache or if the sequence of target results
+ includes 0 or more successful targets followed by at least one failed target.
+ 2. All initial targets in the configuration for the request have non-skipped results in the cache.
+ 3. If there are no specified targets, then all default targets in the request must have non-skipped results
+ in the cache.
+
+ The request whose results we should return.
+ The initial targets for the request's configuration.
+ The default targets for the request's configuration.
+ If false, a cached skipped target will cause this method to return "NotSatisfied".
+ If true, then as long as there is a result in the cache (regardless of whether it was skipped or not), this method
+ will return "Satisfied". In most cases this should be false, but it may be set to true in a situation where there is no
+ chance of re-execution (which is the usual response to missing / skipped targets), and the caller just needs the data.
+ A response indicating the results, if any, and the targets needing to be built, if any.
+
+
+
+ Removes the results for a particular configuration.
+
+ The configuration
+
+
+
+ Cache as many results as we can.
+
+
+
+
+ Sets the build component host.
+
+ The component host.
+
+
+
+ Shuts down this component
+
+
+
+
+ Factory for component creation.
+
+
+
+
+ Looks for results for the specified targets.
+
+ The result to examine
+ The targets to search for
+ An optional list to be populated with missing targets
+ If true, a status of "skipped" counts as having valid results
+ for that target. Otherwise, a skipped target is treated as equivalent to a missing target.
+ False if there were missing results, true otherwise.
+
+
+
+ Implements a build request configuration cache.
+
+
+
+
+ The configurations
+
+
+
+
+ Object used for locking.
+
+
+
+
+ Lookup which can be used to find a configuration with the specified metadata.
+
+
+
+
+ The maximum cache entries allowed before a sweep can occur.
+
+
+
+
+ Creates a new build configuration cache.
+
+
+
+
+ Returns the configuration cached under the specified configuration id.
+
+ The id of the configuration to return.
+ The cached configuration.
+ Returned if a configuration with the specified id is not in the cache.
+
+
+
+ Adds the specified configuration to the cache.
+
+ The configuration to add.
+
+
+
+ Removes the specified configuration from the cache.
+
+ The id of the configuration to remove.
+
+
+
+ Returns the entry in the cache which matches the specified config.
+
+ The configuration to match
+ A matching configuration if one exists, null otherwise.
+
+
+
+ Returns the entry in the cache which matches the specified config.
+
+ The configuration metadata to match
+ A matching configuration if one exists, null otherwise.
+
+
+
+ Gets a matching configuration. If no such configuration exists, one is created and optionally loaded.
+
+
+
+
+ Returns true if the cache contains a configuration with the specified id, false otherwise.
+
+ The configuration id to check.
+ True if the cache contains a configuration with this id, false otherwise.
+
+
+
+ Clear all configurations
+
+
+
+
+ Gets the smallest configuration id of any configuration
+ in this cache.
+
+ Gets the smallest configuration id of any
+ configuration in this cache.
+
+
+
+ Clears configurations from the configuration cache which have not been explicitly loaded.
+
+ Set if configurations which have been cleared.
+
+
+
+ Check whether the config cache has more items that the predefined threshold
+
+
+
+
+ Writes out as many configurations to disk as we can, under the assumption that inactive configurations
+ probably aren't going to be accessed again (the exception is re-entrant builds) and we want to make as much
+ space as possible now for future projects to load.
+
+ True if any configurations were cached, false otherwise.
+
+
+
+ Gets the enumerator over the configurations in the cache.
+
+
+
+
+ Gets the enumerator over the configurations in the cache.
+
+
+
+
+ Sets the component host.
+
+ The build component host.
+
+
+
+ Shuts down this component
+
+
+
+
+ Factory for component creation.
+
+
+
+
+ Override which determines the key for entry into the collection from the specified build request configuration.
+
+ The build request configuration.
+ The configuration id.
+
+
+
+ Represents a cache for build properties
+
+
+
+
+ This interface represents an object which holds build results.
+
+
+
+
+ Adds a result to the cache
+
+ The result to add.
+
+
+
+ Deletes all results from the cache for the specified build.
+
+
+
+
+ Retrieves a BuildResult for the specified matching BuildRequest.
+
+ The request for which the result should be returned.
+ A BuildResult if there is a matching one in the cache, otherwise null.
+
+
+
+ Retrieves a BuildResult for the specified configuration.
+
+ The configuration for which results should be returned.
+ A BuildResult if there is a matching one in the cache, otherwise null.
+
+
+
+ Attempts to satisfy the request from the cache. The request can be satisfied only if:
+ 1. All specified targets in the request have non-skipped results in the cache.
+ 2. All initial targets in the configuration for the request have non-skipped results in the cache.
+ 3. If there are no specified targets, then all default targets in the request must have non-skipped results
+ in the cache.
+
+ The request whose results we should return
+ The initial targets for the request's configuration.
+ The default targets for the request's configuration.
+ If false, a cached skipped target will cause this method to return "NotSatisfied".
+ If true, then as long as there is a result in the cache (regardless of whether it was skipped or not), this method
+ will return "Satisfied". In most cases this should be false, but it may be set to true in a situation where there is no
+ chance of re-execution (which is the usual response to missing / skipped targets), and the caller just needs the data.
+ A response indicating the results, if any, and the targets needing to be built, if any.
+
+
+
+ Clears the results for a specific configuration.
+
+ The configuration id.
+
+
+
+ Caches results to disk if possible.
+
+
+
+
+ This class is responsible for serializing and deserializing anything that is not
+ officially supported by ITranslator, but that we still want to do
+ custom translation of.
+
+
+
+
+ Translates a PropertyDictionary of ProjectPropertyInstances.
+
+ The tranlator doing the translating
+ The dictionary to translate.
+
+
+
+ Deserialize a type or a subtype by its full name. The type must implement ITranslateable
+
+ Top level type. Serialized types can be of this type, or subtypes
+
+
+
+
+ The provider for out-of-proc nodes. This manages the lifetime of external MSBuild.exe processes
+ which act as child nodes for the build system.
+
+
+
+
+ A mapping of all the nodes managed by this provider.
+
+
+
+
+ Constructor.
+
+
+
+
+ Returns the node provider type.
+
+
+
+
+ Returns the number of available nodes.
+
+
+
+
+ Magic number sent by the host to the client during the handshake.
+ Derived from the binary timestamp to avoid mixing binary versions,
+ Is64BitProcess to avoid mixing bitness, and enableNodeReuse to
+ ensure that a /nr:false build doesn't reuse clients left over from
+ a prior /nr:true build. The enableLowPriority flag is to ensure that
+ a build with /low:false doesn't reuse clients left over for a prior
+ /low:true build.
+
+ Is reuse of build nodes allowed?
+ Is the build running at low priority?
+
+
+
+ Instantiates a new MSBuild processes acting as a child nodes or connect to existing ones.
+
+
+
+
+ Sends data to the specified node.
+
+ The node to which data shall be sent.
+ The packet to send.
+
+
+
+ Shuts down all of the connected managed nodes.
+
+ Flag indicating if nodes should prepare for reuse.
+
+
+
+ Shuts down all of the managed nodes permanently.
+
+
+
+
+ Initializes the component.
+
+ The component host.
+
+
+
+ Shuts down the component
+
+
+
+
+ Static factory for component creation.
+
+
+
+
+ Method called when a context terminates.
+
+
+
+
+ Contains the shared pieces of code from NodeProviderOutOfProc
+ and NodeProviderOutOfProcTaskHost.
+
+
+
+
+ The maximum number of bytes to write
+
+
+
+
+ The number of times to retry creating an out-of-proc node.
+
+
+
+
+ The amount of time to wait for an out-of-proc node to spool up before we give up.
+
+
+
+
+ The amount of time to wait for an out-of-proc node to exit.
+
+
+
+
+ The build component host.
+
+
+
+
+ Keeps track of the processes we've already checked for nodes so we don't check them again.
+ We decided to use ConcurrentDictionary of(string, byte) as common implementation of ConcurrentHashSet.
+
+
+
+
+ Delegate used to tell the node provider that a context has been created.
+
+ The created node context.
+
+
+
+ Delegate used to tell the node provider that a context has terminated.
+
+ The id of the node which terminated.
+
+
+
+ The build component host.
+
+
+
+
+ Sends data to the specified node.
+
+ The node to which data shall be sent.
+ The packet to send.
+
+
+
+ Shuts down all of the connected managed nodes.
+
+ List of the contexts to be shut down
+ Flag indicating if nodes should prepare for reuse.
+
+
+
+ Shuts down all of the managed nodes permanently.
+
+ Whether to reuse the node
+ Delegate used to tell the node provider that a context has terminated
+
+
+
+ Finds or creates a child processes which can act as a node.
+
+
+
+
+ Finds processes named after either msbuild or msbuildtaskhost.
+
+
+
+ Item 1 is the name of the process being searched for.
+ Item 2 is the ConcurrentQueue of ordered processes themselves.
+
+
+
+
+ Generate a string from task host context and the remote process to be used as key to lookup processes we have already
+ attempted to connect to or are already connected to
+
+
+
+
+ Attempts to connect to the specified process.
+
+
+
+
+ Connect to named pipe stream and ensure validate handshake and security.
+
+
+ Reused by MSBuild server client .
+
+
+
+
+ Class which wraps up the communications infrastructure for a given node.
+
+
+
+
+ The factory used to create packets from data read off the pipe.
+
+
+
+
+ The node id assigned by the node provider.
+
+
+
+
+ The node process.
+
+
+
+
+ An array used to store the header byte for each packet when read.
+
+
+
+
+ A buffer typically big enough to handle a packet body.
+ We use this as a convenient way to manage and cache a byte[] that's resized
+ automatically to fit our payload.
+
+
+
+
+ A reusable buffer for writing packets.
+
+
+
+
+ A queue used for enqueuing packets to write to the stream asynchronously.
+
+
+
+
+ A task representing the last packet write, so we can chain packet writes one after another.
+ We want to queue up writing packets on a separate thread asynchronously, but serially.
+ Each task drains the
+
+
+
+
+ Delegate called when the context terminates.
+
+
+
+
+ Tracks the state of the packet sent to terminate the node.
+
+
+
+
+ Per node read buffers
+
+
+
+
+ Constructor.
+
+
+
+
+ Id of node.
+
+
+
+
+ Starts a new asynchronous read operation for this node.
+
+
+
+
+ Sends the specified packet to this node asynchronously.
+ The method enqueues a task to write the packet and returns
+ immediately. This is because SendData() is on a hot path
+ under the primary lock (BuildManager's _syncLock)
+ and we want to minimize our time there.
+
+ The packet to send.
+
+
+
+ Schedule a task to drain the packet write queue. We could have had a
+ dedicated thread that would pump the queue constantly, but
+ we don't want to allocate a dedicated thread per node (1MB stack)
+
+ Usually there'll be a single packet in the queue, but sometimes
+ a burst of SendData comes in, with 10-20 packets scheduled. In this case
+ the first scheduled task will drain all of them, and subsequent tasks
+ will run on an empty queue. I tried to write logic that avoids queueing
+ a new task if the queue is already being drained, but it didn't show any
+ improvement and made things more complicated.
+
+
+
+ Actually writes and sends the packet. This can't be called in parallel
+ because it reuses the _writeBufferMemoryStream, and this is why we use
+ the _packetWriteDrainTask to serially chain invocations one after another.
+
+ The packet to send.
+
+
+
+ Avoid having a BinaryWriter just to write a 4-byte int
+
+
+
+
+ Closes the node's context, disconnecting it from the node.
+
+
+
+
+ Waits for the child node process to exit.
+
+
+
+
+ Completes the asynchronous packet write to the node.
+
+
+
+
+ Callback invoked by the completion of a read of a header byte on one of the named pipes.
+
+
+
+
+ Method called when the body of a packet has been read.
+
+
+
+
+ The provider for out-of-proc nodes. This manages the lifetime of external MSBuild.exe processes
+ which act as child nodes for the build system.
+
+
+
+
+ The maximum number of nodes that this provider supports. Should
+ always be equivalent to the number of different TaskHostContexts
+ that exist.
+
+
+
+
+ Store the path for MSBuild / MSBuildTaskHost so that we don't have to keep recalculating it.
+
+
+
+
+ Store the 64-bit path for MSBuild / MSBuildTaskHost so that we don't have to keep recalculating it.
+
+
+
+
+ Store the 64-bit path for MSBuild / MSBuildTaskHost so that we don't have to keep recalculating it.
+
+
+
+
+ Store the path for the 32-bit MSBuildTaskHost so that we don't have to keep re-calculating it.
+
+
+
+
+ Store the path for the 64-bit MSBuildTaskHost so that we don't have to keep re-calculating it.
+
+
+
+
+ Store the path for the 32-bit MSBuild so that we don't have to keep re-calculating it.
+
+
+
+
+ Store the path for the 64-bit MSBuild so that we don't have to keep re-calculating it.
+
+
+
+
+ Store the path for the 64-bit MSBuild so that we don't have to keep re-calculating it.
+
+
+
+
+ Name for MSBuild.exe
+
+
+
+
+ Name for MSBuildTaskHost.exe
+
+
+
+
+ Are there any active nodes?
+
+
+
+
+ A mapping of all the nodes managed by this provider.
+
+
+
+
+ A mapping of all of the INodePacketFactories wrapped by this provider.
+
+
+
+
+ A mapping of all of the INodePacketHandlers wrapped by this provider.
+
+
+
+
+ Keeps track of the set of nodes for which we have not yet received shutdown notification.
+
+
+
+
+ Packet factory we use if there's not already one associated with a particular context.
+
+
+
+
+ Constructor.
+
+
+
+
+ Returns the node provider type.
+
+
+
+
+ Returns the number of available nodes.
+
+
+
+
+ Returns the name of the CLR2 Task Host executable
+
+
+
+
+ Instantiates a new MSBuild process acting as a child node.
+
+
+
+
+ Sends data to the specified node.
+
+ The node to which data shall be sent.
+ The packet to send.
+
+
+
+ Sends data to the specified node.
+
+ The node to which data shall be sent.
+ The packet to send.
+
+
+
+ Shuts down all of the connected managed nodes.
+
+ Flag indicating if nodes should prepare for reuse.
+
+
+
+ Shuts down all of the managed nodes permanently.
+
+
+
+
+ Initializes the component.
+
+ The component host.
+
+
+
+ Shuts down the component
+
+
+
+
+ Registers the specified handler for a particular packet type.
+
+ The packet type.
+ The factory for packets of the specified type.
+ The handler to be called when packets of the specified type are received.
+
+
+
+ Unregisters a packet handler.
+
+ The packet type.
+
+
+
+ Takes a serializer, deserializes the packet and routes it to the appropriate handler.
+
+ The node from which the packet was received.
+ The packet type.
+ The translator containing the data from which the packet should be reconstructed.
+
+
+
+ Routes the specified packet
+
+ The node from which the packet was received.
+ The packet to route.
+
+
+
+ This method is invoked by the NodePacketRouter when a packet is received and is intended for
+ this recipient.
+
+ The node from which the packet was received.
+ The packet.
+
+
+
+ Static factory for component creation.
+
+
+
+
+ Clears out our cached values for the various task host names and paths.
+ FOR UNIT TESTING ONLY
+
+
+
+
+ Given a TaskHostContext, returns the name of the executable we should be searching for.
+
+
+
+
+ Given a TaskHostContext, return the appropriate location of the
+ executable (MSBuild or MSBuildTaskHost) that we wish to use, or null
+ if that location cannot be resolved.
+
+
+
+
+ Make sure a node in the requested context exists.
+
+
+
+
+ Expected to be called when TaskHostTask is done with host of the given context.
+
+
+
+
+ Instantiates a new MSBuild or MSBuildTaskHost process acting as a child node.
+
+
+
+
+ Method called when a context created.
+
+
+
+
+ Method called when a context terminates.
+
+
+
+
+ This class is used by objects in the build engine that have the ability to execute themselves in batches, to partition the
+ items they consume into "buckets", based on the values of select item metadata.
+
+
+ What batching does
+
+ Batching partitions the items consumed by the batchable object into buckets, where each bucket
+ contains a set of items that have the same value set on all item metadata consumed by the object.
+ Metadata consumed may be unqualified, for example %(m), or qualified by the item list to which it
+ refers, for example %(a.m).
+
+ If metadata is qualified, for example %(a.m), then this is considered distinct to metadata with the
+ same name on a different item type. For example, %(a.m) is distinct to %(b.m), and items of type ‘b’
+ are considered to always have a blank value for %(a.m). This means items of type ‘b’ will only be
+ placed in buckets where %(a.m) is blank. However %(a.m) is equivalent to %(m) on items of type ‘a’.
+
+ There is an extra ambiguity rule: every items consumed by the object must have an explicit value for
+ every piece of unqualified metadata. For example, if @(a), %(m), and %(a.n) are consumed, every item
+ of type ‘a’ must have a value for the metadata ‘m’ but need not all necessarily have a value for the
+ metadata ‘n’. This rule eliminates ambiguity about whether items that do not define values for an
+ unqualified metadata should go in all buckets, or just into buckets with a blank value for
+ that metadata.
+
+ For example
+
+
+
+ m0
+
+
+ m1
+
+
+ n0
+
+
+ n1
+
+
+
+
+
+
+
+
+ Will produce 5 buckets:
+
+ a={a1;a2.m0} b={.}
+ a={a3.m1} b={.}
+ a={.} b={b1.n0}
+ a={.} b={b2;b3.n1}
+ a={.} b={b4.}
+
+
+
+
+
+ Determines how many times the batchable object needs to be executed (each execution is termed a "batch"), and prepares
+ buckets of items to pass to the object in each batch.
+
+ List containing ItemBucket objects, each one representing an execution batch.
+
+
+
+ Determines how many times the batchable object needs to be executed (each execution is termed a "batch"), and prepares
+ buckets of items to pass to the object in each batch.
+
+
+
+
+ Any item type that can be considered an implicit input to this batchable object.
+ This is useful for items inside targets, where the item name is plainly an item type that's an "input" to the object.
+ List containing ItemBucket objects, each one representing an execution batch.
+
+
+
+ Of all the item lists that are referenced in this batchable object, which ones should we
+ batch on, and which ones should we just pass in wholesale to every invocation of the
+ target/task?
+
+ Rule #1. If the user has referenced any *qualified* item metadata such as %(EmbeddedResource.Culture),
+ then that item list "EmbeddedResource" will definitely get batched.
+
+ Rule #2. For all the unqualified item metadata such as %(Culture), we make sure that
+ every single item in every single item list being passed into the task contains a value
+ for that metadata. If not, it's an error. If so, we batch all of those item lists.
+
+ All other item lists will not be batched, and instead will be passed in wholesale to all buckets.
+
+ Dictionary containing the item names that should be batched. If the items match unqualified metadata,
+ the entire list of items will be returned in the Value. Otherwise, the Value will be empty, indicating only the
+ qualified item set (in the Key) should be batched.
+
+
+
+
+ Partitions the items consumed by the batchable object into buckets, where each bucket contains a set of items that
+ have the same value set on all item metadata consumed by the object.
+
+
+ PERF NOTE: Given n items and m batching metadata that produce l buckets, it is usually the case that n > l > m,
+ because a batchable object typically uses one or two item metadata to control batching, and only has a handful of
+ buckets. The number of buckets is typically only large if a batchable object is using single-item batching
+ (where l == n). Any algorithm devised for bucketing therefore, should try to minimize n and l in its complexity
+ equation. The algorithm below has a complexity of O(n*lg(l)*m/2) in its comparisons, and is effectively O(n) when
+ l is small, and O(n*lg(n)) in the worst case as l -> n. However, note that the comparison complexity is not the
+ same as the operational complexity for this algorithm. The operational complexity of this algorithm is actually
+ O(n*m + n*lg(l)*m/2 + n*l/2 + n + l), which is effectively O(n^2) in the worst case. The additional complexity comes
+ from the array and metadata operations that are performed. However, those operations are extremely cheap compared
+ to the comparison operations, which dominate the time spent in this method.
+
+ List containing ItemBucket objects (can be empty), each one representing an execution batch.
+
+
+
+ Gets the values of the specified metadata for the given item.
+ The keys in the dictionary returned may be qualified and/or unqualified, exactly
+ as they are found in the metadata reference.
+ For example if %(x) is found, the key is "x", if %(z.x) is found, the key is "z.x".
+ This dictionary in each bucket is used by Expander to expand exactly the same metadata references, so
+ %(x) is expanded using the key "x", and %(z.x) is expanded using the key "z.x".
+
+ the metadata values
+
+
+
+ A class that evaluates an ItemGroup or PropertyGroup that is within a target.
+
+
+
+
+ Initializes this base class.
+
+ The logging context
+ The project instance
+ Flag to determine whether or not to log task inputs.
+
+
+
+ Gets or sets the logging context.
+
+
+
+
+ Gets or sets the project instance.
+
+
+
+
+ Flag to determine whether or not to log task inputs.
+
+
+
+
+ Factory for intrinsic tasks.
+
+ The task instance object.
+ The logging context.
+ The project instance.
+ true to log task inputs, otherwise false.
+ An instantiated intrinsic task.
+
+
+
+ Called to execute a task within a target. This method instantiates the task, sets its parameters, and executes it.
+
+ The lookup used for expansion and to receive created items and properties.
+
+
+
+ If value is not an empty string, adds it to list.
+
+ The list of strings to which this should be added, if it is not empty.
+ The string to add.
+
+
+
+ Implementation of the ItemGroup intrinsic task
+
+
+
+
+ The task instance data
+
+
+
+
+ Instantiates an ItemGroup task
+
+ The original task instance data
+ The logging context
+ The project instance
+ Flag to determine whether or not to log task inputs.
+
+
+
+ Execute an ItemGroup element, including each child item expression
+
+ The lookup used for evaluation and as a destination for these items.
+
+
+
+ Add items to the world. This is the in-target equivalent of an item include expression outside of a target.
+
+ The item specification to evaluate and add.
+ The batching bucket.
+ An of metadata names to keep.
+ An of metadata names to remove.
+ Context for logging
+
+
+
+ Remove items from the world. Removes to items that are part of the project manifest are backed up, so
+ they can be reverted when the project is reset after the end of the build.
+
+ The item specification to evaluate and remove.
+ The batching bucket.
+ Metadata matching.
+ Options matching.
+
+
+
+ Modifies items in the world - specifically, changes their metadata. Changes to items that are part of the project manifest are backed up, so
+ they can be reverted when the project is reset after the end of the build.
+
+ The item specification to evaluate and modify.
+ The batching bucket.
+ An of metadata names to keep.
+ An of metadata names to remove.
+ Context for this operation.
+
+
+
+ Adds batchable parameters from an item element into the list. If the item element was a task, these
+ would be its raw parameter values.
+
+ The list of batchable values
+ The item from which to find batchable values
+
+
+
+ Takes an item specification, evaluates it and expands it into a list of items
+
+ The original item data
+ The expander to use.
+ An of metadata names to keep.
+ An of metadata names to remove.
+ Context for logging
+
+ This code is very close to that which exists in the Evaluator.EvaluateItemXml method. However, because
+ it invokes type constructors, and those constructors take arguments of fundamentally different types, it has not
+ been refactored.
+
+ A list of items.
+
+
+
+ Returns a list of all items specified in Exclude parameter.
+ If no items match, returns empty list.
+
+ The items to match
+ The specification to match against the items.
+ A list of matching items
+
+
+
+ Returns a list of all items in the provided item group whose itemspecs match the specification, after it is split and any wildcards are expanded.
+ If no items match, returns null.
+
+ The items to match
+ The specification to match against the items.
+ The specification to match against the provided items
+ The expander to use
+ Context for logging
+ A list of matching items
+
+
+
+ This class is used during ItemGroup intrinsic tasks to resolve metadata references. It consists of three tables:
+ 1. The metadata added during evaluation.
+ 1. The metadata table created for the bucket, may be null.
+ 2. The metadata table derived from the item definition group, may be null.
+
+
+
+
+ The table for all metadata added during expansion
+
+
+
+
+ The table for metadata which was generated for this batch bucket.
+ May be null.
+
+
+
+
+ The table for metadata from the item definition
+ May be null.
+
+
+
+
+ The item type to which this metadata applies.
+
+
+
+
+ Creates a new metadata table aggregating the bucket and item definition tables.
+
+ The type of item for which we are doing evaluation.
+ The metadata table created for this batch bucket. May be null.
+ The metadata table for the item definition representing this item. May be null.
+
+
+
+ Retrieves the metadata table used to collect additions.
+
+
+
+
+ Gets the specified metadata value. Returns an empty string if none is set.
+
+
+
+
+ Gets the specified metadata value for the qualified item type. Returns an empty string if none is set.
+
+
+
+
+ Gets the specified metadata value for the qualified item type. Returns null if none is set.
+
+
+
+
+ Sets the metadata value.
+
+
+
+
+ This class represents a PropertyGroup intrinsic task.
+
+
+
+
+ The original task instance data.
+
+
+
+
+ Create a new PropertyGroup task.
+
+ The task instance data
+ The logging context
+ The project instance
+ Flag to determine whether or not to log task inputs.
+
+
+
+ Execute a PropertyGroup element, including each child property
+
+ The lookup use for evaluation and as a destination for these properties.
+
+
+
+ Adds batchable parameters from a property element into the list. If the property element was
+ a task, these would be its raw parameter values.
+
+ The list which will contain the batchable values.
+ The property from which to take the values.
+
+
+
+ Interface implemented by the Target Builder which allows tasks to invoke targets and build projects.
+
+
+
+
+ Invokes the specified targets using Dev9 behavior.
+
+ The targets to build.
+ True to continue building the remaining targets if one fails.
+ The of the reference.
+ The results for each target.
+
+ The target is run using the data context of the Project, rather than the data context
+ of the current target. This has the following effects:
+ 1. Data visible to the CALLING target at the time it was first invoked is the only
+ data which the CALLED target can see. No changes made between the time the CALLING
+ target starts and the CALLED target starts are visible to the CALLED target.
+ 2. Items and Properties modified by the CALLED target are not visible to the CALLING
+ target, even after the CALLED target returns. However, any changes made to
+ items and properties by the CALLING target will override any changes made by the
+ CALLED target.
+
+
+
+
+ Contains information about a target name and reference location.
+
+
+
+
+ Construct a target specification.
+
+ The name of the target
+ The location from which it was referred.
+
+
+
+ Gets or sets the target name
+
+
+
+
+ Gets or sets the reference location
+
+
+
+
+ This class represents an implementation of INode for in-proc nodes.
+
+
+
+
+ The build component host.
+
+
+
+
+ The environment at the time the build is started.
+
+
+
+
+ The current directory at the time the build is started.
+
+
+
+
+ The node logging context.
+
+
+
+
+ The build request engine.
+
+
+
+
+ The queue of packets we have received but which have not yet been processed.
+
+
+
+
+ The event which is set when we receive packets.
+
+
+
+
+ The event which is set when we should shut down.
+
+
+
+
+ The reason we are shutting down.
+
+
+
+
+ The exception, if any, which caused shutdown.
+
+
+
+
+ The node endpoint
+
+
+
+
+ Handler for engine exceptions.
+
+
+
+
+ Handler for new configuration requests.
+
+
+
+
+ Handler for blocked request events.
+
+
+
+
+ Handler for request completed events.
+
+
+
+
+ Handler for resource request events.
+
+
+
+
+ Constructor.
+
+
+
+
+ Starts up the node and processes messages until the node is requested to shut down.
+
+ The exception which caused shutdown, if any.
+ The reason for shutting down.
+
+
+
+ Not necessary for in-proc node - we don't serialize.
+
+
+
+
+ Not necessary for in-proc node - we don't serialize.
+
+
+
+
+ Not necessary for in-proc node - we don't serialize.
+
+
+
+
+ Routes the packet to the appropriate handler.
+
+ The node id.
+ The packet.
+
+
+
+ Event handler for the BuildEngine's OnRequestComplete event.
+
+
+
+
+ Event handler for the BuildEngine's OnNewRequest event.
+
+
+
+
+ Event handler for the BuildEngine's OnNewConfigurationRequest event.
+
+
+
+
+ Event handler for the BuildEngine's OnResourceRequest event.
+
+
+
+
+ Event handler for the LoggingService's OnLoggingThreadException event.
+
+
+
+
+ Event handler for the BuildEngine's OnEngineException event.
+
+
+
+
+ Perform necessary actions to shut down the node.
+
+
+
+
+ Dispatches the packet to the correct handler.
+
+
+
+
+ Event handler for the node endpoint's LinkStatusChanged event.
+
+
+
+
+ Handles the BuildRequest packet.
+
+
+
+
+ Handles the BuildRequestConfiguration packet.
+
+
+
+
+ Handles the BuildRequestConfigurationResponse packet.
+
+
+
+
+ Handles the BuildResult packet.
+
+
+
+
+ Handles the NodeConfiguration packet.
+
+
+
+
+ Handles the NodeBuildComplete packet.
+
+
+
+
+ Handles the ResourceResponse packet.
+
+
+
+
+ NodeConfiguration contains all of the information necessary for a node to configure itself for building.
+
+
+
+
+ The node id
+
+
+
+
+ The system parameters which were defined on the host.
+
+
+
+
+ The app domain information needed for setting up AppDomain-isolated tasks.
+
+
+
+
+ The forwarding loggers to use.
+
+
+
+
+ The logging configuration for the node.
+
+
+
+
+ Constructor
+
+ The node id.
+ The build parameters
+ The forwarding loggers.
+ The AppDomain setup information.
+ The logging configuration for the node.
+
+
+
+ Private constructor for deserialization
+
+
+
+
+ Gets or sets the node id
+
+
+
+
+ Retrieves the system parameters.
+
+
+
+
+ Retrieves the logger descriptions.
+
+
+
+
+ Retrieves the app domain setup information.
+
+
+
+
+ The logging configuration for the node.
+
+
+
+
+ Retrieves the packet type.
+
+
+
+
+ Translates the packet to/from binary form.
+
+ The translator to use.
+
+
+
+ Factory for deserialization.
+
+
+
+
+ We need to clone this object since it gets modified for each node which is launched.
+
+
+
+
+ Native methods used by the backend. This was copied from the oldOM so we can make it stylecop compliant and allow
+ easier deletion of the native code in the old OM
+
+
+
+
+ Null Pointer
+
+
+
+
+ Invalid Handle
+
+
+
+
+ Start the process with a normal priority class
+
+
+
+
+ Do not create a window
+
+
+
+
+ Use the standard handles
+
+
+
+
+ Create a new console.
+
+
+
+
+ Create a new process
+
+
+
+
+ Structure that contains the startupinfo
+ Represents STARTUP_INFO in win32
+
+
+
+
+ The size of the structure, in bytes.
+
+
+
+
+ Reserved; must be NULL
+
+
+
+
+ The name of the desktop, or the name of both the desktop and window station for this process.
+ A backslash in the string indicates that the string includes both the desktop and window station names
+
+
+
+
+ For console processes, this is the title displayed in the title bar if a new console window is created.
+ If NULL, the name of the executable file is used as the window title instead.
+ This parameter must be NULL for GUI or console processes that do not create a new console window
+
+
+
+
+ If dwFlags specifies STARTF_USEPOSITION, this member is the x offset of the upper left corner of a window if a new window is created, in pixels. Otherwise, this member is ignored
+
+
+
+
+ If dwFlags specifies STARTF_USEPOSITION, this member is the y offset of the upper left corner of a window if a new window is created, in pixels. Otherwise, this member is ignored.
+
+
+
+
+ If dwFlags specifies STARTF_USESIZE, this member is the width of the window if a new window is created, in pixels. Otherwise, this member is ignored.
+
+
+
+
+ If dwFlags specifies STARTF_USESIZE, this member is the height of the window if a new window is created, in pixels. Otherwise, this member is ignored.
+
+
+
+
+ If dwFlags specifies STARTF_USECOUNTCHARS, if a new console window is created in a console process, this member specifies the screen buffer width, in character columns. Otherwise, this member is ignored.
+
+
+
+
+ If dwFlags specifies STARTF_USECOUNTCHARS, if a new console window is created in a console process, this member specifies the screen buffer height, in character rows. Otherwise, this member is ignored.dwFillAttribute
+
+
+
+
+ If dwFlags specifies STARTF_USEFILLATTRIBUTE, this member is the initial text and background colors if a new console window is created in a console application. Otherwise, this member is ignored.
+
+
+
+
+ A bit field that determines whether certain STARTUPINFO members are used when the process creates a window
+
+
+
+
+ If dwFlags specifies STARTF_USESHOWWINDOW, this member can be any of the SW_ constants defined in Winuser.h. Otherwise, this member is ignored.
+
+
+
+
+ Reserved for use by the C Run-time; must be zero.
+
+
+
+
+ Reserved for use by the C Run-time; must be NULL.
+
+
+
+
+ If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard input handle for the process. Otherwise, this member is ignored and the default for standard input is the keyboard buffer.
+
+
+
+
+ If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard output handle for the process. Otherwise, this member is ignored and the default for standard output is the console window's buffer.
+
+
+
+
+ If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard error handle for the process. Otherwise, this member is ignored and the default for standard error is the console window's buffer.
+
+
+
+
+ Structure to contain security attributes from the create process call represents
+ SECURITY_ATTRIBUTE in win32
+
+
+
+
+ The size, in bytes, of this structure. Set this value to the size of the SECURITY_ATTRIBUTES structure
+
+
+
+
+ A pointer to a security descriptor for the object that controls the sharing of it.
+ If NULL is specified for this member, the object is assigned the default security descriptor of the calling process.
+ This is not the same as granting access to everyone by assigning a NULL discretionary access control list (DACL).
+ The default security descriptor is based on the default DACL of the access token belonging to the calling process.
+ By default, the default DACL in the access token of a process allows access only to the user represented by the access token.
+ If other users must access the object, you can either create a security descriptor with the appropriate access,
+ or add ACEs to the DACL that grants access to a group of users.
+
+
+
+
+ A Boolean value that specifies whether the returned handle is inherited when a new process is created.
+ If this member is TRUE, the new process inherits the handle.
+
+
+
+
+ Process information from the create process call
+ Represents PROCESS_INFORMATION in win32
+
+
+
+
+ A handle to the newly created process. The handle is used to specify the process in all functions that perform operations on the process object.
+
+
+
+
+ A handle to the primary thread of the newly created process. The handle is used to specify the thread in all functions that perform operations on the thread object
+
+
+
+
+ A value that can be used to identify a process.
+ The value is valid from the time the process is created until all handles to the process are closed and
+ the process object is freed; at this point, the identifier may be reused.
+
+
+
+
+ A value that can be used to identify a thread. The value is valid from the time the thread is created until all handles to the thread are closed and the thread object is freed; at this point, the identifier may be reused.
+
+
+
+
+ Delegate for event raised when a new build request needs to be issued.
+
+ The entry issuing the request.
+ The request to be issued.
+
+
+
+ Delegate for event raised when a build request has completed.
+
+ The entry which completed.
+
+
+
+ Delegate for event raised when a build request is blocked on another request which is in progress.
+
+ The build request entry which is being blocked.
+ The request on which we are blocked.
+ The target on which we are blocked.
+ The partial build result on which we are blocked.
+
+
+
+ Represents a class which is capable of building BuildRequestEntries.
+
+
+
+
+ Raised when a new build request is to be issued.
+
+
+
+
+ Raised when the build request is complete.
+
+
+
+
+ Raised when a build request is blocked on another one in progress.
+
+
+
+
+ Raised when resources are requested.
+
+
+
+
+ Builds the request contained in the specified entry.
+
+ The logging context for the node.
+ The entry to be built.
+
+
+
+ Continues building a request which was previously waiting for results.
+
+
+
+
+ Continues building a request which was previously waiting for a resource grant.
+
+
+
+
+ Cancels an existing request.
+
+
+
+
+ Starts to cancel an existing request.
+
+
+ This method should return immediately after signal the cancel event.
+ "CancelRequest()" is equal to call "BeginCancel()" and "WaitForCancelCompletion()".
+ We break "CancelRequest()" to 2 phases, so that we could signal cancel event
+ to a bunch of requests without waiting, in order to optimize the "cancel build" scenario.
+
+
+
+
+ Waits for the cancellation until it's completed, and cleans up the internal states.
+
+
+
+
+ This interface is passed to objects which might need to call back into the request builder, such as the Target and Task builders
+
+
+
+
+ This method instructs the request builder to build the specified projects using the specified parameters. This is
+ what is ultimately used by something like an MSBuild task which needs to invoke a project-to-project reference. IBuildEngine
+ and IBuildEngine2 have BuildProjectFile methods which boil down to an invocation of this method as well.
+
+ An array of projects to be built.
+ The property groups to use for each project. Must be the same number as there are project files.
+ The tools version to use for each project. Must be the same number as there are project files.
+ The targets to be built. Each project will be built with the same targets.
+ True to wait for the results
+ If set, skip targets that are not defined in the projects to be built.
+ An Task representing the work which will be done.
+
+
+
+ This method instructs the request builder that the target builder is blocked on a target which is already in progress on the
+ configuration due to another request.
+
+ The request on which we are blocked.
+ The target on which we are blocked.
+ Results so far from the target builder that's blocking
+
+
+
+ Instructs the RequestBuilder that it may yield its control of the node.
+
+
+
+
+ Instructs the RequestBuilder to suspend until the node is reacquired.
+
+
+
+
+ Instructs the RequestBuilder that next Build request from a task should post its request
+ and immediately return so that the thread may be freed up. May not be nested.
+
+
+
+
+ Exits the previous MSBuild callback state.
+
+
+
+
+ Requests CPU resources from the scheduler.
+
+ The object used by the caller for synchronization. The lock on this object must be taken when calling this method.
+ Number of logical cores being requested.
+ True to make the request block and wait for at least one core.
+ Number of logical cores actually granted. If is false, the call can return
+ zero. Otherwise the return value is positive.
+
+
+
+ Returns CPU resources to the scheduler.
+
+ Number of logical cores being returned.
+
+
+
+ Represents an object which can build targets for a project.
+
+
+
+
+ Builds the specified targets.
+
+ The logging context for the project.
+ The BuildRequestEntry for which we are building targets.
+ The callback to be used to handle new project build requests.
+ The targets to build.
+ The Lookup containing all current items and properties for this target.
+ The cancellation token used to cancel processing of targets.
+ A Task representing the work to be done.
+
+
+
+ Flags indicating the mode in which the task builder should operate.
+
+
+
+
+ This entry is necessary to use the enum with binary math. It is never used outside
+ intermediate calculations.
+
+
+
+
+ In this mode, the task engine actually runs the task and retrieves its outputs.
+
+
+
+
+ In this mode, the task engine only infers the task's outputs from its <Output> tags.
+
+
+
+
+ Interface representing an object which can build tasks.
+
+
+
+
+ Executes the specified task, batching it is necessary.
+
+ The logging context for the target
+ The build request entry
+ The callback to use for handling new build requests.
+ The node for the task
+ The mode to use when executing the task.
+ The lookup used when we are inferring outputs from inputs.
+ The lookup used when executing the task to get its outputs.
+ The cancellation token used to cancel processing of the task.
+ A Task representing the work to be done.
+
+
+
+ This class represents a collection of items that are homogeneous w.r.t.
+ a certain set of metadata.
+
+
+
+
+ This single object contains all of the data necessary to perform expansion of metadata, properties,
+ and items.
+
+
+
+
+ Metadata in this bucket
+
+
+
+
+ The items for this bucket.
+
+
+
+
+ When buckets are being created for batching purposes, this indicates which order the
+ buckets were created in, so that the target/task being batched gets called with the items
+ in the same order as they were declared in the project file. For example, the first
+ bucket created gets bucketSequenceNumber=0, the second bucket created gets
+ bucketSequenceNumber=1, etc.
+
+
+
+
+ The entry we enter when we create the bucket.
+
+
+
+
+ Private default constructor disallows parameterless instantiation.
+
+
+
+
+ Creates an instance of this class using the given bucket data.
+
+ Item types being batched on: null indicates no batching is occurring
+ Hashtable of item metadata values: null indicates no batching is occurring
+ The to use for the items in the bucket.
+ A sequence number indication what order the buckets were created in.
+
+
+
+ Compares this item bucket against the given one. The comparison is
+ solely based on the values of the item metadata in the buckets.
+
+
+
+ -1, if this bucket is "less than" the second one
+ 0, if this bucket is equivalent to the second one
+ +1, if this bucket is "greater than" the second one
+
+
+
+
+ Constructs a token bucket object that can be compared against other
+ buckets. This dummy bucket is a patently invalid bucket, and cannot
+ be used for any other operations besides comparison.
+
+
+ PERF NOTE: A dummy bucket is intentionally very light-weight, and it
+ allocates a minimum of memory compared to a real bucket.
+
+ An item bucket that is invalid for everything except comparisons.
+
+
+
+ Returns the object that knows how to handle all kinds of expansion for this bucket.
+
+
+
+
+ When buckets are being created for batching purposes, this indicates which order the
+ buckets were created in, so that the target/task being batched gets called with the items
+ in the same order as they were declared in the project file. For example, the first
+ bucket created gets bucketSequenceNumber=0, the second bucket created gets
+ bucketSequenceNumber=1, etc.
+
+
+
+
+ The items for this bucket.
+
+
+
+
+ Adds a new item to this bucket.
+
+
+
+
+ Leaves the lookup scope created for this bucket.
+
+
+
+
+ Contains a list of item and property collections, optimized to allow
+ - very fast "cloning"
+ - quick lookups
+ - scoping down of item subsets in nested scopes (useful for batches)
+ - isolation of adds, removes, modifies, and property sets inside nested scopes
+
+ When retrieving the item group for an item type, each table is consulted in turn,
+ starting with the primary table (the "top" or "innermost" table), until a table is found that has an entry for that type.
+ When an entry is found, it is returned without looking deeper.
+ This makes it possible to let callers see only a subset of items without affecting or cloning the original item groups,
+ by populating a scope with item groups that are empty or contain subsets of items in lower scopes.
+
+ Instances of this class can be cloned with Clone() to share between batches.
+
+ When EnterScope() is called, a fresh primary table is inserted, and all adds and removes will be invisible to
+ any clones made before the scope was entered and anyone who has access to item groups in lower tables.
+
+ When LeaveScope() is called, the primary tables are merged into the secondary tables, and the primary tables are discarded.
+ This makes the adds and removes in the primary tables visible to clones made during the previous scope.
+
+ Scopes can be populated (before Adds, Removes, and Lookups) using PopulateWithItem(). This reduces the set of items of a particular
+ type that are visible in a scope, because lookups of items of this type will stop at this level and see the subset, rather than the
+ larger set in a scope below.
+
+ Items can be added or removed by calling AddNewItem() and RemoveItem(). Only the primary level is modified.
+ When items are added or removed they enter into a primary table exclusively for adds or removes, instead of the main primary table.
+ This allows the adds and removes to be applied to the scope below on LeaveScope(). Even when LeaveScope() is called, the adds and removes
+ stay in their separate add and remove tables: if they were applied to a main table, they could truncate the downward traversal performed by lookups
+ and hide items in a lower main table. Only on the final call of LeaveScope() can all adds and removes be applied to the outermost table, i.e., the project.
+
+ Much the same applies to properties.
+
+ For sensible semantics, only the current primary scope can be modified at any point.
+
+
+
+
+ Ordered list of scope used for lookup.
+ Each scope contains multiple tables:
+ - the main item table (populated with subsets of lists, in order to create batches)
+ - the add table (items that have been added during execution)
+ - the remove table (items that have been removed during execution)
+ - the modify table (item metadata modifications)
+ - the main property table (populated with properties that are visible in this scope)
+ - the property set table (changes made to properties)
+ All have to be consulted to find the items and properties available in the current scope.
+ We have to keep them separate, because the adds and removes etc need to be applied to the table
+ below when we leave a scope.
+
+
+
+
+ When we are asked for all the items of a certain type using the GetItems() method, we may have to handle items
+ that have been modified earlier with ModifyItems(). These pending modifications can't be applied immediately to
+ the item because that would affect other batches. Instead we clone the item, apply the modification, and hand that over.
+ The problem is that later we might get asked to remove or modify that item. We want to make sure that we record that as
+ a remove or modify of the real item, not the clone we handed over. So we keep a lookup of (clone, original) to consult.
+
+
+
+
+ Construct a lookup over specified items and properties.
+
+
+
+
+ Copy constructor (called via Clone() - clearer semantics)
+
+
+
+
+ Compares the primary property sets of the passed in lookups to determine if there are properties which are shared between
+ the lookups. We find these shared property names because this indicates that the current Lookup is overriding the property value of another Lookup
+ When an override is detected a messages is generated to inform the users that the property is being changed between batches
+
+ array or error messages to log
+
+
+
+ Clones this object, to create another one with its own list, but the same contents.
+ Then the clone can enter scope and have its own fresh primary list without affecting the other object.
+
+
+
+
+ Enters the scope using the specified description.
+ Callers keep the scope in order to pass it to LeaveScope.
+
+
+
+
+ Leaves the specified scope, which must be the active one.
+ Moves all tables up one: the tertiary table becomes the secondary table, and so on. The primary
+ and secondary table are merged. This has the effect of "applying" the adds applied to the primary
+ table into the secondary table.
+
+
+
+
+ Leaving an arbitrary scope, just merging all the adds, removes, modifies, and sets into the scope below.
+
+
+
+
+ Merge the current scope down into the base scope. This means applying the adds, removes, modifies, and sets
+ directly into the item and property tables in this scope.
+
+
+
+
+ Gets the effective property for the current scope.
+ taking the name from the provided string within the specified start and end indexes.
+ If no match is found, returns null.
+ Caller must not modify the property returned.
+
+
+
+
+ Gets the effective property for the current scope.
+ If no match is found, returns null.
+ Caller must not modify the property returned.
+
+
+
+
+ Gets the items of the specified type that are visible in the current scope.
+ If no match is found, returns an empty list.
+ Caller must not modify the group returned.
+
+
+
+
+ Populates with an item group. This is done before the item lookup is used in this scope.
+ Assumes all the items in the group have the same, provided, type.
+ Assumes there is no item group of this type in the primary table already.
+ Should be used only by batching buckets, and if no items are passed,
+ explicitly stores a marker for this item type indicating this.
+
+
+
+
+ Populates with an item. This is done before the item lookup is used in this scope.
+ There may or may not already be a group for it.
+
+
+
+
+ Apply a property to this scope.
+
+
+
+
+ Implements a true add, an item that has been created in a batch.
+
+
+
+
+ Implements a true add, an item that has been created in a batch.
+
+
+
+
+ Remove a bunch of items from this scope
+
+
+
+
+ Remove an item from this scope
+
+
+
+
+ Modifies items in this scope with the same set of metadata modifications.
+ Assumes all the items in the group have the same, provided, type.
+
+
+
+
+ Apply modifies to a temporary result group.
+ Items to be modified are virtual-cloned so the original isn't changed.
+
+
+
+
+ Applies the specified modifications to the supplied item.
+
+
+
+
+ Look up the "real" item by using its clone, and return the real item.
+ See for explanation of the clone table.
+
+
+
+
+ Applies a list of modifications to the appropriate in a main table.
+ If any modifications conflict, these modifications win.
+
+
+
+
+ Applies a modification to an item in a table of modifications.
+ If the item already exists in the table, merges in the modifications; if there is a conflict
+ the mergeType indicates which should win.
+
+
+
+
+ Add/remove/modify/set directly on an outer scope would need to be handled separately - it would apply
+ directly to the main tables. Our code isn't expected to do this.
+
+
+
+
+ When merging metadata, we can deal with a conflict two different ways:
+ FirstWins = any previous metadata with the name takes precedence
+ SecondWins = the new metadata with the name takes precedence
+
+
+
+
+ A class representing a set of additions, modifications or removal of metadata from items.
+
+
+
+
+ Flag indicating if the modifications should be interpreted such that the lack of an explicit entry for a metadata name
+ means that that metadata should be removed.
+
+
+
+
+ A set of explicitly-specified modifications.
+
+
+
+
+ Constructor.
+
+ When true, metadata which is not explicitly-specified here but which is present on the target
+ item should be removed. When false, only explicitly-specified modifications apply.
+
+
+
+ Cloning constructor.
+
+ The metadata modifications to clone.
+
+
+
+ Clones this modification set.
+
+ A copy of the modifications.
+
+
+
+ A flag indicating whether or not there are any changes which might apply.
+
+
+
+
+ A flag indicating whether only those metadata explicitly-specified should be retained on a target item.
+
+
+
+
+ Applies the modifications from the specified modifications to this one, performing a proper merge.
+
+ The set of metadata modifications to merge into this one.
+
+
+
+ Returns true if this block contains an explicitly-specified modification for the provided metadata name.
+
+ The name of the metadata.
+ True if there is an explicit modification for this metadata, false otherwise.
+ The return value of this method is unaffected by the property.
+
+
+
+ Adds metadata to the modification table.
+
+ The name of the metadata to add (or change) in the target item.
+ The metadata value.
+
+
+
+ Provides an enumeration of the explicit metadata modifications.
+
+
+
+
+ Sets or retrieves a modification from the modifications table.
+
+ The metadata name.
+ If is true, this will return a modification with
+ set to true if the metadata has no other explicitly-specified modification. Otherwise it will return only the explicitly-specified
+ modification if one exists.
+ When if false, this is thrown if the metadata
+ specified does not exist when attempting to retrieve a metadata modification.
+
+
+
+ A type of metadata modification.
+
+
+
+
+ Indicates the metadata value should be kept unchanged.
+
+
+
+
+ Indicates the metadata value should be changed.
+
+
+
+
+ Indicates the metadata value should be removed.
+
+
+
+
+ Represents a modification for a single metadata.
+
+
+
+
+ When true, indicates the metadata should be removed from the target item.
+
+
+
+
+ The value to which the metadata should be set. If null, the metadata value should be retained unmodified.
+
+
+
+
+ A modification which indicates the metadata value should be retained without modification.
+
+
+
+
+ A modification which indicates the metadata should be removed.
+
+
+
+
+ Constructor for metadata modifications of type Keep or Remove.
+
+ The type of modification to make.
+
+
+
+ Constructor for metadata modifications of type Update.
+
+ The new value for the metadata.
+
+
+
+ Creates a metadata modification of type Keep.
+
+ The metadata modification.
+
+
+
+ Creates a metadata modification of type Update with the specified metadata value.
+
+ The new metadata value.
+ The metadata modification.
+
+
+
+ Creates a metadata modification of type Remove.
+
+ The metadata modification.
+
+
+
+ When true, this modification indicates the associated metadata should be removed.
+
+
+
+
+ When true, this modification indicates the associated metadata should retain its existing value.
+
+
+
+
+ The new value of the metadata. Only valid when is false.
+
+
+
+
+ Represents an entry in the lookup list.
+ Class rather than a struct so that it can be modified in the list.
+
+
+
+
+ Contains all of the original items at this level in the Lookup
+
+
+
+
+ Contains all of the items which have been added at this level in the Lookup
+
+
+
+
+ Contails all of the items which have been removed at this level in the Lookup
+
+
+
+
+ Contains all of the metadata which has been changed for items at this level in the Lookup.
+ Schema: { K=type, V= { K=item, V=table of { K=metadata name, V=metadata value }}}
+
+
+
+
+ Contains all of the original properties at this level in the Lookup
+
+
+
+
+ Contains all of the properties which have been set at this level or above in the Lookup
+
+
+
+
+ The managed thread id which entered this scope.
+
+
+
+
+ A description of this scope, for error checking
+
+
+
+
+ The lookup which owns this scope, for error checking.
+
+
+
+
+ Indicates whether or not further levels in the Lookup should be consulted beyond this one
+ to find the actual value for the desired item or property.
+
+
+
+
+ The main table, populated with items that
+ are initially visible in this scope. Does not
+ include adds or removes unless it's the table in
+ the outermost scope.
+
+
+
+
+ Adds made in this scope or above.
+
+
+
+
+ Removes made in this scope or above.
+
+
+
+
+ Modifications made in this scope or above.
+
+
+
+
+ The main property table, populated with properties
+ that are initially visible in this scope. Does not
+ include sets unless it's the table in the outermost scope.
+
+
+
+
+ Properties set in this scope or above.
+
+
+
+
+ ID of thread owning this scope
+
+
+
+
+ Whether to stop lookups going beyond this scope downwards
+
+
+
+
+ The description assigned to this scope.
+
+
+
+
+ Leaves the current lookup scope.
+
+
+
+
+ Implementation of IRequestBuilder
+
+
+
+
+ The dedicated scheduler object.
+
+
+
+
+ The event used to signal that this request should immediately terminate.
+
+
+
+
+ The event used to signal that this request should wake up from its wait state.
+
+
+
+
+ The results used when a build request entry continues.
+
+
+
+
+ Queue of actions to call when a resource request is responded to.
+
+
+
+
+ The task representing the currently-executing build request.
+
+
+
+
+ The cancellation token source for the currently-executing build request.
+
+
+
+
+ The build request entry being built.
+
+
+
+
+ The component host.
+
+
+
+
+ The node logging context
+
+
+
+
+ The project logging context
+
+
+
+
+ The target builder.
+
+
+
+
+ Block type
+
+
+
+
+ Flag indicating we are in an MSBuild callback
+
+
+
+
+ Flag indicating whether this request builder has been zombied by a cancellation request.
+
+
+
+
+ Creates a new request builder.
+
+
+
+
+ The event raised when a new build request should be issued.
+
+
+
+
+ The event raised when the build request has completed.
+
+
+
+
+ The event raised when the build request has completed.
+
+
+
+
+ The event raised when resources are requested.
+
+
+
+
+ The current block type
+
+
+
+
+ We are blocked waiting on a target in progress.
+
+
+
+
+ We are blocked waiting for results from child requests.
+
+
+
+
+ We are blocked because we have yielded control
+
+
+
+
+ We are not blocked at all.
+
+
+
+
+ Retrieves the request entry associated with this RequestBuilder.
+
+
+
+
+ Returns true if this RequestBuilder has an active build request
+
+
+
+
+ Starts a build request
+
+ The logging context for the node.
+ The entry to build.
+
+
+
+ Continues a build request
+
+
+
+
+ Continues a build request after receiving a resource response.
+
+
+
+
+ Terminates the build request
+
+
+ Once we have entered this method, no more methods will be invoked on this class (save ShutdownComponent)
+ as we should no longer be receiving any messages from the BuildManager.
+
+
+
+
+ Starts to cancel an existing request.
+
+
+
+
+ Waits for the cancellation until it's completed, and cleans up the internal states.
+
+
+
+
+ This method instructs the request builder to build the specified projects using the specified parameters. This is
+ what is ultimately used by something like an MSBuild task which needs to invoke a project-to-project reference. IBuildEngine
+ and IBuildEngine2 have BuildProjectFile methods which boil down to an invocation of this method as well.
+
+ An array of projects to be built.
+ The property groups to use for each project. Must be the same number as there are project files.
+ The tools version to use for each project. Must be the same number as there are project files.
+ The targets to be built. Each project will be built with the same targets.
+ True to wait for the results
+ If set, skip targets that are not defined in the projects to be built.
+ True if the requests were satisfied, false if they were aborted.
+
+
+
+ This method is called when the current request needs to build a target which is already in progress on this configuration, but which
+ is being built by another request.
+
+ The id of the request on which we are blocked.
+ The target on which we are blocked.
+ A BuildResult with results from an incomplete build request.
+
+
+
+ Yields the node.
+
+
+
+
+ Waits for the node to be reacquired.
+
+
+
+
+ Enters the state where we are going to perform a build request callback.
+
+
+
+
+ Exits the build request callback state.
+
+
+
+
+ Requests CPU resources from the scheduler.
+
+
+
+
+ Returns CPU resources to the scheduler.
+
+
+
+
+ Sets the component host.
+
+ The component host.
+
+
+
+ Shuts down this component
+
+
+
+
+ Returns true if this builder is using legacy threading semantics.
+
+
+
+
+ This method waits for the specified handles, but will also spawn a request builder "thread" if that event is set.
+ This mechanism is used to implement running RequestBuilder threads on the main UI thread in VS.
+
+ The index of the handle which was signaled.
+
+
+
+ Class factory for component creation.
+
+
+
+
+ Starts the thread used to build
+
+
+
+
+ Set some parameters common to all worker threads we use
+
+
+
+
+ Asserts that the entry is in the ready state.
+
+
+
+
+ Asserts that the entry is in the active state.
+
+
+
+
+ Asserts that the entry is in the active or waiting state.
+
+
+
+
+ The entry point for the request builder thread.
+
+
+
+
+ Launch the project and gather the results, reporting them back to the BuildRequestEngine.
+
+
+
+
+ Reports this result to the engine and cleans up.
+
+
+
+
+ This is called back when this request needs to issue new requests and possible wait on them. This method will
+ block the builder's thread if any of the requests require us to wait for their results.
+
+ The list of build requests to be built.
+ The results, or null if the build should terminate.
+
+
+
+ Gets the results uses to continue the current build request.
+
+
+
+
+ Invokes the OnNewBuildRequests event
+
+ The requests to be fulfilled.
+
+
+
+ Invokes the OnBuildRequestCompleted event
+
+
+
+
+ Invokes the OnBlockedRequest event
+
+
+
+
+ Invokes the OnResourceRequest event
+
+
+
+
+
+ This method is called to reset the current directory to the one appropriate for this project. It should be called any time
+ the project is resumed.
+ If the directory does not exist, does nothing.
+ This is because if the project has not been saved, this directory may not exist, yet it is often useful to still be able to build the project.
+ No errors are masked by doing this: errors loading the project from disk are reported at load time, if necessary.
+
+
+
+
+ Kicks off the build of the project file. Doesn't return until the build is complete (or aborted.)
+
+
+
+
+ Saves the current operating environment.
+
+
+
+
+ Sets the operationg environment to the initial build environment.
+
+
+
+
+ Restores a previously saved operating environment.
+
+
+
+
+ Sets the environment block to the set of saved variables.
+
+
+
+
+ Clears from the current environment any variables which do not exist in the saved environment
+
+
+
+
+ Updates the current environment with values in the saved environment which differ or are not yet set.
+
+
+
+
+ Throws if the RequestBuilder has been zombied.
+
+
+
+
+ Configure warnings as messages and errors based on properties defined in the project.
+
+
+
+
+ The Target Builder is responsible for building a single target within a given project.
+
+
+ The Target Builder is a stack machine which builds project targets. Each time a target needs to be built, it is
+ pushed onto the stack. The main loop for the Target Builder simply evaluates the top item on the stack to determine
+ which action to take. These actions comprise the target state machine, as represented by the states of the
+ TargetEntry object.
+
+ When a target completes, all of its outputs are available in the Lookup contained in the TargetEntry. In fact, everything that it changed
+ in the global state is available by virtue of its Lookup being merged with the current Target's lookup.
+
+ For CallTarget tasks, this behavior is not the same. Rather the Lookup from a CallTarget call does not get merged until the calling
+ Target has completed. This is considered erroneous behavior and 'normal' version of CallTarget will be implemented which does not exhibit
+ this.
+
+
+
+
+ The cancellation token.
+
+
+
+
+ The current stack of targets and dependents. The top-most entry on the stack is the target
+ currently being built.
+
+
+
+
+ The component host.
+
+
+
+
+ The BuildRequestEntry for which we are building targets.
+
+
+
+
+ The lookup representing the project's state.
+
+
+
+
+ The callback interface used to invoke new project builds.
+
+
+
+
+ The project logging context
+
+
+
+
+ The aggregate build result from running the targets
+
+
+
+
+ The project instance we are building
+
+
+
+
+ Flag indicating whether we are under the influence of the legacy CallTarget's ContinueOnError behavior.
+
+
+
+
+ Builds the specified targets.
+
+ The logging context for the project.
+ The BuildRequestEntry for which we are building targets.
+ The callback to be used to handle new project build requests.
+ The names of the targets to build.
+ The Lookup containing all current items and properties for this target.
+ The to use when building the targets.
+ The target's outputs and result codes
+
+
+
+ Sets the component host.
+
+ The component host.
+
+
+
+ Shuts down the component.
+
+
+
+
+ Invokes the specified targets using Dev9 behavior.
+
+ The targets to build.
+ True to continue building the remaining targets if one fails.
+ The of the task.
+ The results for each target.
+
+ Dev9 behavior refers to the following:
+ 1. The changes made during the calling target up to this point are NOT visible to this target.
+ 2. The changes made by this target are NOT visible to the calling target.
+ 3. Changes made by the calling target OVERRIDE changes made by this target.
+
+
+
+
+ Forwarding implementation of BuildProjects
+
+
+
+
+ Required for interface - this should never be called.
+
+
+
+
+ Yields the node.
+
+
+
+
+ Reacquires the node.
+
+
+
+
+ Enters the MSBuild callback state for asynchronous processing of referenced projects.
+
+
+
+
+ Exits the MSBuild callback state.
+
+
+
+
+ Requests CPU resources from the scheduler.
+
+ This method is called from the .
+
+
+
+ Returns CPU resources to the scheduler.
+
+ This method is called from the .
+
+
+
+ Class factory for component creation.
+
+
+
+
+ Processes the target stack until its empty or we hit a recursive break (due to CallTarget etc.)
+
+
+
+
+ Determines if the current target should be skipped, and logs the appropriate message.
+
+ True to skip the target, false otherwise.
+
+
+
+ When a target build fails, we don't just stop building that target; we also pop all of the other dependency targets of its
+ parent target off the stack. Extract that logic into a standalone method so that it can be used when dealing with targets that
+ are skipped-unsuccessful as well as first-time failures.
+
+
+
+
+ Pushes the list of targets specified onto the target stack in reverse order specified, so that
+ they will be built in the order specified.
+
+ List of targets to build.
+ The target which should be considered the parent of these targets.
+ The lookup to be used to build these targets.
+ True if this should be considered an error target.
+ True if target stack processing should terminate when the last target in the list is processed.
+ The reason the target is being built by the parent.
+ True if we actually pushed any targets, false otherwise.
+
+
+
+ Represents which state the target entry is currently in.
+
+
+
+
+ The target's dependencies need to be evaluated and pushed onto the target stack.
+
+ Transitions:
+ Execution, ErrorExecution
+
+
+
+
+ The target is ready to execute its tasks, batched as needed.
+
+ Transitions:
+ ErrorExecution, Completed
+
+
+
+
+ The target is ready to provide error tasks.
+
+ Transitions:
+ None
+
+
+
+
+ The target has finished building. All of the results are in the Lookup.
+
+ Transitions:
+ None
+
+
+
+
+ This class represents a single target in the TargetBuilder. It maintains the state machine for a particular target as well as
+ relevant information on outputs generated while a target is running.
+
+
+
+
+ The BuildRequestEntry to which this target invocation belongs
+
+
+
+
+ The specification of the target being built.
+
+
+
+
+ The Target being built. This will be null until the GetTargetInstance() is called, which
+ will cause us to attempt to resolve the actual project instance. At that point
+ if the target doesn't exist, we will throw an InvalidProjectFileException. We do this lazy
+ evaluation because the 'target doesn't exist' message is not supposed to be emitted until
+ the target is actually needed, as opposed to when it is specified, such as in an OnError
+ clause, DependsOnTargets or on the command-line.
+
+
+
+
+ The current state of this entry
+
+
+
+
+ The completion state of the target.
+
+
+
+
+ The parent entry, which is waiting for us to complete before proceeding.
+
+
+
+
+ Why the parent target built this target.
+
+
+
+
+ The expander used to expand item and property markup to evaluated values.
+
+
+
+
+ The lookup containing our environment.
+
+
+
+
+ The build component host.
+
+
+
+
+ The target builder callback
+
+
+
+
+ A queue of legacy CallTarget lookup scopes to leave when this target is finished.
+
+
+
+
+ The cancellation token.
+
+
+
+
+ Flag indicating whether we are currently executing this target. Used for assertions.
+
+
+
+
+ The current task builder.
+
+
+
+
+ The constructor.
+
+ The build request entry for the target.
+ The target builder callback.
+ The specification for the target to build.
+ The lookup to use.
+ The parent of this entry, if any.
+ The reason the parent built this target.
+ The Build Component Host to use.
+ True if the target builder should stop processing the current target stack when this target is complete.
+
+
+
+ Gets or sets a flag indicating if this entry is the result of being listed as an error target in
+ an OnError clause.
+
+
+
+
+ Sets or sets the location from which this target was referred.
+
+
+
+
+ Gets or sets a flag indicating that the target builder should stop processing the target
+ stack when this target completes.
+
+
+
+
+ Retrieves the name of the target.
+
+
+
+
+ Gets the current state of the target
+
+
+
+
+ The result of this target.
+
+
+
+
+ Retrieves the Lookup this target was initialized with, including any modifications which have
+ been made to it while running.
+
+
+
+
+ The target contained by the entry.
+
+
+
+
+ The build request entry to which this target belongs.
+
+
+
+
+ The target entry for which we are a dependency.
+
+
+
+
+ Why the parent target built this target.
+
+
+
+
+ Determines equivalence of two target entries. They are considered the same
+ if their names are the same.
+
+ The entry to which we compare this one.
+ True if they are equivalent, false otherwise.
+
+
+
+ Retrieves the list of dependencies this target needs to have built and moves the target to the next state.
+ Never returns null.
+
+ A collection of targets on which this target depends.
+
+
+
+ Runs all of the tasks for this target, batched as necessary.
+
+
+
+
+ Retrieves the error targets for this target.
+
+ The project logging context.
+ A list of error targets.
+
+
+
+ Gathers the results from the target into the base lookup of the target.
+
+ The base lookup for this target.
+
+
+
+ Enters a legacy calltarget scope.
+
+ The lookup to enter with.
+
+
+
+ This method is used by the Target Builder to indicate that the target should run in error mode rather than normal mode.
+
+
+
+
+ This method is used by the Target Builder to indicate that a child of this target has failed and that work should not
+ continue in Completed / Skipped mode. We do not want to mark the state to run in ErrorExecution mode so that the
+ OnError targets do not run (the target was skipped due to condition so OnError targets should not run).
+
+
+
+
+ Leaves all the call target scopes in the order they were entered.
+
+
+
+
+ Walks through the set of tasks for this target and processes them by handing them off to the TaskBuilder.
+
+
+ The result of the tasks, based on the last task which ran.
+
+
+
+
+ Gets the task execution mode based
+
+ The result of the up-to-date check.
+ The mode to be used to execute tasks.
+
+
+
+ Verifies that the target's state is as expected.
+
+ The actual value
+ The expected value
+
+
+
+ Gets the list of parameters which are batchable for a target
+ PERF: (Refactor) This used to be a method on the target, and it would
+ cache its values so this would only be computed once for each
+ target. We should consider doing something similar for perf reasons.
+
+ A list of batchable parameters
+
+
+
+ Resolves the target. If it doesn't exist in the project, throws an InvalidProjectFileException.
+
+
+
+
+ Enumeration of the results of target dependency analysis.
+
+
+
+
+ This class is used for performing dependency analysis on targets to determine if they should be built/rebuilt/skipped.
+
+
+
+
+ Creates an instance of this class for the given target.
+
+
+
+
+ Gets the target to perform dependency analysis on.
+
+ Target object.
+
+
+
+ Gets the value of the target's "Inputs" attribute.
+
+ Input specification string (can be empty).
+
+
+
+ Gets the value of the target's "Outputs" attribute.
+
+ Output specification string (can be empty).
+
+
+
+ Compares the target's inputs against its outputs to determine if the target needs to be built/rebuilt/skipped.
+
+
+ The collections of changed and up-to-date inputs returned from this method are valid IFF this method decides an
+ incremental build is needed.
+
+
+
+
+
+
+ DependencyAnalysisResult.SkipUpToDate, if target is up-to-date;
+ DependencyAnalysisResult.SkipNoInputs, if target has no inputs;
+ DependencyAnalysisResult.SkipNoOutputs, if target has no outputs;
+ DependencyAnalysisResult.IncrementalBuild, if only some target outputs are out-of-date;
+ DependencyAnalysisResult.FullBuild, if target is out-of-date
+
+
+
+
+ Does appropriate logging to indicate why this target is being built fully or partially.
+
+
+
+
+
+
+ Returns a string indicating why a full build is occurring.
+
+
+
+
+ Returns a string indicating why an incremental build is occurring.
+
+
+
+
+ Extract only the unique inputs and outputs from all the inputs and outputs gathered
+ during dependency analysis
+
+
+
+
+ Parses the target's "Inputs" and "Outputs" attributes and gathers up referenced items.
+
+
+
+
+
+
+
+
+
+
+
+ Determines if the target needs to be built/rebuilt/skipped if it has no inputs (because they evaluated to empty).
+
+
+
+
+ Determines if the target needs to be built/rebuilt/skipped if it has no outputs (because they evaluated to empty).
+
+ Indication of how to build the target.
+
+
+
+ Determines if the target needs to be built/rebuilt/skipped if it has discrete inputs.
+
+
+
+
+
+
+ Indication of how to build the target.
+
+
+
+ Determines if the target needs to be built/rebuilt/skipped if its inputs and outputs can be correlated.
+
+ The set of items which are in the inputs
+ The set of items which are in the outputs.
+ A list of item types referenced in both the inputs and the outputs
+ The inputs which are "changed" and require a build
+ The inpurt which are "up to date" and do not require a build
+ Indication of how to build the target.
+
+
+
+ Determines if the target needs to be built/rebuilt/skipped if it has discrete outputs.
+
+
+
+
+
+ Indication of how to build the target.
+
+
+
+ Separates item vectors from discrete items, and discards duplicates. If requested, item vector transforms are also
+ separated out. The item vectors (and the transforms) are partitioned by type, since there can be more than one item
+ vector of the same type.
+
+
+ The item vector collection is a table of tables, where the top-level table is indexed by item type, and
+ each "partition" table is indexed by the item vector itself.
+
+
+
+ Collection for item vectors
+ Collection for transforms if they should be collected separately, else null
+
+
+
+
+
+ Retrieves the item-specs of all items in the given item vector collection.
+
+
+ list of item-specs
+
+
+
+ Retrieves the item-specs of all items of the specified type in the given item vector collection.
+
+
+
+
+ list of item-specs
+
+
+
+ Finds the differences in the keys between the two given hashtables.
+
+
+
+
+
+
+
+
+
+ Compares the set of files/directories designated as "inputs" against the set of files/directories designated as
+ "outputs", and indicates if any "output" file/directory is out-of-date w.r.t. any "input" file/directory.
+
+
+ NOTE: Internal for unit test purposes only.
+
+ true, if any "input" is newer than any "output", or if any input or output does not exist.
+
+
+
+ Record the unique input and output files so that the "up to date" message
+ can list them in the log later.
+
+
+
+
+ Compares the file/directory designated as "input" against the file/directory designated as "output", and indicates if
+ the "output" file/directory is out-of-date w.r.t. the "input" file/directory.
+
+
+ If the "input" does not exist on disk, we treat its disappearance as a change, and consider the "input" to be newer
+ than the "output", regardless of whether the "output" itself exists.
+
+
+
+
+
+ true, if "input" is newer than "output"
+
+
+
+ Add timestamp comparison results to a list, to log them together later.
+
+
+
+
+ Compares the last-write times of the given files/directories.
+
+
+ Existing files/directories are always considered newer than non-existent ones, and two non-existent files/directories
+ are considered to have the same last-write time.
+
+
+
+ [out] indicates if the first file/directory does not exist on disk
+ [out] indicates if the second file/directory does not exist on disk
+
+ -1 if the first file/directory is older than the second;
+ 0 if the files/directories were both last written to at the same time;
+ +1 if the first file/directory is newer than the second
+
+
+
+
+ By default we do not sort target inputs and outputs as it has significant perf impact.
+ But allow suites to enable this so they get consistent results.
+
+
+
+
+ The unique target inputs.
+
+
+
+
+ The unique target outputs.
+
+
+
+
+ Why TLDA decided this entry was out of date
+
+
+
+
+ A logging detail entry. Describes what TLDA decided about inputs / outputs
+
+
+
+
+ The reason that we are logging this entry
+
+
+
+
+ The input item name (can be null)
+
+
+
+
+ The output item name (can be null)
+
+
+
+
+ The input file
+
+
+
+
+ The output file
+
+
+
+
+ Construct a log detail element
+
+ Input file
+ Output file
+ Input item name (can be null)
+ Output item name (can be null)
+ The reason we are logging
+
+
+
+ The possible values for a task's ContinueOnError attribute.
+
+
+
+
+ If the task fails, error and stop.
+
+
+
+
+ If the task fails, error and continue.
+
+
+
+
+ If the task fails, warn and continue.
+
+
+
+
+ The TaskBuilder is one of two components related to building tasks, the other being the TaskExecutionHost. The TaskBuilder is
+ responsible for all parts dealing with the XML/task declaration. It determines if the task is intrinsic or extrinsic,
+ looks up the task in the task registry, determines the task parameters and requests them to be set, and requests outputs
+ when task execution has been completed. It is not responsible for reflection over the task instance or anything which
+ requires dealing with the task instance directly - those actions are handled by the TaskExecutionHost.
+
+
+
+
+ The Build Request Entry for which this task is executing.
+
+
+
+
+ The cancellation token
+
+
+
+
+ The build component host.
+
+
+
+
+ The original target child instance
+
+
+
+
+ The task instance for extrinsic tasks
+
+
+
+
+ Host callback for host-aware tasks.
+
+
+
+
+ indicates whether to ignore task execution failures
+
+
+
+
+ The logging context for the target in which we are executing.
+
+
+
+
+ Full path to the project, for errors
+
+
+
+
+ The target builder callback.
+
+
+
+
+ The task execution host for in-proc tasks.
+
+
+
+
+ The object used to synchronize access to the task execution host.
+
+
+
+
+ Constructor
+
+
+
+
+ Builds the task specified by the XML.
+
+ The logging context of the target
+ The build request entry being built
+ The target builder callback.
+ The task instance.
+ The mode in which to execute tasks.
+ The lookup to be used for inference.
+ The lookup to be used during execution.
+ The to use when executing the task.
+ The result of running the task batch.
+
+ The ExecuteTask method takes a task as specified by XML and executes it. This procedure is comprised
+ of the following steps:
+ 1. Loading the Task from its containing assembly by looking it up in the task registry
+ 2. Determining if the task is batched. If it is, create the batches and execute each as if it were a non-batched task
+ 3. If the task is not batched, execute it.
+ 4. If the task was batched, hold on to its Lookup until all of the natches are done, then merge them.
+
+
+
+
+ Sets the build component host.
+
+ The component host.
+
+
+
+ Shuts down the component.
+
+
+
+
+ Class factory for component creation.
+
+
+
+
+ Build up a list of all parameters on the task, including those in any Output tags,
+ in order to find batchable metadata references
+
+ The list of parameter values
+
+
+
+ Called to execute a task within a target. This method instantiates the task, sets its parameters, and executes it.
+
+ true, if successful
+
+
+
+ Execute a single bucket
+
+ true if execution succeeded
+
+
+
+ Returns the set of parameters that can contribute to a task's identity, and their values for this particular task.
+
+
+
+
+ Executes the task using an STA thread.
+
+
+ STA thread launching also being used in XMakeCommandLine\OutOfProcTaskAppDomainWrapperBase.cs, InstantiateAndExecuteTaskInSTAThread method.
+ Any bug fixes made to this code, please ensure that you also fix that code.
+
+
+
+
+ Logs a task skipped message if necessary.
+
+
+
+
+ Runs an intrinsic task.
+
+
+
+
+ Initializes and executes the task.
+
+
+
+
+ Recomputes the task's "ContinueOnError" setting.
+
+ The bucket being executed.
+ The task host to use.
+
+ There are four possible values:
+ false - Error and stop if the task fails.
+ true - Warn and continue if the task fails.
+ ErrorAndContinue - Error and continue if the task fails.
+ WarnAndContinue - Same as true.
+
+
+
+
+ Execute a task object for a given bucket.
+
+ The host used to execute the task.
+ The logging context.
+ The task host for the task.
+ The batching bucket
+ The task execution mode
+ The result of running the task.
+
+
+
+ Gathers task outputs in two ways:
+ 1) Given an instantiated task that has finished executing, it extracts the outputs using .NET reflection.
+ 2) Otherwise, it parses the task's output specifications and (statically) infers the outputs.
+
+ The task execution host.
+ The task execution mode
+ The bucket to which the task execution belongs.
+ true, if successful
+
+
+
+ Uses the given task output specification to (statically) infer the task's outputs.
+
+ The lookup
+ The task output specification
+ The task parameter name
+ can be null
+ can be null
+ The bucket for the batch.
+
+
+
+ The task host object which allows tasks to interface with the rest of the build system.
+ Implementation of IBuildEngineX is thread-safe, so, for example, tasks can log concurrently on multiple threads.
+
+
+
+
+ Help diagnose tasks that log after they return.
+
+
+
+
+ The build component host
+
+
+
+
+ The build request entry
+
+
+
+
+ Location of the task node in the original file
+
+
+
+
+ The task logging context
+
+
+
+
+ True if the task connected to this proxy is alive
+
+
+
+
+ The callback used to invoke the target builder.
+
+
+
+
+ This reference type is used to block access to a single entry methods of the interface
+
+
+
+
+ A client sponsor is a class
+ which will respond to a lease renewal request and will
+ increase the lease time allowing the object to stay in memory
+
+
+
+
+ Legacy continue on error value per batch exposed via IBuildEngine
+
+
+
+
+ Flag indicating if errors should be converted to warnings.
+
+
+
+
+ The thread on which we yielded.
+
+
+
+
+ Constructor
+
+ The component host
+ The build request entry
+ The of the task.
+ An to use to invoke targets and build projects.
+
+
+
+ Returns true in the multiproc case
+
+
+ If MSBUILDNOINPROCNODE is set, then even if there's only one node in the buildparameters, it will be an out-of-proc node.
+
+
+
+
+ Reflects the value of the ContinueOnError attribute.
+
+
+
+
+ The line number this task is on
+
+
+
+
+ The column number this task is on
+
+
+
+
+ The project file this task is in.
+ Typically this is an imported .targets file.
+ Unfortunately the interface has shipped with a poor name, so we cannot change it.
+
+
+
+
+ Indicates whether or not errors should be converted to warnings.
+
+
+
+
+ Sets or retrieves the logging context
+
+
+
+
+ For configuring child AppDomains.
+
+
+
+
+ Whether or not this is out of proc.
+
+
+
+
+ Builds a single project file
+ Thread safe.
+
+ The project file
+ The list of targets to build
+ The global properties to use
+ The outputs from the targets
+ The tools version to use
+ True on success, false otherwise.
+
+
+
+ Builds multiple project files in parallel. This is the method the old MSBuild task invokes.
+ Thread safe.
+
+ The list of projects to build
+ The set of targets to build
+ The global properties to use for each project
+ The outputs for each target on each project
+ The tools versions to use
+ Whether to use the results cache
+ Whether to unload projects when we are done.
+ True on success, false otherwise.
+
+
+
+ Builds multiple project files in parallel.
+ Thread safe.
+
+ The list of projects to build
+ The set of targets to build
+ The global properties to use for each project
+ The list of global properties to undefine
+ The tools versions to use
+ Should the target outputs be returned in the BuildEngineResult
+ A structure containing the result of the build, success or failure and the list of target outputs per project
+
+
+
+ Requests to yield the node.
+ Thread safe, however Yield cannot be called unless the
+ last call to Yield or Reacquire was Reacquire.
+
+
+
+
+ Requests to reacquire the node.
+ Thread safe, however Reacquire cannot be called unless the
+ last call to Yield or Reacquire was Yield.
+
+
+
+
+ Logs an error event for the current task
+ Thread safe.
+
+ The event args
+
+
+
+ Logs a warning event for the current task
+ Thread safe.
+
+ The event args
+
+
+
+ Logs a message event for the current task
+ Thread safe.
+
+ The event args
+
+
+
+ Logs a custom event for the current task
+ Thread safe.
+
+ The event args
+
+
+
+ Builds a single project file
+ Thread safe.
+
+ The project file name
+ The set of targets to build.
+ The global properties to use
+ The outputs from the targets
+ True on success, false otherwise.
+
+
+
+ Disposes of all of the objects with the specified lifetime.
+
+
+
+
+ Gets a previously registered task object.
+
+
+
+
+ Unregisters a task object.
+
+
+
+
+ Logs a telemetry event for the current task.
+
+ The event name.
+ The list of properties associated with the event.
+
+
+
+ Gets the global properties for the current project.
+
+ An containing the global properties of the current project.
+
+
+
+ Enables or disables emitting a default error when a task fails without logging errors
+
+
+
+
+ Contains all warnings that should be logged as errors.
+ Non-null empty set when all warnings should be treated as errors.
+
+
+
+
+ Contains all warnings that should be logged as errors.
+ Non-null empty set when all warnings should be treated as errors.
+
+
+
+
+ Contains all warnings that should be logged as errors.
+ Non-null empty set when all warnings should be treated as errors.
+
+
+
+
+ Determines if the given warning should be treated as an error.
+
+
+ True if the warning should not be treated as a message and WarningsAsErrors is an empty set or contains the given warning code.
+
+
+
+ Additional cores granted to the task by the scheduler. Does not include the one implicit core automatically granted to all tasks.
+
+
+
+
+ True if the one implicit core has been allocated by , false otherwise.
+
+
+
+
+ Total number of cores granted to the task, including the one implicit core.
+
+
+
+
+ Allocates shared CPU resources. Called by a task when it's about to do potentially multi-threaded/multi-process work.
+
+ The number of cores the task wants to use.
+ The number of cores the task is allowed to use given the current state of the build. This number is always between
+ 1 and . If the task has allocated its one implicit core, this call may block, waiting for
+ at least one core to become available.
+
+
+
+ Frees shared CPU resources. Called by a task when it's finished doing multi-threaded/multi-process work.
+
+ The number of cores the task wants to return. This number must be between 0 and the number of cores
+ granted and not yet released.
+
+
+
+ Frees all CPU resources granted so far.
+
+
+
+
+
+
+
+
+
+
+ Reports a file access from a task.
+
+ The file access to report.
+
+
+
+ Called by the internal MSBuild task.
+ Does not take the lock because it is called by another request builder thread.
+
+
+
+
+
+ InitializeLifetimeService is called when the remote object is activated.
+ This method will determine how long the lifetime for the object will be.
+
+ The lease object to control this object's lifetime.
+
+
+
+ Indicates to the TaskHost that it is no longer needed.
+ Called by TaskBuilder when the task using the EngineProxy is done.
+
+
+
+
+ Determine if the event is serializable. If we are running with multiple nodes we need to make sure the logging events are serializable. If not
+ we need to log a warning.
+
+
+
+
+ Async version of BuildProjectFilesInParallel.
+
+ The list of projects to build
+ The set of targets to build
+ The global properties to use for each project
+ The list of global properties to undefine
+ The tools versions to use
+ Should the target outputs be returned in the BuildEngineResult
+ If set, skip targets that are not defined in the projects to be built.
+ A Task returning a structure containing the result of the build, success or failure and the list of target outputs per project
+
+
+
+ Verify the task host is active or not
+ Thread safe.
+
+
+
+
+ A build request contains information about the configuration used to build as well
+ as which targets need to be built.
+
+
+
+
+ The invalid global request id
+
+
+
+
+ The invalid node request id
+
+
+
+
+ The results transfer request id
+
+
+
+
+ The submission with which this request is associated.
+
+
+
+
+ The configuration id.
+
+
+
+
+ The project context id, if already determined.
+
+
+
+
+ The global build request id, assigned by the Build Manager
+
+
+
+
+ The global request id of the request which spawned this one.
+
+
+
+
+ The build request id assigned by the node originating this request.
+
+
+
+
+
+
+
+
+
+
+ The build event context of the parent
+
+
+
+
+ The build event context of this request
+
+
+
+
+ Whether or not the issued in response to this request should include .
+
+
+
+
+ Filter describing properties, items, and metadata of interest for this request.
+
+
+
+
+ Constructor for serialization.
+
+
+
+
+ Initializes a build request with proxy targets.
+
+ The id of the build submission.
+ The id of the node issuing the request
+ The configuration id to use.
+
+ Host services if any. May be null.
+ Additional flags for the request.
+ Filter for desired build results.
+ The project context id
+
+
+
+ Initializes a build request with a parent context.
+
+ The id of the build submission.
+ The id of the node issuing the request
+ The configuration id to use.
+ The targets to be built
+ Host services if any. May be null.
+ The build event context of the parent project.
+ The parent build request, if any.
+
+ Additional flags for the request.
+ Filter for desired build results.
+ The project context id
+
+
+
+ Private constructor for deserialization
+
+
+
+
+ Returns true if the configuration has been resolved, false otherwise.
+
+
+
+
+ Returns the submission id
+
+
+
+
+ Returns the configuration id
+
+
+
+
+ Returns the project context id
+
+
+
+
+ Gets the global request id
+
+
+
+
+ Gets the global request id of the parent request.
+
+
+
+
+ Gets the node request id
+
+
+
+
+ The targets specified when the request was made. Doesn't include default or initial targets.
+ Either this is null or is null;
+
+
+
+
+ See . Either this is null, or is null;
+
+
+
+
+ Returns the type of packet.
+
+
+
+
+ Returns the build event context of the parent, if any.
+
+
+
+
+ Returns the build event context for this request, if any.
+
+
+
+
+ The of the currently executing task, if any.
+ Used to correlate a project's build with the parent task that spawned it
+ (usually the MSBuild task).
+
+
+
+
+ The set of flags specified in the BuildRequestData for this request.
+
+
+
+
+ Filter describing properties, items, and metadata of interest for this request.
+
+
+
+
+ The route for host-aware tasks back to the host
+
+
+
+
+ Returns true if this is a root request (one which has no parent.)
+
+
+
+
+ Whether static graph isolation constraints should be skipped for this request
+
+
+
+
+ Sets the configuration id to a resolved id.
+
+ The new configuration id for this request.
+
+
+
+ Reads/writes this packet
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ Indicates what the action is for requests which are yielding.
+
+
+
+
+ The request is yielding its control of the node.
+
+
+
+
+ The request is ready to reacquire control of the node.
+
+
+
+
+ There is no yield action
+
+
+
+
+ This class is used to inform the Scheduler that a request on a node is being blocked from further progress. There
+ are two cases for this:
+ 1) The request may be blocked waiting for a target to complete in the same project but which is assigned to
+ another request.
+ 2) The request may be blocked because it has child requests which need to be satisfied to proceed.
+
+
+
+
+ The yield action, if any.
+
+
+
+
+ The global request id of the request which is being blocked from continuing.
+
+
+
+
+ The set of targets which are currently in progress for the blocked global request ID.
+
+
+
+
+ The request on which we are blocked, if any.
+
+
+
+
+ The name of the blocking target, if any.
+
+
+
+
+ The requests which need to be built to unblock the request, if any.
+
+
+
+
+ Constructor for deserialization.
+
+
+
+
+ Constructor for the blocker where we are blocked waiting for a target.
+
+
+
+
+ Constructor for the blocker where we are blocked waiting for requests to be satisfied.
+
+
+
+
+ Constructor for a blocker used by yielding requests.
+
+
+
+
+ Constructor for a blocker used by results-transfer requests
+
+ The request needing results transferred
+
+
+
+ Constructor for common values.
+
+
+
+
+ Returns the type of packet.
+
+
+
+
+ Accessor for the blocked request id.
+
+
+
+
+ Accessor for the set of targets currently in progress.
+
+
+
+
+ Accessor for the blocking request id, if any.
+
+
+
+
+ Accessor for the blocking request id, if any.
+
+
+
+
+ Accessor for the blocking build requests, if any.
+
+
+
+
+ Accessor for the yield action.
+
+
+
+
+ Serialization method.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ A build request configuration represents all of the data necessary to know which project to build
+ and the environment in which it should be built.
+
+
+
+
+ The invalid configuration id
+
+
+
+
+ This is the ID of the configuration as set by the generator of the configuration. When
+ a node generates a configuration, this is set to a negative number. The Build Manager will
+ generate positive IDs
+
+
+
+
+ The full path to the project to build.
+
+
+
+
+ The tools version specified for the configuration.
+ Always specified.
+ May have originated from a /tv switch, or an MSBuild task,
+ or a Project tag, or the default.
+
+
+
+
+ Whether the tools version was set by the /tv switch or passed in through an msbuild callback
+ directly or indirectly.
+
+
+
+
+ The set of global properties which should be used when building this project.
+
+
+
+
+ Flag indicating if the project in this configuration is a traversal
+
+
+
+
+ Synchronization object. Currently this just prevents us from caching and uncaching at the
+ same time, causing a race condition. This class is not made 100% threadsafe by the presence
+ and current usage of this lock.
+
+
+
+
+ The project object, representing the project to be built.
+
+
+
+
+ The state of a project instance which has been transferred from one node to another.
+
+
+
+
+ The project instance properties we should transfer.
+ and are mutually exclud
+
+
+
+
+ The initial targets for the project
+
+
+
+
+ The default targets for the project
+
+
+
+
+ The defined targets for the project.
+
+
+
+
+ This is the lookup representing the current project items and properties 'state'.
+
+
+
+
+ This is the set of targets which are currently building but which have not yet completed.
+ { targetName -> globalRequestId }
+
+
+
+
+ The node where this configuration's master results are stored.
+
+
+
+
+ Holds a snapshot of the environment at the time we blocked.
+
+
+
+
+ Holds a snapshot of the current working directory at the time we blocked.
+
+
+
+
+ The target names that were requested to execute.
+
+
+
+
+ Initializes a configuration from a BuildRequestData structure. Used by the BuildManager.
+ Figures out the correct tools version to use, falling back to the provided default if necessary.
+ May throw InvalidProjectFileException.
+
+ The data containing the configuration information.
+ The default ToolsVersion to use as a fallback
+
+
+
+ Initializes a configuration from a BuildRequestData structure. Used by the BuildManager.
+ Figures out the correct tools version to use, falling back to the provided default if necessary.
+ May throw InvalidProjectFileException.
+
+ The configuration ID to assign to this new configuration.
+ The data containing the configuration information.
+ The default ToolsVersion to use as a fallback
+
+
+
+ Creates a new BuildRequestConfiguration based on an existing project instance.
+ Used by the BuildManager to populate configurations from a solution.
+
+ The configuration id
+ The project instance.
+
+
+
+ Creates a new configuration which is a clone of the old one but with a new id.
+
+
+
+
+ Private constructor for deserialization
+
+
+
+
+ Flag indicating whether the configuration is allowed to cache. This does not mean that the configuration will
+ actually cache - there are several criteria which must for that.
+
+
+
+
+ When reset caches is false we need to only keep around the configurations which are being asked for during the design time build.
+ Other configurations need to be cleared. If this configuration is marked as ExplicitlyLoadedConfiguration then it should not be cleared when
+ Reset Caches is false.
+
+
+
+
+ Flag indicating whether or not the configuration is actually building.
+
+
+
+
+ Flag indicating whether or not the configuration has been loaded before.
+
+
+
+
+ Flag indicating if the configuration is cached or not.
+
+
+
+
+ Flag indicating if this configuration represents a traversal project. Traversal projects
+ are projects which typically do little or no work themselves, but have references to other
+ projects (and thus are used to find more work.) The scheduler can treat these differently
+ in order to fill its work queue with other options for scheduling.
+
+
+
+
+ Returns true if this configuration was generated on a node and has not yet been resolved.
+
+
+
+
+ Sets or returns the configuration id
+
+
+
+
+ Returns the filename of the project to build.
+
+
+
+
+ The tools version specified for the configuration.
+ Always specified.
+ May have originated from a /tv switch, or an MSBuild task,
+ or a Project tag, or the default.
+
+
+
+
+ Returns the global properties to use to build this project.
+
+
+
+
+ Sets or returns the project to build.
+
+
+
+
+ Loads the project specified by the configuration's parameters into the configuration block.
+
+
+
+
+ Returns true if the default and initial targets have been resolved.
+
+
+
+
+ Gets the initial targets for the project
+
+
+
+
+ Gets the default targets for the project
+
+
+
+
+ Gets or sets the targets defined for the project.
+
+
+
+
+ Returns the node packet type
+
+
+
+
+ Returns the lookup which collects all items and properties during the run of this project.
+
+
+
+
+ Retrieves the set of targets currently building, mapped to the request id building them.
+
+
+
+
+ Holds a snapshot of the environment at the time we blocked.
+
+
+
+
+ Holds a snapshot of the current working directory at the time we blocked.
+
+
+
+
+ Whether the tools version was set by the /tv switch or passed in through an msbuild callback
+ directly or indirectly.
+
+
+
+
+ Gets or sets the node on which this configuration's results are stored.
+
+
+
+
+ Implementation of the equality operator.
+
+ The left hand argument
+ The right hand argument
+ True if the objects are equivalent, false otherwise.
+
+
+
+ Implementation of the inequality operator.
+
+ The left-hand argument
+ The right-hand argument
+ True if the objects are not equivalent, false otherwise.
+
+
+
+ Requests that the configuration be cached to disk.
+
+
+
+
+ Retrieves the configuration data from the cache.
+
+
+
+
+ Gets the list of targets which are used to build the specified request, including all initial and applicable default targets
+
+ The request
+ An array of t
+
+
+
+ This override is used to provide a hash code for storage in dictionaries and the like.
+
+
+ If two objects are Equal, they must have the same hash code, for dictionaries to work correctly.
+ Two configurations are Equal if their global properties are equivalent, not necessary reference equals.
+ So only include filename and tools version in the hashcode.
+
+ A hash code
+
+
+
+ Returns a string representation of the object
+
+ String representation of the object
+
+
+
+ Determines object equality
+
+ The object to compare with
+ True if they contain the same data, false otherwise
+
+
+
+ Equality of the configuration is the product of the equality of its members.
+
+ The other configuration to which we will compare ourselves.
+ True if equal, false otherwise.
+
+
+
+ Reads or writes the packet to the serializer.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ Applies the state from the specified instance to the loaded instance. This overwrites the items and properties.
+
+
+ Used when we transfer results and state from a previous node to the current one.
+
+
+
+
+ Gets the name of the cache file for this configuration.
+
+
+
+
+ Deletes the cache file
+
+
+
+
+ Clones this BuildRequestConfiguration but sets a new configuration id.
+
+
+
+
+ Compares this object with another for equality
+
+ The object with which to compare this one.
+ True if the objects contain the same data, false otherwise.
+
+
+
+ Gets the set of project targets for this .
+
+ The project targets to transform into a set.
+ The set of project targets for this .
+
+
+
+ Determines what the real tools version is.
+
+
+
+
+ Gets the translator for this configuration.
+
+
+
+
+ This packet is sent by a node to request or release resources from/to the scheduler.
+
+
+
+
+ The global request id of the request which is asking for resources.
+
+
+
+
+ True if this is a request to acquire resources, false if this is a request to release resources.
+
+
+
+
+ True if the request should be blocking until the resources become available. False if the request should
+ be responded to immediately even if the desired resources are not available.
+
+
+
+
+ Number of CPU cores being requested or released.
+
+
+
+
+ Constructor for deserialization.
+
+
+
+
+ Private constructor, use CreateAcquireRequest or CreateReleaseRequest to make instances.
+
+
+
+
+ Factory method for acquiring.
+
+
+
+
+ Factory method for releasing.
+
+
+
+
+ Returns the type of packet.
+
+
+
+
+ Accessor for the global request id.
+
+
+
+
+ Accessor for _isResourceAcquire.
+
+
+
+
+ Accessor fro _isBlocking.
+
+
+
+
+ Accessor for _numCores.
+
+
+
+
+ Serialization method.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ This packet is sent by the scheduler in response to to grant resources to a node.
+
+
+
+
+ The global request id of the request which is being responded to.
+
+
+
+
+ Number of CPU cores being granted.
+
+
+
+
+ Constructor for deserialization.
+
+
+
+
+ Constructor for granting cores.
+
+
+
+
+ Returns the type of packet.
+
+
+
+
+ Accessor for the global request id.
+
+
+
+
+ Accessor for _numCores.
+
+
+
+
+ Serialization method.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ This class is used by the Scheduler to unblock a blocked build request on the BuildRequestEngine.
+ There are two cases:
+ 1. The request was blocked waiting on a target in the same project. In this case this class will contain
+ no information other than the request id.
+ 2. The request was blocked on some set of build requests. This class will then contain the build results
+ needed to satisfy those requests.
+
+
+
+
+ The node request id of the request which is blocked and now will either result or have results reported.
+
+
+
+
+ The build result which we wish to report.
+
+
+
+
+ Constructor for deserialization.
+
+
+
+
+ Constructor for the unblocker where we are blocked waiting for a target.
+
+
+
+
+ Constructor for the unblocker where we are blocked waiting for results.
+
+
+
+
+ Constructor for the unblocker for circular dependencies
+
+
+
+
+ Returns the type of packet.
+
+
+
+
+ Accessor for the blocked node request id.
+
+
+
+
+ Accessor for the build results, if any.
+
+
+
+
+ Serialization method.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ An interface representing results for a build request
+
+
+
+
+ The exception, if any, generated while the build ran.
+
+
+
+
+ The overall build result code.
+
+
+
+
+ Returns an enumerator for all target results in this build result
+
+
+
+
+ Set of environment variables for the configuration this result came from
+
+
+
+
+ The current directory for the configuration this result came from
+
+
+
+
+ Gets the results for a target in the build request
+
+ The target name
+ The target results
+
+
+
+ Returns true if there are results for the specified target
+
+ The target name
+ True if results exist, false otherwise.
+
+
+
+ The result of executing the task or target.
+
+
+
+
+ The work unit was skipped.
+
+
+
+
+ The work unit succeeded.
+
+
+
+
+ The work unit failed.
+
+
+
+
+ The work unit was cancelled.
+
+
+
+
+ Indicates whether further work should be done.
+
+
+
+
+ Work should proceed with the next work unit.
+
+
+
+
+ No further work units should be executed.
+
+
+
+
+ A result of executing a target or task.
+
+
+
+
+ The result.
+
+
+
+
+ The next action to take.
+
+
+
+
+ The exception from the failure, if any.
+
+
+
+
+ Creates a new work result ready for aggregation during batches.
+
+
+
+
+ Creates a work result with the specified result codes.
+
+
+
+
+ Translator constructor
+
+
+
+
+ Get the result code.
+
+
+
+
+ Get the action code.
+
+
+
+
+ Get the exception
+
+
+
+
+ Translator.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ Aggregates the specified result with this result and returns the aggregation.
+
+
+ The rules are:
+ 1. Errors take precedence over success.
+ 2. Success takes precedence over skipped.
+ 3. Stop takes precedence over continue.
+ 4. The first exception in the result wins.
+
+
+
+
+ Callback for event raised when a build request is completed
+
+ The request which completed
+ The result for the request
+
+
+
+ Callback for event raised when a request is resumed
+
+ The request being resumed
+
+
+
+ Callback for event raised when a new build request is generated by an MSBuild callback
+
+ Information about what is blocking the engine.
+
+
+
+ Callback for event raised when the build request engine's status changes.
+
+ The new status for the engine
+
+
+
+ Callback for event raised when a new configuration needs an ID resolved.
+
+ The configuration needing an ID
+
+
+
+ Callback for event raised when a resource is requested.
+
+ The resources being requested
+
+
+
+ Callback for event raised when there is an unhandled exception in the engine.
+
+ The exception.
+
+
+
+ Status types for the build request engine
+
+
+
+
+ The engine has not yet been initialized, and cannot accept requests.
+
+
+
+
+ The engine has no active or waiting build requests.
+
+
+
+
+ The engine is presently working on a build request.
+
+
+
+
+ The engine has only build requests which are waiting for build results to continue.
+
+
+
+
+ The engine has shut down.
+
+
+
+
+ Objects implementing this interface may be used by a Node to process build requests
+ and generate build results.
+
+
+
+
+ Raised when a build request is completed and results are available.
+
+
+
+
+ Raised when a build request is resumed from a previously waiting state.
+
+
+
+
+ Raised when a new build request is generated by an MSBuild callback.
+
+
+
+
+ Raised when the engine status changes.
+
+
+
+
+ Raised when a configuration needs an id.
+
+
+
+
+ Raised when resources are requested.
+
+
+
+
+ Raised when an unhandled exception occurs in the engine.
+
+
+
+
+ Gets the current engine status.
+
+
+
+
+ Prepares the engine for a new build and spins up the engine thread.
+ The engine must be in the Idle state, and not already be initialized.
+
+ The logging context for the node.
+
+
+
+ Cleans up after a build but leaves the engine thread running. Aborts
+ any outstanding requests. Blocks until the engine has cleaned up
+ everything. After this method is called, InitializeForBuild may be
+ called to start a new build, or the component may be shut down.
+
+
+
+
+ Submits the specified request to the build queue.
+
+ The request to build.
+ It is only valid to call this method when the engine is in the Idle or
+ Waiting state because the engine can only service one active request at a time.
+
+
+
+ Notifies the engine of a build result for a waiting build request.
+
+ The unblocking information
+
+
+
+ Notifies the engine of a resource response granting the node resources.
+
+ The resource response.
+
+
+
+ Notifies the engine of a configuration response packet, typically generated by the Build Request Manager. This packet is used to set
+ the global configuration ID for a specific configuration.
+
+ The build configuration response.
+
+
+
+ Represents a collection of all node providers in the system. Reports events concerning
+ the topology of the system and provides a means to send and receive data to nodes.
+
+
+
+
+ Requests that a new node be created.
+
+ The configuration to use to create the node.
+ The to use.
+ Number of nodes to be reused or created.
+ Information about the node created
+
+ Throws an exception if the node could not be created.
+
+
+
+
+ Sends a data packet to a specific node
+
+ The node to which the data packet should be sent.
+ The packet to send.
+
+
+
+ Shuts down all of the managed nodes. This is an asynchronous method - the nodes are
+ not considered shut down until a NodeShutdown packet has been received.
+
+ Flag indicating if nodes should prepare for reuse.
+
+
+
+ Shuts down all of the managed nodes permanently. This is an asynchronous method - the nodes are
+ not considered shut down until a NodeShutdown packet has been received.
+
+
+
+
+ The node manager contains state which is not supposed to persist between builds, make sure this is cleared.
+
+
+
+
+ The type of nodes provided by the node provider.
+
+
+
+
+ The provider provides the in-proc node.
+
+
+
+
+ The provider provides out-of-proc nodes.
+
+
+
+
+ The provider provides remote nodes.
+
+
+
+
+ This interface represents a collection of nodes in the system. It provides methods to
+ enumerate active nodes as well as send data and receive events from those nodes.
+
+
+
+
+ The type of nodes provided by this node provider.
+
+
+
+
+ The number of nodes this provider can create.
+
+
+
+
+ Requests that a new node be created on the specified machine.
+
+ The id to assign to the first created node. Resulting nodes ids will be in range [nextNodeId, nextNodeId + numberOfNodesToCreate - 1]
+
+ The packet factory used to create packets when data is
+ received on this node.
+
+ NodeConfiguration factory of particular node
+ Required number of nodes to create
+ Array of NodeInfo of successfully created nodes
+
+
+
+ Sends data to a specific node.
+
+ The node to which data should be sent.
+ The packet to be sent.
+
+
+
+ Shuts down all of the connected, managed nodes. This call will not return until all nodes are shut down.
+
+ Flag indicating if nodes should prepare for reuse.
+
+
+
+ Shuts down all of the managed nodes. This call will not return until all nodes are shut down.
+
+
+
+
+ This is an implementation of INodeEndpoint for in-proc nodes. This endpoint can use either
+ synchronous or asynchronous packet processing methods. When synchronous processing methods are
+ used, the SendData method will cause the OnDataReceived event on the receiving endpoint to be called
+ on the same thread, blocking until the handler returns. The asynchronous method more closely emulates
+ the way other kinds of endpoints work, as the recipient processes the packet on a different thread
+ than that from which the packet originated, but with the cost of the extra thread.
+
+
+
+
+ An object for the two inproc endpoints to synchronize on.
+
+
+
+
+ The current communication status of the node.
+
+
+
+
+ The communications mode
+
+
+
+
+ The peer endpoint
+
+
+
+
+ The build component host
+
+
+
+
+ The packet factory used to route packets.
+
+
+
+
+ Object used as a lock source for the async data
+
+
+
+
+ Set when a packet is available in the packet queue
+
+
+
+
+ Set when the asynchronous packet pump should terminate
+
+
+
+
+ The thread which runs the asynchronous packet pump
+
+
+
+
+ Set to true if our peer is connected to us.
+
+
+
+
+ The asynchronous packet queue.
+
+
+ Operations on this queue must be synchronized since it is accessible by multiple threads.
+ Use a lock on the packetQueue itself.
+
+
+
+
+ Instantiates a Node and initializes it to unconnected.
+
+ The communications mode for this endpoint.
+ The component host.
+
+
+
+ Raised when the link status has changed.
+
+
+
+
+ Represents the style of communications used by the in-proc endpoint.
+
+
+
+
+ The DataReceived event is raised on the same thread as that which called SendData.
+
+
+
+
+ The DataReceived event is raised on a separate thread from that which called SendData
+
+
+
+
+ Returns the link status of this node.
+
+
+
+
+ Causes this endpoint to wait for the remote endpoint to connect
+
+ Unused
+
+
+
+ Causes this node to connect to the matched endpoint.
+
+ Unused
+
+
+
+ Shuts down the link
+
+
+
+
+ Sends data to the peer endpoint.
+
+ The packet to send.
+
+
+
+ This method is used to create a matched pair of endpoints used by the Node Provider and
+ the Node. The inputs and outputs for each node are automatically configured.
+
+ The communications mode for the endpoints.
+ The component host.
+ A matched pair of endpoints.
+
+
+
+ Invokes the OnLinkStatusChanged event in a thread-safe manner.
+
+ The new status of the endpoint link.
+
+
+
+ This method is called by the other endpoint when it is ready to establish the connection.
+
+
+
+
+ This method is called by either side to notify this endpoint that the link is inactive.
+
+
+
+
+ This does the actual work of changing the status and shutting down any threads we may have for
+ disconnection.
+
+
+
+
+ Updates the current link status if it has changed and notifies any registered delegates.
+
+ The status the node should now be in.
+
+
+
+ Adds a packet to the packet queue when asynchronous mode is enabled.
+
+ The packet to be transmitted.
+
+
+
+ Initializes the packet pump thread and the supporting events as well as the packet queue.
+
+
+
+
+ Shuts down the packet pump thread and cleans up associated data.
+
+
+
+
+ This method handles the asynchronous message pump. It waits for messages to show up on the queue
+ and calls FireDataAvailable for each such packet. It will terminate when the terminate event is
+ set.
+
+
+
+
+ Used to return a matched pair of endpoints for in-proc nodes to use with the Build Manager.
+
+
+
+
+ The endpoint destined for use by a node.
+
+
+
+
+ The endpoint destined for use by the Build Manager
+
+
+
+
+ Creates an endpoint pair
+
+ The node-side endpoint.
+ The manager-side endpoint.
+
+
+
+ Contains information about the state of a node.
+
+
+
+
+ The node ID
+
+
+
+
+ The provider type
+
+
+
+
+ The configuration IDs the node knows about. These are not necessarily the ones
+ currently assigned to the node, as that can change.
+
+
+
+
+ Constructor.
+
+
+
+
+ The ID of the node.
+
+
+
+
+ The type of provider which manages this node.
+
+
+
+
+ Assigns the specific configuration ID to the node.
+
+
+ True if the configuration is not already known to the node and must be sent to it, false otherwise.
+
+
+
+
+ Determines whether the specified configuration if is known to the node.
+
+
+
+
+ Returns true if this node can service requests with the specified affinity.
+
+
+
+
+ Creates a new MSBuild process
+
+
+
+
+ Creates a new MSBuild process
+
+
+
+
+ An implementation of a node provider for in-proc nodes.
+
+
+
+
+ The invalid in-proc node id
+
+
+
+
+ Flag indicating we have disposed.
+
+
+
+
+ Value used to ensure multiple in-proc nodes which save the operating environment are not created.
+
+
+
+
+ The component host.
+
+
+
+
+ The in-proc node.
+
+
+
+
+ The in-proc node endpoint.
+
+
+
+
+ The packet factory used to route packets from the node.
+
+
+
+
+ The in-proc node thread.
+
+
+
+
+ Event which is raised when the in-proc endpoint is connected.
+
+
+
+
+ The ID of the in-proc node.
+
+
+
+
+ Check to allow the inproc node to have exclusive ownership of the operating environment
+
+
+
+
+ Initializes the node provider.
+
+
+
+
+ Finalizes an instance of the class.
+
+
+
+
+ Returns the type of nodes managed by this provider.
+
+
+
+
+ Returns the number of nodes available to create on this provider.
+
+
+
+
+ Sets the build component host.
+
+ The component host.
+
+
+
+ Shuts down this component.
+
+
+
+
+ Sends data to the specified node.
+
+ The node to which data should be sent.
+ The data to send.
+
+
+
+ Causes all connected nodes to be shut down.
+
+ Flag indicating if the nodes should prepare for reuse.
+
+
+
+ Causes all nodes to be shut down permanently - for InProc nodes it is the same as ShutdownConnectedNodes
+ with enableReuse = false
+
+
+
+
+ Requests that a node be created on the specified machine.
+
+ The id of the node to create.
+ The factory to use to create packets from this node.
+ The configuration for the node.
+
+
+
+ Registers a packet handler. Not used in the in-proc node.
+
+
+
+
+ Unregisters a packet handler. Not used in the in-proc node.
+
+
+
+
+ Deserializes and routes a packet. Not used in the in-proc node.
+
+
+
+
+ Routes a packet.
+
+ The id of the node from which the packet is being routed.
+ The packet to route.
+
+
+
+ IDisposable implementation
+
+
+
+
+ Factory for component creation.
+
+
+
+
+ Creates a new in-proc node.
+
+
+
+
+ Thread proc which runs the in-proc node.
+
+
+
+
+ Callback invoked when the link status of the endpoint has changed.
+
+ The endpoint whose status has changed.
+ The new link status.
+
+
+
+ Callback invoked when the endpoint shuts down.
+
+ The reason the endpoint is shutting down.
+ Any exception which was raised that caused the endpoint to shut down.
+
+
+
+ Dispose implementation.
+
+
+
+
+ Each component in the build system which is registered with the Build Manager or a Node must
+ implement this interface.
+
+ REFACTOR: Maybe these could all implement IDisposable.
+
+
+
+
+ Called by the build component host when a component is first initialized
+
+ The host for the component.
+
+
+
+ Called by the build component host when the component host is about to shutdown
+
+
+
+
+ Factory delegate which instantiates a component of the type specified.
+
+ The type of component to be instantiated.
+ An instance of the component.
+
+
+
+ An enumeration of all component types recognized by the system
+
+
+
+
+ Request Manager
+
+
+
+
+ Scheduler
+
+
+
+
+ Results Cache
+
+
+
+
+ Property Cache
+
+
+
+
+ The Build Request Configuration Cache
+
+
+
+
+ Node Manager
+
+
+
+
+ InProcNodeProvider
+
+
+
+
+ OutOfProcNodeProvider
+
+
+
+
+ RemoteNodeProvider
+
+
+
+
+ Node packet factory
+
+
+
+
+ Request engine
+
+
+
+
+ File monitor
+
+
+
+
+ The endpoint on a Node
+
+
+
+
+ The logging service
+
+
+
+
+ The component responsible for building requests.
+
+
+
+
+ The component responsible for building targets.
+
+
+
+
+ The component responsible for building tasks.
+
+
+
+
+ The component which is responsible for providing test data to the variour components
+
+
+
+
+ OutOfProcTaskHostNodeProvider
+
+
+
+
+ Node manager for task host nodes
+
+
+
+
+ The cache of registered disposable objects.
+
+
+
+
+ The SDK resolution service.
+
+
+
+
+ The component which is the sink for file access reports and forwards reports to other components.
+
+
+
+
+ The component which launches new MSBuild nodes.
+
+
+
+
+ This interface is implemented by objects which host build components.
+
+
+
+
+ Retrieves the name of the host.
+
+
+
+
+ Retrieves the BuildParameters used during the build.
+
+
+
+
+ The data structure which holds the data for the use of legacy threading semantics
+
+
+
+
+ Retrieves the logging service associated with a particular build
+
+
+
+
+ Registers a factory which will be used to create the necessary components of the build
+ system.
+
+ The type which is created by this factory.
+ The factory to be registered.
+
+ It is not necessary to register any factories. If no factory is registered for a specific kind
+ of object, the system will use the default factory.
+
+
+
+
+ Gets an instance of the specified component type from the host.
+
+ The component type to be retrieved
+ The component
+
+
+
+ Represents an object which provides scheduling services for BuildRequests over Nodes.
+
+
+
+
+ Retrieves the minimum assignable configuration id
+
+
+
+
+ Determines if the specified configuration is currently being built
+
+ The configuration to query for
+ True if the configuration is being built somewhere, false otherwise.
+
+
+
+ Retrieves a configuration id for a configuration which has a matching path
+
+ The path for the configuration
+ A positive configuration id if one exists in the plan, 0 otherwise.
+
+
+
+ Retrieves the request executing on a node.
+
+
+
+
+ Reports to the scheduler that a request is blocked.
+
+ The node making the report.
+ The thing blocking the active request on the node.
+ Action to be taken.
+
+
+
+ Reports to the scheduler that a new result has been generated for a build request.
+
+ The node reporting the request.
+ The result.
+ Action to be taken.
+
+
+
+ Reports to the scheduler that a node has been created.
+
+ Info about the created nodes.
+ Action to be taken.
+
+
+
+ Reports to the scheduler than a node aborted the build.
+
+ The node which aborted.
+
+
+
+ Resets the scheduler.
+
+
+
+
+ Writes a detailed summary of the build state which includes information about the scheduling plan.
+
+
+
+
+ Requests CPU resources.
+
+
+
+
+ Returns CPU resources.
+
+
+
+
+ The type of action to take in response to a scheduling request.
+
+
+
+
+ The response indicates that no action should be taken.
+
+
+
+
+ The response indicates that the request should be sent to the specified node.
+
+
+
+
+ The response indicates that the request should be send to the specified node,
+ along with the configuration for the request.
+
+
+
+
+ The response has results for a particular blocked request
+
+
+
+
+ The specified request id should now resume execution
+
+
+
+
+ The response indicates that a new node should be created rather than scheduling this request.
+ The request may be scheduled at a later time.
+
+
+
+
+ The response indicates that the submission is complete.
+
+
+
+
+ The last action caused a circular dependency which cannot be resolved.
+
+
+
+
+ A response from the scheduler indicating where a build request should be handled.
+
+
+
+
+ The type of action to take on this response.
+
+
+
+
+ The node ID to which the request should be sent.
+
+
+
+
+ The results for a completed submission.
+
+
+
+
+ The build request to send.
+
+
+
+
+ The unblocking information.
+
+
+
+
+ The type of node we must create.
+
+
+
+
+ The number of nodes of the requested affinity to create.
+
+
+
+
+ Constructs a response where no action should be taken.
+
+
+
+
+ Constructs a response indicating what type of node we need to create.
+
+
+
+
+ Constructs a response indicating that a specific submission has completed.
+
+
+
+
+ Constructs a response indicating there is a circular dependency caused by the specified request.
+
+
+
+
+ Constructs a response where a request should be scheduled.
+
+ The node ID to which the request should be sent.
+ The request to send.
+ true to send the configuration, otherwise false.
+
+
+
+ Constructs a response where a result should be sent or execution should be resumed.
+
+ The node ID to which the result should be sent.
+ The result to send.
+
+
+
+ Creates a Schedule or ScheduleWithConfiguration response
+
+ The node to which the response should be sent.
+ The request to be scheduled.
+ Flag indicating whether or not the configuration for the request must be sent to the node as well.
+ The ScheduleResponse.
+
+
+
+ Creates a ReportResult response.
+
+ The node to which the response should be sent.
+ The result to be reported.
+ The ScheduleResponse.
+
+
+
+ Creates a ResumeExecution response.
+
+ The node to which the response should be sent.
+ The request which should resume executing.
+ The ScheduleResponse.
+
+
+
+ Creates a CircularDependency response.
+
+ The node to which the response should be sent.
+ The request which attempted to invoke the request causing the circular dependency.
+ The request which caused the circular dependency.
+ The ScheduleResponse.
+
+
+
+ Creates a SubmissionComplete response.
+
+ The result for the submission's root request.
+ The ScheduleResponse.
+
+
+
+ Create a CreateNode response
+
+ The type of node to create.
+ The number of new nodes of that particular affinity to create.
+ The ScheduleResponse.
+
+
+
+ Returns the schedule response as a descriptive string.
+
+
+
+
+ Delegate is called when a node shuts down.
+
+ The reason for the shutdown
+ The exception which caused an unexpected shutdown, if any.
+
+
+
+ This interface is implemented by a build node, and allows the host process to control its execution.
+
+
+
+
+ Runs the Node. Returns the reason the node shut down.
+
+
+
+
+ Flags requrned by ITaskExecutionHost.FindTask().
+
+
+
+
+ The task was not found.
+
+
+
+
+ The task must be executed on an STA thread.
+
+
+
+
+ The task must be executed in a separate AppDomain.
+
+
+
+
+ This interface represents the host for task execution. When used in the in-proc scenario, these method calls essentially
+ are pass-throughs to just set some member variables and call methods directly on the task and associated objects.
+ In the out-of-proc/AppDomain-isolated case, the object implementing these methods may break apart the information
+ in the parameters to be consumed by the IContract representing the remote object through MAF.
+
+ REFACTOR - Eliminate this interface.
+
+
+
+
+ The associated project.
+
+
+
+
+ Flag to determine whether or not to log task inputs.
+
+
+
+
+ Initialize the host with the objects required to communicate with the host process.
+
+
+
+
+ Ask the task host to find its task in the registry and get it ready for initializing the batch
+
+ The task requirements if the task is found, null otherwise.
+
+
+
+ Initializes for running a particular batch
+
+ True if the task is instantiated, false otherwise.
+
+
+
+ Sets a task parameter using an unevaluated value, which will be expanded by the batch bucket.
+
+
+
+
+ Gets all of the outputs and stores them in the batch bucket.
+
+
+
+
+ Signal that we are done with this bucket.
+
+
+
+
+ Signal that we are done with this task.
+
+
+
+
+ Executes the task.
+
+
+ True if execution succeeded, false otherwise.
+
+
+
+
+ The TaskExecutionHost is responsible for instantiating tasks, setting their parameters and gathering outputs using
+ reflection, and executing the task in the appropriate context.The TaskExecutionHost does not deal with any part of the task declaration or
+ XML.
+
+
+
+
+ Time interval in miliseconds to wait between receiving a cancelation signal and emitting the first warning that a non-cancelable task has not finished
+
+
+
+
+ Time interval in miliseconds between subsequent warnings that a non-cancelable task has not finished
+
+
+
+
+ Resolver to assist in resolving types when a new appdomain is created
+
+
+
+
+ The interface used to call back into the build engine.
+
+
+
+
+ The project instance in whose context we are executing
+
+
+
+
+ The logging context for the target.
+
+
+
+
+ The logging context for the task.
+
+
+
+
+ The registration which handles the callback when task cancellation is invoked.
+
+
+
+
+ The name of the task to execute.
+
+
+
+
+ The XML location of the task element.
+
+
+
+
+ The arbitrary task host object.
+
+
+
+
+ The bucket used to evaluate items and properties.
+
+
+
+
+ The task type retrieved from the assembly.
+
+
+
+
+ Set to true if the execution has been cancelled.
+
+
+
+
+ Event which is signalled when a task is not executing. Used for cancellation.
+
+
+
+
+ The task items that we remoted across the appdomain boundary
+ we use this list to disconnect the task items once we're done.
+
+
+
+
+ We need access to the build component host so that we can get at the
+ task host node provider when running a task wrapped by TaskHostTask
+
+
+
+
+ The set of intrinsic tasks mapped for this process.
+
+
+
+
+ Constructor
+
+
+
+
+ Initializes a new instance of the class
+ for unit testing only.
+
+
+
+
+ Finalizes an instance of the class.
+
+
+
+
+ Flag to determine whether or not to log task inputs.
+
+
+
+
+ The associated project.
+
+
+
+
+ Gets the task instance
+
+
+
+
+ FOR UNIT TESTING ONLY
+
+
+
+
+ App domain configuration.
+
+
+
+
+ Whether or not this is out-of-proc.
+
+
+
+
+ Implementation of IDisposable
+
+
+
+
+ Initialize to run a specific task.
+
+
+
+
+ Ask the task host to find its task in the registry and get it ready for initializing the batch
+
+ True if the task is found in the task registry false if otherwise.
+
+
+
+ Initialize to run a specific batch of the current task.
+
+
+
+
+ Sets all of the specified parameters on the task.
+
+ The name/value pairs for the parameters.
+ True if the parameters were set correctly, false otherwise.
+
+
+
+ Retrieve the outputs from the task.
+
+ True of the outputs were gathered successfully, false otherwise.
+
+
+
+ Cleans up after running a batch.
+
+
+
+
+ Cleans up after running the task.
+
+
+
+
+ Executes the task.
+
+
+
+
+ Implementation of IDisposable
+
+
+
+
+ Disposes of the cancellation token registration.
+
+
+
+
+ Cancels the currently-running task.
+ Kick off a task to wait for the currently-running task and log the wait message.
+
+
+
+
+ Called on the local side.
+
+
+
+
+ Called on the local side.
+
+
+
+
+ Called on the local side.
+
+
+
+
+ Remember this TaskItem so that we can disconnect it when this Task has finished executing
+ Only if we're passing TaskItems to another AppDomain is this necessary. This call
+ Will make that determination for you.
+
+
+
+
+ Gets the outputs (as an array of ITaskItem) from the specified output parameter.
+
+
+
+
+ Gets the outputs (as an array of string values) from the specified output parameter.
+
+
+
+
+ Given the task name, this method tries to find the task. It uses the following search order:
+ 1) checks the tasks declared by the project, searching by exact name and task identity parameters
+ 2) checks the global task declarations (in *.TASKS in MSbuild bin dir), searching by exact name and task identity parameters
+ 3) checks the tasks declared by the project, searching by fuzzy match (missing namespace, etc.) and task identity parameters
+ 4) checks the global task declarations (in *.TASKS in MSbuild bin dir), searching by fuzzy match (missing namespace, etc.) and task identity parameters
+ 5) 1-4 again in order without the task identity parameters, to gather additional information for the user (if the task identity
+ parameters don't match, it is an error, but at least we can return them a more useful error in this case than just "could not
+ find task")
+
+ The search ordering is meant to reduce the number of assemblies we scan, because loading assemblies can be expensive.
+ The tasks and assemblies declared by the project are scanned first, on the assumption that if the project declared
+ them, they are likely used.
+
+ If the set of task identity parameters are defined, only tasks that match that identity are chosen.
+
+ The Type of the task, or null if it was not found.
+
+
+
+ Instantiates the task.
+
+
+
+
+ Set the specified parameter based on its type.
+
+
+
+
+ Given an instantiated task, this helper method sets the specified scalar parameter based on its type.
+
+
+
+
+ Given an instantiated task, this helper method sets the specified vector parameter. Vector parameters can be composed
+ of multiple item vectors. The semicolon is the only separator allowed, and white space around the semicolon is
+ ignored. Any item separator strings are not allowed, and embedded item vectors are not allowed.
+
+ This method is marked "internal" for unit-testing purposes only -- it should be "private" ideally.
+
+ If @(CPPFiles) is a vector for the files a.cpp and b.cpp, and @(IDLFiles) is a vector for the files a.idl and b.idl:
+
+ "@(CPPFiles)" converts to { a.cpp, b.cpp }
+
+ "@(CPPFiles); c.cpp; @(IDLFiles); c.idl" converts to { a.cpp, b.cpp, c.cpp, a.idl, b.idl, c.idl }
+
+ "@(CPPFiles,';')" converts to <error>
+
+ "xxx@(CPPFiles)xxx" converts to <error>
+
+
+
+
+ Variation to handle arrays, to help with logging the parameters.
+
+
+ Logging currently enabled only by an env var.
+
+
+
+
+ Given an instantiated task, this helper method sets the specified parameter
+
+
+
+
+ Gets task item outputs
+
+
+
+
+ Gather task outputs in array form
+
+
+
+
+ Finds all the task properties that are required.
+ Returns them as keys in a dictionary.
+
+ Gets a list of properties which are required.
+
+
+
+ Show a message that cancel has not yet finished.
+
+
+
+
+ The assembly task factory is used to wrap and construct tasks which are from .net assemblies.
+
+
+
+
+ The type loader to load types which derrive from ITask or ITask2
+
+
+
+
+ Name of the task wrapped by the task factory
+
+
+
+
+ The loaded type (type, assembly name / file) of the task wrapped by the factory
+
+
+
+
+ A cache of tasks and the AppDomains they are loaded in.
+
+
+
+
+ the set of parameters owned by this particular task host
+
+
+
+
+ Tracks whether, in the UsingTask invocation, we were specifically asked to use
+ the task host. If so, that overrides all other concerns, and we will launch
+ the task host even if the requested runtime / architecture match that of the
+ current MSBuild process.
+
+
+
+
+ Need to store away the taskloggingcontext used by CreateTaskInstance so that
+ TaskLoader will be able to call back with errors.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Name of the factory. In this case the name is the assembly name which is wrapped by the factory
+
+
+
+
+ Gets the type of task this factory creates.
+
+
+
+
+ Initializes this factory for instantiating tasks with a particular inline task block.
+
+ Name of the task.
+ The parameter group.
+ The task body.
+ The task factory logging host.
+ A value indicating whether initialization was successful.
+
+ MSBuild engine will call this to initialize the factory. This should initialize the factory enough so that the factory can be asked
+ whether or not task names can be created by the factory.
+
+ The taskFactoryLoggingHost will log messages in the context of the target where the task is first used.
+
+
+
+
+
+ Initializes this factory for instantiating tasks with a particular inline task block and a set of UsingTask parameters.
+
+ Name of the task.
+ Special parameters that the task factory can use to modify how it executes tasks,
+ such as Runtime and Architecture. The key is the name of the parameter and the value is the parameter's value. This
+ is the set of parameters that was set on the UsingTask using e.g. the UsingTask Runtime and Architecture parameters.
+ The parameter group.
+ The task body.
+ The task factory logging host.
+ A value indicating whether initialization was successful.
+
+ MSBuild engine will call this to initialize the factory. This should initialize the factory enough so that the
+ factory can be asked whether or not task names can be created by the factory. If a task factory implements ITaskFactory2,
+ this Initialize method will be called in place of ITaskFactory.Initialize.
+
+ The taskFactoryLoggingHost will log messages in the context of the target where the task is first used.
+
+
+
+
+
+ Get a list of parameters for the task.
+
+
+
+
+ Create an instance of the task to be used.
+ The task factory logging host will log messages in the context of the task.
+
+
+ The task factory logging host will log messages in the context of the task.
+
+
+ The generated task, or null if the task failed to be created.
+
+
+
+
+ Create an instance of the task to be used.
+
+
+ The task factory logging host will log messages in the context of the task.
+
+
+ Special parameters that the task factory can use to modify how it executes tasks, such as Runtime and Architecture.
+ The key is the name of the parameter and the value is the parameter's value. This is the set of parameters that was
+ set to the task invocation itself, via e.g. the special MSBuildRuntime and MSBuildArchitecture parameters.
+
+
+ If a task factory implements ITaskFactory2, MSBuild will call this method instead of ITaskFactory.CreateTask.
+
+
+ The generated task, or null if the task failed to be created.
+
+
+
+
+ Cleans up any context or state that may have been built up for a given task.
+
+ The task to clean up.
+
+ For many factories, this method is a no-op. But some factories may have built up
+ an AppDomain as part of an individual task instance, and this is their opportunity
+ to shutdown the AppDomain.
+
+
+
+
+ Initialize the factory from the task registry
+
+
+
+
+ Create an instance of the wrapped ITask for a batch run of the task.
+
+
+
+
+ Is the given task name able to be created by the task factory. In the case of an assembly task factory
+ this question is answered by checking the assembly wrapped by the task factory to see if it exists.
+
+
+
+
+ Validates the given set of parameters, logging the appropriate errors as necessary.
+
+
+
+
+ Given the set of parameters that are set to the factory, and the set of parameters coming from the task invocation that we're searching for
+ a matching record to, determine whether the parameters match this record.
+
+
+
+
+ Given a set of task parameters from the UsingTask and from the task invocation, generate a dictionary that combines the two, or throws if the merge
+ is impossible (we shouldn't ever get to this point if it is ...)
+
+
+
+
+ Returns true if the provided set of task host parameters matches the current process,
+ and false otherwise.
+
+
+
+
+ Log errors from TaskLoader.
+
+
+
+
+ The wrapper task for tasks that wish to take advantage of the
+ task host factory feature. Generated by AssemblyTaskFactory
+ when it wants to run the loaded task in the task host.
+
+
+
+
+ The IBuildEngine callback object.
+
+
+
+
+ The host object that can be passed to this task.
+
+
+
+
+ Logging context for logging errors / issues
+ encountered in the TaskHostTask itself.
+
+
+
+
+ Location of the task in the project file.
+
+
+
+
+ The provider for the task host nodes.
+
+
+
+
+ The packet factory.
+
+
+
+
+ The event which is set when we receive packets.
+
+
+
+
+ The packet that is the end result of the task host task execution process
+
+
+
+
+ The set of parameters used to decide which host to launch.
+
+
+
+
+ The type of the task that we are wrapping.
+
+
+
+
+ The AppDomainSetup we'll want to apply to the AppDomain that we may
+ want to load the OOP task into.
+
+
+
+
+ The task host context of the task host we're launching -- used to
+ communicate with the task host.
+
+
+
+
+ True if currently connected to the task host; false otherwise.
+
+
+
+
+ The provider for task host nodes.
+
+
+
+
+ Lock object to serialize access to the task host.
+
+
+
+
+ Keeps track of whether the wrapped task has had cancel called against it.
+
+
+
+
+ The set of parameters that has been set to this wrapped task -- save them
+ here so that we can forward them on to the task host.
+
+
+
+
+ Did the task succeed?
+
+
+
+
+ Constructor
+
+
+
+
+
+ THe IBuildEngine callback object
+
+
+
+
+ The host object that can be passed to this task.
+
+
+
+
+ Sets the requested task parameter to the requested value.
+
+
+
+
+ Returns the value of the requested task parameter
+
+
+
+
+ Cancels the currently executing task
+
+
+
+
+ Executes the task.
+
+
+
+
+ Registers the specified handler for a particular packet type.
+
+ The packet type.
+ The factory for packets of the specified type.
+ The handler to be called when packets of the specified type are received.
+
+
+
+ Unregisters a packet handler.
+
+ The packet type.
+
+
+
+ Takes a serializer, deserializes the packet and routes it to the appropriate handler.
+
+ The node from which the packet was received.
+ The packet type.
+ The translator containing the data from which the packet should be reconstructed.
+
+
+
+ Routes the specified packet
+
+ The node from which the packet was received.
+ The packet to route.
+
+
+
+ This method is invoked by the NodePacketRouter when a packet is received and is intended for
+ this recipient.
+
+ The node from which the packet was received.
+ The packet.
+
+
+
+ Called by TaskHostFactory to let the task know that if it needs to do any additional cleanup steps,
+ now would be the time.
+
+
+
+
+ Handles the packets received from the task host.
+
+
+
+
+ Task completed executing in the task host
+
+
+
+
+ The task host node failed for some reason
+
+
+
+
+ Handle logged messages from the task host.
+
+
+
+
+ Since we log that we weren't able to connect to the task host in a couple of different places,
+ extract it out into a separate method.
+
+
+
+
+ The host allows task factories access to method to allow them to log message during the construction of the task factories.
+
+
+
+
+ Location of the task node in the original file
+
+
+
+
+ The task factory logging context
+
+
+
+
+ Is the system running in multi-process mode and requires events to be serializable
+
+
+
+
+ A client sponsor is a class
+ which will respond to a lease renewal request and will
+ increase the lease time allowing the object to stay in memory
+
+
+
+
+ True if the task connected to this proxy is alive
+
+
+
+
+ Constructor
+
+
+
+
+ Returns true in the multiproc case
+ REVIEW: Should this mean the same thing in the distributed build case? If we have
+ a build which happens to be on a distributed cluster, but the build manager has only
+ alotted a single machine to this build, is this true? Because the build manager
+ could later decide to add more nodes to this build.
+ UNDONE: This means we are building with multiple processes. If we are building on
+ one machine then I think the maxcpu-count is still 1. In my mind this means multiple nodes either distributed or on the same machine.
+
+
+
+
+ Reflects the value of the ContinueOnError attribute.
+
+
+
+
+ The line number this task is on
+
+
+
+
+ The column number this task is on
+
+
+
+
+ The project file this task is in.
+ Typically this is an imported .targets file.
+ Unfortunately the interface has shipped with a poor name, so we cannot change it.
+
+
+
+
+ Sets or retrieves the logging context
+
+
+
+
+ Logs an error event for the current task
+
+ The event args
+
+
+
+ Logs a warning event for the current task
+
+ The event args
+
+
+
+ Logs a message event for the current task
+
+ The event args
+
+
+
+ Logs a custom event for the current task
+
+ The event args
+
+
+
+ Builds a single project file
+
+ The project file name
+ The set of targets to build.
+ The global properties to use
+ The outputs from the targets
+ True on success, false otherwise.
+
+
+
+ InitializeLifetimeService is called when the remote object is activated.
+ This method will determine how long the lifetime for the object will be.
+
+ The lease object to control this object's lifetime.
+
+
+
+ Indicates to the TaskHost that it is no longer needed.
+ Called by TaskBuilder when the task using the EngineProxy is done.
+
+
+
+
+ Determine if the event is serializable. If we are running with multiple nodes we need to make sure the logging events are serializable. If not
+ we need to log a warning.
+
+
+
+
+ Verify the task host is active or not
+
+
+
+
+ Reasons for a node to shutdown.
+
+
+
+
+ The BuildManager sent a command instructing the node to terminate.
+
+
+
+
+ The BuildManager sent a command instructing the node to terminate, but to restart for reuse.
+
+
+
+
+ The communication link failed.
+
+
+
+
+ The NodeEngine caught an exception which requires the Node to shut down.
+
+
+
+
+ This class is the public entry point for executing builds.
+
+
+
+
+ The object used for thread-safe synchronization of static members.
+
+
+
+
+ The object used for thread-safe synchronization of BuildManager shared data and the Scheduler.
+
+
+
+
+ The singleton instance for the BuildManager.
+
+
+
+
+ The next build id;
+
+
+
+
+ The next build request configuration ID to use.
+ These must be unique across build managers, as they
+ are used as part of cache file names, for example.
+
+
+
+
+ The cache for build request configurations.
+
+
+
+
+ The cache for build results.
+
+
+
+
+ The object responsible for creating and managing nodes.
+
+
+
+
+ The object responsible for creating and managing task host nodes.
+
+
+
+
+ The object which determines which projects to build, and where.
+
+
+
+
+ The node configuration to use for spawning new nodes.
+
+
+
+
+ Any exception which occurs on a logging thread will go here.
+
+
+
+
+ Set of active nodes in the system.
+
+
+
+
+ Event signalled when all nodes have shutdown.
+
+
+
+
+ Mapping of nodes to the configurations they know about.
+
+
+
+
+ Flag indicating if we are currently shutting down. When set, we stop processing packets other than NodeShutdown.
+
+
+
+
+ CancellationTokenSource to use for async operations. This will be cancelled when we are shutting down to cancel any async operations.
+
+
+
+
+ The current state of the BuildManager.
+
+
+
+
+ The name given to this BuildManager as the component host.
+
+
+
+
+ The parameters with which the build was started.
+
+
+
+
+ The current pending and active submissions.
+
+
+ { submissionId, BuildSubmission }
+
+
+
+
+ The current pending and active graph build submissions.
+
+
+ { submissionId, GraphBuildSubmission }
+
+
+
+
+ Event signalled when all build submissions are complete.
+
+
+
+
+ The overall success of the build.
+
+
+
+
+ The next build submission id.
+
+
+
+
+ The last BuildParameters used for building.
+
+
+
+
+ Mapping of unnamed project instances to the file names assigned to them.
+
+
+
+
+ The next ID to assign to a project which has no name.
+
+
+
+
+ The build component factories.
+
+
+
+
+ Mapping of submission IDs to their first project started events.
+
+
+
+
+ Whether a cache has been provided by a project instance, meaning
+ we've acquired at least one build submission that included a project instance.
+ Once that has happened, we use the provided one, rather than our default.
+
+
+
+
+ The project started event handler
+
+
+
+
+ The project finished event handler
+
+
+
+
+ The logging exception event handler
+
+
+
+
+ Legacy threading semantic data associated with this build manager.
+
+
+
+
+ The worker queue.
+
+
+
+
+ Flag indicating we have disposed.
+
+
+
+
+ When the BuildManager was created.
+
+
+
+
+ Messages to be logged
+
+
+
+
+ Build telemetry to be send when this build ends.
+ Could be null
+
+
+
+
+ Creates a new unnamed build manager.
+ Normally there is only one build manager in a process, and it is the default build manager.
+ Access it with
+
+
+
+
+ Creates a new build manager with an arbitrary distinct name.
+ Normally there is only one build manager in a process, and it is the default build manager.
+ Access it with
+
+
+
+
+ Finalizes an instance of the class.
+
+
+
+
+ Enumeration describing the current state of the build manager.
+
+
+
+
+ This is the default state. may be called in this state. All other methods raise InvalidOperationException
+
+
+
+
+ This is the state the BuildManager is in after has been called but before has been called.
+ , , , , and may be called in this state.
+
+
+
+
+ This is the state the BuildManager is in after has been called but before all existing submissions have completed.
+
+
+
+
+ Gets the singleton instance of the Build Manager.
+
+
+
+
+ Retrieves a hosted instance for resolving SDKs.
+
+
+
+
+ Retrieves the logging service associated with a particular build
+
+ The logging service.
+
+
+
+ Retrieves the name of the component host.
+
+
+
+
+ Retrieves the build parameters associated with this build.
+
+ The build parameters.
+
+
+
+ Retrieves the LegacyThreadingData associated with a particular build manager
+
+
+
+
+
+
+
+
+
+ Prepares the BuildManager to receive build requests.
+
+ The build parameters. May be null.
+ Build messages to be logged before the build begins.
+ Thrown if a build is already in progress.
+
+
+
+ Prepares the BuildManager to receive build requests.
+
+ The build parameters. May be null.
+ Thrown if a build is already in progress.
+
+
+
+ Configure the build to use I/O tracking for nodes.
+
+
+ Must be a separate non-inlinable method to avoid loading the BuildXL assembly when not opted in.
+
+
+
+
+ Cancels all outstanding submissions asynchronously.
+
+
+
+
+ Clears out all of the cached information.
+
+
+
+
+ This methods requests the BuildManager to find a matching ProjectInstance in its cache of previously-built projects.
+ If none exist, a new instance will be created from the specified project.
+
+ The Project for which an instance should be retrieved.
+ The instance.
+
+
+
+ Submits a build request to the current build but does not start it immediately. Allows the user to
+ perform asynchronous execution or access the submission ID prior to executing the request.
+
+ Thrown if StartBuild has not been called or if EndBuild has been called.
+
+
+
+ Submits a graph build request to the current build but does not start it immediately. Allows the user to
+ perform asynchronous execution or access the submission ID prior to executing the request.
+
+ Thrown if StartBuild has not been called or if EndBuild has been called.
+
+
+
+ Convenience method. Submits a build request and blocks until the results are available.
+
+ Thrown if StartBuild has not been called or if EndBuild has been called.
+
+
+
+ Convenience method. Submits a graph build request and blocks until the results are available.
+
+ Thrown if StartBuild has not been called or if EndBuild has been called.
+
+
+
+ Signals that no more build requests are expected (or allowed) and the BuildManager may clean up.
+
+
+ This call blocks until all currently pending requests are complete.
+
+ Thrown if there is no build in progress.
+
+
+
+ Convenience method. Submits a lone build request and blocks until results are available.
+
+ Thrown if a build is already in progress.
+
+
+
+ Convenience method. Submits a lone graph build request and blocks until results are available.
+
+ Thrown if a build is already in progress.
+
+
+
+ Shuts down all idle MSBuild nodes on the machine
+
+
+
+
+ Dispose of the build manager.
+
+
+
+
+ This method is invoked by the NodePacketRouter when a packet is received and is intended for
+ this recipient.
+
+ The node from which the packet was received.
+ The packet.
+
+
+
+ Registers a factory which will be used to create the necessary components of the build
+ system.
+
+ The type which is created by this factory.
+ The factory to be registered.
+
+ It is not necessary to register any factories. If no factory is registered for a specific kind
+ of object, the system will use the default factory.
+
+
+
+
+ Gets an instance of the specified component type from the host.
+
+ The component type to be retrieved
+ The component
+
+
+
+ This method adds the request in the specified submission to the set of requests being handled by the scheduler.
+
+
+
+
+ This method adds the graph build request in the specified submission to the set of requests being handled by the scheduler.
+
+
+
+
+ Creates the traversal and metaproject instances necessary to represent the solution and populates new configurations with them.
+
+
+
+
+ Gets the next build id.
+
+
+
+
+ Creates and optionally populates a new configuration.
+
+
+
+
+ Processes the next action in the work queue.
+
+ The action to be processed.
+
+
+
+ Processes a packet
+
+
+
+
+ To avoid deadlock possibility, this method MUST NOT be called inside of 'lock (_syncLock)'
+
+
+
+
+ Deals with exceptions that may be thrown when handling a submission.
+
+
+ To avoid deadlock possibility, this method MUST NOT be called inside of 'lock (_syncLock)'
+
+
+
+
+ Waits to drain all events of logging service.
+ This method shall be used carefully because during draining, LoggingService will block all incoming events.
+
+
+ To avoid deadlock possibility, this method MUST NOT be called inside of 'lock (_syncLock)'
+
+
+
+
+ Deals with exceptions that may be thrown as a result of ExecuteSubmission.
+
+
+
+
+ The submission is a top level build request entering the BuildManager.
+ Sends the request to the scheduler with optional legacy threading semantics behavior.
+
+
+
+
+ Asks the nodeManager to tell the currently connected nodes to shut down and sets a flag preventing all non-shutdown-related packets from
+ being processed.
+
+
+
+
+ Retrieves the next build submission id.
+
+
+
+
+ Errors if the BuildManager is in the specified state.
+
+
+
+
+ Verifies the BuildManager is in the required state, and throws a if it is not.
+
+
+
+
+ Verifies the BuildManager is in the required state, and throws a if it is not.
+
+
+
+
+ Method called to reset the state of the system after a build.
+
+
+
+
+ Returns a new, valid configuration id.
+
+
+
+
+ Finds a matching configuration in the cache and returns it, or stores the configuration passed in.
+
+
+
+
+ Handles a new request coming from a node.
+
+
+
+
+ Handles a resource request coming from a node.
+
+
+
+
+ Handles a configuration request coming from a node.
+
+
+
+
+ Handles a build result coming from a node.
+
+
+
+
+ Handles the NodeShutdown packet
+
+
+
+
+ Report the received to the file access manager.
+
+ The id of the node from which the was received.
+ The file access report.
+
+
+
+ Report the received to the file access manager.
+
+ The id of the node from which the was received.
+ The process data report.
+
+
+
+ If there are no more active nodes, cleans up any remaining submissions.
+
+
+ Must only be called from within the sync lock.
+
+
+
+
+ Carries out the actions specified by the scheduler.
+
+
+
+
+ Completes a submission using the specified overall results.
+
+
+
+
+ Completes a submission using the specified overall results.
+
+
+
+
+ Determines if the submission is fully completed.
+
+
+
+
+ Determines if the submission is fully completed.
+
+
+
+
+ Retrieves the configuration structure for a node.
+
+
+
+
+ Handler for thread exceptions. This handler will only get called if the exception did not previously
+ get handled by a node exception handlers (for instance because the build is complete for the node.) In this case we
+ get the exception and will put it into the OverallBuildResult so that the host can see what happened.
+
+
+
+
+ Handler for LoggingService thread exceptions.
+
+
+
+
+ Raised when a project finished logging message has been processed.
+
+
+
+
+ Raised when a project started logging message is about to be processed.
+
+
+
+
+ Creates a logging service around the specified set of loggers.
+
+
+
+
+ Ensures that the packet type matches the expected type
+
+ The instance-type of packet being expected
+
+
+
+ Shutdown the logging service
+
+
+
+
+ Dispose implementation
+
+
+
+
+ The logger registered to the logging service when no other one is.
+
+
+
+
+ The logger verbosity.
+
+
+
+
+ The logger parameters.
+
+
+
+
+ Initialize.
+
+
+
+
+ Shutdown.
+
+
+
+
+ This class represents all of the settings which must be specified to start a build.
+
+
+
+
+ The default thread stack size for threads owned by MSBuild.
+
+
+
+
+ The timeout for endpoints to shut down.
+
+
+
+
+ The timeout for the engine to shutdown.
+
+
+
+
+ The shutdown timeout for the logging thread.
+
+
+
+
+ The shutdown timeout for the request builder.
+
+
+
+
+ The maximum number of idle request builders to retain before we start discarding them.
+
+
+
+
+ The startup directory.
+
+
+
+
+ Indicates whether we should warn when a property is uninitialized when it is used.
+
+
+
+
+ Indicates if we should dump string interning stats.
+
+
+
+
+ Indicates if we should debug the expander.
+
+
+
+
+ Indicates if we should keep duplicate target outputs.
+
+
+
+
+ Indicates if we should enable the build plan
+
+
+
+
+ The maximum number of idle request builders we will retain.
+
+
+
+
+ Location that msbuild.exe was last successfully found at.
+
+
+
+
+ The build id
+
+
+
+
+ The culture
+
+
+
+
+ The default tools version.
+
+
+
+
+ Flag indicating whether node reuse should be enabled.
+ By default, it is enabled.
+
+
+
+
+ The original process environment.
+
+
+
+
+ The environment properties for the build.
+
+
+
+
+ The forwarding logger records.
+
+
+
+
+ The build-global properties.
+
+
+
+
+ The loggers.
+
+
+
+
+ The maximum number of nodes to use.
+
+
+
+
+ The maximum amount of memory to use.
+
+
+
+
+ The location of the node exe. This is the full path including the exe file itself.
+
+
+
+
+ Flag indicating if we should only log critical events.
+
+
+
+
+ The UI culture.
+
+
+
+
+ The toolset provider
+
+
+
+
+ Should the logging service be done Synchronously when the number of cps's is 1
+
+
+
+
+ Should the inprocess node be shutdown when the build finishes. By default this is false
+ since visual studio needs to keep the inprocess node around after the build has finished.
+
+
+
+
+ When true, the in-proc node will not be available.
+
+
+
+
+ When true, the build should log task inputs to the loggers.
+
+
+
+
+ When true, the build should log the input parameters. Note - logging these is very expensive!
+
+
+
+
+ The settings used to load the project under build
+
+
+
+
+ Constructor for those who intend to set all properties themselves.
+
+
+
+
+ Creates BuildParameters from a ProjectCollection.
+
+ The ProjectCollection from which the BuildParameters should populate itself.
+
+
+
+ Private constructor for translation
+
+
+
+
+ Copy constructor
+
+
+
+
+ Gets or sets the desired thread priority for building.
+
+
+
+
+ By default if the number of processes is set to 1 we will use Asynchronous logging. However if we want to use synchronous logging when the number of cpu's is set to 1
+ this property needs to be set to true.
+
+
+
+
+ Indicates whether to emit a default error if a task returns false without logging an error.
+
+
+
+
+ Gets the environment variables which were set when this build was created.
+
+
+
+
+ The name of the culture to use during the build.
+
+
+
+
+ The default tools version for the build.
+
+
+
+
+ When true, indicates that the build should emit a detailed summary at the end of the log.
+
+
+
+
+ When true, indicates the in-proc node should not be used.
+
+
+
+
+ When true, indicates that the task parameters should be logged.
+
+
+
+
+ When true, indicates that the initial properties and items should be logged.
+
+
+
+
+ Indicates that the build should reset the configuration and results caches.
+
+
+
+
+ Flag indicating whether out-of-proc nodes should remain after the build and wait for further builds.
+
+
+
+
+ Gets an immutable collection of environment properties.
+
+
+ This differs from the BuildProcessEnvironment in that there are certain MSBuild-specific properties which are added, and those environment variables which
+ would not be valid as MSBuild properties are removed.
+
+
+
+
+ The collection of forwarding logger descriptions.
+
+
+
+
+ Sets or retrieves an immutable collection of global properties.
+
+
+
+
+ Interface allowing the host to provide additional control over the build process.
+
+
+
+
+ Enables or disables legacy threading semantics
+
+
+ Legacy threading semantics indicate that if a submission is to be built
+ only on the in-proc node and the submission is executed synchronously, then all of its
+ requests will be built on the thread which invoked the build rather than a
+ thread owned by the BuildManager.
+
+
+
+
+ The collection of loggers to use during the build.
+
+
+
+
+ The maximum number of nodes this build may use.
+
+
+
+
+ The amount of memory the build should limit itself to using, in megabytes.
+
+
+
+
+ The location of the build node executable.
+
+
+
+
+ Flag indicating if non-critical logging events should be discarded.
+
+
+
+
+ A list of warnings to treat as errors. To treat all warnings as errors, set this to an empty .
+
+
+
+
+ A list of warnings to not treat as errors. Only has any effect if WarningsAsErrors is empty.
+
+
+
+
+ A list of warnings to treat as low importance messages.
+
+
+
+
+ Locations to search for toolsets.
+
+
+
+
+ Returns all of the toolsets.
+
+
+ toolsetProvider.Toolsets is already a readonly collection.
+
+
+
+
+ The name of the UI culture to use during the build.
+
+
+
+
+ Flag indicating if the operating environment such as the current directory and environment be saved and restored between project builds and task invocations.
+ This should be set to false for any other build managers running in the system so that we do not have two build managers trampling on each others environment.
+
+
+
+
+ Shutdown the inprocess node when the build finishes. By default this is false
+ since visual studio needs to keep the inprocess node around after the build finishes.
+
+
+
+
+ Gets the internal msbuild thread stack size.
+
+
+
+
+ Gets the endpoint shutdown timeout.
+
+
+
+
+ Gets or sets the engine shutdown timeout.
+
+
+
+
+ Gets the maximum number of idle request builders to retain.
+
+
+
+
+ Gets the logging thread shutdown timeout.
+
+
+
+
+ Gets the request builder shutdown timeout.
+
+
+
+
+ Gets the startup directory.
+ It is current directory from which MSBuild command line was recently invoked.
+ It is communicated to working nodes as part of NodeConfiguration deserialization once the node manager acquires a particular node.
+ This deserialization assign this value to static backing field making it accessible from rest of build thread.
+ In MSBuild server node, this value is set once is received.
+
+
+
+
+ Indicates whether the build plan is enabled or not.
+
+
+
+
+ Indicates whether we should warn when a property is uninitialized when it is used.
+
+
+
+
+ Indicates whether we should dump string interning stats
+
+
+
+
+ Indicates whether we should dump debugging information about the expander
+
+
+
+
+ Indicates whether we should keep duplicate target outputs
+
+
+
+
+ Gets or sets the build id.
+
+
+
+
+ Gets or sets the environment properties.
+
+
+ This is not the same as BuildProcessEnvironment. See EnvironmentProperties. These properties are those which
+ are used during evaluation of a project, and exclude those properties which would not be valid MSBuild properties
+ because they contain invalid characters (such as 'Program Files (x86)').
+
+
+
+
+ Gets the global properties.
+
+
+
+
+ Gets or sets the node id.
+
+
+
+
+ Gets the toolset provider.
+
+
+
+
+ The one and only project root element cache to be used for the build.
+
+
+
+
+ Information for configuring child AppDomains.
+
+
+
+
+ (for diagnostic use) Whether or not this is out of proc
+
+
+
+
+
+
+
+ Gets or sets a value indicating if the build is allowed to interact with the user.
+
+
+
+
+ Gets or sets a value indicating the isolation mode to use.
+
+
+ Kept for API backwards compatibility.
+
+
+
+
+ Gets or sets a value indicating the isolation mode to use.
+
+
+
+
+ Input cache files that MSBuild will use to read build results from.
+ If the isolation mode is set to ,
+ this sets the isolation mode to .
+
+
+
+
+ Output cache file where MSBuild will write the contents of its build result caches during EndBuild.
+ If the isolation mode is set to ,
+ this sets the isolation mode to .
+
+
+
+
+ Gets or sets a value indicating whether file accesses should be reported to any configured project cache plugins.
+
+
+
+
+ Determines whether MSBuild will save the results of builds after EndBuild to speed up future builds.
+
+
+
+
+ Gets or sets a value indicating whether the build process should run as low priority.
+
+
+
+
+ Gets or sets a value that will error when the build process fails an incremental check.
+
+
+
+
+ Gets or sets the project cache description to use for all or
+ in addition to any potential project caches described in each project.
+
+
+
+
+ Retrieves a toolset.
+
+
+
+
+ Creates a clone of this BuildParameters object. This creates a clone of the logger collections, but does not deep clone
+ the loggers within.
+
+
+
+
+ Implementation of the serialization mechanism.
+
+
+
+
+ The class factory for deserialization.
+
+
+
+
+ Gets the value of a boolean environment setting which is not expected to change.
+
+
+
+
+ Gets the value of an integer environment variable, or returns the default if none is set or it cannot be converted.
+
+
+
+
+ Centralization of the common parts of construction.
+
+
+
+
+ Loads the toolsets if we don't have them already.
+
+
+
+
+ This method determines where MSBuild.Exe is and sets the NodeExePath to that by default.
+
+
+
+
+ Helper to avoid doing an expensive disk check for MSBuild.exe when
+ we already checked in a previous build.
+ This File.Exists otherwise can show up in profiles when there's a lot of
+ design time builds going on.
+
+
+
+
+ The isolation mode to use.
+
+
+
+
+ Do not enable isolation.
+
+
+
+
+ Enable isolation and log isolation violations as messages.
+
+
+ Under this mode, only the results from top-level targets
+ are serialized if the -orc switch is supplied to mitigate
+ the chances of an isolation-violating target on a
+ dependency project using incorrect state due to its
+ dependency on a cached target whose side effects would
+ not be taken into account. (E.g., the definition of a property.)
+
+
+
+
+ Enable isolation and log isolation violations as errors.
+
+
+
+
+ A callback used to receive notification that a build has completed.
+
+
+ When this delegate is invoked, the WaitHandle on the BuildSubmission will have been be signalled and the OverallBuildResult will be valid.
+
+
+
+
+ A BuildSubmission represents an build request which has been submitted to the BuildManager for processing. It may be used to
+ execute synchronous or asynchronous build requests and provides access to the results upon completion.
+
+
+ This class is thread-safe.
+
+
+
+
+ The callback to invoke when the submission is complete.
+
+
+
+
+ The completion event.
+
+
+
+
+ Flag indicating if logging is done.
+
+
+
+
+ True if it has been invoked
+
+
+
+
+ Flag indicating whether synchronous wait should support legacy threading semantics.
+
+
+
+
+ Constructor
+
+
+
+
+ The BuildManager with which this submission is associated.
+
+
+
+
+ An ID uniquely identifying this request from among other submissions within the same build.
+
+
+
+
+ The asynchronous context provided to , if any.
+
+
+
+
+ A which will be signalled when the build is complete. Valid after or returns, otherwise null.
+
+
+
+
+ Returns true if this submission is complete.
+
+
+
+
+ The result of the build. Valid only after WaitHandle has become signalled.
+
+
+
+
+ The BuildRequestData being used for this submission.
+
+
+
+
+ The build request for execution.
+
+
+
+
+ Starts the request and blocks until results are available.
+
+ The request has already been started or is already complete.
+
+
+
+ Starts the request asynchronously and immediately returns control to the caller.
+
+ The request has already been started or is already complete.
+
+
+
+ Sets the event signaling that the build is complete.
+
+
+
+
+ Indicates that all logging events for this submission are complete.
+
+
+
+
+ Starts the request asynchronously and immediately returns control to the caller.
+
+ The request has already been started or is already complete.
+
+
+
+ Determines if we are completely done with this submission and can complete it so the user may access results.
+
+
+
+
+ This class represents the data which is used for legacy threading semantics for the build
+
+
+
+
+ Store the pair of start/end events used by a particular submission to track their ownership
+ of the legacy thread.
+ Item1: Start event, tracks when the submission has permission to start building.
+ Item2: End event, signalled when that submission is no longer using the legacy thread.
+
+
+
+
+ The current submission id building on the main thread, if any.
+
+
+
+
+ The instance to be used when the new request builder is started on the main thread.
+
+
+
+
+ Lock object for startNewRequestBuilderMainThreadEventsById, since it's possible for multiple submissions to be
+ submitted at the same time.
+
+
+
+
+ The instance to be used when the new request builder is started on the main thread.
+
+
+
+
+ The current submission id building on the main thread, if any.
+
+
+
+
+ Given a submission ID, assign it "start" and "finish" events to track its use of
+ the legacy thread.
+
+
+
+
+ This submission is completely done with the legacy thread, so unregister it
+ from the dictionary so that we don't leave random events lying around.
+
+
+
+
+ Given a submission ID, return the event being used to track when that submission is ready
+ to be executed on the legacy thread.
+
+
+
+
+ Given a submission ID, return the event being used to track when that submission is ready
+ to be executed on the legacy thread.
+
+
+
+
+ Signal that the legacy thread is starting work.
+
+
+
+
+ Signal that the legacy thread has finished its work.
+
+
+
+
+ Interface defining properties, items, and metadata of interest for a .
+
+
+
+
+ Properties of interest.
+
+
+
+
+ Items and metadata of interest.
+
+
+
+
+ Creates an instance of this exception using the given message.
+
+
+
+
+ Creates an instance of this exception using projectFile, targetName, taskName and inner exception.
+ Adds the inner exception's details to the exception message because most bug reporters don't bother
+ to provide the inner exception details which is typically what we care about.
+
+
+
+
+ Creates an instance of this exception using projectFile, targetName, taskName and message.
+
+
+
+
+ Wrapper for the COM Running Object Table.
+
+
+ See https://docs.microsoft.com/en-us/windows/desktop/api/objidl/nn-objidl-irunningobjecttable.
+
+
+
+
+ Attempts to retrieve an item from the ROT.
+
+
+
+
+ Flags providing additional control over the build request
+
+
+
+
+ No flags.
+
+
+
+
+ When this flag is present, the existing ProjectInstance in the build will be replaced by this one.
+
+
+
+
+ When this flag is present, the issued in response to this request will
+ include .
+
+
+
+
+ When this flag is present and the project has previously been built on a node whose affinity is
+ incompatible with the affinity this request requires, we will ignore the project state (but not
+ target results) that were previously generated.
+
+
+ This usually is not desired behavior. It is only provided for those cases where the client
+ knows that the new build request does not depend on project state generated by a previous request. Setting
+ this flag can provide a performance boost in the case of incompatible node affinities, as MSBuild would
+ otherwise have to serialize the project state from one node to another, which may be
+ expensive depending on how much data the project previously generated.
+
+ This flag has no effect on target results, so if a previous request already built a target, the new
+ request will not re-build that target (nor will any of the project state mutations which previously
+ occurred as a consequence of building that target be re-applied.)
+
+
+
+
+ When this flag is present, caches including the will be cleared
+ after the build request completes. This is used when the build request is known to modify a lot of
+ state such as restoring packages or generating parts of the import graph.
+
+
+
+
+ When this flag is present, the top level target(s) in the build request will be skipped if those targets
+ are not defined in the Project to build. This only applies to this build request (if another target calls
+ the "missing target" at any other point this will still result in an error).
+
+
+
+
+ When this flag is present, the issued in response to this request will
+ include a that includes ONLY the
+ explicitly-requested properties, items, and metadata.
+
+
+
+
+ When this flag is present, projects loaded during build will ignore missing imports ( and ).
+ This is especially useful during a restore since some imports might come from packages that haven't been restored yet.
+
+
+
+
+ When this flag is present, an unresolved MSBuild project SDK will fail the build. This flag is used to
+ change the behavior to still fail when an SDK is missing
+ because those are more fatal.
+
+
+
+
+ BuildRequestData encapsulates all of the data needed to submit a build request.
+
+
+
+
+ Constructs a BuildRequestData for build requests based on project instances.
+
+ The instance to build.
+ The targets to build.
+
+
+
+ Constructs a BuildRequestData for build requests based on project instances.
+
+ The instance to build.
+ The targets to build.
+ The host services to use, if any. May be null.
+
+
+
+ Constructs a BuildRequestData for build requests based on project instances.
+
+ The instance to build.
+ The targets to build.
+ The host services to use, if any. May be null.
+ Flags controlling this build request.
+
+
+
+ Constructs a BuildRequestData for build requests based on project instances.
+
+ The instance to build.
+ The targets to build.
+ The host services to use, if any. May be null.
+ Flags controlling this build request.
+ The list of properties whose values should be transferred from the project to any out-of-proc node.
+
+
+
+ Constructs a BuildRequestData for build requests based on project instances.
+
+ The instance to build.
+ The targets to build.
+ The host services to use, if any. May be null.
+ Flags controlling this build request.
+ The list of properties whose values should be transferred from the project to any out-of-proc node.
+ A describing properties, items, and metadata that should be returned. Requires setting .
+
+
+
+ Constructs a BuildRequestData for build requests based on project files.
+
+ The full path to the project file.
+ The global properties which should be used during evaluation of the project. Cannot be null.
+ The tools version to use for the build. May be null.
+ The targets to build.
+ The host services to use. May be null.
+
+
+
+ Constructs a BuildRequestData for build requests based on project files.
+
+ The full path to the project file.
+ The global properties which should be used during evaluation of the project. Cannot be null.
+ The tools version to use for the build. May be null.
+ The targets to build.
+ The host services to use. May be null.
+ The to use.
+ A describing properties, items, and metadata that should be returned. Requires setting .
+
+
+
+ Constructs a BuildRequestData for build requests based on project files.
+
+ The full path to the project file.
+ The global properties which should be used during evaluation of the project. Cannot be null.
+ The tools version to use for the build. May be null.
+ The targets to build.
+ The host services to use. May be null.
+ The to use.
+
+
+
+ Common constructor.
+
+
+
+
+ The actual project, in the case where the project doesn't come from disk.
+ May be null.
+
+ The project instance.
+
+
+ The project file.
+ The project file to be built.
+
+
+
+ The name of the targets to build.
+
+ An array of targets in the project to be built.
+
+
+
+ Extra flags for this BuildRequest.
+
+
+
+
+ The global properties to use.
+
+ The set of global properties to be used to build this request.
+
+
+
+ The explicitly requested tools version to use.
+
+
+
+
+ Gets the HostServices object for this request.
+
+
+
+
+ Returns a list of properties to transfer out of proc for the build.
+
+
+
+
+ Returns the properties, items, and metadata that will be returned
+ by this build.
+
+
+
+
+ Whether the tools version used originated from an explicit specification,
+ for example from an MSBuild task or /tv switch.
+
+
+
+
+ Returns the global properties as a dictionary.
+
+
+
+
+ This class represents an implementation of INode for out-of-proc nodes.
+
+
+
+
+ Whether the current appdomain has an out of proc node.
+ For diagnostics.
+
+
+
+
+ The one and only project root element cache to be used for the build
+ on this out of proc node.
+
+
+
+
+ The endpoint used to talk to the host.
+
+
+
+
+ The saved environment for the process.
+
+
+
+
+ The component factories.
+
+
+
+
+ The build system parameters.
+
+
+
+
+ The logging service.
+
+
+
+
+ The node logging context.
+
+
+
+
+ The global config cache.
+
+
+
+
+ The global node manager
+
+
+
+
+ The build request engine.
+
+
+
+
+ The packet factory.
+
+
+
+
+ The current node configuration
+
+
+
+
+ The queue of packets we have received but which have not yet been processed.
+
+
+
+
+ The event which is set when we receive packets.
+
+
+
+
+ The event which is set when we should shut down.
+
+
+
+
+ The reason we are shutting down.
+
+
+
+
+ The exception, if any, which caused shutdown.
+
+
+
+
+ Data for the use of LegacyThreading semantics.
+
+
+
+
+ The current instance.
+
+
+
+
+ Constructor.
+
+
+
+
+ Get the logging service for a build.
+
+ The logging service.
+
+
+
+ Retrieves the LegacyThreadingData associated with a particular build manager
+
+
+
+
+ Retrieves the name of this component host.
+
+
+
+
+ Retrieves the build parameters for the current build.
+
+ The build parameters.
+
+
+
+ Whether the current appdomain has an out of proc node.
+
+
+
+
+ Starts up the node and processes messages until the node is requested to shut down.
+ Assumes no node reuse.
+ Assumes low priority is disabled.
+
+ The exception which caused shutdown, if any.
+ The reason for shutting down.
+
+
+
+ Starts up the node and processes messages until the node is requested to shut down.
+ Assumes low priority is disabled.
+
+ Whether this node is eligible for reuse later.
+ The exception which caused shutdown, if any.
+ The reason for shutting down.
+
+
+
+ Starts up the node and processes messages until the node is requested to shut down.
+
+ Whether this node is eligible for reuse later.
+ Whether this node should be running with low priority.
+ The exception which caused shutdown, if any.
+ The reason for shutting down.
+
+
+
+ Registers a factory with the component host.
+
+ The factory type to register.
+ The factory method.
+
+
+
+ Get a component from the host.
+
+ The component type to get.
+ The component.
+
+
+
+ Registers a packet handler.
+
+ The packet type for which the handler should be registered.
+ The factory used to create packets.
+ The handler for the packets.
+
+
+
+ Unregisters a packet handler.
+
+ The type of packet for which the handler should be unregistered.
+
+
+
+ Deserializes and routes a packer to the appropriate handler.
+
+ The node from which the packet was received.
+ The packet type.
+ The translator to use as a source for packet data.
+
+
+
+ Routes a packet to the appropriate handler.
+
+ The node id from which the packet was received.
+ The packet to route.
+
+
+
+ Called when a packet has been received.
+
+ The node from which the packet was received.
+ The packet.
+
+
+
+ Event handler for the BuildEngine's OnRequestComplete event.
+
+
+
+
+ Event handler for the BuildEngine's OnNewRequest event.
+
+
+
+
+ Event handler for the BuildEngine's OnNewConfigurationRequest event.
+
+
+
+
+ Event handler for the BuildEngine's OnResourceRequest event.
+
+
+
+
+ Event handler for the LoggingService's OnLoggingThreadException event.
+
+
+
+
+ Event handler for the BuildEngine's OnEngineException event.
+
+
+
+
+ Perform necessary actions to shut down the node.
+
+
+
+
+ Clears all the caches used during the build.
+
+
+
+
+ Event handler for the node endpoint's LinkStatusChanged event.
+
+
+
+
+ Callback for logging packets to be sent.
+
+
+
+
+ Dispatches the packet to the correct handler.
+
+
+
+
+ Handles the BuildRequest packet.
+
+
+
+
+ Handles the BuildRequestConfiguration packet.
+
+
+
+
+ Handles the BuildRequestConfigurationResponse packet.
+
+
+
+
+ Handles the BuildResult packet.
+
+
+
+
+ Handles the ResourceResponse packet.
+
+
+
+
+
+ Handles the NodeConfiguration packet.
+
+
+
+
+ Handles the NodeBuildComplete packet.
+
+
+
+
+ Overall results for targets and requests
+
+
+
+
+ The target or request was a complete success.
+
+
+
+
+ The target or request failed in some way.
+
+
+
+
+ Contains the current results for all of the targets which have produced results for a particular configuration.
+
+
+
+
+ The submission with which this result is associated.
+
+
+
+
+ The configuration ID with which this result is associated.
+
+
+
+
+ The global build request ID for which these results are intended.
+
+
+
+
+ The global build request ID which issued the request leading to this result.
+
+
+
+
+ The build request ID on the originating node.
+
+
+
+
+ The first build request to generate results for a configuration will set this so that future
+ requests may be properly satisfied from the cache.
+
+
+
+
+ The first build request to generate results for a configuration will set this so that future
+ requests may be properly satisfied from the cache.
+
+
+
+
+ The set of results for each target.
+
+
+
+
+ The request caused a circular dependency in scheduling.
+
+
+
+
+ The exception generated while this request was running, if any.
+ Note that this can be set if the request itself fails, or if it receives
+ an exception from a target or task.
+
+
+
+
+ The overall result calculated in the constructor.
+
+
+
+
+ Snapshot of the environment from the configuration this results comes from.
+ This should only be populated when the configuration for this result is moved between nodes.
+
+
+
+
+ Snapshot of the current directory from the configuration this result comes from.
+ This should only be populated when the configuration for this result is moved between nodes.
+
+
+
+
+ state after the build. This is only provided if
+ includes or
+ for the build request which this object is a result of,
+ and will be null otherwise. Where available, it may be a non buildable-dummy object, and should only
+ be used to retrieve , and
+ from it. No other operation is guaranteed to be supported.
+
+
+
+
+ Constructor for serialization.
+
+
+
+
+ Constructor creates an empty build result
+
+ The build request to which these results should be associated.
+
+
+
+ Constructs a build result with an exception
+
+ The build request to which these results should be associated.
+ The exception, if any.
+
+
+
+ Constructor creates a build result indicating a circular dependency was created.
+
+ The build request to which these results should be associated.
+ Set to true if a circular dependency was detected.
+
+
+
+ Constructs a new build result based on existing results, but filtered by a specified set of target names
+
+ The existing results.
+ The target names whose results we will take from the existing results, if they exist.
+
+
+
+ Constructs a new build result with existing results, but associated with the specified request.
+
+ The build request with which these results should be associated.
+ The existing results, if any.
+ The exception, if any
+
+
+
+ Constructs a new build result with existing results, but associated with the specified request.
+
+ The build request with which these results should be associated.
+ The existing results, if any.
+ The list of target names that are the subset of results that should be returned.
+ The exception, if any
+
+
+
+ Constructor which allows reporting results for a different nodeRequestId
+
+
+
+
+ Constructor for deserialization
+
+
+
+
+ Returns the submission id.
+
+
+
+
+ Returns the configuration ID for this result.
+
+
+
+
+ Returns the build request id for which this result was generated
+
+
+
+
+ Returns the build request id for the parent of the request for which this result was generated
+
+
+
+
+ Returns the node build request id for which this result was generated
+
+
+
+
+ Returns the exception generated while this result was run, if any.
+
+
+
+
+ Returns a flag indicating if a circular dependency was detected.
+
+
+
+
+ Returns the overall result for this result set.
+
+
+
+
+ Returns an enumerator for all target results in this build result
+
+
+
+
+ state after the build. In general, it may be a non buildable-dummy object, and should only
+ be used to retrieve , and
+ from it. Any other operation is not guaranteed to be supported.
+
+
+
+
+ Returns the node packet type.
+
+
+
+
+ Holds a snapshot of the environment at the time we blocked.
+
+
+
+
+ Holds a snapshot of the current working directory at the time we blocked.
+
+
+
+
+ Returns the initial targets for the configuration which requested these results.
+
+
+
+
+ Returns the default targets for the configuration which requested these results.
+
+
+
+
+ The defined targets for the project associated with this build result.
+
+
+
+
+ Container used to transport errors from the scheduler (issued while computing a build result)
+ to the TaskHost that has the proper logging context (project id, target id, task id, file location)
+
+
+
+
+ Indexer which sets or returns results for the specified target
+
+ The target
+ The results for the specified target
+ KeyNotFoundException is returned if the specified target doesn't exist when reading this property.
+ ArgumentException is returned if the specified target already has results.
+
+
+
+ Adds the results for the specified target to this result collection.
+
+ The target to which these results apply.
+ The results for the target.
+
+
+
+ Keep the results only for targets in .
+
+ The targets whose results to keep.
+
+
+
+ Merges the specified results with the results contained herein.
+
+ The results to merge in.
+
+
+
+ Determines if there are any results for the specified target.
+
+ The target for which results are desired.
+ True if results exist, false otherwise.
+
+
+
+ Reads or writes the packet to the serializer.
+
+
+
+
+ Factory for serialization
+
+
+
+
+ Caches all of the targets results we can.
+
+
+
+
+ Clear cached files from disk.
+
+
+
+
+ Clones the build result (the resultsByTarget field is only a shallow copy).
+
+
+
+
+ Sets the overall result.
+
+ true if the result is success, otherwise false.
+
+
+
+ Creates the target result dictionary.
+
+
+
+
+ Creates the target result dictionary and populates it with however many target results are
+ available given the list of targets passed.
+
+
+
+
+ The result code for a given target.
+
+
+
+
+ The target was skipped because its condition was not met.
+
+
+
+
+ The target successfully built.
+
+
+
+
+ The target failed to build.
+
+
+
+
+ An interface representing results for a specific target
+
+
+
+
+ The exception generated when the target ran, if any.
+
+
+
+
+ The set of build items output by the target.
+ These are ITaskItem's, so they have no item-type.
+
+
+
+
+ The result code for the target run.
+
+
+
+
+ Contains the result items for a single target as well as the overall result code.
+
+
+
+
+ The result for this target.
+
+
+
+
+ Flag indicating whether to consider this target failure as having caused a build failure.
+
+
+
+
+ Flag indicating whether at least one target which has run after us (transitively via AfterTargets) failed.
+
+
+
+
+ The store of items in this result.
+
+
+
+
+ The context under which these results have been cached.
+
+
+
+
+ The (possibly null) from the original target build
+
+
+
+
+ Initializes the results with specified items and result.
+
+ The items produced by the target.
+ The overall result for the target.
+ The original build event context from when the target was first built, if available.
+ Non-null when creating a after building the target initially (or skipping due to false condition).
+ Null when the is being created in other scenarios:
+ * Target that never ran because a dependency had an error
+ * in when Cancellation was requested
+ * in ProjectCache.CacheResult.ConstructBuildResult
+
+
+
+
+ Private constructor for deserialization
+
+
+
+
+ Returns the exception which aborted this target, if any.
+
+ The exception which aborted this target, if any.
+
+
+
+ Returns the items produced by the target.
+ These are ITaskItem's, so they have no item-type.
+
+ The items produced by the target.
+
+
+
+ Returns the result code for the target.
+
+ The result code for the target.
+
+
+
+ Returns the internal result for the target.
+
+
+
+
+ The (possibly null) from the original target build
+
+
+
+
+ Sets or gets a flag indicating whether or not a failure results should cause the build to fail.
+
+
+
+
+ Sets or gets a flag indicating whether at least one target which has run after us (transitively via AfterTargets) failed.
+
+
+
+
+ Reads or writes the packet to the serializer.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ Gets the name of the cache file for this configuration.
+
+
+
+
+ Gets the name of the cache file for this configuration.
+
+
+
+
+ Cache the items.
+
+
+
+
+ Performs the actual translation
+
+
+
+
+ Retrieve the items from the cache.
+
+
+
+
+ Gets the translator for this configuration.
+
+
+
+
+ Information about where the cache for the items in this result are stored.
+
+
+
+
+ Constructor.
+
+
+
+
+ Retrieves the configuration id.
+
+
+
+
+ Retrieves the target name.
+
+
+
+
+ Represents an object that is immutable and has an Instance, e.g. a .
+
+ The Instance type.
+
+
+
+ A reflection-generated TaskPropertyInfo instance.
+
+
+
+
+ The reflection-produced PropertyInfo.
+
+
+
+
+ The type of the generated tasks.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The original property info that generated this instance.
+ The type to reflect over to get the reflection propertyinfo later.
+
+
+
+ Initializes a new instance of the class.
+
+ The PropertyInfo used to discover this task property.
+
+
+
+ Initializes a new with three precomputed parameters. This is specifically
+ used with MetadataLoadContext, as these parameters cannot be computed for the property type passed in directly but
+ rather the relevant base type.
+
+
+
+
+ Gets or sets the reflection-produced PropertyInfo.
+
+
+
+
+ Controls where projects must be built.
+
+
+
+
+ The project may only be scheduled on the in-proc node. This happens automatically if there is a host object or if a ProjectInstance
+ was specified. A host may wish to specify it if they know a task depends explicitly on shared static data or other host-provided
+ objects.
+
+
+
+
+ The project may only be scheduled on an out-of-proc node. A host may wish to specify this if it is known the project being built
+ could contaminate the host environment (or the host contaminates the environment while a build is proceeding.)
+
+
+
+
+ The project may be scheduled anywhere.
+
+
+
+
+ Implementation of HostServices that
+ mediates access from the build to the host.
+
+
+
+
+ Collection storing host objects for particular project/task/target combinations.
+
+
+
+
+ A mapping of project file names to their node affinities. An entry for String.Empty means that
+ all projects which don't otherwise have an affinity should use that affinity.
+
+
+
+
+ Gets any host object applicable to this task name
+ where the task appears within a target and project with the specified names.
+ If no host object exists, returns null.
+
+
+
+
+ Register a host object for a particular task/target pair.
+ Overwrites any existing host object.
+
+
+
+
+ Register a remote host object for a particular task/target pair.
+ The remote host object require registered in Running Object Table(ROT) already.
+ Overwrites any existing host object.
+
+ It's caller's responsibly:
+ To maintain the live cycle of the host object.
+ Register and unregister from ROT.
+ Ensure the host object has appropriate COM interface that can be used in task.
+
+ project file name
+ target name
+ task name
+ the Moniker used to register host object in ROT
+
+
+
+ Unregister the project's host objects, if any and remove any node affinities associated with it.
+
+
+
+
+ Retrieves the node affinity for a particular project file.
+
+
+
+
+ Sets the node affinity for a particular project file.
+
+
+ The project file. If set to String.Empty, all projects will use the specified affinity. If set to null, all affinities will be cleared.
+
+ The to set.
+
+
+
+ Updates the host object table when a project is renamed.
+ Old full path may be null.
+
+
+
+
+ Returns true if there is any in process host object registered for this project file.
+
+
+
+
+ Retrieves the node affinity for a particular project file.
+
+
+
+
+ Test only
+
+
+
+
+
+ Bag holding host object information for a single project file.
+
+
+
+
+ The mapping of targets and tasks to host objects.
+
+
+
+
+ Constructor
+
+
+
+
+ Accessor which indicates if there are any registered in process host objects.
+
+
+
+
+ Registers a host object for this project file
+
+
+
+
+ Registers a host object for this project file
+
+
+
+
+ Gets any host object for this project file matching the task and target names specified.
+
+
+
+
+ Equatable key for the table
+
+
+
+
+ Target name
+
+
+
+
+ Task name
+
+
+
+
+ Constructor
+
+
+
+
+ Implementation of IEquatable.
+
+
+
+
+ Type for ProjectTaskInstance and ProjectPropertyGroupTaskInstance and ProjectItemGroupTaskInstance
+ allowing them to be used in a single collection of target children
+
+
+
+
+ Condition on the element
+
+
+
+
+ Full path to the file in which the originating element was originally
+ defined.
+ If it originated in a project that was not loaded and has never been
+ given a path, returns an empty string.
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the original condition attribute
+ if any
+
+
+
+
+ Type for TaskOutputItem and TaskOutputProperty
+ allowing them to be used in a single collection
+
+
+
+
+ Condition on the element
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the TaskParameter attribute
+
+
+
+
+ Location of the original condition attribute, if any
+
+
+
+
+ Enum for controlling project instance creation
+
+
+
+
+ no options
+
+
+
+
+ create immutable version of project instance
+
+
+
+
+ create project instance with some look up table that improves performance
+
+
+
+
+ What the user gets when they clone off a ProjectInstance.
+ They can hold onto this, change/query items and properties,
+ and call it several times to build it.
+
+
+ Neither this class nor any of its constituents are allowed to have
+ references to any of the Construction or Evaluation objects.
+ This class is immutable except for adding instance items and setting instance properties.
+ It only exposes items and properties: targets, host services, and the task registry are not exposed as they are only the concern of build.
+ Constructors are internal in order to direct users to Project class instead; these are only createable via Project objects.
+
+
+
+
+ Targets in the project after overrides have been resolved.
+ This is an unordered collection keyed by target name.
+ Only the wrapper around this collection is exposed.
+
+
+
+
+ Targets in the project after overrides have been resolved.
+ This is an immutable, unordered collection keyed by target name.
+ It is just a wrapper around actualTargets.
+
+
+
+
+ The global properties evaluation occurred with.
+ Needed by the build as they traverse between projects.
+
+
+
+
+ List of names of the properties that, while global, are still treated as overridable
+
+
+
+
+ Whether the tools version used originated from an explicit specification,
+ for example from an MSBuild task or /tv switch.
+
+
+
+
+ Properties in the project. This is a dictionary of name, value pairs.
+
+
+
+
+ Properties originating from environment variables, gotten from the project collection
+
+
+
+
+ Items in the project. This is a dictionary of ordered lists of a single type of items keyed by item type.
+
+
+
+
+ Items organized by evaluatedInclude value
+
+
+
+
+ The project's root directory, for evaluation of relative paths and
+ setting the current directory during build.
+ Is never null.
+ If the project has not been loaded from disk and has not been given a path, returns the current directory from
+ the time the project was loaded - this is the same behavior as Whidbey/Orcas.
+ If the project has not been loaded from disk but has been given a path, this path may not exist.
+
+
+
+
+ The project file location, for logging.
+ If the project has not been loaded from disk and has not been given a path, returns null.
+ If the project has not been loaded from disk but has been given a path, this path may not exist.
+
+
+
+
+ The item definitions from the parent Project.
+
+
+
+
+ The HostServices to use during a build.
+
+
+
+
+ Whether when we read a ToolsVersion that is not equivalent to the current one on the Project tag, we
+ treat it as the current one.
+
+
+
+
+ The toolsversion that was originally on the project's Project root element
+
+
+
+
+ Whether the instance is immutable.
+ The object is always mutable during evaluation.
+
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Uses the default project collection.
+
+ The name of the project file.
+ A new project instance
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Uses the default project collection.
+
+ The name of the project file.
+ The global properties to use.
+ The tools version.
+ A new project instance
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Global properties may be null.
+ Tools version may be null.
+
+ The name of the project file.
+ The global properties to use.
+ The tools version.
+ Project collection
+ A new project instance
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Global properties may be null.
+ Tools version may be null.
+
+ The name of the project file.
+ The global properties to use.
+ The tools version.
+ The sub-toolset version, used in tandem with the ToolsVersion to determine the set of toolset properties.
+ Project collection
+ A new project instance
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Global properties may be null.
+ Tools version may be null.
+ Evaluation context may be null.
+
+ The name of the project file.
+ The global properties to use.
+ The tools version.
+ The sub-toolset version, used in tandem with the ToolsVersion to determine the set of toolset properties.
+ Project collection
+ Project load settings
+ The context to use for evaluation.
+ The directory cache factory to use for file I/O.
+ Indicates if loading the project is allowed to interact with the user.
+ A new project instance
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Uses the default project collection.
+
+ The project root element
+ A new project instance
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Global properties may be null.
+ Tools version may be null.
+
+ The project root element
+ The global properties to use.
+ The tools version.
+ Project collection
+ A new project instance
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Global properties may be null.
+ Tools version may be null.
+ Sub-toolset version may be null, but if specified will override all other methods of determining the sub-toolset.
+
+ The project root element
+ The global properties to use.
+ The tools version.
+ The sub-toolset version, used in tandem with the ToolsVersion to determine the set of toolset properties.
+ Project collection
+ A new project instance
+
+
+
+ Creates a ProjectInstance from an external created .
+ Properties and items are cloned immediately and only the instance data is stored.
+
+
+
+
+ Creates a ProjectInstance from an immutable .
+ The resulting object wraps the
+ object. Unlike the ProjectInstance(Project project, ProjectInstanceSettings settings)
+ constructor, the properties and items are not cloned.
+
+ The immutable .
+ Whether the fast item lookup cache is required.
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Global properties may be null.
+ Tools version may be null.
+ Sub-toolset version may be null, but if specified will override all other methods of determining the sub-toolset.
+
+ The project root element
+ The global properties to use.
+ The tools version.
+ The sub-toolset version, used in tandem with the ToolsVersion to determine the set of toolset properties.
+ Project collection
+ Project load settings
+ The context to use for evaluation.
+ The directory cache factory to use for file I/O.
+ Indicates if loading the project is allowed to interact with the user.
+ A new project instance
+
+
+
+ Creates a ProjectInstance directly. Used to generate solution metaprojects.
+
+ The full path to give to this project.
+ The traversal project from which global properties and tools version will be inherited.
+ An containing global properties.
+
+
+
+ Creates a ProjectInstance directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Global properties may be null.
+ Tools version may be null.
+ Used by SolutionProjectGenerator so that it can explicitly pass the vsVersionFromSolution in for use in
+ determining the sub-toolset version.
+
+ The project root element
+ The global properties to use.
+ The tools version.
+ The version of the solution, used to help determine which sub-toolset to use.
+ Project collection
+ An instance to use when resolving SDKs.
+ The current build submission ID.
+ A new project instance
+
+
+
+ Initializes a new instance of the class directly.
+ No intermediate Project object is created.
+ This is ideal if the project is simply going to be built, and not displayed or edited.
+ Global properties may be null.
+ Tools version may be null.
+ Used by SolutionProjectGenerator so that it can explicitly pass the vsVersionFromSolution in for use in
+ determining the sub-toolset version.
+
+
+
+
+ Creates a mutable ProjectInstance directly, using the specified logging service.
+ Assumes the project path is already normalized.
+ Used by the RequestBuilder.
+
+
+
+
+ Creates a mutable ProjectInstance directly, using the specified logging service.
+ Assumes the project path is already normalized.
+ Used by this class when generating legacy solution wrappers.
+
+
+
+
+ Constructor called by Project's constructor to create a fresh instance.
+ Properties and items are cloned immediately and only the instance data is stored.
+
+
+
+
+ Constructor for deserialization.
+
+
+
+
+ Deep clone of this object.
+ Useful for compiling a single file; or for keeping resolved assembly references between builds.
+
+
+
+
+ Create a file based ProjectInstance.
+
+ The file to evaluate the ProjectInstance from.
+ The to use.
+
+
+
+
+ Create a based ProjectInstance.
+
+ The to evaluate the ProjectInstance from.
+ The to use.
+
+
+
+ Create a ProjectInstance from an immutable project source.
+
+ The immutable on which the ProjectInstance is based.
+ The to use.
+
+
+
+ Global properties this project was evaluated with, if any.
+ Read only collection.
+ Traverses project references.
+
+
+ This is the publicly exposed getter, that translates into a read-only dead IDictionary<string, string>.
+
+
+
+
+ The tools version this project was evaluated with, if any.
+ Not necessarily the same as the tools version on the Project tag, if any;
+ it may have been externally specified, for example with a /tv switch.
+
+
+
+
+ Enumerator over item types of the items in this project
+
+
+
+
+ Enumerator over properties in this project
+
+
+
+
+ Enumerator over items in this project.
+
+
+
+
+ Gets a object containing evaluated items.
+
+
+
+
+ Serialize the entire project instance state.
+
+ When false, only a part of the project instance state is serialized (properties and items).
+ In this case out of proc nodes re-evaluate the project instance from disk to obtain the un-serialized state.
+ This partial state recombination may lead to build issues when the project instance state differs from what is on disk.
+
+
+
+
+ The ID of the evaluation that produced this ProjectInstance.
+
+ See .
+
+
+
+
+ The project's root directory, for evaluation of relative paths and
+ setting the current directory during build.
+ Is never null: projects not loaded from disk use the current directory from
+ the time the build started.
+
+
+
+
+ The full path to the project, for logging.
+ If the project was never given a path, returns empty string.
+
+
+
+
+ Read-only dictionary of item definitions in this project.
+ Keyed by item type
+
+
+
+
+ The full file paths of all the files that during evaluation contributed to this project instance.
+ This does not include projects that were never imported because a condition on an Import element was false.
+ The outer ProjectRootElement that maps to this project instance itself is not included.
+
+
+
+
+ This list will contain duplicate imports if an import is imported multiple times. However, only the first import was used in evaluation.
+
+
+
+
+ DefaultTargets specified in the project, or
+ the logically first target if no DefaultTargets is
+ specified in the project.
+ The build builds these if no targets are explicitly specified
+ to build.
+
+
+
+
+ InitialTargets specified in the project, plus those
+ in all imports, gathered depth-first.
+ The build runs these before anything else.
+
+
+
+
+ Targets in the project. The build process can find one by looking for its name
+ in the dictionary.
+ This collection is read-only.
+
+
+
+
+ Whether the instance is immutable.
+ This is set permanently when the instance is created.
+
+
+
+
+ Task classes and locations known to this project.
+ This is the project-specific task registry, which is consulted before
+ the toolset's task registry.
+ Only set during evaluation, so does not check for immutability.
+
+
+
+
+ Gets the Toolset
+
+
+
+
+ The sub-toolset version we should use during the build, used to determine which set of sub-toolset
+ properties we should merge into this toolset.
+
+
+
+
+ The externally specified tools version, if any.
+ For example, the tools version from a /tv switch.
+ Not necessarily the same as the tools version from the project tag or of the toolset used.
+ May be null.
+ Flows through to called projects.
+
+
+
+
+ Gets the global properties
+
+
+
+
+ List of names of the properties that, while global, are still treated as overridable
+
+
+
+
+ Gets the properties
+
+
+
+
+ Gets the item definitions
+
+
+
+
+ Gets the items
+
+
+
+
+ Sets the initial targets
+ Only set during evaluation, so does not check for immutability.
+
+
+
+
+ Gets or sets the default targets
+ Only set during evaluation, so does not check for immutability.
+
+
+
+
+ Gets or sets the before targets
+ Only set during evaluation, so does not check for immutability.
+
+
+
+
+ Gets or sets the after targets
+ Only set during evaluation, so does not check for immutability.
+
+
+
+
+ List of possible values for properties inferred from certain conditions,
+ keyed by the property name.
+
+
+ Because ShouldEvaluateForDesignTime returns false, this should not be called.
+
+
+
+
+ Whether evaluation should collect items ignoring condition,
+ as well as items respecting condition; and collect
+ conditioned properties, as well as regular properties
+
+
+
+
+ Location of the originating file itself, not any specific content within it.
+ Never returns null, even if the file has not got a path yet.
+
+
+
+
+ Gets the global properties this project was evaluated with, if any.
+ Traverses project references.
+
+
+
+
+ The tools version we should use during the build, used to determine which toolset we should access.
+
+
+
+
+ If we are treating a missing toolset as the current ToolsVersion
+
+
+
+
+ The toolsversion that was originally specified on the project's root element
+
+
+
+
+ The externally specified tools version, if any.
+ For example, the tools version from a /tv switch.
+ Not necessarily the same as the tools version from the project tag or of the toolset used.
+ May be null.
+ Flows through to called projects.
+
+
+
+
+ Whether the tools version used originated from an explicit specification,
+ for example from an MSBuild task or /tv switch.
+
+
+
+
+ The sub-toolset version we should use during the build, used to determine which set of sub-toolset
+ properties we should merge into this toolset.
+
+
+
+
+ Actual collection of properties in this project,
+ for the build to start with.
+
+
+
+
+ Actual collection of items in this project,
+ for the build to start with.
+
+
+
+
+ Task classes and locations known to this project.
+ This is the project-specific task registry, which is consulted before
+ the toolset's task registry.
+
+
+ UsingTask tags have already been evaluated and entered into this task registry.
+
+
+
+
+ Number of targets in the project.
+
+
+
+
+ The project root element cache from the project collection
+ that began the build. This is a thread-safe object.
+ It's held here so it can get passed to the build.
+
+
+
+
+ Returns the evaluated, escaped value of the provided item's include.
+
+
+
+
+ Returns the evaluated, escaped value of the provided item definition's include.
+
+
+
+
+ Gets the escaped value of the provided metadatum.
+
+
+
+
+ Gets the escaped value of the metadatum with the provided name on the provided item.
+
+
+
+
+ Gets the escaped value of the metadatum with the provided name on the provided item definition.
+
+
+
+
+ Get the escaped value of the provided property
+
+
+
+
+ Gets items of the specified type.
+ For internal use.
+
+
+ Already a readonly collection
+
+
+
+
+ Initializes the object for evaluation.
+ Only called during evaluation, so does not check for immutability.
+
+
+
+
+ Indicates to the data block that evaluation has completed,
+ so for example it can mark datastructures read-only.
+
+
+
+
+ Adds a new item
+ Only called during evaluation, so does not check for immutability.
+
+
+
+
+ Adds a new item to the collection of all items ignoring condition
+
+
+ Because ShouldEvaluateForDesignTime returns false, this should not be called.
+
+
+
+
+ Adds a new item definition
+ Only called during evaluation, so does not check for immutability.
+
+
+
+
+ Properties encountered during evaluation. These are read during the first evaluation pass.
+ Unlike those returned by the Properties property, these are ordered, and include any properties that
+ were subsequently overridden by others with the same name. It does not include any
+ properties whose conditions did not evaluate to true.
+
+
+ Because ShouldEvaluateForDesignTime returns false, this should not be called.
+
+
+
+
+ Item definition metadata encountered during evaluation. These are read during the second evaluation pass.
+ Unlike those returned by the ItemDefinitions property, these are ordered, and include any metadata that
+ were subsequently overridden by others with the same name and item type. It does not include any
+ elements whose conditions did not evaluate to true.
+
+
+ Because ShouldEvaluateForDesignTime returns false, this should not be called.
+
+
+
+
+ Items encountered during evaluation. These are read during the third evaluation pass.
+ Unlike those returned by the Items property, these are ordered.
+ It does not include any elements whose conditions did not evaluate to true.
+ It does not include any items added since the last evaluation.
+
+
+ Because ShouldEvaluateForDesignTime returns false, this should not be called.
+
+
+
+
+ Retrieves an existing item definition, if any.
+
+
+
+
+ Sets a property which does not come from the Xml.
+ This is where global, environment, and toolset properties are added to the project instance by the evaluator, and we mark them
+ immutable if we are immutable.
+ Only called during evaluation, so does not check for immutability.
+
+
+
+
+ Sets a property which comes from the Xml.
+ Predecessor is discarded as it is a design time only artefact.
+ Only called during evaluation, so does not check for immutability.
+
+
+
+
+ Retrieves an existing target, if any.
+
+
+
+
+ Adds a new target.
+ Only called during evaluation, so does not check for immutability.
+
+
+
+
+ Record an import opened during evaluation.
+
+
+
+
+ Record an import opened during evaluation. Include duplicates
+
+
+
+
+ Get any property in the item that has the specified name,
+ otherwise returns null
+
+
+
+
+ Get any property in the item that has the specified name,
+ otherwise returns null.
+ Name is the segment of the provided string with the provided start and end indexes.
+
+
+
+
+ Get the value of a property in this project, or
+ an empty string if it does not exist.
+
+
+ A property with a value of empty string and no property
+ at all are not distinguished between by this method.
+ This is because the build does not distinguish between the two.
+ The reason this method exists when users can simply do GetProperty(..).EvaluatedValue,
+ is that the caller would have to check for null every time. For properties, empty and undefined are
+ not distinguished, so it much more useful to also have a method that returns empty string in
+ either case.
+ This function returns the unescaped value.
+
+
+
+
+ Add a property with the specified name and value.
+ Overwrites any property with the same name already in the collection.
+
+
+ We don't take a ProjectPropertyInstance to make sure we don't have one that's already
+ in use by another ProjectPropertyInstance.
+
+
+
+
+ Adds an item with no metadata to the project
+
+
+ We don't take a ProjectItemInstance to make sure we don't have one that's already
+ in use by another ProjectInstance.
+
+
+ For purposes of declaring the project that defined this item (for use with e.g. the
+ DeclaringProject* metadata), the entrypoint project is used for synthesized items
+ like those added by this API.
+
+
+
+
+ Adds an item with metadata to the project.
+ Metadata may be null.
+
+
+ We don't take a ProjectItemInstance to make sure we don't have one that's already
+ in use by another ProjectInstance.
+
+
+ For purposes of declaring the project that defined this item (for use with e.g. the
+ DeclaringProject* metadata), the entrypoint project is used for synthesized items
+ like those added by this API.
+
+
+
+
+ Get a list of all the items in the project of the specified
+ type, or an empty list if there are none.
+ This is a read-only list.
+
+
+
+
+ get items by item type and evaluated include value
+
+
+
+
+ Removes an item from the project, if present.
+ Returns true if it was present, false otherwise.
+
+
+
+
+ Removes any property with the specified name.
+ Returns true if the property had a value (possibly empty string), otherwise false.
+
+
+
+
+ Create an independent, deep clone of this object and everything in it.
+ Useful for compiling a single file; or for keeping build results between builds.
+ Clone has the same mutability as the original.
+
+
+
+
+ Create an independent clone of this object, keeping ONLY the explicitly
+ requested project state.
+
+
+ Useful for reducing the wire cost of IPC for out-of-proc nodes used during
+ design-time builds that only need to populate a known set of data.
+
+ Project state that should be returned.
+
+
+
+
+ Create an independent, deep clone of this object and everything in it, with
+ specified mutability.
+ Useful for compiling a single file; or for keeping build results between builds.
+
+
+
+
+ Build default target/s with loggers of the project collection.
+ Returns true on success, false on failure.
+ Only valid if mutable.
+
+
+
+
+ Build default target/s with specified loggers.
+ Returns true on success, false on failure.
+ Loggers may be null.
+ Only valid if mutable.
+
+
+ If any of the loggers supplied are already attached to the logging service we
+ were passed, throws InvalidOperationException.
+
+
+
+
+ Build default target/s with specified loggers.
+ Returns true on success, false on failure.
+ Loggers may be null.
+ Only valid if mutable.
+
+
+ If any of the loggers supplied are already attached to the logging service we
+ were passed, throws InvalidOperationException.
+
+
+
+
+ Build a target with specified loggers.
+ Returns true on success, false on failure.
+ Target may be null.
+ Loggers may be null.
+ Only valid if mutable.
+
+
+ If any of the loggers supplied are already attached to the logging service we
+ were passed, throws InvalidOperationException.
+
+
+
+
+ Build a target with specified loggers.
+ Returns true on success, false on failure.
+ Target may be null.
+ Loggers may be null.
+ Remote loggers may be null.
+ Only valid if mutable.
+
+
+ If any of the loggers supplied are already attached to the logging service we
+ were passed, throws InvalidOperationException.
+
+
+
+
+ Build a list of targets with specified loggers.
+ Returns true on success, false on failure.
+ Targets may be null.
+ Loggers may be null.
+ Only valid if mutable.
+
+
+ If any of the loggers supplied are already attached to the logging service we
+ were passed, throws InvalidOperationException.
+
+
+
+
+ Build a list of targets with specified loggers.
+ Returns true on success, false on failure.
+ Targets may be null.
+ Loggers may be null.
+ Remote loggers may be null.
+ Only valid if mutable.
+
+
+ If any of the loggers supplied are already attached to the logging service we
+ were passed, throws InvalidOperationException.
+
+
+
+
+ Build a list of targets with specified loggers.
+ Returns true on success, false on failure.
+ Targets may be null.
+ Loggers may be null.
+ Only valid if mutable.
+
+
+ If any of the loggers supplied are already attached to the logging service we
+ were passed, throws InvalidOperationException.
+
+
+
+
+ Build a list of targets with specified loggers.
+ Returns true on success, false on failure.
+ Targets may be null.
+ Loggers may be null.
+ Remote loggers may be null.
+ Only valid if mutable.
+
+
+ If any of the loggers supplied are already attached to the logging service we
+ were passed, throws InvalidOperationException.
+
+
+
+
+ Evaluates the provided string by expanding items and properties,
+ using the current items and properties available.
+ This is useful for some hosts, or for the debugger immediate window.
+ Does not expand bare metadata expressions.
+
+
+ Not for internal use.
+
+
+
+
+ Evaluates the provided string as a condition by expanding items and properties,
+ using the current items and properties available, then doing a logical evaluation.
+ This is useful for the immediate window.
+ Does not expand bare metadata expressions.
+
+
+ Not for internal use.
+
+
+
+
+ Creates a ProjectRootElement from the contents of this ProjectInstance.
+
+ A ProjectRootElement which represents this instance.
+
+
+
+ Replaces the project state (, and ) with that
+ from the provided.
+
+ with the state to use.
+
+
+
+ When project instances get serialized between nodes, they need to be initialized with node specific information.
+ The node specific information cannot come from the constructor, because that information is not available to INodePacketTranslators
+
+
+
+
+ Translate the project instance to or from a stream.
+ Only translates global properties, properties, items, and mutability.
+
+
+
+
+ Creates a set of project instances which represent the project dependency graph for a solution build.
+
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Throws invalid operation exception if the project instance is immutable.
+ Called before an edit.
+
+
+
+
+ Builds a list of targets with the specified loggers.
+
+
+
+
+ Builds a list of targets with the specified loggers.
+
+
+
+
+ Retrieves the list of targets which should run before the specified target.
+ Never returns null.
+
+
+
+
+ Retrieves the list of targets which should run after the specified target.
+ Never returns null.
+
+
+
+
+ Cache the contents of this project instance to the translator.
+ The object is retained, but the bulk of its content is released.
+
+
+
+
+ Retrieve the contents of this project from the translator.
+
+
+
+
+ Adds the specified target to the instance.
+
+
+
+
+ Removes the specified target from the instance.
+
+
+
+
+ Throws invalid operation exception if the project instance is immutable.
+ Called before an edit.
+
+
+
+
+ Generate a 4.0+-style solution wrapper project.
+
+ The solution file to generate a wrapper for.
+ The global properties of this solution.
+ The ToolsVersion to use when generating the wrapper.
+ The logging service used to log messages etc. from the solution wrapper generator.
+ The build event context in which this project is being constructed.
+ A collection of target names that the user requested be built.
+
+
+ The ProjectRootElement for the root traversal and each of the metaprojects.
+
+
+
+ Spawn the old engine to generate a solution wrapper project, so that our build ordering is somewhat more correct
+ when solutions with toolsVersions < 4.0 are passed to us.
+
+
+ #############################################################################################
+ #### Segregated into another method to avoid loading the old Engine in the regular case. ####
+ ####################### Do not move back in to the main code path! ##########################
+ #############################################################################################
+ We have marked this method as NoInlining because we do not want Microsoft.Build.Engine.dll to be loaded unless we really execute this code path
+
+ The solution file to generate a wrapper for.
+ The global properties of this solution.
+ The ToolsVersion to use when generating the wrapper.
+ The root element cache which should be used for the generated project.
+ The build parameters.
+ The logging service used to log messages etc. from the solution wrapper generator.
+ The build event context in which this project is being constructed.
+ true if the project is explicitly loaded, otherwise false.
+ An to use when resolving SDKs.
+
+ An appropriate ProjectRootElement
+
+
+
+ Creates a copy of a dictionary and returns a read-only dictionary around the results.
+
+ The value stored in the dictionary
+ Dictionary to clone.
+ The to use for the cloned dictionary.
+
+
+
+ Creates a copy of a dictionary and returns a read-only dictionary around the results.
+
+ The value stored in the dictionary
+ Dictionary to clone.
+
+
+
+ Common code for the constructors that evaluate directly.
+ Global properties may be null.
+ Tools version may be null.
+ Does not set mutability.
+
+
+
+
+ Get items by evaluatedInclude value
+
+
+
+
+ Create various target snapshots
+
+
+
+
+ Create various imports snapshots
+
+
+
+
+ Create environment variable properties snapshot
+
+
+
+
+ Create global properties snapshot
+
+
+
+
+ Create evaluated include cache snapshot
+
+
+
+
+ Create Items snapshot
+
+
+
+
+ Create ItemDefinitions snapshot
+
+
+
+
+ create property snapshot
+
+
+
+
+ An evaluated item definition for a particular item-type, divested of all references to XML.
+ Immutable.
+
+
+
+
+ Item type, for example "Compile", that this item definition applies to
+
+
+
+
+ Collection of metadata that link the XML metadata and instance metadata
+ Since evaluation has occurred, this is an unordered collection.
+ Is never null or empty.
+
+
+
+
+ Constructs an empty project item definition instance.
+
+ The type of item this definition object represents.
+
+
+
+ Called when a ProjectInstance is created.
+
+
+ Assumes that the itemType string originated in a ProjectItemDefinitionElement and therefore
+ was already validated.
+
+
+
+
+ Type of this item definition.
+
+
+
+
+ Metadata on the item definition.
+ If there is no metadata, returns empty collection.
+ This is a read-only collection.
+
+
+
+
+ Number of pieces of metadata on this item definition.
+
+
+
+
+ Names of all metadata on this item definition
+
+
+
+
+ Implementation of IKeyed exposing the item type, so these
+ can be put in a dictionary conveniently.
+
+
+
+
+ Get any metadata in the item that has the specified name,
+ otherwise returns null
+
+
+
+
+ Returns the specified metadata.
+
+ The metadata name.
+ The metadata value, or an empty string if none exists.
+
+
+
+ Returns the metadata for the specified item type.
+
+ The item type.
+ The metadata name.
+ The metadata value, or an empty string if none exists.
+
+
+
+ Returns the metadata for the specified item type.
+
+ The item type.
+ The metadata name.
+ The metadata value, or an null if none exists.
+
+
+
+ Sets a new metadata value. Called by the evaluator only.
+ Discards predecessor as this information is only useful at design time.
+
+
+
+
+ Creates a ProjectItemDefinitionElement representing this instance.
+
+
+
+
+ Wraps an unevaluated itemgroup under a target.
+ Immutable.
+
+
+
+
+ Condition, if any
+
+
+
+
+ Child items.
+ Not ProjectItemInstances, as these are evaluated during the build.
+
+
+
+
+ Location of this element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Constructor called by the Evaluator.
+ Assumes ProjectItemGroupTaskItemInstance is an immutable type.
+
+
+
+
+ Cloning constructor
+
+
+
+
+ Condition, if any.
+ May be empty string.
+
+
+
+
+ Child items
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Deep clone
+
+
+
+
+ Wraps an unevaluated item under an itemgroup in a target.
+ Immutable.
+
+
+
+
+ Item type, for example "Compile"
+
+
+
+
+ Unevaluated include
+
+
+
+
+ Unevaluated exclude
+
+
+
+
+ Unevaluated remove
+
+
+
+
+ The list of metadata Remove should match on.
+
+
+
+
+ The options for MatchOnMetadata.
+
+
+
+
+ The list of metadata to keep.
+
+
+
+
+ The list of metadata to remove.
+
+
+
+
+ True to remove duplicates during the add.
+
+
+
+
+ Unevaluated condition
+
+
+
+
+ Location of this element
+
+
+
+
+ Location of the include, if any.
+
+
+
+
+ Location of the exclude, if any.
+
+
+
+
+ Location of the remove, if any.
+
+
+
+
+ Location of matchOnMetadata, if any.
+
+
+
+
+ Location of metadataMatchingSchema, if any.
+
+
+
+
+ Location of keepMetadata, if any.
+
+
+
+
+ Location of removeMetadata, if any.
+
+
+
+
+ Location of keepDuplicates, if any.
+
+
+
+
+ Location of the condition, if any.
+
+
+
+
+ Ordered collection of unevaluated metadata.
+ May be null.
+
+
+ There is no need for a PropertyDictionary here as the build always
+ walks through all metadata sequentially.
+ Lazily created, as so many items have no metadata at all.
+
+
+
+
+ Constructor called by the Evaluator.
+ Metadata may be null, indicating no metadata.
+ Metadata collection is ordered.
+ Assumes ProjectItemGroupTaskMetadataInstance is an immutable type.
+
+
+
+
+ Cloning constructor
+
+
+
+
+ Item type, for example "Compile"
+
+
+
+
+ Unevaluated include value
+
+
+
+
+ Unevaluated exclude value
+
+
+
+
+ Unevaluated remove value
+
+
+
+
+ Unevaluated MatchOnMetadata value.
+
+
+
+
+ Unevaluated MatchOnMetadataOptions value.
+
+
+
+
+ Unevaluated keepMetadata value.
+
+
+
+
+ Unevaluated removeMetadata value.
+
+
+
+
+ Unevaluated keepDuplicates value.
+
+
+
+
+ Unevaluated condition value.
+
+
+
+
+ Ordered collection of unevaluated metadata on the item.
+ If there is no metadata, returns an empty collection.
+ IEnumerable
+
+
+
+ Location of the element.
+
+
+
+
+ Location of the include attribute, if any.
+
+
+
+
+ Location of the exclude attribute, if any.
+
+
+
+
+ Location of the remove attribute, if any.
+
+
+
+
+ Location of the matchOnMetadata attribute, if any.
+
+
+
+
+ Location of the matchOnMetadataOptions attribute, if any.
+
+
+
+
+ Location of the keepMetadata attribute, if any.
+
+
+
+
+ Location of the removeMetadata attribute, if any.
+
+
+
+
+ Location of the keepDuplicates attribute, if any.
+
+
+
+
+ Location of the condition attribute if any.
+
+
+
+
+ Deep clone
+
+
+
+
+ Wraps an unevaluated metadatum under an item in an itemgroup in a target
+ Immutable.
+
+
+
+
+ Name of the metadatum
+
+
+
+
+ Unevaluated value
+
+
+
+
+ Unevaluated condition
+
+
+
+
+ Location of this element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Constructor called by the Evaluator.
+
+
+
+
+ Cloning constructor
+
+
+
+
+ Name of the metadatum
+
+
+
+
+ Unevaluated value
+
+
+
+
+ Unevaluated condition value
+
+
+
+
+ Location of the element
+
+
+
+
+ Location of the condition attribute if any
+
+
+
+
+ Deep clone
+
+
+
+
+ Wraps an evaluated item for build purposes
+
+
+ Does not store XML location information. That is not needed by the build process as all correctness checks
+ and evaluation has already been performed, so it is unnecessary bulk.
+
+
+
+
+ The project instance to which this item belongs.
+ Never null.
+
+
+
+
+ Item type, for example "Compile"
+ Never null.
+
+
+
+
+ Backing task item holding the other data.
+ Never null.
+
+
+
+
+ Constructor for items with no metadata.
+ Include may be empty.
+ Called before the build when virtual items are added,
+ and during the build when tasks emit items.
+ Mutability follows the project.
+
+
+
+
+ Constructor for items with no metadata.
+ Include may be empty.
+ Called before the build when virtual items are added,
+ and during the build when tasks emit items.
+ Mutability follows the project.
+
+
+
+
+ Constructor for items with metadata.
+ Called before the build when virtual items are added,
+ and during the build when tasks emit items.
+ Include may be empty.
+ Direct metadata may be null, indicating no metadata. It will be cloned.
+ Builtin metadata may be null, indicating it has not been populated. It will be cloned.
+ Inherited item definition metadata may be null. It is assumed to ALREADY HAVE BEEN CLONED.
+ Mutability follows the project.
+
+
+ Not public since the only creation scenario is setting on a project.
+
+
+
+
+ Constructor for items with metadata.
+ Called when a ProjectInstance is created.
+ Include may be empty.
+ Direct metadata may be null, indicating no metadata. It will be cloned.
+ Metadata collection provided is cloned.
+ Mutability follows the project.
+
+
+ Not public since the only creation scenario is setting on a project.
+
+
+
+
+ Cloning constructor, retaining same parentage.
+
+
+
+
+ Cloning constructor.
+
+
+
+
+ Constructor for serialization
+
+
+
+
+ Owning project
+
+
+
+
+ Item type, for example "Compile"
+
+
+ This cannot be set, as it is used as the key into
+ the project's items table.
+
+
+
+
+ Evaluated include value.
+ May be empty string.
+
+
+
+
+ Evaluated include value, escaped as necessary.
+ May be empty string.
+
+
+
+
+ Evaluated include value, escaped as necessary.
+ May be empty string.
+
+
+
+
+ Unordered collection of evaluated metadata on the item.
+ If there is no metadata, returns an empty collection.
+ Does not include built-in metadata.
+ Includes any from item definitions.
+ This is a read-only collection. To modify the metadata, use .
+
+
+ Computed, not necessarily fast.
+
+
+
+
+ Number of pieces of metadata on this item
+
+
+
+
+ Implementation of IKeyed exposing the item type
+
+
+
+
+ Returns all the metadata names on this item.
+ Includes names from any applicable item definitions.
+ Includes names of built-in metadata.
+
+
+ Computed, not necessarily fast.
+
+
+
+
+ ITaskItem implementation
+
+
+
+
+ ITaskItem implementation
+
+
+ Computed, not necessarily fast.
+
+
+
+
+ Returns the number of metadata entries.
+ Includes any from applicable item definitions.
+ Includes both custom and built-in metadata.
+
+
+ Computed, not necessarily fast.
+
+
+
+
+ The directory of the project being built
+ Never null: If there is no project filename yet, it will use the current directory
+
+
+
+
+ Retrieves the comparer used for determining equality between ProjectItemInstances.
+
+
+
+
+ The full path to the project file being built
+ Can be null: if the project hasn't been saved yet it will be null
+
+
+
+
+ Get any metadata in the item that has the specified name,
+ otherwise returns null.
+ Includes any metadata inherited from item definitions.
+ Includes any built-in metadata.
+
+
+
+
+ Get the value of a metadata on this item, or
+ String.Empty if it does not exist or has no value.
+ Includes any metadata inherited from item definitions and any built-in metadata.
+ To determine whether a piece of metadata is actually present
+ but with an empty value, use HasMetadata.
+
+
+
+
+ Returns true if a particular piece of metadata is defined on this item (even if
+ its value is empty string) otherwise false.
+ This includes built-in metadata and metadata from item definitions.
+
+
+ It has to include all of these because it's used for batching, which doesn't
+ care where the metadata originated.
+
+
+
+
+ Add a metadata with the specified name and value.
+ Overwrites any metadata with the same name already in the collection.
+
+
+
+
+ Add a metadata with the specified names and values.
+ Overwrites any metadata with the same name already in the collection.
+
+
+
+
+ Removes a metadatum with the specified name.
+ Used by TaskItem
+
+
+
+
+ Produce a string representation.
+
+
+
+
+ Get the value of a metadata on this item, or
+ String.Empty if it does not exist or has no value.
+ Includes any metadata inherited from item definitions and any built-in metadata.
+ To determine whether a piece of metadata is actually present
+ but with an empty value, use HasMetadata.
+
+
+
+
+ Sets the specified metadata. Discards the xml part except for the name.
+ Discards the location of the original element. This is not interesting in the Execution world
+ as it should never be needed for any messages, and is just extra bulk.
+ Predecessor is discarded as it is only needed for design time.
+
+
+
+
+ ITaskItem implementation.
+
+
+ ITaskItem should not return null if metadata is not present.
+
+
+
+
+ ITaskItem2 implementation.
+
+
+ ITaskItem2 should not return null if metadata is not present.
+
+
+
+
+ ITaskItem implementation
+
+
+ MetadataValue is assumed to be in its escaped form.
+
+
+
+
+ ITaskItem2 implementation
+
+
+ Assumes metadataValue is unescaped.
+
+
+
+
+ ITaskItem implementation
+
+
+
+
+ ITaskItem implementation
+
+
+ Returns a dictionary of the UNESCAPED values of the metadata
+
+
+
+
+ ITaskItem2 implementation
+
+
+ Returns a dictionary of the ESCAPED values of the metadata
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name specified.
+ If no value is available, returns empty string.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name and item type specified.
+ If no value is available, returns empty string.
+ If item type is null, it is ignored, otherwise it must match.
+
+
+
+
+ Returns the value if it exists.
+ If no value is available, returns null.
+ If item type is null, it is ignored, otherwise it must match.
+
+
+
+
+ Translation method.
+
+
+
+
+ Set all the supplied metadata on all the supplied items.
+
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Add a metadata with the specified names and values.
+ Overwrites any metadata with the same name already in the collection.
+
+
+
+
+ Sets metadata where one built-in metadata is allowed to be set: RecursiveDir.
+ This is not normally legal to set outside of evaluation. However, the CreateItem
+ needs to be able to set it as a task output, because it supports wildcards. So as a special exception we allow
+ tasks to set this particular metadata as a task output.
+ Other built in metadata names are ignored. That's because often task outputs are items that were passed in,
+ which legally have built-in metadata. If necessary we can calculate it on the new items we're making if requested.
+ We don't copy them too because tasks shouldn't set them (they might become inconsistent)
+
+
+
+
+ Deep clone the item.
+ Any metadata inherited from item definitions are also copied.
+
+
+
+
+ Deep clone the item.
+ Any metadata inherited from item definitions are also copied.
+
+
+
+
+ Generates a ProjectItemElement representing this instance.
+
+ The root element to which the element will belong.
+ The new element.
+
+
+
+ Common constructor code.
+ Direct metadata may be null, indicating no metadata. It will be cloned.
+ Builtin metadata may be null, indicating it has not been populated. It will be cloned.
+ Inherited item definition metadata may be null. It is assumed to ALREADY HAVE BEEN CLONED.
+ Mutability follows the project.
+
+
+
+
+ An item without an item type. Cast to an ITaskItem, this is
+ what is given to tasks. It is also used for target outputs.
+
+
+
+
+ The source file that defined this item.
+
+
+
+
+ Evaluated include, escaped as necessary.
+
+
+
+
+ The evaluated (escaped) include prior to wildcard expansion. Used to determine the
+ RecursiveDir build-in metadata value.
+
+
+
+
+ Evaluated metadata.
+ May be null.
+
+
+ Lazily created, as there are huge numbers of items generated in
+ a build that have no metadata at all.
+
+
+
+
+ Cached value of the fullpath metadata. All other metadata are computed on demand.
+
+
+
+
+ All the item definitions that apply to this item, in order of
+ decreasing precedence. At the bottom will be an item definition
+ that directly applies to the item type that produced this item. The others will
+ be item definitions inherited from items that were
+ used to create this item.
+
+
+
+
+ Directory of the associated project. If this is available,
+ it is used to calculate built-in metadata. Otherwise,
+ the current directory is used.
+
+
+
+
+ Whether the task item is immutable.
+
+
+
+
+ Creates an instance of this class given the item-spec.
+
+
+
+
+ Creates an instance of this class given the item-spec and a built-in metadata collection.
+ Parameters are assumed to be ALREADY CLONED.
+
+
+
+
+ Creates a task item by copying the information from a .
+ Parameters are cloned.
+
+
+
+
+ Creates an instance of this class given the backing item.
+ Does not copy immutability, since there is no connection with the original.
+
+
+
+
+ Private constructor used for serialization.
+
+
+
+
+ Private constructor used for serialization.
+
+
+
+
+ Gets or sets the unescaped include, or "name", for the item.
+
+
+ This one is a bit tricky. Orcas assumed that the value being set was escaped, but
+ that the value being returned was unescaped. Maintain that behaviour here. To get
+ the escaped value, use ITaskItem2.EvaluatedIncludeEscaped.
+
+
+
+
+ Gets or sets the escaped include, or "name", for the item.
+
+
+ Taking the opportunity to fix the property name, although this doesn't
+ make it obvious it's an improvement on ItemSpec.
+
+
+
+
+ Gets the names of metadata on the item.
+ Includes all built-in metadata.
+ Computed, not necessarily fast.
+
+
+
+
+ Gets the number of metadata set on the item.
+ Computed, not necessarily fast.
+
+
+
+
+ Gets the evaluated include for this item, unescaped.
+
+
+
+
+ Gets the evaluated include for this item, escaped.
+
+
+
+
+ The directory of the project owning this TaskItem.
+ May be null if this is not well defined.
+
+
+
+
+ Returns some value useful for a key in a dictionary
+
+
+
+
+ The escaped include for this item
+
+
+
+
+ The value of the include after evaluation but before wildcard expansion.
+ Used to determine %(RecursiveDir)
+
+
+
+
+ Number of pieces of metadata directly on this item
+
+
+
+
+ Efficient way to retrieve metadata used by packet serialization
+ and binary logger.
+
+
+
+
+ Sets the given metadata.
+ Equivalent to calling for each item in .
+
+ The metadata to set.
+
+
+
+ Used to return metadata from another AppDomain. Can't use yield return because the
+ generated state machine is not marked as [Serializable], so we need to allocate.
+
+ The source list to return metadata from.
+ An array of string key-value pairs representing metadata.
+
+
+
+ Unordered collection of evaluated metadata on the item.
+ If there is no metadata, returns an empty collection.
+ Does not include built-in metadata.
+ Includes any from item definitions not masked by directly set metadata.
+ This is a read-only collection. To modify the metadata, use .
+ Computed, not necessarily fast.
+
+
+
+
+ This allows an explicit typecast from a "TaskItem" to a "string", returning the ItemSpec for this item.
+
+
+
+
+ The equivalence operator.
+
+ The left hand operand.
+ The right hand operand.
+ True if the items are equivalent, false otherwise.
+
+
+
+ The non-equivalence operator.
+
+ The left hand operand.
+ The right hand operand.
+ False if the items are equivalent, true otherwise.
+
+
+
+ Produce a string representation.
+
+
+
+
+ Overridden to give this class infinite lease time. Otherwise we end up with a limited
+ lease (5 minutes I think) and instances can expire if they take long time processing.
+
+
+
+
+ Returns the metadata with the specified key.
+
+
+
+
+ Returns the escaped value of the metadata with the specified key.
+
+
+
+
+ Returns the escaped value of the metadata with the specified key.
+
+
+
+
+ Gets any existing ProjectMetadata on the item, or
+ else any on an applicable item definition.
+ This is ONLY called during evaluation.
+
+
+ Evaluation never creates ITaskItems, so this should never be called.
+
+
+
+
+ Set metadata
+
+
+
+
+ ITaskItem implementation which returns the specified metadata value, unescaped.
+ If metadata is not defined, returns empty string.
+
+
+
+
+ Returns the specified metadata value, escaped.
+ If metadata is not defined, returns empty string.
+
+
+
+
+ ITaskItem implementation which sets metadata.
+
+
+ The value is assumed to be escaped.
+
+
+
+
+ ITaskItem2 implementation which sets the literal value of metadata -- it is escaped
+ internally as necessary.
+
+
+
+
+ ITaskItem implementation which removed the named piece of metadata.
+ If the metadata is not present, does nothing.
+
+
+
+
+ ITaskItem implementation which copies the metadata on this item to the specified item.
+ Does not copy built-in metadata, and will not overwrite existing, non-empty metadata.
+ If the destination implements ITaskItem2, this avoids losing the escaped nature of values.
+
+
+
+
+ ITaskItem implementation which copies the metadata on this item to the specified item.
+ Copies direct and item definition metadata.
+ Does not copy built-in metadata, and will not overwrite existing, non-empty metadata.
+ If the destination implements ITaskItem2, this avoids losing the escaped nature of values.
+
+ When copying metadata to a task item which can be accessed from a task (Utilities task item)
+ this method will merge and expand any metadata originating with item definitions.
+
+ destination item to copy the metadata from this to
+ Whether the OriginalItemSpec should be added as a piece
+ of magic metadata. For copying of items this is useful but for cloning of items this adds
+ additional metadata which is not useful because the OriginalItemSpec will always be identical
+ to the ItemSpec, and the addition will and will cause copy-on-write to trigger.
+
+
+
+
+ ITaskItem implementation which returns a clone of the metadata on this object.
+ Values returned are unescaped. To get the original escaped values, use ITaskItem2.CloneCustomMetadataEscaped instead.
+
+ The cloned metadata.
+
+
+
+ ITaskItem2 implementation which returns a clone of the metadata on this object.
+ Values returned are in their original escaped form.
+
+ The cloned metadata.
+
+
+
+ Reads or writes the packet to the serializer.
+ Built-in metadata is not transmitted, but other metadata is.
+ Does not lose escaped nature.
+
+
+
+
+ Override of GetHashCode.
+
+
+
+
+ Override of Equals
+
+
+
+
+ Test for item equivalence. Items are equivalent if their item specs are the same,
+ and they have the same custom metadata, case insensitive.
+
+
+ The metadata value check has to be case insensitive as batching bucketing is case
+ insensitive.
+
+ The item against which to compare.
+ True if the items are equivalent, false otherwise.
+
+
+
+ Returns true if a particular piece of metadata is defined on this item (even if
+ its value is empty string) otherwise false.
+ This includes built-in metadata and metadata from item definitions.
+
+
+ It has to include all of these because it's used for batching, which doesn't
+ care where the metadata originated.
+
+
+
+
+ Add a metadata with the specified names and values.
+ Overwrites any metadata with the same name already in the collection.
+
+
+ Assumes that metadataDictionary contains escaped values
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ Reads or writes the task item to the translator using an interner for metadata.
+
+
+
+
+ Gets any metadata with the specified name.
+ Does not include built-in metadata.
+
+
+
+
+ Add a metadata with the specified name and value.
+ Overwrites any metadata with the same name already in the collection.
+
+
+
+
+ Add a metadata with the specified name and value.
+ Overwrites any metadata with the same name already in the collection.
+ Does not allow built-in metadata unless allowItemSpecModifiers is set.
+
+
+
+
+ Sets metadata where one built-in metadata is allowed to be set: RecursiveDir.
+ This is not normally legal to set outside of evaluation. However, the CreateItem
+ needs to be able to set it as a task output, because it supports wildcards. So as a special exception we allow
+ tasks to set this particular metadata as a task output.
+ Other built in metadata names are ignored. That's because often task outputs are items that were passed in,
+ which legally have built-in metadata. If necessary we can calculate it on the new items we're making if requested.
+ We don't copy them too because tasks shouldn't set them (they might become inconsistent)
+
+
+
+
+ Deep clone this into another TaskItem
+
+
+
+
+ Deep clone this into another TaskItem
+
+
+
+
+ Helper to get the value of a built-in metadatum with
+ the specified name, if any.
+ If value is not available, returns empty string.
+
+
+
+
+ Retrieves the named metadata from the item definition, if any.
+ If it is not present, returns null.
+
+
+
+
+ A class factory for instance model items.
+
+
+
+
+ The project to which item instances created by this factory will belong.
+
+
+
+
+ Constructor not taking an item type.
+ This indicates that the user of this factory should set the item type
+ on it before using it to create items.
+
+
+
+
+ Constructor taking the itemtype for the generated items.
+
+
+
+
+ The item type that generated items should have
+
+
+
+
+ Sets the item type via the item xml.
+ Used by the evaluator only.
+
+
+
+
+ Creates an instance-model item.
+
+ The include.
+ The project that defined the item.
+ A new instance item.
+
+
+
+ Create a ProjectItemInstance, changing the item type but keeping the include.
+ This is to support the scenario Include="@(i)" where we are copying
+ metadata.
+
+
+
+
+ Create a ProjectItemInstance, changing the item type and include but retaining the
+ metadata of the original item.
+ This is to support this scenario: Include="@(i->'xxx')"
+
+
+
+
+ Create a new item from the specified include and include before wildcard expansion.
+ This is to support the scenario Include="@(i)" where we are creating new items before adding metadata.
+
+
+
+
+ Applies the supplied metadata to the destination item.
+
+
+
+
+ Create a ProjectItemInstance from another item, changing the item type and include.
+
+
+
+
+ A class factory for task items.
+
+
+
+
+ The singleton instance.
+
+
+
+
+ Private constructor for singleton creation.
+
+
+
+
+ The item type of items created by this factory.
+ Since TaskItems don't have an item type, this returns null, and cannot be set.
+
+
+
+
+ The item xml for items in this factory.
+
+
+
+
+ The singleton instance. Can be cast to the interface required.
+
+
+
+
+ Creates a taskitem.
+
+ The include.
+ The project that defined the item.
+ A new instance item.
+
+
+
+ Creates a task item from a ProjectItem
+
+
+
+
+ Creates a task item from a ProjectItem but changing the itemspec
+
+
+
+
+ Create a task item from a ProjectItemInstance.
+
+
+
+
+ Creates a task item from a ProjectItem
+
+
+
+
+ Creates a task item using the specified include and include before wildcard expansion.
+
+
+
+
+ Applies the supplied metadata to the destination item.
+
+
+
+
+ Implementation of IMetadataTable that can be passed to expander to expose only built-in metadata on this item.
+ Built-in metadata is stored in a separate table so it can be cleared out when the item is renamed, as this invalidates the values.
+ Also, more importantly, because typically the same regular metadata values can be shared by many items,
+ and keeping item-specific metadata out of it could allow it to be implemented as a copy-on-write table.
+
+
+
+
+ Item type
+
+
+
+
+ Backing item
+
+
+
+
+ Constructor.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name specified.
+ If no value is available, returns empty string.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name and item type specified.
+ If item type is null, it is ignored.
+ If no value is available, returns empty string.
+
+
+
+
+ Returns the value if it exists, null otherwise.
+ If item type is null, it is ignored.
+
+
+
+
+ Implementation of a comparer that determines equality between ProjectItemInstances
+
+
+
+
+ The singleton comparer.
+
+
+
+
+ Constructor.
+
+
+
+
+ Returns the default comparer instance.
+
+
+
+
+ Implemtnation of IEqualityComparer.Equals.
+
+ The left hand side.
+ The right hand side.
+ True of the instances are equivalent, false otherwise.
+
+
+
+ Implementation of IEqualityComparer.GetHashCode.
+
+ The item instance.
+ The hash code of the instance.
+
+
+
+ Wraps an evaluated piece of metadata for build purposes
+ Added and removed via methods on the ProjectItemInstance object.
+ IMMUTABLE OBJECT.
+
+
+
+
+ Name of the metadatum
+
+
+
+
+ Evaluated value
+ Never null.
+
+
+
+
+ Constructor for metadata.
+ Does not allow item spec modifiers.
+ Discards the location of the original element. This is not interesting in the Execution world
+ as it should never be needed for any subsequent messages, and is just extra bulk.
+ IMMUTABLE OBJECT.
+
+
+ Not public since the only creation scenario is setting on an item
+
+
+
+
+ Constructor for metadata.
+ Called when a ProjectInstance is created, before the build
+ when virtual items are added, and during the build when tasks
+ emit items.
+ Discards the location of the original element. This is not interesting in the Execution world
+ as it should never be needed for any subsequent messages, and is just extra bulk.
+ IMMUTABLE OBJECT.
+ If the value passed in is null, will be changed to String.Empty.
+
+
+ Not public since the only creation scenario is setting on an item
+
+
+
+
+ Constructor for metadata from a ProjectMetadata.
+ Called when a ProjectInstance is created.
+ IMMUTABLE OBJECT.
+
+
+
+
+ Private constructor used for serialization
+
+
+
+
+ Name of the metadata
+
+
+ This cannot be set, as it is used as the key into
+ the item's metadata table.
+
+
+
+
+ Evaluated value of the metadatum.
+ Never null.
+
+
+
+
+ Implementation of IKeyed exposing the metadatum name
+
+
+
+
+ Implementation of IValued
+
+
+
+
+ Evaluated and escaped value of the metadata.
+ Never null.
+
+
+
+
+ String representation handy for tracing
+
+
+
+
+ Reads or writes the packet to the serializer.
+
+
+
+
+ Compares this metadata to another for equivalence.
+
+ The other metadata
+ True if they are equivalent, false otherwise.
+
+
+
+ Deep clone the metadata
+ Strings are immutable (copy on write) so there is no work to do.
+ Allows built-in metadata names, as they are still valid on the new metadatum.
+
+ A new metadata instance.
+
+
+
+ Factory for serialization.
+
+
+
+
+ Wraps an onerror element
+
+
+ This is an immutable class
+
+
+
+
+ Unevaluated executetargets value.
+
+
+
+
+ Condition on the element.
+
+
+
+
+ Location of this element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Location of the executeTargets attribute
+
+
+
+
+ Constructor called by Evaluator.
+ All parameters are in the unevaluated state.
+
+
+
+
+ Unevaluated condition.
+ May be empty string.
+
+
+
+
+ Unevaluated ExecuteTargets value.
+ May be empty string.
+
+
+
+
+ Location of the element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Location of the execute targets attribute, if any
+
+
+
+
+ Wraps an unevaluated propertygroup under a target.
+ Immutable.
+
+
+
+
+ Condition, if any
+
+
+
+
+ Child properties.
+ Not ProjectPropertyInstances, as these are evaluated during the build.
+
+
+
+
+ Location of this element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Constructor called by the Evaluator.
+ Assumes ProjectPropertyGroupTaskPropertyInstance is an immutable type.
+
+
+
+
+ Cloning constructor
+
+
+
+
+ Condition, if any.
+ May be empty string.
+
+
+
+
+ Child properties
+
+
+
+
+ Location of the element itself
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Deep clone
+
+
+
+
+ Wraps an unevaluated property under an propertygroup in a target.
+ Immutable.
+
+
+
+
+ Name of the property
+
+
+
+
+ Unevaluated value
+
+
+
+
+ Unevaluated condition
+
+
+
+
+ Location of this element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Constructor called by the Evaluator.
+
+
+
+
+ Cloning constructor
+
+
+
+
+ Property name
+
+
+
+
+ Unevaluated value
+
+
+
+
+ Unevaluated condition value
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Deep clone
+
+
+
+
+ Wraps an evaluated property for build purposes.
+ Added and removed via methods on the ProjectInstance object.
+
+
+
+
+ Name of the property
+
+
+
+
+ Evaluated value: stored escaped.
+
+
+
+
+ Private constructor
+
+
+
+
+ Name of the property
+
+
+ This cannot be set, as it is used as the key into
+ the project's properties table.
+
+
+
+
+ Evaluated value of the property.
+ Setter assumes caller has protected global properties, if necessary
+ SETTER ASSUMES CALLER ONLY CALLS IF PROJECTINSTANCE IS MUTABLE because it cannot always be verified.
+
+
+
+
+ Whether this object is immutable.
+ An immutable object can not be made mutable.
+
+
+
+
+ Evaluated value of the property, escaped as necessary.
+ Setter assumes caller has protected global properties, if necessary.
+
+
+
+
+ Implementation of IKeyed exposing the property name
+
+
+
+
+ Implementation of IValued
+
+
+
+
+ Compares this property to another for equivalence.
+
+ The other property.
+ True if the properties are equivalent, false otherwise.
+
+
+
+ Reads or writes the packet to the serializer.
+
+
+
+
+ String representation handy for tracing
+
+
+
+
+ Called before the build when virtual properties are added,
+ and during the build when tasks emit properties.
+ If name is invalid or reserved, throws ArgumentException.
+ Creates mutable object.
+
+
+ Not public since the only creation scenario is setting on a project.
+
+
+
+
+ Called before the build when virtual properties are added,
+ and during the build when tasks emit properties.
+ If name is invalid or reserved, throws ArgumentException.
+ Creates mutable object.
+
+
+ Not public since the only creation scenario is setting on a project.
+
+
+
+
+ Called by the Evaluator during creation of the ProjectInstance.
+ Reserved properties can be set with this constructor using the appropriate flag.
+ This flags should ONLY be set by the evaluator or by cloning; after the ProjectInstance is created, they must be illegal.
+ If name is invalid or reserved, throws ArgumentException.
+
+
+
+
+ Called during project build time to create a property. Reserved properties will cause
+ an invalid project file exception.
+ Creates mutable object.
+
+
+
+
+ Called during project build time to create a property. Reserved properties will cause
+ an invalid project file exception.
+
+
+
+
+ Cloning constructor.
+ Strings are immutable (copy on write) so there is no work to do
+
+
+
+
+ Cloning constructor.
+ Strings are immutable (copy on write) so there is no work to do
+
+
+
+
+ Factory for serialization
+
+
+
+
+ Performs a deep clone
+
+
+
+
+ Performs a deep clone, optionally changing mutability
+
+
+
+
+ Creates a ProjectPropertyElement representing this instance.
+
+ The root element to which this element will belong.
+ The new element.
+
+
+
+ Private constructor which throws the right sort of exception depending on whether it is invoked as a result of
+ a design-time or build-time call.
+ Discards the location of the original element after error checking. This is not interesting in the Execution world
+ as it should never be needed for any subsequent messages, and is just extra bulk.
+ Inherits mutability from project if any.
+
+
+
+
+ Version of the class that's immutable.
+ Could have a single class with a boolean field, but there are large numbers of these
+ so it's important to avoid adding another field. Both types of objects are 16 bytes instead of 20.
+
+
+
+
+ Private constructor.
+ Called by outer class factory method.
+
+
+
+
+ Whether this object can be changed.
+ An immutable object can not be made mutable.
+
+
+ Usually gotten from the parent ProjectInstance.
+
+
+
+
+ Whether this object can be changed. An immutable object cannot be made mutable.
+
+
+ The environment is captured at the start of the build, so environment-derived
+ properties can't change.
+
+
+
+
+ Wraps a target element
+
+
+ This is an immutable class.
+
+
+
+
+ Name of the target
+
+
+
+
+ Condition on the target.
+ Evaluated during the build.
+
+
+
+
+ Inputs on the target
+
+
+
+
+ Outputs on the target
+
+
+
+
+ Return values on the target.
+
+
+
+
+ Semicolon separated list of targets it depends on
+
+
+
+
+ Semicolon separated list of targets it runs before
+
+
+
+
+ Semicolon separated list of targets it runs after
+
+
+
+
+ Condition for whether to trim duplicate outputs
+
+
+
+
+ Child entries of the target which refer to OnError targets
+
+
+
+
+ Whether the project file that this target lives in has at least one target
+ with a Returns attribute on it. If so, the default behaviour for all targets
+ in the file without Returns attributes changes from returning the Outputs, to
+ returning nothing.
+
+
+
+
+ Location of this element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Location of the inputs attribute, if any
+
+
+
+
+ Location of the outputs attribute, if any
+
+
+
+
+ Location of the returns attribute, if any
+
+
+
+
+ Location of KeepDuplicateOutputs attribute, if any
+
+
+
+
+ Location of the DependsOnTargets attribute ,if any
+
+
+
+
+ Location of the BeforeTargets attribute ,if any
+
+
+
+
+ Location of the AfterTargets attribute ,if any
+
+
+
+
+ Child tasks below the target (both regular tasks and "intrinsic tasks" like ItemGroup and PropertyGroup).
+ This is a read-only list unless the instance has been modified using AddTask.
+
+
+
+
+ Constructor called by Evaluator.
+ All parameters are in the unevaluated state.
+ All location parameters may be null if not applicable, except for the main location parameter.
+
+
+
+
+ Name of the target
+
+
+
+
+ Unevaluated condition on the task.
+ May be empty string.
+
+
+
+
+ Unevaluated inputs on the target element.
+ May be empty string.
+
+
+
+
+ Unevaluated outputs on the target element
+ May be empty string.
+
+
+
+
+ Unevaluated return values on the target element
+ May be empty string or null, if no return value is specified.
+
+
+
+
+ Unevaluated condition on which we will trim duplicate outputs from the target outputs
+ May be empty string.
+
+
+
+
+ Unevaluated semicolon separated list of targets it depends on.
+ May be empty string.
+
+
+
+
+ Unevaluated semicolon separated list of targets it runs before.
+ May be empty string.
+
+
+
+
+ Unevaluated semicolon separated list of targets it runs after.
+ May be empty string.
+
+
+
+
+ Children below the target. The build iterates through this to get each task to execute.
+ This is an ordered collection.
+ This is a read-only list; the ProjectTargetInstance class is immutable.
+ This collection does not contain the OnError target references.
+
+
+
+
+ The children below the target which refer to OnError targets.
+ This is an ordered collection.
+ This is a read-only list; the ProjectTargetInstance class is immutable.
+
+
+
+
+ Just the tasks below this target, if any.
+ Other kinds of children are not included.
+
+
+
+
+ Full path to the file from which this target originated.
+ If it originated in a project that was not loaded and has never been
+ given a path, returns an empty string.
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Location of the inputs
+
+
+
+
+ Location of the outputs
+
+
+
+
+ Location of the returns
+
+
+
+
+ Location of the KeepDuplicatOutputs attribute
+
+
+
+
+ Location of the dependsOnTargets
+
+
+
+
+ Location of the beforeTargets
+
+
+
+
+ Location of the afterTargets
+
+
+
+
+ Implementation of IKeyed exposing the target name
+
+
+
+
+ Whether the project file that this target lives in has at least one target
+ with a Returns attribute on it. If so, the default behaviour for all targets
+ in the file without Returns attributes changes from returning the Outputs, to
+ returning nothing.
+
+
+
+
+ Creates a ProjectTargetElement representing this instance. Attaches it to the specified root element.
+
+ The root element to which the new element will belong.
+ The new element.
+
+
+ Adds new child instance.
+ Child instance.
+
+
+
+ Creates a new task and adds it to the end of the list of tasks.
+
+ The name of the task to create.
+ The task's condition.
+ The continue on error flag.
+ The new task instance.
+
+
+
+ Creates a new task and adds it to the end of the list of tasks.
+
+ The name of the task to create.
+ The task's condition.
+ The continue on error flag.
+ The MSBuild runtime.
+ The MSBuild architecture.
+ The new task instance.
+
+
+
+ Wraps a task element
+
+
+ This is an immutable class
+
+
+
+
+ Name of the task, possibly qualified, as it appears in the project
+
+
+
+
+ Condition on the task, if any
+ May be empty string
+
+
+
+
+ Continue on error on the task, if any
+ May be empty string
+
+
+
+
+ Runtime on the task, if any
+ May be empty string
+
+
+
+
+ Architecture on the task, if any
+ May be empty string
+
+
+
+
+ Unordered set of task parameter names and unevaluated values.
+ This is a dead, read-only collection.
+
+
+
+
+ Output properties and items below this task. This is an ordered collection
+ as one may depend on another.
+ This is a dead, read-only collection.
+
+
+
+
+ Location of this element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Location of the continueOnError attribute, if any
+
+
+
+
+ Location of the MSBuildRuntime attribute, if any
+
+
+
+
+ Location of the MSBuildArchitecture attribute, if any
+
+
+
+
+ Constructor called by Evaluator.
+ All parameters are in the unevaluated state.
+ Locations other than the main location may be null.
+
+
+
+
+ Creates a new task instance directly. Used for generating instances on-the-fly.
+
+ The task name.
+ The location for this task.
+ The unevaluated condition.
+ The unevaluated continue on error.
+ The MSBuild runtime.
+ The MSBuild architecture.
+
+
+
+ Name of the task, possibly qualified, as it appears in the project
+
+
+
+
+ Unevaluated condition on the task
+ May be empty string.
+
+
+
+
+ Unevaluated ContinueOnError on the task.
+ May be empty string.
+
+
+
+
+ Unevaluated MSBuildRuntime on the task.
+ May be empty string.
+
+
+
+
+ Unevaluated MSBuildArchitecture on the task.
+ May be empty string.
+
+
+
+
+ Read-only dead unordered set of task parameter names and unevaluated values.
+ Condition and ContinueOnError, which have their own properties, are not included in this collection.
+
+
+
+
+ Ordered set of output property and item objects.
+ This is a read-only dead collection.
+
+
+
+
+ Location of the ContinueOnError attribute, if any
+
+
+
+
+ Location of the MSBuildRuntime attribute, if any
+
+
+
+
+ Location of the MSBuildArchitecture attribute, if any
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Retrieves the parameters dictionary as used during the build.
+
+
+
+
+ Returns the value of a named parameter, or null if there is no such parameter.
+
+ The name of the parameter to retrieve.
+ The parameter value, or null if it does not exist.
+
+
+
+ Sets the unevaluated value for the specified parameter.
+
+ The name of the parameter to set.
+ The unevaluated value for the parameter.
+
+
+
+ Adds an output item to the task.
+
+ The name of the parameter on the task which produces the output.
+ The item which will receive the output.
+ The condition.
+
+
+
+ Adds an output property to the task.
+
+ The name of the parameter on the task which produces the output.
+ The property which will receive the output.
+ The condition.
+
+
+
+ Wraps an output item element under a task element
+
+
+ Immutable.
+
+
+
+
+ Name of the property to put the output in
+
+
+
+
+ Property on the task class to retrieve the output from
+
+
+
+
+ Condition on the output element
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the original item type attribute
+
+
+
+
+ Location of the original task parameter attribute
+
+
+
+
+ Location of the original condition attribute
+
+
+
+
+ Constructor called by evaluator
+
+
+
+
+ Name of the item type that the outputs go into
+
+
+
+
+ Property on the task class to retrieve the outputs from
+
+
+
+
+ Condition on the element.
+ If there is no condition, returns empty string.
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Location of the TaskParameter attribute
+
+
+
+
+ Location of the ItemType attribute
+
+
+
+
+ Represents an output property element beneath a task element
+
+
+ Immutable.
+
+
+
+
+ Name of the property to put the output in
+
+
+
+
+ Property on the task class to retrieve the output from
+
+
+
+
+ Condition on the output element
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the original property name attribute
+
+
+
+
+ Location of the original task parameter attribute
+
+
+
+
+ Location of the original condition attribute
+
+
+
+
+ Constructor called by Evaluator
+
+
+
+
+ Name of the property to put the output in
+
+
+
+
+ Property on the task class to retrieve the output from
+
+
+
+
+ Condition on the output element.
+ If there is no condition, returns empty string.
+
+
+
+
+ Location of the original PropertyName attribute
+
+
+
+
+ Location of the original element
+
+
+
+
+ Location of the condition, if any
+
+
+
+
+ Location of the TaskParameter attribute
+
+
+
+
+ This class packages information about task which has been loaded from a task factory.
+
+
+
+
+ Cache of names of required properties on this type
+
+
+
+
+ Cache of names of output properties on this type
+
+
+
+
+ Cache of names of properties on this type whose names are ambiguous
+
+
+
+
+ Cache of PropertyInfos for this type
+
+
+
+
+ Factory which is wrapped by the wrapper
+
+
+
+
+ Wrapper of lazy initializable property data.
+
+
+
+
+ The name of the task this factory can create.
+
+
+
+
+ The set of special parameters that, along with the name, contribute to the identity of
+ this factory.
+
+
+
+
+ Creates an instance of this class for the given type.
+
+
+
+
+ Load information about the task factory itself
+
+
+
+
+ The task factory wrapped by the wrapper
+
+
+
+
+ Gets the list of names of public instance properties that have the required attribute applied.
+ Caches the result - since it can't change during the build.
+
+
+
+
+
+ Gets the list of names of public instance properties that have the output attribute applied.
+ Caches the result - since it can't change during the build.
+
+
+
+
+
+ Get the name of the factory wrapped by the wrapper
+
+
+
+
+ The set of task identity parameters that were set on
+ this particular factory's UsingTask statement.
+
+
+
+
+ Get the cached propertyinfo of the given name
+
+ property name
+ PropertyInfo
+
+
+
+ Sets the given property on the task.
+
+
+
+
+ Gets the value of a given property on the given task.
+
+
+
+
+ Determines whether a task with the given name is instantiable by this factory.
+
+ Name of the task.
+
+ true if this factory can instantiate such a task; otherwise, false.
+
+
+
+
+ Populate the cache of PropertyInfos for this type
+
+
+
+
+ This class is used to track tasks used by a project. Tasks are declared in project files with the <UsingTask> tag.
+ Task and assembly names must be specified per .NET guidelines, however, the names do not need to be fully qualified if
+ they provide enough information to locate the tasks they refer to. Assemblies can also be referred to using file paths --
+ this is useful when it is not possible/desirable to place task assemblies in the GAC, or in the same directory as MSBuild.
+
+
+ 1) specifying a task assembly using BOTH its assembly name (strong or weak) AND its file path is not allowed
+ 2) when specifying the assembly name, the file extension (usually ".dll") must NOT be specified
+ 3) when specifying the assembly file, the file extension MUST be specified
+
+
+ <UsingTask TaskName="Microsoft.Build.Tasks.Csc" ==> look for the "Csc" task in the
+ AssemblyName="Microsoft.Build.Tasks"/> weakly-named "Microsoft.Build.Tasks" assembly
+
+ <UsingTask TaskName="t1" ==> look for the "t1" task in the
+ AssemblyName="mytasks, Culture=en, Version=1.0.0.0"/> strongly-named "mytasks" assembly
+
+ <UsingTask TaskName="foo" ==> look for the "foo" task in the
+ AssemblyFile="$(MyDownloadedTasks)\utiltasks.dll"/> "utiltasks" assembly file
+
+ <UsingTask TaskName="UtilTasks.Bar" ==> invalid task declaration
+ AssemblyName="utiltasks.dll"
+ AssemblyFile="$(MyDownloadedTasks)\"/>
+
+
+
+
+ The fallback task registry
+
+
+
+
+ If true, we will force all tasks to run in the MSBuild task host EXCEPT
+ a small well-known set of tasks that are known to depend on IBuildEngine
+ callbacks; as forcing those out of proc would be just setting them up for
+ known failure.
+
+
+
+
+ Simple name for the MSBuild tasks (v4), used for shimming in loading
+ task factory UsingTasks
+
+
+
+
+ Filename for the MSBuild tasks (v4), used for shimming in loading
+ task factory UsingTasks
+
+
+
+
+ Expected location that MSBuild tasks (v4) is picked up from if the user
+ references it with just a simple name, used for shimming in loading
+ task factory UsingTasks
+
+
+
+
+ Simple name for the MSBuild tasks (v12), used for shimming in loading
+ task factory UsingTasks
+
+
+
+
+ Filename for the MSBuild tasks (v12), used for shimming in loading
+ task factory UsingTasks
+
+
+
+
+ Expected location that MSBuild tasks (v12) is picked up from if the user
+ references it with just a simple name, used for shimming in loading
+ task factory UsingTasks
+
+
+
+
+ Simple name for the MSBuild tasks (v14+), used for shimming in loading
+ task factory UsingTasks
+
+
+
+
+ Filename for the MSBuild tasks (v14+), used for shimming in loading
+ task factory UsingTasks
+
+
+
+
+ Expected location that MSBuild tasks (v14+) is picked up from if the user
+ references it with just a simple name, used for shimming in loading
+ task factory UsingTasks
+
+
+
+
+ Monotonically increasing counter for registered tasks.
+
+
+
+
+ Cache of tasks already found using exact matching,
+ keyed by the task identity requested.
+
+
+
+
+ Cache of tasks already found using fuzzy matching,
+ keyed by the task name requested.
+ Value is a dictionary of all possible matches for that
+ task name, by unique identity.
+
+
+
+
+ Cache of task declarations i.e. the <UsingTask> tags fed to this registry,
+ keyed by the task name declared.
+ Task name may be qualified or not.
+ This field may be null.
+ This is expected to be modified only during initialization via a single call, and all reads will occur only after the initialization is done - so no need for a concurrent dictionary.
+
+
+
+
+ Create another set containing architecture-specific task entries.
+ Then when we look for them, check if the name exists in that.
+ This is expected to be modified only during initialization via a single call, and all reads will occur only after the initialization is done - so no need for a concurrent dictionary.
+
+
+
+
+ The cache to load the *.tasks files into
+
+
+
+
+ Creates a task registry that does not fall back to any other task registry.
+ Default constructor does no work because the tables are initialized lazily when a task is registered
+
+
+
+
+ Creates a task registry that defers to the specified toolset's registry for those tasks it cannot resolve.
+ UNDONE: (Logging.) We can't pass the base task registry from the Toolset because we can't call GetTaskRegistry
+ without logging context information. When the Project load code is altered to contain logging service
+ references, we can load the toolset task registry at the time this registry is created and pass it to
+ this constructor instead of the toolset state.
+
+ The Toolset containing the toolser task registry
+ The to use.
+
+
+
+ Returns the toolset state used to initialize this registry, if any.
+
+
+
+
+ Access the next registration sequence id.
+ FOR UNIT TESTING ONLY.
+
+
+
+
+ Access list of task registrations.
+ FOR UNIT TESTING ONLY.
+
+
+
+
+ Evaluate the usingtask and add the result into the data passed in
+
+ A type derived from IProperty
+ A type derived from IItem
+
+
+
+ Evaluate the usingtask and add the result into the data passed in
+
+ A type derived from IProperty
+ A type derived from IItem
+
+
+
+ Given a task name, this method retrieves the task class. If the task has been requested before, it will be found in
+ the class cache; otherwise, <UsingTask> declarations will be used to search the appropriate assemblies.
+
+
+
+
+ Retrieves the task registration record for the specified task.
+
+ The name of the task to retrieve.
+ The task's project file.
+ The set of task identity parameters to be used to identify the
+ correct task record match.
+ True if an exact name match is required.
+ The logging context.
+ The location of the task element in the project file.
+ True if the record was retrieved from the cache.
+ The task registration record, or null if none was found.
+
+
+
+ Is the class being loaded a task factory class
+
+
+
+
+ Searches all task declarations for the given task name.
+ If no exact match is found, looks for partial matches.
+ A task name that is not fully qualified may produce several partial matches.
+
+
+
+
+ Registers an evaluated using task tag for future
+ consultation
+
+
+
+
+ Given a task name and a list of records which may contain the task, this helper method will ask the records to see if the task name
+ can be created by the factories which are wrapped by the records. (this is done by instantiating the task factory and asking it).
+
+
+
+
+ An object representing the identity of a task -- not just task name, but also
+ the set of identity parameters
+
+
+
+
+ Constructor
+
+
+
+
+ The name of the task
+
+
+
+
+ The identity parameters
+
+
+
+
+ Comparer used to figure out whether two RegisteredTaskIdentities are equal or not.
+
+
+
+
+ The singleton comparer to use when an exact match is desired
+
+
+
+
+ The singleton comparer to use when a fuzzy match is desired. Note that this still does an exact match on the
+ name, but does a fuzzy match on the task identity parameters.
+
+
+
+
+ Keeps track of whether we're doing exact or fuzzy equivalency
+
+
+
+
+ Constructor
+
+
+
+
+ The singleton comparer to use for when an exact match is desired
+
+
+
+
+ The singleton comparer to use for when a fuzzy match is desired
+
+
+
+
+ Returns true if these two identities match "fuzzily" -- if the names pass a partial type name
+ match and the task identity parameters would constitute a valid merge (e.g. "don't care" and
+ something explicit). Otherwise returns false.
+
+
+
+
+ Returns true if the two task identities are equal; false otherwise.
+
+
+
+
+ Returns a hash code for the given task identity
+
+
+
+
+ Returns true if the two dictionaries representing sets of task identity parameters match; false otherwise.
+ Internal so that RegisteredTaskRecord can use this function in its determination of whether the task factory
+ supports a certain task identity.
+
+
+
+
+ A record for a task registration which also contains the factory which matches the record
+
+
+
+
+ Default task factory to use if one is not specified
+
+
+
+
+ Default task factory to use if one is not specified and runtime or architecture is specified
+
+
+
+
+ Task factory used to create CodeDom-based inline tasks. Special-cased as one of two officially
+ supported task factories in Microsoft.Build.Tasks.vX.Y.dll to deal with versioning issue.
+
+
+
+
+ Task factory used to create CodeDom-based inline tasks. Special-cased as one of two officially
+ supported task factories in Microsoft.Build.Tasks.vX.Y.dll to deal with versioning issue.
+
+
+
+
+ Lock for the taskFactoryTypeLoader
+
+
+
+
+ Type filter to make sure we only look for taskFactoryClasses
+
+
+
+
+ Identity of this task.
+
+
+
+
+ Typeloader for taskFactories
+
+
+
+
+ The task name this record was registered with from the using task element
+
+
+
+
+ The assembly information about the task factory to be instantiated. For
+ AssemblyTaskFactories this is the task assembly which should be loaded
+
+
+
+
+ The task factory class name which will be used to lookup the task factory from the assembly specified in the assemblyName or assemblyFile.
+
+
+
+
+ A task factory wrapper which caches and combines information related to the parameters of the task.
+
+
+
+
+ Cache of task names which can be created by the factory.
+ When ever a taskName is checked against the factory we cache the result so we do not have to
+ make possibly expensive calls over and over again.
+
+
+
+
+ Set of parameters that can be used by the task factory specifically.
+
+
+
+
+ Encapsulates the parameters and the body of the task element for the inline task.
+
+
+
+
+ The registration order id for this task. This is used to determine the order in which tasks are registered.
+
+
+
+
+ Constructor
+
+
+
+
+ Gets the task name this record was registered with.
+
+
+
+
+ Gets the assembly load information.
+
+
+
+
+ Gets the task factory attribute value.
+
+
+
+
+ Gets the set of parameters for the task factory
+
+
+
+
+ Gets the inline task record
+
+
+
+
+ Identity of this task.
+
+
+
+
+ The registration order id for this task. This is used to determine the order in which tasks are registered.
+
+
+
+
+ Ask the question, whether or not the task name can be created by the task factory.
+ To answer this question we need to instantiate and initialize the task factory and ask it if it can create the given task name.
+ This question is useful for assembly tasks where the task may or may not be in an assembly, this can also be useful if the task factory
+ loads an external file and uses that to generate the tasks.
+
+ true if the task can be created by the factory, false if it cannot be created
+
+
+
+ Given a Registered task record and a task name. Check create an instance of the task factory using the record.
+ If the factory is a assembly task factory see if the assemblyFile has the correct task inside of it.
+
+
+
+
+ Create an instance of the task factory and load it from the assembly.
+
+ If the task factory could not be properly created an InvalidProjectFileException will be thrown
+
+
+
+ Keep track of the xml which will be sent to the inline task factory and the parameters if any which will also be passed in
+
+
+
+
+ The list of parameters found in the using task along with a corosponding UsingTaskParameterInfo which contains the specific information about it
+ Populated lazily as it is often empty.
+
+
+
+
+ The body of the task element which will be passed to the task factory.
+
+
+
+
+ Was the task body evaluated or not
+
+
+
+
+ Create an empty ParameterGroupAndTaskElementRecord
+
+
+
+
+ The parameters from the ParameterGroup from the using task element which will be passed to the task factory.
+
+
+
+
+ The body of the task element which will be passed to the task factory.
+
+
+
+
+ Has the task body been passed to the expander to be expanded
+
+
+
+
+ Keep track of the xml which will be sent to the inline task factory and the parameters if any which will also be passed in
+
+ Property type
+ Item Type
+
+
+
+ Evaluate the task body of the using task
+
+ IProperttyTypes
+ IItems
+
+
+
+ Convert the UsingTaskParameterGroupElement into a list of parameter names and UsingTaskParameters
+
+ Property type
+ Item types
+
+
+
+ Enumeration of all possible (currently supported) options for handshakes.
+
+
+
+
+ Process is a TaskHost
+
+
+
+
+ Using the 2.0 CLR
+
+
+
+
+ 64-bit Intel process
+
+
+
+
+ Node reuse enabled
+
+
+
+
+ Building with BelowNormal priority
+
+
+
+
+ Building with administrator privileges
+
+
+
+
+ Using the .NET Core/.NET 5.0+ runtime
+
+
+
+
+ ARM64 process
+
+
+
+
+ Caching computed hash.
+
+
+
+
+ Computes Handshake stable hash string representing whole state of handshake.
+
+
+
+
+ This class contains utility methods for the MSBuild engine.
+
+
+
+
+ Indicates to the NodeEndpoint that all the various parts of the Handshake have been sent.
+
+
+
+
+ The version of the handshake. This should be updated each time the handshake structure is altered.
+
+
+
+
+ The timeout to connect to a node.
+
+
+
+
+ Whether to trace communications
+
+
+
+
+ Lock trace to ensure we are logging in serial fashion.
+
+
+
+
+ Place to dump trace
+
+
+
+
+ Ticks at last time logged
+
+
+
+
+ Delegate to debug the communication utilities.
+
+
+
+
+ Gets or sets the node connection timeout.
+
+
+
+
+ Get environment block.
+
+
+
+
+ Free environment block.
+
+
+
+
+ Set environment variable P/Invoke.
+
+
+
+
+ Sets an environment variable using P/Invoke to workaround the .NET Framework BCL implementation.
+
+
+ .NET Framework implementation of SetEnvironmentVariable checks the length of the value and throws an exception if
+ it's greater than or equal to 32,767 characters. This limitation does not exist on modern Windows or .NET.
+
+
+
+
+ Returns key value pairs of environment variables in a new dictionary
+ with a case-insensitive key comparer.
+
+
+ Copied from the BCL implementation to eliminate some expensive security asserts on .NET Framework.
+
+
+
+
+ Updates the environment to match the provided dictionary.
+
+
+
+
+ Indicate to the client that all elements of the Handshake have been sent.
+
+
+
+
+ Extension method to write a series of bytes to a stream
+
+
+
+
+ Extension method to read a series of bytes from a stream.
+ If specified, leading byte matches one in the supplied array if any, returns rejection byte and throws IOException.
+
+
+
+
+ Given the appropriate information, return the equivalent HandshakeOptions.
+
+
+
+
+ Gets the value of an integer environment variable, or returns the default if none is set or it cannot be converted.
+
+
+
+
+ Writes trace information to a log file
+
+
+
+
+ Writes trace information to a log file
+
+
+
+
+ Writes trace information to a log file
+
+
+
+
+ Writes trace information to a log file
+
+
+
+
+ Writes trace information to a log file
+
+
+
+
+ Writes trace information to a log file
+
+
+
+
+ Writes trace information to a log file
+
+
+
+
+ Writes trace information to a log file
+
+
+
+
+ Writes trace information to a log file
+
+
+
+
+ Gets a hash code for this string. If strings A and B are such that A.Equals(B), then
+ they will return the same hash code.
+ This is as implemented in CLR String.GetHashCode() [ndp\clr\src\BCL\system\String.cs]
+ but stripped out architecture specific defines
+ that causes the hashcode to be different and this causes problem in cross-architecture handshaking
+
+
+
+
+ Contains a list of the special (reserved) properties that are settable by MSBuild code only.
+
+
+
+
+ Lookup for reserved property names. Intentionally do not include MSBuildExtensionsPath* or MSBuildUserExtensionsPath in this list. We need tasks to be able to override those.
+
+
+
+
+ Indicates if the given property is a reserved property.
+
+ true, if specified property is reserved
+
+
+
+ Constants used by the Engine
+
+
+
+
+ If no default tools version is specified in the config file or registry, we'll use 2.0.
+ The engine will use its binpath for the matching toolset path.
+
+
+
+
+ The toolsversion we will fall back to as a last resort if the default one cannot be found, this fallback should be the most current toolsversion known
+
+
+
+
+ The toolsversion we will use when we construct the solution wrapper metaprojects; this should be the most current toolsversion known
+
+
+
+
+ Name of the property used to specify a Visual Studio version.
+
+
+
+
+ Name of the property used to select which sub-toolset to use.
+
+
+
+
+ Value we should be setting VisualStudioVersion as the ultimate fallback when Dev10 is installed.
+
+
+
+
+ Current version of this MSBuild Engine assembly in the
+ form, e.g, "4.0"
+
+
+
+
+ The set of available static methods.
+ NOTE: Do not allow methods here that could do "bad" things under any circumstances.
+ These must be completely benign operations, as they run during project load, which must be safe in VS.
+ Key = Type or Type::Method, Value = AssemblyQualifiedTypeName (where null = mscorlib)
+
+
+ Placed here to avoid StyleCop error.
+
+
+
+
+ Static methods that are allowed in constants. Key = Type or Type::Method, Value = Tuple of AssemblyQualifiedTypeName (where null = mscorlib) or the actual type object
+
+
+
+
+ Locker to protect initialization
+
+
+
+
+ Whether a key is present
+
+
+
+
+ Add an entry if not already present
+
+
+
+
+ Constructs the fully qualified method name and adds it to the cache
+
+
+
+
+
+
+
+
+ Get an entry if present
+
+
+
+
+ Get an entry or null if not present
+
+
+
+
+ Tries to retrieve the type information for a type name / method name combination.
+
+ It does 2 lookups:
+ 1st try: 'typeFullName'
+ 2nd try: 'typeFullName::simpleMethodName'
+
+
+ namespace qualified type name
+ name of the method
+
+
+
+
+ Returns the fully qualified format for the given method: see typeFullName::methodName
+
+ namespace qualified type name
+ simple name of the method
+
+
+
+
+ Re-initialize.
+ Unit tests need this when they enable "unsafe" methods -- which will then go in the collection,
+ and mess up subsequent tests.
+
+
+
+
+ Fill up the dictionary for first use
+
+
+
+
+ Gets the of Microsoft.Build.dll.
+
+
+
+
+ Gets a singleton instance of .
+
+
+
+
+ Gets the assembly file version in the format major.minor.
+
+
+
+
+ Used for the purposes of evaluating an item specification. Given a filespec that may include wildcard characters * and
+ ?, we translate it into an actual list of files. If the input filespec doesn't contain any wildcard characters, and it
+ doesn't appear to point to an actual file on disk, then we just give back the input string as an array of length one,
+ assuming that it wasn't really intended to be a filename (as items are not required to necessarily represent files).
+ Any wildcards passed in that are unescaped will be treated as real wildcards.
+ The "include" of items passed back from the filesystem will be returned canonically escaped.
+ The ordering of the list returned is deterministic (it is sorted).
+ Will never throw IO exceptions. If path is invalid, just returns filespec verbatim.
+
+ The directory to evaluate, escaped.
+ The filespec to evaluate, escaped.
+ Accepted loggers for drive enumeration: TargetLoggingContext, ILoggingService,
+ and EvaluationLoggingContext.
+ Location of Exclude element in file, used after drive enumeration detection.
+ Array of file paths, unescaped.
+
+
+
+ Used for the purposes of evaluating an item specification. Given a filespec that may include wildcard characters * and
+ ?, we translate it into an actual list of files. If the input filespec doesn't contain any wildcard characters, and it
+ doesn't appear to point to an actual file on disk, then we just give back the input string as an array of length one,
+ assuming that it wasn't really intended to be a filename (as items are not required to necessarily represent files).
+ Any wildcards passed in that are unescaped will be treated as real wildcards.
+ The "include" of items passed back from the filesystem will be returned canonically escaped.
+ The ordering of the list returned is deterministic (it is sorted).
+ Will never throw IO exceptions. If path is invalid, just returns filespec verbatim.
+
+ The directory to evaluate, escaped.
+ The filespec to evaluate, escaped.
+ Filespecs to exclude, escaped.
+ Whether to force file glob expansion when eager expansion is turned off.
+ Class that contains functions for matching filenames with patterns.
+ Accepted loggers for drive enumeration: TargetLoggingContext, ILoggingService,
+ and EvaluationLoggingContext.
+ Location of Include element in file, used after drive enumeration detection.
+ Location of Exclude element in file, used after drive enumeration detection.
+ Location of Import element in file, used after drive enumeration detection.
+ Context to log a warning, used after drive enumeration detection.
+ Full path to project file to create BuildEventFileInfo,
+ used after drive enumeration detection.
+ Flag used to detect when to properly log a warning
+ for the Exclude attribute after detecting a drive enumerating wildcard.
+ Array of file paths, escaped.
+
+
+
+ Used for the purposes of evaluating an item specification. Given a filespec that may include wildcard characters * and
+ ?, we translate it into an actual list of files. If the input filespec doesn't contain any wildcard characters, and it
+ doesn't appear to point to an actual file on disk, then we just give back the input string as an array of length one,
+ assuming that it wasn't really intended to be a filename (as items are not required to necessarily represent files).
+ Any wildcards passed in that are unescaped will be treated as real wildcards.
+ The "include" of items passed back from the filesystem will be returned canonically escaped.
+ The ordering of the list returned is deterministic (it is sorted).
+ Will never throw IO exceptions: if there is no match, returns the input verbatim.
+
+ The directory to evaluate, escaped.
+ The filespec to evaluate, escaped.
+ true to return escaped specs.
+ Whether to force file glob expansion when eager expansion is turned off.
+ The exclude specification, escaped.
+ Class that contains functions for matching filenames with patterns.
+ Accepted loggers for drive enumeration: TargetLoggingContext, ILoggingService,
+ and EvaluationLoggingContext.
+ Location of Include element in file, used after drive enumeration detection.
+ Location of Exclude element in file, used after drive enumeration detection.
+ Location of Import element in file, used after drive enumeration detection.
+ Context to log a warning, used after drive enumeration detection.
+ Full path to project file to create BuildEventFileInfo,
+ used after drive enumeration detection.
+ Flag used to detect when to properly log a warning
+ for the Exclude attribute after detecting a drive enumerating wildcard.
+ Array of file paths.
+
+
+
+ Returns a Func that will return true IFF its argument matches any of the specified filespecs.
+ Assumes filespec may be escaped, so it unescapes it.
+ The returned function makes no escaping assumptions or escaping operations. Its callers should control escaping.
+
+
+
+ A Func that will return true IFF its argument matches any of the specified filespecs.
+
+
+
+ Returns true if the given file matches this file spec.
+
+
+
+
+ Same as but the argument is expected to be a normalized path.
+
+
+
+
+ Thin wrapper around Microsoft.Win32.RegistryKey that can be
+ subclassed for testing purposes
+
+
+
+
+ Has the object been disposed yet.
+
+
+
+
+ Initializes this RegistryKeyWrapper to wrap the specified key.
+ Does not check for a null key.
+
+
+
+
+ Initializes this RegistryKeyWrapper to wrap the key at the specified path
+ and assumes the key is underneath HKLM
+ Note that registryKeyPath should be relative to HKLM.
+
+
+
+
+ Initializes this RegistryKeyWrapper to wrap the key at the specified path
+
+
+
+
+ Initializes this RegistryKeyWrapper to wrap the key at the specified path
+
+
+
+
+ Name of the registry key
+
+
+
+
+ Convenient static helper method on RegistryKeyWrapper, for when someone is only intersted in knowing
+ whether a particular registry key exists or not.
+
+
+
+
+ Gets the value with name "name" stored under this registry key
+
+
+
+
+
+
+ Gets the names of all values underneath this registry key
+
+
+
+
+
+ Gets the names of all sub keys immediately below this registry key
+
+
+
+
+
+ Returns the RegistryKeyWrapper around the sub key with name "name". If that does
+ not exist, returns a RegistryKeyWrapper around null.
+
+
+
+
+
+
+ Returns true if the wrapped registry key exists.
+
+
+
+
+
+ Lazy getter for the root tools version registry key: means that this class
+ will never throw registry exceptions from the constructor
+
+
+
+
+ This class contains utility methods for the MSBuild engine.
+
+
+
+
+ Save off the contents of the environment variable that specifies whether we should treat higher toolsversions as the current
+ toolsversion. (Some hosts require this.)
+
+
+
+
+ Save off the contents of the environment variable that specifies whether we should treat all toolsversions, regardless of
+ whether they are higher or lower, as the current toolsversion. (Some hosts require this.)
+
+
+
+
+ If set, default to the ToolsVersion from the project file (or if that doesn't isn't set, default to 2.0). Otherwise, use Dev12+
+ defaulting logic: first check the MSBUILDDEFAULTTOOLSVERSION environment variable, then check for a DefaultOverrideToolsVersion,
+ then if both fail, use the current ToolsVersion.
+
+
+
+
+ If set, will be used as the ToolsVersion to build with (unless MSBUILDLEGACYDEFAULTTOOLSVERSION is set).
+
+
+
+
+ Delegate for a method that, given a ToolsVersion string, returns the matching Toolset.
+
+
+
+
+ INTERNAL FOR UNIT-TESTING ONLY
+
+ We've got several environment variables that we read into statics since we don't expect them to ever
+ reasonably change, but we need some way of refreshing their values so that we can modify them for
+ unit testing purposes.
+
+
+
+
+ Sets the inner XML/text of the given XML node, escaping as necessary.
+
+
+ Can be empty string, but not null.
+
+
+
+ Extracts the inner XML/text of the given XML node, unescaping as necessary.
+
+
+ Inner XML/text of specified node.
+
+
+
+ Figure out whether there are any XML tags, other than comment tags,
+ in the string.
+
+
+ We know the string coming in is a valid XML fragment. (The project loaded after all.)
+ So for example we can ignore an open comment tag without a matching closing comment tag.
+
+
+
+
+ Removes the xmlns attribute from an XML string.
+
+ XML string to process.
+ The modified XML string.
+
+
+
+ Creates a comma separated list of valid tools versions suitable for an error message.
+
+
+
+
+ Figure out what ToolsVersion to use to actually build the project with.
+
+ The user-specified ToolsVersion (through e.g. /tv: on the command line)
+ The ToolsVersion from the project file
+ Delegate used to test whether a toolset exists for a given ToolsVersion. May be null, in which
+ case we act as though that toolset existed.
+ The default ToolsVersion
+ true if the project file specifies an explicit toolsversion but a different one is chosen
+ The ToolsVersion we should use to build this project. Should never be null.
+
+
+
+ Retrieves properties derived from the current
+ environment variables.
+
+
+
+
+ Extension to IEnumerable to get the count if it
+ can be quickly gotten, otherwise 0.
+
+
+
+
+ Extension to IEnumerable of KVP of string, something to just return the somethings.
+
+
+
+
+ Project-related Xml utilities
+
+
+
+
+ Gets child elements, ignoring whitespace and comments.
+ Throws InvalidProjectFileException for unexpected XML node types.
+
+
+
+
+ Gets child elements, ignoring whitespace and comments.
+ Throws InvalidProjectFileException for unexpected XML node types if parameter is set.
+
+
+
+
+ Throw an invalid project exception if there are any child elements at all
+
+
+
+
+ Throw an invalid project exception indicating that the child is not valid beneath the element because it is a duplicate
+
+
+
+
+ Throw an invalid project exception indicating that the child is not valid beneath the element
+
+
+
+
+ Verify that if a namespace is specified it matches the default MSBuild namespace.
+
+ Element to check namespace.
+ True when the namespace is in the MSBuild namespace or no namespace.
+
+
+
+ Verifies that if the attribute is present on the element, its value is not empty
+
+
+
+
+ Verifies that if the attribute is present on the element, its value is not empty
+
+
+
+
+ If there are any attributes on the element, throws an InvalidProjectFileException complaining that the attribute is not valid on this element.
+
+
+
+
+ If the condition is false, throws an InvalidProjectFileException complaining that the attribute is not valid on this element.
+
+
+
+
+ Verify that the element has the specified required attribute on it and
+ it has a value other than empty string
+
+
+
+
+ Verify that all attributes on the element are on the list of legal attributes
+
+
+
+
+ Throws an InvalidProjectFileException complaining that the attribute is not valid on this element.
+
+
+
+
+ Sets the value of an attribute, but if the value to set is null or empty, just
+ removes the attribute. Returns the attribute, or null if it was removed.
+ UNDONE: Make this return a bool if the attribute did not change, so we can avoid dirtying.
+
+
+
+
+ Sets the value of an attribute, removing the attribute if the value is null, but still setting it
+ if the value is the empty string. Returns the attribute, or null if it was removed.
+ UNDONE: Make this return a bool if the attribute did not change, so we can avoid dirtying.
+
+
+
+
+ Returns the value of the attribute.
+ If the attribute is null, returns an empty string.
+
+
+
+
+ Returns the value of the attribute.
+ If the attribute is not present, returns an empty string.
+
+
+
+
+ Returns the value of the attribute.
+ If the attribute is not present, returns either null or an empty string, depending on the value
+ of nullIfNotExists.
+
+
+
+
+ Exception indicating that we tried to build a type of project MSBuild did not recognize.
+
+
+
+
+ Disposable helper class to wrap XmlReader / XmlTextReader functionality.
+
+
+
+
+ Creates an XmlReaderExtension with handle to an XmlReader.
+
+ Path to the file on disk.
+ Whther to load the file in real only mode.
+ Disposable XmlReaderExtension object.
+
+
+
+ Get the Encoding type from the XML declaration tag
+
+ XML Reader object
+ Encoding if specified, else null.
+
+
+
+ A debug only helper class for tracing
+
+
+
+
+ A dictionary of named counters
+
+
+
+
+ Last time logging happened
+
+
+
+
+ How often to log
+
+
+
+
+ A place callers can put something worth logging later
+
+
+
+
+ Short name of the current assembly - to distinguish statics when this type is shared into different assemblies
+
+
+
+
+ Put something in the slot
+
+
+
+
+ Put something in the slot
+
+ The key type.
+ The value type.
+
+
+
+ Increment the named counter, and dump if it's time to do so
+
+
+
+
+ Log the provided items
+
+ The item type.
+
+
+
+ Dump all the named counters, if any
+
+
+
+
+ Replacement for BinaryReader which attempts to intern the strings read by ReadString.
+
+
+
+
+ The maximum size, in bytes, to read at once.
+
+
+
+
+ A cache of recently used buffers. This is a pool of size 1 to avoid allocating moderately sized
+ objects repeatedly. Used in scenarios that don't have a good context to attach
+ a shared buffer to.
+
+
+
+
+ Shared buffer saves allocating these arrays many times.
+
+
+
+
+ True if is owned by this instance, false if it was passed by the caller.
+
+
+
+
+ The decoder used to translate from UTF8 (or whatever).
+
+
+
+
+ Comment about constructing.
+
+
+
+
+ Read a string while checking the string precursor for intern opportunities.
+ Taken from ndp\clr\src\bcl\system\io\binaryreader.cs-ReadString()
+
+
+
+
+ A shared buffer to avoid extra allocations in InterningBinaryReader.
+
+
+ The caller is responsible for managing the lifetime of the returned buffer and for passing it to .
+
+
+
+
+ A placeholder instructing InterningBinaryReader to use pooled buffer (to avoid extra allocations).
+
+
+ Lifetime of the pooled buffer is managed by InterningBinaryReader (tied to BinaryReader lifetime wrapping the buffer)
+
+
+
+
+ Gets a buffer from the pool or creates a new one.
+
+ The . Should be returned to the pool after we're done with it.
+
+
+
+ Returns our buffer to the pool if we were not passed one by the caller.
+
+
+
+
+ Create a BinaryReader. It will either be an interning reader or standard binary reader
+ depending on whether the interning reader is possible given the buffer and stream.
+
+
+
+
+ Holds thepreallocated buffer.
+
+
+
+
+ Yes, we are constructing.
+
+
+
+
+ The char buffer.
+
+
+
+
+ The byte buffer.
+
+
+
+
+ The MSBuild client successfully processed the build request.
+
+
+
+
+ Server is busy. This would invoke a fallback behavior.
+
+
+
+
+ Client was unable to connect to the server. This would invoke a fallback behavior.
+
+
+
+
+ Client was unable to launch the server. This would invoke a fallback behavior.
+
+
+
+
+ The build stopped unexpectedly, for example,
+ because a named pipe between the server and the client was unexpectedly closed.
+
+
+
+
+ The client is not able to identify the server state.
+
+
+ This may happen when mutex that is regulating the server state throws.
+ See: https://github.com/dotnet/msbuild/issues/7993.
+
+
+
+
+ Enumeration of the various ways in which the MSBuildClient execution can exit.
+
+
+
+
+ The MSBuild client exit type.
+ Covers different ways MSBuild client execution can finish.
+ Build errors are not included. The client could finish successfully and the build at the same time could result in a build error.
+
+
+
+
+ The build exit type. Possible values: MSBuildApp.ExitType serialized into a string.
+ This field is null if MSBuild client execution was not successful.
+
+
+
+
+ This class is the public entry point for executing builds in msbuild server.
+ It processes command-line arguments and invokes the build engine.
+
+
+
+
+ The build inherits all the environment variables from the client process.
+ This property allows to add extra environment variables or reset some of the existing ones.
+
+
+
+
+ The console mode we had before the build.
+
+
+
+
+ Full path to current MSBuild.exe if executable is MSBuild.exe,
+ or to version of MSBuild.dll found to be associated with the current process.
+
+
+
+
+ The command line to process.
+ The first argument on the command line is assumed to be the name/path of the executable, and is ignored.
+
+
+
+
+ The MSBuild client execution result.
+
+
+
+
+ Whether MSBuild server finished the build.
+
+
+
+
+ Handshake between server and client.
+
+
+
+
+ The named pipe name for client-server communication.
+
+
+
+
+ The named pipe stream for client-server communication.
+
+
+
+
+ A way to cache a byte array when writing out packets
+
+
+
+
+ A binary writer to help write into
+
+
+
+
+ Used to estimate the size of the build with an ETW trace.
+
+
+
+
+ Capture configuration of Client Console.
+
+
+
+
+ Incoming packet pump and redirection.
+
+
+
+
+ Public constructor with parameters.
+
+ The command line to process. The first argument
+ on the command line is assumed to be the name/path of the executable, and is ignored
+ Full path to current MSBuild.exe if executable is MSBuild.exe,
+ or to version of MSBuild.dll found to be associated with the current process.
+
+
+
+ Orchestrates the execution of the build on the server,
+ responsible for client-server communication.
+
+ Cancellation token.
+ A value of type that indicates whether the build succeeded,
+ or the manner in which it failed.
+
+
+
+ Attempt to shutdown MSBuild Server node.
+
+
+ It shutdown only server created by current user with current admin elevation.
+
+
+ True if server is not running anymore.
+
+
+
+ Some platforms do not allow getting current background color. There
+ is not way to check, but not-supported exception is thrown. Assume
+ black, but don't crash.
+
+
+
+
+ Launches MSBuild server.
+
+ Whether MSBuild server was started successfully.
+
+
+
+ Handle cancellation.
+
+
+
+
+ Handle when packet pump is completed both successfully or with error.
+
+
+
+
+ Dispatches the packet to the correct handler.
+
+
+
+
+ Connects to MSBuild server.
+
+ Whether the client connected to MSBuild server successfully.
+
+
+
+ Holds various information about the current msbuild execution that the cache might use.
+ The cache may need to know about the top level projects or the entire project graph, so MSBuild
+ provides a graph when one is available. When it isn't available, MSBuild provides the top level projects
+ and the plugin can construct its own graph based on those.
+ So either is null, or is null. But not both.
+
+
+
+
+ Result types that a plugin can return for a given build request.
+
+
+
+
+ The plugin failed and couldn't return a result. The plugin should log an error detailing the failure. MSBuild will stop the build.
+
+
+
+
+ The plugin determined that it supports a build request and found that it can be skipped. MSBuild won't build the request.
+
+
+
+
+ The plugin determined that it supports a build request and found that it cannot be skipped. MSBuild will build the request.
+
+
+
+
+ The plugin determined that it does not support a certain build request. MSBuild will build the request.
+ For example, a plugin may not support projects with a certain extension, certain properties, or certain called targets.
+
+
+
+
+ Represents the cache result a plugin returns back to MSBuild when queried about a certain project.
+ Results representing cache hits (with == )
+ contain information about what MSBuild should use for the queried project.
+ It is assumed that all cache hits result in a successful .
+
+
+
+
+ Events logged with this logger will get pushed into MSBuild's logging infrastructure.
+
+
+
+
+ A cache hit can use this to instruct MSBuild to construct a BuildResult with the target result specified in this
+ type.
+
+
+
+
+ Gets the path to the assembly containing the project cache plugin.
+
+
+
+
+ This exception is used to wrap an unhandled exception from a project cache plugin. This exception aborts the build, and it can only be
+ thrown by the MSBuild engine.
+
+
+
+
+ The project cache has already logged this as an error.
+ Should not get logged again.
+
+
+
+
+ Gets the error code associated with this exception's message (not the inner exception).
+
+ The error code string.
+
+
+
+ Only one plugin instance can exist for a given BuildManager BeginBuild / EndBuild session.
+ Any exceptions thrown by the plugin will cause MSBuild to fail the build.
+
+
+
+
+ Called once before the build, to have the plugin instantiate its state.
+ Errors are checked via .
+
+
+
+
+ Called once for each build request.
+ Operation needs to be atomic. Any side effects (IO, environment variables, etc) need to be reverted upon
+ cancellation.
+ MSBuild may choose to cancel this method and build the project itself.
+ Errors are checked via .
+
+
+
+
+ Called once after all the build to let the plugin do any post build operations (log metrics, cleanup, etc).
+ Errors are checked via .
+
+
+
+
+ Called for each file access from an MSBuild node or one of its children.
+
+
+
+
+ Called for each new child process created by an MSBuild node or one of its children.
+
+
+
+
+ Called when a build request finishes execution. This provides an opportunity for the plugin to take action on the
+ aggregated file access reports from .
+ Errors are checked via .
+
+
+
+
+ An instanatiable version of MSBuildFileSystemBase not overriding any methods,
+ i.e. falling back to FileSystem.Default.
+
+
+
+
+ Optimization which frontloads plugin initialization since we have an entire graph.
+
+
+
+
+ A cache hit can use this to instruct MSBuild to build the cheaper version of the targets that the plugin avoided
+ running.
+ For example, GetTargetPath is the cheaper version of Build.
+
+ MSBuild will build the proxy targets and assign their target results to the real targets the mapping points to.
+ The proxy targets are left in the build result (i.e., both GetTargetPath and Build will appear in the build result).
+ Real targets can be committed in which case msbuild only keeps the proxy target in the build result.
+
+
+
+
+ Mapping from proxy targets to real targets. Case insensitive.
+
+
+
+
+ The requested access to the file or device.
+
+
+ See https://learn.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants for a full list of values.
+
+
+
+
+ For a directory, the right to list the contents of the directory.
+
+
+
+
+ For a directory, the right to create a file in the directory.
+
+
+
+
+ For a directory, the right to create a subdirectory.
+
+
+
+
+ The right to read extended file attributes.
+
+
+
+
+ Right to delete an object.
+
+
+
+
+ Right to wait on a handle.
+
+
+
+
+ For a file object, the right to append data to the file. (For local files, write operations will not overwrite existing
+ data if this flag is specified without .) For a directory object, the right to create a subdirectory
+ ().
+
+
+
+
+ The right to write extended file attributes.
+
+
+
+
+ For a native code file, the right to execute the file. This access right given to scripts may cause the script to be executable, depending on the script interpreter.
+
+
+
+
+ For a directory, the right to delete a directory and all the files it contains, including read-only files.
+
+
+
+
+ The right to read file attributes.
+
+
+
+
+ The right to write file attributes.
+
+
+
+
+ For a file object, the right to write data to the file. For a directory object, the right to create a file in the
+ directory ().
+
+
+
+
+ All possible access rights.
+
+
+
+
+ Execute access.
+
+
+
+
+ Write access.
+
+
+
+
+ Read access.
+
+
+
+
+ File access data.
+
+
+
+ The operation that performed the file access.
+
+
+ The requested access.
+
+
+ The process id.
+
+
+ Id of file access.
+
+
+ Correlation id of file access.
+
+
+ The error code of the operation.
+
+
+ The desired access.
+
+
+ The file flags and attributes.
+
+
+ The path being accessed.
+
+
+ The process arguments.
+
+
+ Whether the file access is augmented.
+
+
+
+ The file or device attributes and flags.
+
+
+
+
+ The file is read only. Applications can read the file but cannot write to or delete it.
+
+
+
+
+ The file is hidden. Do not include it in an ordinary directory listing.
+
+
+
+
+ The file is part of or used exclusively by an operating system.
+
+
+
+
+ The path is a directory.
+
+
+
+
+ The file should be archived. Applications use this attribute to mark files for backup or removal.
+
+
+
+
+ The file does not have other attributes set. This attribute is valid only if used alone.
+
+
+
+
+ The file is being used for temporary storage.
+
+
+ For more information, see the Caching Behavior section of this topic.
+
+
+
+
+ The data of a file is not immediately available. This attribute indicates that file data is physically moved to offline
+ storage. This attribute is used by Remote Storage, the hierarchical storage management software. Applications should
+ not arbitrarily change this attribute.
+
+
+
+
+ The file or directory is encrypted. For a file, this means that all data in the file is encrypted. For a directory,
+ this means that encryption is the default for newly created files and subdirectories. For more information, see File
+ Encryption.
+
+
+ This flag has no effect if is also specified.
+ This flag is not supported on Home, Home Premium, Starter, or ARM editions of Windows.
+
+
+
+
+ The file data is requested, but it should continue to be located in remote storage. It should not be transported back
+ to local storage. This flag is for use by remote storage systems.
+
+
+
+
+ Normal reparse point processing will not occur; CreateFile will attempt to open the reparse point. When a file is
+ opened, a file handle is returned, whether or not the filter that controls the reparse point is operational.
+
+
+ This flag cannot be used with the CREATE_ALWAYS flag.
+ If the file is not a reparse point, then this flag is ignored.
+ For more information, see the Remarks section.
+
+
+
+
+ The file or device is being opened with session awareness. If this flag is not specified, then per-session devices
+ (such as a redirected USB device) cannot be opened by processes running in session 0. This flag has no effect for
+ callers not in session 0. This flag is supported only on server editions of Windows.
+
+
+ Windows Server 2008 R2, Windows Server 2008, and Windows Server 2003: This flag is not supported before Windows Server
+ 2012.
+
+
+
+
+ Access will occur according to POSIX rules. This includes allowing multiple files with names, differing only in case,
+ for file systems that support that naming. Use care when using this option, because files created with this flag may
+ not be accessible by applications that are written for MS-DOS or 16-bit Windows.
+
+
+
+
+ The file is being opened or created for a backup or restore operation. The system ensures that the calling process
+ overrides file security checks when the process has SE_BACKUP_NAME and SE_RESTORE_NAME privileges. For more
+ information, see Changing Privileges in a Token.
+
+
+ You must set this flag to obtain a handle to a directory. A directory handle can be passed to some functions instead of
+ a file handle. For more information, see the Remarks section.
+
+
+
+
+ The file is to be deleted immediately after all of its handles are closed, which includes the specified handle and any
+ other open or duplicated handles.
+
+
+ If there are existing open handles to a file, the call fails unless they were all opened with the FILE_SHARE_DELETE
+ share mode.
+ Subsequent open requests for the file fail, unless the FILE_SHARE_DELETE share mode is specified.
+
+
+
+
+ Access is intended to be sequential from beginning to end. The system can use this as a hint to optimize file caching.
+
+
+ This flag should not be used if read-behind (that is, reverse scans) will be used.
+ This flag has no effect if the file system does not support cached I/O and .
+ For more information, see the Caching Behavior section of this topic.
+
+
+
+
+ Access is intended to be random. The system can use this as a hint to optimize file caching.
+
+
+ This flag has no effect if the file system does not support cached I/O and .
+ For more information, see the Caching Behavior section of this topic.
+
+
+
+
+ The file or device is being opened with no system caching for data reads and writes. This flag does not affect hard
+ disk caching or memory mapped files.
+
+
+ There are strict requirements for successfully working with files opened with CreateFile using this
+ flag; for details, see File Buffering.
+
+
+
+
+ The file or device is being opened or created for asynchronous I/O.
+
+
+ When subsequent I/O operations are completed on this handle, the event specified in the OVERLAPPED structure will be
+ set to the signaled state.
+ If this flag is specified, the file can be used for simultaneous read and write operations.
+ If this flag is not specified, then I/O operations are serialized, even if the calls to the read and write functions
+ specify an OVERLAPPED structure.
+ For information about considerations when using a file handle created with this flag, see the Synchronous and
+ Asynchronous I/O Handles section of this topic.
+
+
+
+
+ Write operations will not go through any intermediate cache; they will go directly to disk.
+
+
+ For additional information, see the Caching Behavior section of this topic.
+
+
+
+
+ Process data.
+
+
+
+ The process name.
+
+
+ The process id.
+
+
+ The parent process id.
+
+
+ The creation date time.
+
+
+ The exit date time.
+
+
+ The exit code.
+
+
+
+ Which operation resulted in a reported file access.
+
+
+
+
+ Unknown operation.
+
+
+
+
+ CreateFile.
+
+
+
+
+ CreateProcess.
+
+
+
+
+ GetFileAttributes.
+
+
+
+
+ GetFileAttributesEx.
+
+
+
+
+ Process forked.
+
+
+
+
+ FindFirstFileEx.
+
+
+ FindFirstFile also indicates this op, since we implement it in terms of FindFirstFileEx.
+
+
+
+
+ FindNextFile.
+
+
+
+
+ CreateDirectory.
+
+
+
+
+ DeleteFile.
+
+
+
+
+ MoveFile (source; read and deleted).
+
+
+
+
+ MoveFile (destination; written).
+
+
+
+
+ SetFileInformationByHandleSource (source; read and deleted).
+
+
+
+
+ SetFileInformationByHandleDest (destination; written).
+
+
+
+
+ ZwSetRenameInformationFileSource (source; read and deleted).
+
+
+
+
+ ZwSetRenameInformationFileDest (destination; written).
+
+
+
+
+ ZwSetLinkInformationFileDest.
+
+
+
+
+ ZwSetDispositionInformationFile (delete-on-close; deleted).
+
+
+
+
+ ZwSetModeInformationFile (delete-on-close; deleted).
+
+
+
+
+ ZwSetFileNameInformationFile (source; read and written).
+
+
+
+
+ ZwSetFileNameInformationFile (destination; written).
+
+
+
+
+ CopyFile (source; read).
+
+
+
+
+ CopyFile (destination; written).
+
+
+
+
+ CreateHardLink (source; read).
+
+
+
+
+ CreateHardLink (destination; written).
+
+
+
+
+ RemoveDirectory.
+
+
+
+
+ RemoveDirectory (source; written).
+
+
+
+
+ NtQueryDirectoryFile.
+
+
+
+
+ ZwQueryDirectoryFile.
+
+
+
+
+ NtCreateFile.
+
+
+
+
+ ZwCreateFile.
+
+
+
+
+ ZwOpenFile.
+
+
+
+
+ This is a quasi operation. We issue this
+ report when Detours is changing file open
+ request with Read/Write access to Read access only.
+
+
+
+
+ This is a quasi operation. The sandbox issues this only when FileAccessPolicy.OverrideAllowWriteForExistingFiles is set, representing
+ that an allow for write check was performed for a given path for the first time (in the scope of a process, another process in the same process
+ tree may also report this for the same path).
+
+
+
+
+ This operation used to indicate to the engine by the Linux sandbox that a process being executed statically links libc
+ and may have missing file observations.
+
+
+
+
+ Access of reparse point target.
+
+
+
+
+ Access of reparse point target, cached by Detours.
+
+
+
+
+ Access checks for source of CreateSymbolicLink API.
+
+
+
+
+ Access check for MoveFileWithgProgress source target.
+
+
+
+
+ Access check for MoveFileWithProgress dest target.
+
+
+
+
+ Multiple operations lumped into one.
+
+
+
+
+ Process exited.
+
+
+
+
+ Level of access requested by a reported file operation.
+
+
+
+
+ No access requested.
+
+
+
+
+ Read access requested.
+
+
+
+
+ Write access requested.
+
+
+
+
+ Metadata-only probe access requested (e.g. ).
+
+
+
+
+ Directory enumeration access requested (on the directory itself; immediate children will be enumerated).
+
+
+
+
+ Metadata-only probe access requested; probed as part of a directory enumeration (e.g. ).
+
+
+
+
+ Both read and write access requested.
+
+
+
+
+ All defined access levels requested.
+
+
+
+
+ This class represents an implementation of INode for out-of-proc server nodes aka MSBuild server
+
+
+
+
+ A callback used to execute command line build.
+
+
+
+
+ The endpoint used to talk to the host.
+
+
+
+
+ The packet factory.
+
+
+
+
+ The queue of packets we have received but which have not yet been processed.
+
+
+
+
+ The event which is set when we receive packets.
+
+
+
+
+ The event which is set when we should shut down.
+
+
+
+
+ The reason we are shutting down.
+
+
+
+
+ The exception, if any, which caused shutdown.
+
+
+
+
+ Indicate that cancel has been requested and initiated.
+
+
+
+
+ Starts up the server node and processes all build requests until the server is requested to shut down.
+
+ The exception which caused shutdown, if any.
+ The reason for shutting down.
+
+
+
+ Registers a packet handler.
+
+ The packet type for which the handler should be registered.
+ The factory used to create packets.
+ The handler for the packets.
+
+
+
+ Unregisters a packet handler.
+
+ The type of packet for which the handler should be unregistered.
+
+
+
+ Deserializes and routes a packer to the appropriate handler.
+
+ The node from which the packet was received.
+ The packet type.
+ The translator to use as a source for packet data.
+
+
+
+ Routes a packet to the appropriate handler.
+
+ The node id from which the packet was received.
+ The packet to route.
+
+
+
+ Called when a packet has been received.
+
+ The node from which the packet was received.
+ The packet.
+
+
+
+ Perform necessary actions to shut down the node.
+
+
+
+
+ Event handler for the node endpoint's LinkStatusChanged event.
+
+
+
+
+ Callback for logging packets to be sent.
+
+
+
+
+ Dispatches the packet to the correct handler.
+
+
+
+
+ NodeBuildComplete is used to signalize that node work is done (including server node)
+ and shall recycle or shutdown if PrepareForReuse is false.
+
+
+
+
+
+
+
+
+
+
+
+ Reports file accesses and process data to the in-proc node.
+
+
+
+
+ The to report file accesses and process
+ data to the in-proc node.
+
+
+
+
+ Reports a file access to the in-proc node.
+
+ The file access to report to the in-proc node.
+ The id of the reporting out-of-proc node.
+
+
+
+ Reports process data to the in-proc node.
+
+ The process data to report to the in-proc node.
+ The id of the reporting out-of-proc node.
+
+
+
+
+
+
+
+
+
+ The base to fall back to for functionality not provided by .
+
+
+
+
+ A host-provided cache used for file existence and directory enumeration.
+
+
+
+
+ A provider of instances. To be implemented by MSBuild hosts that wish to intercept
+ file existence checks and file enumerations performed during project evaluation.
+
+
+ Unlike , file enumeration returns file/directory names, not full paths.
+ The host uses to specify the directory cache
+ factory per project.
+
+
+
+
+ Returns an to be used when evaluating the project associated with this .
+
+ The ID of the evaluation for which the interface is requested.
+
+
+
+ A predicate taking file name.
+
+ The file name to check.
+
+
+
+ A function taking file name and returning an arbitrary result.
+
+ The type of the result to return
+ The file name to transform.
+
+
+
+ Allows the implementor to intercept file existence checks and file enumerations performed during project evaluation.
+
+
+
+
+ Returns true if the given path points to an existing file on disk.
+
+ A full and normalized path.
+
+
+
+ Returns true if the given path points to an existing directory on disk.
+
+ A full and normalized path.
+
+
+
+ Enumerates files in the given directory only (non-recursively).
+
+ The desired return type.
+ The directory to enumerate, specified as a full normalized path.
+ A search pattern supported by the platform which is guaranteed to return a superset of relevant files.
+ A predicate to test whether a file should be included.
+ A transform from ReadOnlySpan<char> to .
+
+ The parameter may match more files than what the caller is interested in. In other words,
+ can return false even if the implementation enumerates only files whose names
+ match the pattern. The implementation is free to ignore the pattern and call the predicate for all files on the given
+ .
+
+
+
+
+ Enumerates subdirectories in the given directory only (non-recursively).
+
+ The desired return type.
+ The directory to enumerate, specified as a full normalized path.
+ A search pattern supported by the platform which is guaranteed to return a superset of relevant directories.
+ A predicate to test whether a directory should be included.
+ A transform from ReadOnlySpan<char> to .
+
+ The parameter may match more direcories than what the caller is interested in. In other words,
+ can return false even if the implementation enumerates only directories whose names
+ match the pattern. The implementation is free to ignore the pattern and call the predicate for all directories on the given
+ .
+
+
+
+
+ Abstracts away some file system operations.
+
+ Implementations:
+ - must be thread safe
+ - may cache some or all the calls.
+
+
+
+
+ Use this for var sr = new StreamReader(path)
+
+
+
+
+ Use this for new FileStream(path, mode, access, share)
+
+
+
+
+ Use this for File.ReadAllText(path)
+
+
+
+
+ Use this for File.ReadAllBytes(path)
+
+
+
+
+ Use this for Directory.EnumerateFiles(path, pattern, option)
+
+
+
+
+ Use this for Directory.EnumerateFolders(path, pattern, option)
+
+
+
+
+ Use this for Directory.EnumerateFileSystemEntries(path, pattern, option)
+
+
+
+
+ Use this for File.GetAttributes()
+
+
+
+
+ Use this for File.GetLastWriteTimeUtc(path)
+
+
+
+
+ Use this for Directory.Exists(path)
+
+
+
+
+ Use this for File.Exists(path)
+
+
+
+
+ Use this for File.Exists(path) || Directory.Exists(path)
+
+
+
+
+ The item type to which this metadata applies.
+
+
+
+
+ Wraps the NuGet.Frameworks assembly, which is referenced by reflection and optionally loaded into a separate AppDomain for performance.
+
+
+
+
+ Methods, properties, and objects used from the NuGet.Frameworks assembly.
+
+
+
+
+ Public constructor for cross-domain activation only. Use to instantiate.
+
+
+
+
+ Initialized this instance. May run in a separate AppDomain.
+
+ The NuGet.Frameworks to be loaded or null to load by path.
+ The file path from which NuGet.Frameworks should be loaded of is null.
+
+
+
+ A null-returning InitializeLifetimeService to give the proxy an infinite lease time.
+
+
+
+
+ Creates suitable for loading Microsoft.Build, NuGet.Frameworks, and dependencies.
+ See https://github.com/dotnet/msbuild/blob/main/documentation/NETFramework-NGEN.md#nugetframeworks for the motivation
+ to use a separate AppDomain.
+
+
+
+
+ Wraps an existing allowing the property usage to be tracked.
+
+ The type of properties to be produced.
+ The type of items to be produced.
+ The type of metadata on those items.
+ The type of item definitions to be produced.
+
+
+
+ Creates an instance of the PropertyTrackingEvaluatorDataWrapper class.
+
+ The underlying to wrap for property tracking.
+ The used to log relevant events.
+ Property tracking setting value
+
+
+
+ Returns a property with the specified name, or null if it was not found.
+
+ The property name.
+ The property.
+
+
+
+ Returns a property with the specified name, or null if it was not found.
+ Name is the segment of the provided string with the provided start and end indexes.
+
+
+
+
+ Sets a property which does not come from the Xml.
+
+
+
+
+ Sets a property which comes from the Xml.
+ Predecessor is any immediately previous property that was overridden by this one during evaluation.
+ This would include all properties with the same name that lie above in the logical
+ project file, and whose conditions evaluated to true.
+ If there are none above this is null.
+
+
+
+
+ Logic containing what to do when a property is read.
+
+ The name of the property.
+ The value of the property that was read (null if there is no value).
+
+
+
+ Logs an EnvironmentVariableRead event.
+
+ The name of the environment variable read.
+
+
+
+ Logs an UninitializedPropertyRead event.
+
+ The name of the uninitialized property read.
+
+
+
+ If the property's initial value is set, it logs a PropertyInitialValueSet event.
+
+ The property being set.
+ The source of the property.
+
+
+
+ If the property's value has changed, it logs a PropertyReassignment event.
+
+ The property's preceding state. Null if none.
+ The property's current state.
+ The location of this property's reassignment.
+
+
+
+ Determines the source of a property given the variables SetProperty arguments provided. This logic follows what's in .
+
+
+
+
+ The available sources for a property.
+
+
+
+
+ Flags to control options when creating a new, in memory, project.
+
+
+
+
+ Do not include any options.
+
+
+
+
+ Include the XML declaration element.
+
+
+
+
+ Include the ToolsVersion attribute on the Project element.
+
+
+
+
+ Include the default MSBuild namespace on the Project element.
+
+
+
+
+ Include all file options.
+
+
+
+
+ Properties or other mutable state associated with a .
+
+
+
+
+ The property changed.
+
+
+
+
+ The toolsets changed.
+
+
+
+
+ The loggers changed.
+
+
+
+
+ The global properties changed.
+
+
+
+
+ The property changed.
+
+
+
+
+ The property changed.
+
+
+
+
+ The property changed.
+
+
+
+
+ The property changed.
+
+
+
+
+ The property changed.
+
+
+
+
+ Event arguments for the event.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets the nature of the change made to the .
+
+
+
+
+ Class representing a reference to a project import path with property fall-back
+ This class is immutable.
+ If mutability would be needed in the future, it should be implemented via copy-on-write or
+ a DeepClone would need to be added (and called from DeepClone methods of owning types)
+
+
+
+
+ ProjectImportPathMatch instance representing no fall-back
+
+
+
+
+ String representation of the property reference - eg. "MSBuildExtensionsPath32"
+
+
+
+
+ Returns the corresponding property name - eg. "$(MSBuildExtensionsPath32)"
+
+
+
+
+ Enumeration of the search paths for the property.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ Flags for controlling the project load.
+
+
+ This is a "flags" enum, allowing future settings to be added
+ in an additive, non breaking fashion.
+
+
+
+
+ Normal load. This is the default.
+
+
+
+
+ Ignore nonexistent targets files when evaluating the project
+
+
+
+
+ Record imports including duplicate, but not circular, imports on the ImportsIncludingDuplicates property
+
+
+
+
+ Throw an exception and stop the evaluation of a project if any circular imports are detected
+
+
+
+
+ Record the item elements that got evaluated
+
+
+
+
+ Ignore empty targets files when evaluating the project
+
+
+
+
+ By default, evaluations performed via evaluate and collect elements whose conditions were false (e.g. ).
+ This flag turns off this behaviour. members that collect such elements will throw when accessed.
+
+
+
+
+ Ignore invalid target files when evaluating the project
+
+
+
+
+ Whether to profile the evaluation
+
+
+
+
+ Used in combination with to still treat an unresolved MSBuild project SDK as an error.
+
+
+
+
+ An object used by the caller to extend the lifespan of evaluation caches (by passing the object on to other
+ evaluations).
+ The caller should throw away the context when the environment changes (IO, environment variables, SDK resolution
+ inputs, etc).
+ This class and its closure needs to be thread safe since API users can do evaluations in parallel.
+
+
+
+
+ Instructs the to reuse all cached state between the different project evaluations that use it.
+
+
+
+
+ Instructs the to not reuse any cached state between the different project evaluations that use it.
+
+
+
+
+ Instructs the to reuse SDK resolver cache between the different project evaluations that use it.
+ No other cached state is reused.
+
+
+
+
+ For contexts that are not fully shared, this field tracks whether the instance has already been used for evaluation.
+
+
+
+
+ Key to file entry list. Example usages: cache glob expansion and intermediary directory expansions during glob expansion.
+
+
+
+
+ Factory for
+
+ The to use.
+
+
+
+ Factory for
+
+ The to use.
+ The to use.
+ This parameter is compatible only with .
+ The method throws if a file system is used with or .
+ The reasoning is that these values guarantee not reusing file system caches between evaluations,
+ and the passed in might cache state.
+
+
+
+
+ Creates a copy of this with a given swapped in.
+
+ The file system to use by the new evaluation context.
+ The new evaluation context.
+
+
+
+ Pretty prints an evaluation location in markdown format
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Pretty prints an evaluation location with its associated profiled location
+
+
+
+
+ Appends the header of all the locations to the string builder
+
+
+
+
+
+ Appends a pretty printed location with its associated profiled data
+
+
+
+
+ Normalizes the expression returned by
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Appends a default header with a given separator
+
+
+
+
+ Appends a default representation of an evaluation location with a given separator
+
+
+
+
+ Pretty prints an evaluation location in tab separated value (TSV) format
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tracks an assortment of evaluation elements in a stack-like fashion, keeping inclusive and exclusive times for each of them.
+
+
+
+
+ If is false, then requesting to track a given element has no effect and a null is returned.
+
+
+
+
+ Contains each evaluated location with its associated timed entry
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns true when the evaluation stack is empty.
+
+
+
+
+
+ A frame in the evaluation tracker
+
+
+ Each frame keeps track of its inclusive and exclusive times
+
+
+
+
+
+
+
+ Constructs a new evaluation frame and pushes it to the tracker stack
+
+
+
+
+ Pops this from the tracker stack and computes inclusive and exclusive times
+
+
+
+
+ Represents the elements of an item specification string (e.g. Include="*.cs;foo;@(i)") and
+ provides some operations over them (like matching items against a given ItemSpec)
+
+
+
+
+ The fragments that compose an item spec string (values, globs, item references)
+
+
+
+
+ The expander needs to have a default item factory set.
+
+
+
+
+ The xml attribute where this itemspec comes from
+
+
+
+ The string containing item syntax
+ Expects the expander to have a default item factory set
+ The xml location the itemspec comes from
+ The directory that the project is in.
+ Expand properties before breaking down fragments. Defaults to true
+ Context in which to log
+
+
+
+ Return true if the given matches this itemspec
+
+ The item to attempt to find a match for.
+
+
+
+ Return the fragments that match against the given
+
+ The item to match.
+
+ Total number of matches. Some fragments match more than once (item expression may contain multiple instances of
+ )
+
+
+
+
+ Returns a list of normalized paths that are common between this itemspec and keys of the given dictionary.
+
+ The dictionary to match this itemspec against.
+ The keys of that are also referenced by this itemspec.
+
+
+
+ Return an MSBuildGlob that represents this ItemSpec.
+
+
+
+
+ Returns all the fragment strings that represent it.
+ "1;*;2;@(foo)" gets returned as ["1", "2", "*", "a", "b"], given that @(foo)=["a", "b"]
+ Order is not preserved. Globs are not expanded. Item expressions get replaced with their referring item instances.
+
+
+
+
+ The substring from the original itemspec representing this fragment
+
+
+
+
+ Path of the project the itemspec is coming from
+
+
+
+ The number of times the
+
+ appears in this fragment
+
+
+
+
+ True if TextFragment starts with /**/ or a variation thereof with backslashes.
+
+
+
+
+ A Trie representing the sets of values of specified metadata taken on by the referenced items.
+ A single flat list or set of metadata values would not work in this case because we are matching
+ on multiple metadata. If one item specifies NotTargetFramework to be net46 and TargetFramework to
+ be netcoreapp3.1, we wouldn't want to match that to an item with TargetFramework 46 and
+ NotTargetFramework netcoreapp3.1.
+
+ Implementing this as a list of sets where each metadatum key has its own set also would not work
+ because different items could match on different metadata, and we want to check to see if any
+ single item matches on all the metadata. As an example, consider this scenario:
+ Item Baby has metadata GoodAt="eating" BadAt="talking" OkAt="sleeping"
+ Item Child has metadata GoodAt="sleeping" BadAt="eating" OkAt="talking"
+ Item Adolescent has metadata GoodAt="talking" BadAt="sleeping" OkAt="eating"
+ Specifying these three metadata:
+ Item Forgind with metadata GoodAt="sleeping" BadAt="talking" OkAt="eating"
+ should match none of them because Forgind doesn't match all three metadata of any of the items.
+ With a list of sets, Forgind would match Baby on BadAt, Child on GoodAt, and Adolescent on OkAt,
+ and Forgind would be erroneously removed.
+
+ With a Trie as below, Items specify paths in the tree, so going to any child node eliminates all
+ items that don't share that metadatum. This ensures the match is proper.
+
+ Todo: Tries naturally can have different shapes depending on in what order the metadata are considered.
+ Specifically, if all the items share a single metadata value for the one metadatum and have different
+ values for a second metadatum, it will have only one node more than the number of items if the first
+ metadatum is considered first. If the metadatum is considered first, it will have twice that number.
+ Users can theoretically specify the order in which metadata should be considered by reordering them
+ on the line invoking this, but that is extremely nonobvious from a user's perspective.
+ It would be nice to detect poorly-ordered metadata and account for it to avoid making more nodes than
+ necessary. This would need to order if appropriately both in creating the MetadataTrie and in using it,
+ so it could best be done as a preprocessing step. For now, wait to find out if it's necessary (users'
+ computers run out of memory) before trying to implement it.
+
+ Property type
+ Item type
+
+
+
+ Wrapper of two tables for a convenient method return value.
+
+
+
+
+ The item set
+
+
+
+
+ The metadata dictionary.
+ The key is the possibly qualified metadata name, for example
+ "EmbeddedResource.Culture" or "Culture"
+
+
+
+
+ Constructs a pair from an item set and metadata
+
+ The item set
+ The metadata dictionary
+
+
+
+ Gets or sets the item set
+
+
+
+
+ Gets or sets the metadata dictionary
+ The key is the possibly qualified metadata name, for example
+ "EmbeddedResource.Culture" or "Culture"
+
+
+
+
+ COMPAT: Whidbey used the "current project file/targets" directory for evaluating Import and PropertyGroup conditions
+ Orcas broke this by using the current root project file for all conditions
+ For Dev10+, we'll fix this, and use the current project file/targets directory for Import, ImportGroup and PropertyGroup
+ but the root project file for the rest. Inside of targets will use the root project file as always.
+
+
+
+
+ Lazily created normalized item value.
+
+
+
+
+ Somebody is referencing this operation
+
+
+
+
+ Applies uncached item operations (include, remove, update) in order. Since Remove effectively overwrites Include or Update,
+ Remove operations are preprocessed (adding to globsToIgnore) to create a longer list of globs we don't need to process
+ properly because we know they will be removed. Update operations are batched as much as possible, meaning rather
+ than being applied immediately, they are combined into a dictionary of UpdateOperations that need to be applied. This
+ is to optimize the case in which as series of UpdateOperations, each of which affects a single ItemSpec, are applied to all
+ items in the list, leading to a quadratic-time operation.
+
+
+
+
+ Apply the Update operation to the item if it matches.
+
+ The item to check for a match.
+ The updated item.
+
+
+
+ This sets the function used to determine whether an item matches an item spec.
+
+
+
+
+ Apply the Remove operation.
+
+
+ This override exists to apply the removing-everything short-circuit and to avoid creating a redundant list of items to remove.
+
+
+
+
+ A collection of ItemData that maintains insertion order and internally optimizes some access patterns, e.g. bulk removal
+ based on normalized item values.
+
+
+
+
+ A mutable and enumerable version of .
+
+
+
+
+ The list of items in the collection. Defines the enumeration order.
+
+
+
+
+ A dictionary of items keyed by their normalized value.
+
+
+
+
+ Gets or creates a dictionary keyed by normalized values.
+
+
+
+
+ Removes all items passed in a collection.
+
+
+
+
+ Removes all items whose normalized path is passed in a collection.
+
+
+
+
+ Creates an immutable view of this collection.
+
+
+
+
+ The list of items in the collection. Defines the enumeration order.
+
+
+
+
+ Creates a new mutable collection.
+
+
+
+
+ Creates a mutable view of this collection. Changes made to the returned builder are not reflected in this collection.
+
+
+
+
+ Produce the items to operate on. For example, create new ones or select existing ones
+
+
+
+
+ Is this spec a single reference to a specific item?
+
+ True if the item is a simple reference to the referenced item type.
+
+
+
+ An efficient multi-value wrapper holding one or more items.
+
+
+
+
+ A non-allocating enumerator for the multi-value.
+
+
+
+
+ Holds one value or a list of values.
+
+
+
+
+ This struct represents a reference to a piece of item metadata. For example,
+ %(EmbeddedResource.Culture) or %(Culture) in the project file. In this case,
+ "EmbeddedResource" is the item name, and "Culture" is the metadata name.
+ The item name is optional.
+
+
+
+
+ The item name
+
+
+
+
+ The metadata name
+
+
+
+
+ Constructor
+
+ Name of the item
+ Name of the metadata
+
+
+
+ Pretty prints a profiled result to a variety of formats
+
+
+
+
+ Gets a profiled result in a markdown-like form.
+
+
+
+
+ Gets a profiled result in a tab separated value form.
+
+
+
+
+ Event arguments for the event.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The changed project.
+
+
+
+ Gets the project that was marked dirty.
+
+ Never null.
+
+
+
+ Event arguments for the event.
+
+
+
+
+ The unformatted reason for dirtying the project collection.
+
+
+
+
+ The formatting parameter.
+
+
+
+
+ Initializes a new instance of the class
+ that represents a change to a specific project root element.
+
+ The ProjectRootElement whose content was actually changed.
+ The unformatted (may contain {0}) reason for the dirty event.
+ The formatting parameter to use with .
+
+
+
+ Gets the project root element which was just changed..
+
+ Never null.
+
+
+
+ Gets the reason for the change.
+
+ May be null.
+
+
+
+ Interface for an object which can provide toolsets for evaulation.
+
+
+
+
+ Gets an enumeration of all toolsets in the provider.
+
+
+
+
+ Retrieves a specific toolset.
+
+ The tools version for the toolset.
+ The requested toolset.
+
+
+
+ This class encapsulates the behavior and collection of built-in metadata. These metadatum
+ are inferred from the content of the include and sometimes the context of the project or
+ current directory.
+
+
+
+
+ Retrieves the count of built-in metadata.
+
+
+
+
+ Retrieves the list of metadata names.
+
+
+
+
+ Retrieves a built-in metadata value and caches it.
+ Never returns null.
+
+
+ The current directory for evaluation. Null if this is being called from a task, otherwise
+ it should be the project's directory.
+
+ The evaluated include prior to wildcard expansion.
+ The evaluated include for the item.
+ The path to the project that defined this item
+ The name of the metadata.
+ The generated full path, for caching
+ The unescaped metadata value.
+
+
+
+ Retrieves a built-in metadata value and caches it.
+ If value is not available, returns empty string.
+
+
+ The current directory for evaluation. Null if this is being called from a task, otherwise
+ it should be the project's directory.
+
+ The evaluated include prior to wildcard expansion.
+ The evaluated include for the item.
+ The path to the project that defined this item
+ The name of the metadata.
+ The generated full path, for caching
+ The escaped as necessary metadata value.
+
+
+
+ Extract the value for "RecursiveDir", if any, from the Include.
+ If there is none, returns an empty string.
+
+
+ Inputs to and outputs of this function are all escaped.
+
+
+
+
+ Flags for controlling the toolset initialization.
+
+
+
+
+ Do not read toolset information from any external location.
+
+
+
+
+ Read toolset information from the exe configuration file.
+
+
+
+
+ Read toolset information from the registry (HKLM\Software\Microsoft\MSBuild\ToolsVersions).
+
+
+
+
+ Read toolset information from the current exe path
+
+
+
+
+ Use the default location or locations.
+
+
+
+
+ This class encapsulates a set of related projects, their toolsets, a default set of global properties,
+ and the loggers that should be used to build them.
+ A global version of this class acts as the default ProjectCollection.
+ Multiple ProjectCollections can exist within an appdomain. However, these must not build concurrently.
+
+
+
+
+ The object to synchronize with when accessing certain fields.
+
+
+ ProjectCollection is highly reentrant - project creation, toolset and logger changes, and so on
+ all need lock protection, but there are a lot of read cases as well, and calls to create Projects
+ call back to the ProjectCollection under locks. Use a RW lock with recursion support to avoid
+ adding reentrancy bugs.
+
+
+
+
+ The global singleton project collection used as a default for otherwise
+ unassociated projects.
+
+
+
+
+ Gets the file version of the file in which the Engine assembly lies.
+
+
+ This is the Windows file version (specifically the value of the ProductVersion
+ resource), not necessarily the assembly version.
+ If you want the assembly version, use Constants.AssemblyVersion.
+
+
+
+
+ The display version of the file in which the Engine assembly lies.
+
+
+
+
+ The projects loaded into this collection.
+
+
+
+
+ External projects support
+
+
+
+
+ Single logging service used for all builds of projects in this project collection
+
+
+
+
+ Any object exposing host services.
+ May be null.
+
+
+
+
+ A mapping of tools versions to Toolsets, which contain the public Toolsets.
+ This is the collection we use internally.
+
+
+
+
+ The default global properties.
+
+
+
+
+ The properties representing the environment.
+
+
+
+
+ The default tools version obtained by examining all of the toolsets.
+
+
+
+
+ A counter incremented every time the toolsets change which would necessitate a re-evaluation of
+ associated projects.
+
+
+
+
+ This is the default value used by newly created projects for whether or not the building
+ of projects is enabled. This is for security purposes in case a host wants to closely
+ control which projects it allows to run targets/tasks.
+
+
+
+
+ We may only wish to log critical events, record that fact so we can apply it to build requests
+
+
+
+
+ Whether reevaluation is temporarily disabled on projects in this collection.
+ This is useful when the host expects to make a number of reads and writes
+ to projects, and wants to temporarily sacrifice correctness for performance.
+
+
+
+
+ Whether MarkDirty() is temporarily disabled on
+ projects in this collection.
+ This allows, for example, global properties to be set without projects getting
+ marked dirty for reevaluation as a consequence.
+
+
+
+
+ The maximum number of nodes which can be started during the build
+
+
+
+
+ LoggingService Logger mode.
+ If Asynchronous mode is used
+
+
+
+
+ Instantiates a project collection with no global properties or loggers that reads toolset
+ information from the configuration file and registry.
+
+
+
+
+ Instantiates a project collection using toolsets from the specified locations,
+ and no global properties or loggers.
+ May throw InvalidToolsetDefinitionException.
+
+ The locations from which to load toolsets.
+
+
+
+ Instantiates a project collection with specified global properties, no loggers,
+ and that reads toolset information from the configuration file and registry.
+ May throw InvalidToolsetDefinitionException.
+
+ The default global properties to use. May be null.
+
+
+
+ Instantiates a project collection with specified global properties and loggers and using the
+ specified toolset locations.
+ May throw InvalidToolsetDefinitionException.
+
+ The default global properties to use. May be null.
+ The loggers to register. May be null.
+ The locations from which to load toolsets.
+
+
+
+ Instantiates a project collection with specified global properties and loggers and using the
+ specified toolset locations, node count, and setting of onlyLogCriticalEvents.
+ Global properties and loggers may be null.
+ Throws InvalidProjectFileException if any of the global properties are reserved.
+ May throw InvalidToolsetDefinitionException.
+
+ The default global properties to use. May be null.
+ The loggers to register. May be null and specified to any build instead.
+ Any remote loggers to register. May be null and specified to any build instead.
+ The locations from which to load toolsets.
+ The maximum number of nodes to use for building.
+ If set to true, only critical events will be logged.
+
+
+
+ Instantiates a project collection with specified global properties and loggers and using the
+ specified toolset locations, node count, and setting of onlyLogCriticalEvents.
+ Global properties and loggers may be null.
+ Throws InvalidProjectFileException if any of the global properties are reserved.
+ May throw InvalidToolsetDefinitionException.
+
+ The default global properties to use. May be null.
+ The loggers to register. May be null and specified to any build instead.
+ Any remote loggers to register. May be null and specified to any build instead.
+ The locations from which to load toolsets.
+ The maximum number of nodes to use for building.
+ If set to true, only critical events will be logged.
+ If set to true, load all projects as read-only.
+
+
+
+ Instantiates a project collection with specified global properties and loggers and using the
+ specified toolset locations, node count, and setting of onlyLogCriticalEvents.
+ Global properties and loggers may be null.
+ Throws InvalidProjectFileException if any of the global properties are reserved.
+ May throw InvalidToolsetDefinitionException.
+
+ The default global properties to use. May be null.
+ The loggers to register. May be null and specified to any build instead.
+ Any remote loggers to register. May be null and specified to any build instead.
+ The locations from which to load toolsets.
+ The maximum number of nodes to use for building.
+ If set to true, only critical events will be logged.
+ If set to true, load all projects as read-only.
+ If set to true, asynchronous logging will be used. has to called to clear resources used by async logging.
+ If set to true, it will try to reuse singleton.
+
+
+
+ Handler to receive which project got added to the project collection.
+
+
+
+
+ Event that is fired when a project is added to the ProjectRootElementCache of this project collection.
+
+
+
+
+ Raised when state is changed on this instance.
+
+
+ This event is NOT raised for changes in individual projects.
+
+
+
+
+ Raised when a contained by this instance is changed.
+
+
+ This event is NOT raised for changes to global properties, or any other change that doesn't actually dirty the XML.
+
+
+
+
+ Raised when a contained by this instance is directly changed.
+
+
+ This event is NOT raised for direct project XML changes via the construction model.
+
+
+
+
+ Retrieves the global project collection object.
+ This is a singleton project collection with no global properties or loggers that reads toolset
+ information from the configuration file and registry.
+ May throw InvalidToolsetDefinitionException.
+ Thread safe.
+
+
+
+
+ Gets the file version of the file in which the Engine assembly lies.
+
+
+ This is the Windows file version (specifically the value of the FileVersion
+ resource), not necessarily the assembly version.
+ If you want the assembly version, use Constants.AssemblyVersion.
+ This is not the .
+
+
+
+
+ Gets a version of the Engine suitable for display to a user.
+
+
+ This is in the form of a SemVer v2 version, Major.Minor.Patch-prerelease+metadata.
+
+
+
+
+ The default tools version of this project collection. Projects use this tools version if they
+ aren't otherwise told what tools version to use.
+ This value is gotten from the .exe.config file, or else in the registry,
+ or if neither specify a default tools version then it is hard-coded to the tools version "2.0".
+ Setter throws InvalidOperationException if a toolset with the provided tools version has not been defined.
+ Always defined.
+
+
+
+
+ Returns default global properties for all projects in this collection.
+ Read-only dead dictionary.
+
+
+ This is the publicly exposed getter, that translates into a read-only dead IDictionary<string, string>.
+
+ To be consistent with Project, setting and removing global properties is done with
+ SetGlobalProperty and RemoveGlobalProperty.
+
+
+
+
+ All the projects currently loaded into this collection.
+ Each has a unique combination of path, global properties, and tools version.
+
+
+
+
+ Number of projects currently loaded into this collection.
+
+
+
+
+ Loggers that all contained projects will use for their builds.
+ Loggers are added with the .
+ Returns an empty collection if there are no loggers.
+
+
+
+
+ Returns the toolsets this ProjectCollection knows about.
+
+
+ ValueCollection is already read-only
+
+
+
+
+ Returns the locations used to find the toolsets.
+
+
+
+
+ This is the default value used by newly created projects for whether or not the building
+ of projects is enabled. This is for security purposes in case a host wants to closely
+ control which projects it allows to run targets/tasks.
+
+
+
+
+ When true, only log critical events such as warnings and errors. Has to be in here for API compat
+
+
+
+
+ Object exposing host services to tasks during builds of projects
+ contained by this project collection.
+ By default, HostServices is used.
+ May be set to null, but the getter will create a new instance in that case.
+
+
+
+
+ Whether reevaluation is temporarily disabled on projects in this collection.
+ This is useful when the host expects to make a number of reads and writes
+ to projects, and wants to temporarily sacrifice correctness for performance.
+
+
+
+
+ Whether MarkDirty() is temporarily disabled on
+ projects in this collection.
+ This allows, for example, global properties to be set without projects getting
+ marked dirty for reevaluation as a consequence.
+
+
+
+
+ Global collection id.
+ Can be used for external providers to optimize the cross-site link exchange
+
+
+
+
+ External project support.
+ Establish a remote project link for this collection.
+
+
+
+
+ Logging service that should be used for project load and for builds
+
+
+
+
+ Gets default global properties for all projects in this collection.
+ Dead copy.
+
+
+
+
+ Returns the property dictionary containing the properties representing the environment.
+
+
+
+
+ Returns the internal version for this object's state.
+ Updated when toolsets change, indicating all contained projects are potentially invalid.
+
+
+
+
+ The maximum number of nodes which can be started during the build
+
+
+
+
+ The cache of project root elements associated with this project collection.
+ Each is associated with a specific project collection for two reasons:
+ - To help protect one project collection from any XML edits through another one:
+ until a reload from disk - when it's ready to accept changes - it won't see the edits;
+ - So that the owner of this project collection can force the XML to be loaded again
+ from disk, by doing .
+
+
+
+
+ Escape a string using MSBuild escaping format. For example, "%3b" for ";".
+ Only characters that are especially significant to MSBuild parsing are escaped.
+ Callers can use this method to make a string safe to be parsed to other methods
+ that would otherwise expand it; or to make a string safe to be written to a project file.
+
+
+
+
+ Unescape a string using MSBuild escaping format. For example, "%3b" for ";".
+ All escaped characters are unescaped.
+
+
+
+
+ Returns true if there is a toolset defined for the specified
+ tools version, otherwise false.
+
+
+
+
+ Add a new toolset.
+ Replaces any existing toolset with the same tools version.
+
+
+
+
+ Remove a toolset.
+ Returns true if it was present, otherwise false.
+
+
+
+
+ Removes all toolsets.
+
+
+
+
+ Get the toolset with the specified tools version.
+ If it is not present, returns null.
+
+
+
+
+ Figure out what ToolsVersion to use to actually build the project with.
+
+ The user-specified ToolsVersion (through e.g. /tv: on the command line). May be null
+ The ToolsVersion from the project file. May be null
+ The ToolsVersion we should use to build this project. Should never be null.
+
+
+
+ Returns any and all loaded projects with the provided path.
+ There may be more than one, if they are distinguished by global properties
+ and/or tools version.
+
+
+
+
+ Returns any and all loaded projects with the provided path.
+ There may be more than one, if they are distinguished by global properties
+ and/or tools version.
+
+
+
+
+ Loads a project with the specified filename, using the collection's global properties and tools version.
+ If a matching project is already loaded, it will be returned, otherwise a new project will be loaded.
+
+ The project file to load
+ A loaded project.
+
+
+
+ Loads a project with the specified filename and tools version, using the collection's global properties.
+ If a matching project is already loaded, it will be returned, otherwise a new project will be loaded.
+
+ The project file to load
+ The tools version to use. May be null.
+ A loaded project.
+
+
+
+ Loads a project with the specified filename, tools version and global properties.
+ If a matching project is already loaded, it will be returned, otherwise a new project will be loaded.
+
+ The project file to load
+ The global properties to use. May be null, in which case the containing project collection's global properties will be used.
+ The tools version. May be null.
+ A loaded project.
+
+
+
+ Loads a project with the specified reader, using the collection's global properties and tools version.
+ The project will be added to this project collection when it is named.
+
+ Xml reader to read project from
+ A loaded project.
+
+
+
+ Loads a project with the specified reader and tools version, using the collection's global properties.
+ The project will be added to this project collection when it is named.
+
+ Xml reader to read project from
+ The tools version to use. May be null.
+ A loaded project.
+
+
+
+ Loads a project with the specified reader, tools version and global properties.
+ The project will be added to this project collection when it is named.
+
+ Xml reader to read project from
+ The global properties to use. May be null in which case the containing project collection's global properties will be used.
+ The tools version. May be null.
+ A loaded project.
+
+
+
+ Adds a logger to the collection of loggers used for builds of projects in this collection.
+ If the logger object is already in the collection, does nothing.
+
+
+
+
+ Adds some loggers to the collection of loggers used for builds of projects in this collection.
+ If any logger object is already in the collection, does nothing for that logger.
+ May be null.
+
+
+
+
+ Adds some remote loggers to the collection of remote loggers used for builds of projects in this collection.
+ May be null.
+
+
+
+
+ Removes all loggers from the collection of loggers used for builds of projects in this collection.
+
+
+
+
+ Unloads the specific project specified.
+ Host should call this when they are completely done with the project.
+ If project was not already loaded, throws InvalidOperationException.
+
+
+
+
+ Unloads a project XML root element from the weak cache.
+
+ The project XML root element to unload.
+
+ Thrown if the project XML root element to unload is still in use by a loaded project or its imports.
+
+
+ This method is useful for the case where the host knows that all projects using this XML element
+ are unloaded, and desires to discard any unsaved changes.
+
+
+
+
+ Unloads all the projects contained by this ProjectCollection.
+ Host should call this when they are completely done with all the projects.
+
+
+
+
+ Get any global property on the project collection that has the specified name,
+ otherwise returns null.
+
+
+
+
+ Set a global property at the collection-level,
+ and on all projects in the project collection.
+
+
+
+
+ Removes a global property from the collection-level set of global properties,
+ and all projects in the project collection.
+ If it was on this project collection, returns true.
+
+
+
+
+ Called when a host is completely done with the project collection.
+
+
+
+
+ Initializes the component with the component host.
+
+ The component host.
+
+
+
+ Shuts down the component.
+
+
+
+
+ Unloads a project XML root element from the cache entirely, if it is not
+ in use by project loaded into this collection.
+ Returns true if it was unloaded successfully, or was not already loaded.
+ Returns false if it was not unloaded because it was still in use by a loaded .
+
+ The project XML root element to unload.
+
+
+
+ Logs a BuildFinished event. This is used specifically when a ProjectCollection is created but never actually built, yet a BuildFinished event
+ is still desired. As an example, if a Project is just meant to be evaluated, but a binlog is also collected, that binlog should be able to
+ say the build succeeded or failed. This provides a mechanism to achieve that.
+
+
+
+
+ Called by a Project object to load itself into this collection.
+ If the project was already loaded under a different name, it is unloaded.
+ Stores the project in the list of loaded projects if it has a name.
+ Does not store the project if it has no name because it has not been saved to disk yet.
+ If the project previously had a name, but was not in the collection already, throws InvalidOperationException.
+ If the project was not previously in the collection, sets the collection's global properties on it.
+
+
+
+
+ Called after a loaded project's global properties are changed, so we can update
+ our loaded project table.
+ Project need not already be in the project collection yet, but it can't be in another one.
+
+
+ We have to remove and re-add so that there's an error if there's already an equivalent
+ project loaded.
+
+
+
+
+ Following standard framework guideline dispose pattern.
+ Shut down logging service if the project collection owns one, in order
+ to shut down the logger thread and loggers.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources..
+
+
+
+ Remove a toolset and does not raise events. The caller should have acquired a write lock on this method's behalf.
+
+ The toolset to remove.
+ true if the toolset was found and removed; false otherwise.
+
+
+
+ Adds a logger to the collection of loggers used for builds of projects in this collection.
+ If the logger object is already in the collection, does nothing.
+
+
+
+
+ Handler which is called when a project is added to the RootElementCache of this project collection. We then fire an event indicating that a project was added to the collection itself.
+
+
+
+
+ Handler which is called when a project that is part of this collection is dirtied. We then fire an event indicating that a project has been dirtied.
+
+
+
+
+ Handler which is called when a project is dirtied.
+
+
+
+
+ Raises the event.
+
+ The event arguments that indicate ProjectRootElement-specific details.
+
+
+
+ Raises the event.
+
+ The event arguments that indicate Project-specific details.
+
+
+
+ Raises the event.
+
+ The event arguments that indicate details on what changed on the collection.
+
+
+
+ Shutdown the logging service
+
+
+
+
+ Create a new logging service
+
+
+
+
+ Reset the toolsets using the provided toolset reader, used by unit tests
+
+
+
+
+ Reset the toolsets using the provided toolset reader, used by unit tests
+
+
+
+
+ Populate Toolsets with a dictionary of (toolset version, Toolset)
+ using information from the registry and config file, if any.
+
+
+
+
+ Event to provide information about what project just got added to the project collection.
+
+
+
+
+ The root element which was added to the project collection.
+
+
+
+
+ Root element which was added to the project collection.
+
+
+
+
+ The ReusableLogger wraps a logger and allows it to be used for both design-time and build-time. It internally swaps
+ between the design-time and build-time event sources in response to Initialize and Shutdown events.
+
+
+
+
+ The logger we are wrapping.
+
+
+
+
+ Returns the logger we are wrapping.
+
+
+
+
+ The design-time event source
+
+
+
+
+ The build-time event source
+
+
+
+
+ The Any event handler
+
+
+
+
+ The BuildFinished event handler
+
+
+
+
+ The BuildStarted event handler
+
+
+
+
+ The Custom event handler
+
+
+
+
+ The Error event handler
+
+
+
+
+ The Message event handler
+
+
+
+
+ The ProjectFinished event handler
+
+
+
+
+ The ProjectStarted event handler
+
+
+
+
+ The Status event handler
+
+
+
+
+ The TargetFinished event handler
+
+
+
+
+ The TargetStarted event handler
+
+
+
+
+ The TaskFinished event handler
+
+
+
+
+ The TaskStarted event handler
+
+
+
+
+ The Warning event handler
+
+
+
+
+ The telemetry event handler.
+
+
+
+
+ Constructor.
+
+
+
+
+ The Message logging event
+
+
+
+
+ The Error logging event
+
+
+
+
+ The Warning logging event
+
+
+
+
+ The BuildStarted logging event
+
+
+
+
+ The BuildFinished logging event
+
+
+
+
+ The ProjectStarted logging event
+
+
+
+
+ The ProjectFinished logging event
+
+
+
+
+ The TargetStarted logging event
+
+
+
+
+ The TargetFinished logging event
+
+
+
+
+ The TashStarted logging event
+
+
+
+
+ The TaskFinished logging event
+
+
+
+
+ The Custom logging event
+
+
+
+
+ The Status logging event
+
+
+
+
+ The Any logging event
+
+
+
+
+ The telemetry sent event.
+
+
+
+
+ Should evaluation events include generated metaprojects?
+
+
+
+
+ Should evaluation events include profiling information?
+
+
+
+
+ Should task events include task inputs?
+
+
+
+
+ The logger verbosity
+
+
+
+
+ The logger parameters
+
+
+
+
+ If we haven't yet been initialized, we register for design time events and initialize the logger we are holding.
+ If we are in design-time mode
+
+
+
+
+ If we haven't yet been initialized, we register for design time events and initialize the logger we are holding.
+ If we are in design-time mode
+
+
+
+
+ If we are in build-time mode, we unregister for build-time events and re-register for design-time events.
+ If we are in design-time mode, we unregister for design-time events and shut down the logger we are holding.
+
+
+
+
+ Registers for all of the events on the specified event source.
+
+
+
+
+ Unregisters for all events on the specified event source.
+
+
+
+
+ Handler for Warning events.
+
+
+
+
+ Handler for TaskStarted events.
+
+
+
+
+ Handler for TaskFinished events.
+
+
+
+
+ Handler for TargetStarted events.
+
+
+
+
+ Handler for TargetFinished events.
+
+
+
+
+ Handler for Status events.
+
+
+
+
+ Handler for ProjectStarted events.
+
+
+
+
+ Handler for ProjectFinished events.
+
+
+
+
+ Handler for Message events.
+
+
+
+
+ Handler for Error events.
+
+
+
+
+ Handler for Custom events.
+
+
+
+
+ Handler for BuildStarted events.
+
+
+
+
+ Handler for BuildFinished events.
+
+
+
+
+ Handler for Any events.
+
+
+
+
+ Handler for telemetry events.
+
+
+
+
+ Holder for the projects loaded into this collection.
+
+
+
+
+ The collection of all projects already loaded into this collection.
+ Key is the full path to the project, value is a list of projects with that path, each
+ with different global properties and/or tools version.
+
+
+ If hosts tend to load lots of projects with the same path, the value will have to be
+ changed to a more efficient type of collection.
+
+ Lock on this object. Concurrent load must be thread safe.
+ Not using ConcurrentDictionary because some of the add/update
+ semantics would get convoluted.
+
+
+
+
+ Count of loaded projects
+
+
+
+
+ Returns the number of projects currently loaded
+
+
+
+
+ Enumerate all the projects
+
+
+
+
+ Enumerate all the projects.
+
+
+
+
+ Get all projects with the provided path.
+ Returns an empty list if there are none.
+
+
+
+
+ Returns the project in the collection matching the path, global properties, and tools version provided.
+ There can be no more than one match.
+ If none is found, returns null.
+
+
+
+
+ Adds the provided project to the collection.
+ If there is already an equivalent project, throws InvalidOperationException.
+
+
+
+
+ Removes the provided project from the collection.
+ If project was not loaded, returns false.
+
+
+
+
+ Removes a project, using the specified full path to use as the key to find it.
+ This is specified separately in case the project was previously stored under a different path.
+
+
+
+
+ Removes all projects from the collection.
+
+
+
+
+ Returns true if the global properties and tools version provided are equivalent to
+ those in the provided project, otherwise false.
+
+
+
+
+ Represents an evaluated project with design time semantics.
+ Always backed by XML; can be built directly, or an instance can be cloned off to add virtual items/properties and build.
+ Edits to this project always update the backing XML.
+
+
+
+
+ Whether to write information about why we evaluate to debug output.
+
+
+
+
+ * and ? are invalid file name characters, but they occur in globs as wild cards.
+
+
+
+
+ Context to log messages and events in.
+
+
+
+
+ Host-provided factory for interfaces to be used during evaluation.
+
+
+
+
+ Default project template options (include all features).
+
+
+
+
+ Certain item operations split the item element in multiple elements if the include
+ contains globs, references to items or properties, or multiple item values.
+
+ The items operations that may expand item elements are:
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+
+ When this property is set to true, the previous item operations throw an
+ instead of expanding the item element.
+
+
+
+
+ Construct an empty project, evaluating with the global project collection's
+ global properties and default tools version.
+ Project will be added to the global project collection when it is named.
+
+
+
+
+ Construct an empty project, evaluating with the global project collection's
+ global properties and default tools version.
+ Project will be added to the global project collection when it is named.
+
+
+
+
+ Construct an empty project, evaluating with the specified project collection's
+ global properties and default tools version.
+ Project will be added to the specified project collection when it is named.
+
+
+
+
+ Construct an empty project, evaluating with the specified project collection's
+ global properties and default tools version.
+ Project will be added to the specified project collection when it is named.
+
+
+
+
+ Construct an empty project, evaluating with the specified project collection and
+ the specified global properties and default tools version, either of which may be null.
+ Project will be added to the specified project collection when it is named.
+
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ The the project is added to.
+
+
+
+ Construct an empty project, evaluating with the specified project collection and
+ the specified global properties and default tools version, either of which may be null.
+ Project will be added to the specified project collection when it is named.
+
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ The the project is added to.
+ The to use for the new project.
+
+
+
+ Construct over a ProjectRootElement object, evaluating with the global project collection's
+ global properties and default tools version.
+ Project is added to the global project collection if it has a name, or else when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ ProjectRootElement to use.
+
+
+
+ Construct over a ProjectRootElement object, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project is added to the global project collection if it has a name, or else when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ ProjectRootElement to use.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+
+
+
+ Construct over a ProjectRootElement object, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project is added to the global project collection if it has a name, or else when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ ProjectRootElement to use.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ The the project is added to.
+
+
+
+ Construct over a ProjectRootElement object, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project is added to the global project collection if it has a name, or else when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ ProjectRootElement to use.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ The the project is added to.
+ The to use for evaluation.
+
+
+
+ Construct over a ProjectRootElement object, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project is added to the global project collection if it has a name, or else when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ ProjectRootElement to use.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ Sub-toolset version to explicitly evaluate the toolset with. May be null.
+ The the project is added to.
+ The to use for evaluation.
+
+
+
+ Construct over a text reader over project xml, evaluating with the global project collection's
+ global properties and default tools version.
+ Project will be added to the global project collection when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ Xml reader to read project from.
+
+
+
+ Construct over a text reader over project xml, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project will be added to the global project collection when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ Xml reader to read project from.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+
+
+
+ Construct over a text reader over project xml, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project will be added to the specified project collection when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ Xml reader to read project from.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ The collection with which this project should be associated. May not be null.
+
+
+
+ Construct over a text reader over project xml, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project will be added to the specified project collection when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ Xml reader to read project from.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ The collection with which this project should be associated. May not be null.
+ The to use for evaluation.
+
+
+
+ Construct over a text reader over project xml, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project will be added to the specified project collection when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ Xml reader to read project from.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ Sub-toolset version to explicitly evaluate the toolset with. May be null.
+ The collection with which this project should be associated. May not be null.
+ The load settings for this project.
+
+
+
+ Construct over an existing project file, evaluating with the global project collection's
+ global properties and default tools version.
+ Project is added to the global project collection.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+ May throw IO-related exceptions.
+
+ If the evaluation fails.
+
+
+
+ Construct over an existing project file, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project is added to the global project collection.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+ May throw IO-related exceptions.
+
+
+
+
+ Construct over an existing project file, evaluating with the specified global properties and
+ using the tools version provided, either or both of which may be null.
+ Project is added to the global project collection.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+ May throw IO-related exceptions.
+
+ The project file.
+ The global properties. May be null.
+ The tools version. May be null.
+ The collection with which this project should be associated. May not be null.
+
+
+
+ Construct over an existing project file, evaluating with the specified global properties and
+ using the tools version provided, either or both of which may be null.
+ Project is added to the global project collection.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+ May throw IO-related exceptions.
+
+ The project file.
+ The global properties. May be null.
+ The tools version. May be null.
+ The collection with which this project should be associated. May not be null.
+ The load settings for this project.
+
+
+
+ Construct over an existing project file, evaluating with the specified global properties and
+ using the tools version provided, either or both of which may be null.
+ Project is added to the global project collection.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+ May throw IO-related exceptions.
+
+ The project file.
+ The global properties. May be null.
+ The tools version. May be null.
+ Sub-toolset version to explicitly evaluate the toolset with. May be null.
+ The collection with which this project should be associated. May not be null.
+ The load settings for this project.
+
+
+
+ Create a file based project.
+
+ The file to evaluate the project from.
+ The to use.
+
+
+
+
+ Create a based project.
+
+ The to evaluate the project from.
+ The to use.
+
+
+
+ Create a based project.
+
+ The to evaluate the project from.
+ The to use.
+
+
+
+ Whether build is enabled for this project.
+
+
+
+
+ Explicitly enabled
+
+
+
+
+ Explicitly disabled
+
+
+
+
+ No explicit setting, uses the setting on the
+ project collection.
+ This is the default.
+
+
+
+
+ Gets or sets the project collection which contains this project.
+ Can never be null.
+ Cannot be modified.
+
+
+
+
+ The backing Xml project.
+ Can never be null.
+
+
+ There is no setter here as that doesn't make sense. If you have a new ProjectRootElement, evaluate it into a new Project.
+
+
+
+
+ Whether this project is dirty such that it needs reevaluation.
+ This may be because its underlying XML has changed (either through this project or another)
+ either the XML of the main project or an imported file;
+ or because its toolset may have changed.
+
+
+
+
+ Read only dictionary of the global properties used in the evaluation
+ of this project.
+
+
+ This is the publicly exposed getter, that translates into a read-only dead IDictionary<string, string>.
+
+ In order to easily tell when we're dirtied, setting and removing global properties is done with
+ SetGlobalProperty and RemoveGlobalProperty.
+
+
+
+
+ Indicates whether the global properties dictionary contains the specified key.
+
+
+
+
+ Indicates how many elements are in the global properties dictionary.
+
+
+
+
+ Enumerates the values in the global properties dictionary.
+
+
+
+
+ Item types in this project.
+ This is an ordered collection.
+
+
+ data.ItemTypes is a KeyCollection, so it doesn't need any
+ additional read-only protection.
+
+
+
+
+ Properties in this project.
+ Since evaluation has occurred, this is an unordered collection.
+
+
+
+
+ Collection of possible values implied for properties contained in the conditions found on properties,
+ property groups, imports, and whens.
+
+ For example, if the following conditions existed on properties in a project:
+
+ Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"
+ Condition="'$(Configuration)' == 'Release'"
+
+ the table would be populated with
+
+ { "Configuration", { "Debug", "Release" }}
+ { "Platform", { "x86" }}
+
+ This is used by Visual Studio to determine the configurations defined in the project.
+
+
+
+
+ Read-only dictionary of item definitions in this project.
+ Keyed by item type.
+
+
+
+
+ Items in this project, ordered within groups of item types.
+
+
+
+
+ Items in this project, ordered within groups of item types,
+ including items whose conditions evaluated to false, or that were
+ contained within item groups who themselves had conditioned evaluated to false.
+ This is useful for hosts that wish to display all items, even if they might not be part
+ of the build in the current configuration.
+
+
+
+
+ All the files that during evaluation contributed to this project, as ProjectRootElements,
+ with the ProjectImportElement that caused them to be imported.
+ This does not include projects that were never imported because a condition on an Import element was false.
+ The outer ProjectRootElement that maps to this project itself is not included.
+
+
+ This can be used by the host to figure out what projects might be impacted by a change to a particular file.
+ It could also be used, for example, to find the .user file, and use its ProjectRootElement to modify properties in it.
+
+
+
+
+ This list will contain duplicate imports if an import is imported multiple times. However, only the first import was used in evaluation.
+
+
+
+
+ Targets in the project. The key to the dictionary is the target's name.
+ Overridden targets are not included in this collection.
+ This collection is read-only.
+
+
+
+
+ Properties encountered during evaluation. These are read during the first evaluation pass.
+ Unlike those returned by the Properties property, these are ordered, and includes any properties that
+ were subsequently overridden by others with the same name. It does not include any
+ properties whose conditions did not evaluate to true.
+ It does not include any properties added since the last evaluation.
+
+
+
+
+ Item definition metadata encountered during evaluation. These are read during the second evaluation pass.
+ Unlike those returned by the ItemDefinitions property, these are ordered, and include any metadata that
+ were subsequently overridden by others with the same name and item type. It does not include any
+ elements whose conditions did not evaluate to true.
+ It does not include any item definition metadata added since the last evaluation.
+
+
+
+
+ Items encountered during evaluation. These are read during the third evaluation pass.
+ Unlike those returned by the Items property, these are ordered with respect to all other items
+ encountered during evaluation, not just ordered with respect to items of the same item type.
+ In some applications, like the F# language, this complete mutual ordering is significant, and such hosts
+ can use this property.
+ It does not include any elements whose conditions did not evaluate to true.
+ It does not include any items added since the last evaluation.
+
+
+
+
+ The tools version this project was evaluated with, if any.
+ Not necessarily the same as the tools version on the Project tag, if any;
+ it may have been externally specified, for example with a /tv switch.
+ The actual tools version on the Project tag, can be gotten from Xml.ToolsVersion.
+ Cannot be changed once the project has been created.
+
+
+ Set by construction.
+
+
+
+
+ The sub-toolset version that, combined with the ToolsVersion, was used to determine
+ the toolset properties for this project.
+
+
+
+
+ The root directory for this project.
+ Is never null: in-memory projects use the current directory from the time of load.
+
+
+
+
+ The full path to this project's file.
+ May be null, if the project was not loaded from disk.
+ Setter renames the project, if it already had a name.
+
+
+
+
+ Whether ReevaluateIfNecessary is temporarily disabled.
+ This is useful when the host expects to make a number of reads and writes
+ to the project, and wants to temporarily sacrifice correctness for performance.
+
+
+
+
+ Whether MarkDirty() is temporarily disabled.
+ This allows, for example, a global property to be set without the project getting
+ marked dirty for reevaluation as a consequence.
+
+
+
+
+ This controls whether or not the building of targets/tasks is enabled for this
+ project. This is for security purposes in case a host wants to closely
+ control which projects it allows to run targets/tasks. By default, for a newly
+ created project, we will use whatever setting is in the parent project collection.
+ When build is disabled, the Build method on this class will fail. However if
+ the host has already created a ProjectInstance, it can still build it. (It is
+ free to put a similar check around where it does this.)
+
+
+
+
+ Location of the originating file itself, not any specific content within it.
+ If the file has not been given a name, returns an empty location.
+
+
+
+
+ Obsolete. Use instead.
+
+
+
+
+ The ID of the last evaluation for this Project.
+ A project is always evaluated upon construction and can subsequently get evaluated multiple times via
+
+
+ It is an arbitrary number that changes when this project reevaluates.
+ Hosts don't know whether an evaluation actually happened in an interval, but they can compare this number to
+ their previously stored value to find out, and if so perhaps decide to update their own state.
+ Note that the number may not increase monotonically.
+
+ This number corresponds to the and can be used to connect
+ evaluation logging events back to the Project instance.
+
+
+
+
+ List of names of the properties that, while global, are still treated as overridable.
+
+
+
+
+ The logging service used for evaluation errors.
+
+
+
+
+ Returns the evaluated, escaped value of the provided item's include.
+
+
+
+
+ Returns the evaluated, escaped value of the provided item definition's include.
+
+
+
+
+ Finds all the globs specified in item includes.
+
+
+
+
+ *.txt
+
+ (both outside and inside project cone)
+ (both outside and inside project cone)
+
+
+
+
+ (If Bar has globs, they will have been included when querying Bar ProjectItems for globs)
+
+ ]]>
+
+
+ Example result:
+
+
+
+
+
+
+ is a that combines all globs in the include element and ignores
+ all the fragments in the exclude attribute and all the fragments in all Remove elements that apply to the include element.
+
+
+ Users can construct a composite glob that incorporates all the globs in the Project:
+
+ r.MSBuildGlob).ToArray());
+ uberGlob.IsMatch("foo.cs");
+ ]]>
+
+
+
+
+ List of .
+
+
+
+
+ See .
+
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ Overload of .
+
+ Confine search to item elements of this type.
+
+
+
+ See .
+
+ Type of the item.
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ Finds all the item elements in the logical project with itemspecs that match the given string:
+ - elements that would include (or exclude) the string
+ - elements that would update the string (not yet implemented)
+ - elements that would remove the string (not yet implemented).
+
+
+
+ The following snippet shows what GetItemProvenance("a.cs") returns for various item elements.
+
+ // Occurrences:2; Operation: Include; Provenance: StringLiteral | Glob
+ // Occurrences: 1; Operation: Exclude; Provenance: StringLiteral
+ // NA
+ // Occurrences: 2; Operation: Include; Provenance: Inconclusive (it is an indirect occurrence from a referenced item)
+ // Occurrences: 4; Operation: Include; Provenance: FromLiteral (direct reference in $P) | Glob (direct reference in $P) | Inconclusive (it is an indirect occurrence from referenced properties and items)
+
+ a.cs;*.cs;@(A)
+
+
+
+
+
+
+ This method and its overloads are useful for clients that need to inspect all the item elements
+ that might refer to a specific item instance. For example, Visual Studio uses it to inspect
+ projects with globs. Upon a file system or IDE file artifact change, VS calls this method to find all the items
+ that might refer to the detected file change (e.g. 'which item elements refer to "Program.cs"?').
+ It uses such information to know which elements it should edit to reflect the user or file system changes.
+
+ Literal string matching tries to first match the strings. If the check fails, it then tries to match
+ the strings as if they represented files: it normalizes both strings as files relative to the current project directory
+
+ GetItemProvenance suffers from some sources of inaccuracy:
+ - it is performed after evaluation, thus is insensitive to item data flow when item references are present
+ (it sees items as they are at the end of evaluation)
+
+ This API and its return types are prone to change.
+
+
+ The string to perform matching against.
+
+
+ A list of , sorted in project evaluation order.
+
+
+
+
+ See .
+
+ The string to perform matching against.
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ Overload of .
+
+ The string to perform matching against.
+ The item type to constrain the search in.
+
+
+
+ See .
+
+ The string to perform matching against.
+ The type of the item to perform matching against.
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ Overload of .
+
+
+ The ProjectItem object that indicates: the itemspec to match and the item type to constrain the search in.
+ The search is also constrained on item elements appearing before the item element that produced this .
+ The element that produced this is included in the results.
+
+
+
+
+ See .
+
+
+ The ProjectItem object that indicates: the itemspec to match and the item type to constrain the search in.
+ The search is also constrained on item elements appearing before the item element that produced this .
+ The element that produced this is included in the results.
+
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ Gets the escaped value of the provided metadatum.
+
+
+
+
+ Gets the escaped value of the metadatum with the provided name on the provided item.
+
+
+
+
+ Gets the escaped value of the metadatum with the provided name on the provided item definition.
+
+
+
+
+ Get the escaped value of the provided property.
+
+
+
+
+ Returns an iterator over the "logical project". The logical project is defined as
+ the unevaluated project obtained from the single MSBuild file that is the result
+ of inlining the text of all imports of the original MSBuild project manifest file.
+
+
+
+
+ Get any property in the project that has the specified name,
+ otherwise returns null.
+
+
+
+
+ Get the unescaped value of a property in this project, or
+ an empty string if it does not exist.
+
+
+ A property with a value of empty string and no property
+ at all are not distinguished between by this method.
+ That makes it easier to use. To find out if a property is set at
+ all in the project, use GetProperty(name).
+
+
+
+
+ Set or add a property with the specified name and value.
+ Overwrites the value of any property with the same name already in the collection if it did not originate in an imported file.
+ If there is no such existing property, uses this heuristic:
+ Updates the last existing property with the specified name that has no condition on itself or its property group, if any,
+ and is in this project file rather than an imported file.
+ Otherwise, adds a new property in the first property group without a condition, creating a property group if necessary after
+ the last existing property group, else at the start of the project.
+ Returns the property set.
+ Evaluates on a best-effort basis:
+ -expands with all properties. Properties that are defined in the XML below the new property may be used, even though in a real evaluation they would not be.
+ -only this property is evaluated. Anything else that would depend on its value is not affected.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+
+
+ Change a global property after the project has been evaluated.
+ If the value changes, this makes the project require reevaluation.
+ If the value changes, returns true, otherwise false.
+
+
+
+
+ Adds an item with no metadata to the project.
+ Any metadata can be added subsequently.
+ Does not modify the XML if a wildcard expression would already include the new item.
+ Evaluates on a best-effort basis:
+ -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be.
+ -only this item is evaluated. Other items that might depend on it is not affected.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+
+
+ Adds an item with metadata to the project.
+ Metadata may be null, indicating no metadata.
+ Does not modify the XML if a wildcard expression would already include the new item.
+ Evaluates on a best-effort basis:
+ -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be.
+ -only this item is evaluated. Other items that might depend on it is not affected.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+
+
+ Adds an item with no metadata to the project.
+ Makes no effort to see if an existing wildcard would already match the new item, unless it is the first item in an item group.
+ Makes no effort to locate the new item near similar items.
+ Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type.
+ Evaluates on a best-effort basis:
+ -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be.
+ -only this item is evaluated. Other items that might depend on it is not affected.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+
+
+ Adds an item with metadata to the project.
+ Metadata may be null, indicating no metadata.
+ Makes no effort to see if an existing wildcard would already match the new item, unless it is the first item in an item group.
+ Makes no effort to locate the new item near similar items.
+ Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type.
+ Evaluates on a best-effort basis:
+ -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be.
+ -only this item is evaluated. Other items that might depend on it is not affected.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+
+
+ All the items in the project of the specified
+ type.
+ If there are none, returns an empty list.
+ Use AddItem or RemoveItem to modify items in this project.
+
+
+ data.GetItems returns a read-only collection, so no need to re-wrap it here.
+
+
+
+
+ All the items in the project of the specified
+ type, irrespective of whether the conditions on them evaluated to true.
+ This is a read-only list: use AddItem or RemoveItem to modify items in this project.
+
+
+ ItemDictionary[] returns a read only collection, so no need to wrap it.
+
+
+
+
+ Returns all items that have the specified evaluated include.
+ For example, all items that have the evaluated include "bar.cpp".
+ Typically there will be zero or one, but sometimes there are two items with the
+ same path and different item types, or even the same item types. This will return
+ them all.
+
+
+ data.GetItemsByEvaluatedInclude already returns a read-only collection, so no need
+ to wrap it further.
+
+
+
+
+ Removes the specified property.
+ Property must be associated with this project.
+ Property must not originate from an imported file.
+ Returns true if the property was in this evaluated project, otherwise false.
+ As a convenience, if the parent property group becomes empty, it is also removed.
+ Updates the evaluated project, but does not affect anything else in the project until reevaluation. For example,
+ if "p" is removed, it will be removed from the evaluated project, but "q" which is evaluated from "$(p)" will not be modified until reevaluation.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state.
+
+
+
+
+ Removes a global property.
+ If it was set, returns true, and marks the project
+ as requiring reevaluation.
+
+
+
+
+ Removes an item from the project.
+ Item must be associated with this project.
+ Item must not originate from an imported file.
+ Returns true if the item was in this evaluated project, otherwise false.
+ As a convenience, if the parent item group becomes empty, it is also removed.
+ If the item originated from a wildcard or semicolon separated expression, expands that expression into multiple items first.
+ Updates the evaluated project, but does not affect anything else in the project until reevaluation. For example,
+ if an item of type "i" is removed, "j" which is evaluated from "@(i)" will not be modified until reevaluation.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+ Normally this will return true, since if the item isn't in the project, it will throw.
+ The exception is removing an item that was only in ItemsIgnoringCondition.
+
+
+
+
+ Removes all the specified items from the project.
+ Items that are not associated with this project are skipped.
+
+
+ Removing one item could cause the backing XML
+ to be expanded, which could zombie (disassociate) the next item.
+ To make this case easy for the caller, if an item
+ is not associated with this project it is simply skipped.
+
+
+
+
+ Evaluates the provided string by expanding items and properties,
+ as if it was found at the very end of the project file.
+ This is useful for some hosts for which this kind of best-effort
+ evaluation is sufficient.
+ Does not expand bare metadata expressions.
+
+
+
+
+ Returns an instance based on this project, but completely disconnected.
+ This instance can be used to build independently.
+ Before creating the instance, this will reevaluate the project if necessary, so it will not be dirty.
+
+ The created project instance.
+
+
+
+ Returns an instance based on this project, but completely disconnected.
+ This instance can be used to build independently.
+ Before creating the instance, this will reevaluate the project if necessary, so it will not be dirty.
+ The instance is immutable; none of the objects that form it can be modified. This makes it safe to
+ access concurrently from multiple threads.
+
+ The project instance creation settings.
+ The created project instance.
+
+
+
+ See .
+
+ The project instance creation settings.
+ The evaluation context to use in case reevaluation is required.
+ The created project instance.
+
+
+
+ Called to forcibly mark the project as dirty requiring reevaluation. Generally this is not necessary to set; all edits affecting
+ this project will automatically make it dirty. However there are potential corner cases where it is necessary to mark the project dirty
+ directly. For example, if the project has an import conditioned on a file existing on disk, and the file did not exist at
+ evaluation time, then someone subsequently creates that file, the project cannot know that reevaluation would be productive.
+ In such a case the host can help us by setting the dirty flag explicitly so that ReevaluateIfNecessary()
+ will recognize an evaluation is indeed necessary.
+ Does not mark the underlying project file as requiring saving.
+
+
+
+
+ Reevaluate the project to get it into a queryable state, if it's dirty.
+ This incorporates all changes previously made to the backing XML by editing this project.
+ Throws InvalidProjectFileException if the evaluation fails.
+
+
+
+
+ See .
+
+ The to use. See .
+
+
+
+ Save the project to the file system, if dirty.
+ Uses the default encoding.
+
+
+
+
+ Save the project to the file system, if dirty.
+
+
+
+
+ Save the project to the file system, if dirty or the path is different.
+ Uses the default encoding.
+
+
+
+
+ Save the project to the file system, if dirty or the path is different.
+
+
+
+
+ Save the project to the provided TextWriter, whether or not it is dirty.
+ Uses the encoding of the TextWriter.
+ Clears the Dirty flag.
+
+
+
+
+ Saves a "logical" or "preprocessed" project file, that includes all the imported
+ files as if they formed a single file.
+
+
+
+
+ Starts a build using this project, building the default targets.
+ Returns true on success, false on failure.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Starts a build using this project, building the default targets and the specified logger.
+ Returns true on success, false on failure.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ Logger to use.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Starts a build using this project, building the default targets and the specified loggers.
+ Returns true on success, false on failure.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ List of loggers.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Starts a build using this project, building the default targets and the specified loggers.
+ Returns true on success, false on failure.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ List of loggers.
+ Remote loggers for multi proc logging.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Starts a build using this project, building the specified target.
+ Returns true on success, false on failure.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ Target to build.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Starts a build using this project, building the specified target with the specified loggers.
+ Returns true on success, false on failure.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ Target to build.
+ List of loggers.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Starts a build using this project, building the specified target with the specified loggers.
+ Returns true on success, false on failure.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ Target to build.
+ List of loggers.
+ Remote loggers for multi proc logging.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Starts a build using this project, building the specified targets.
+ Returns true on success, false on failure.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ Targets to build.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Starts a build using this project, building the specified targets with the specified loggers.
+ Returns true on success, false on failure.
+ If build is disabled on this project, does not build, and returns false.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ Targets to build.
+ List of loggers.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Starts a build using this project, building the specified targets with the specified loggers.
+ Returns true on success, false on failure.
+ If build is disabled on this project, does not build, and returns false.
+ Works on a privately cloned instance. To set or get
+ virtual items for build purposes, clone an instance explicitly and build that.
+ Does not modify the Project object.
+
+ Targets to build.
+ List of loggers.
+ Remote loggers for multi proc logging.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ See .
+
+ Targets to build.
+ List of loggers.
+ Remote loggers for multi proc logging.
+ The evaluation context to use in case reevaluation is required.
+ Returns true on success and false on failure or disabled build.
+
+
+
+ Tests whether a given project IS or IMPORTS some given project xml root element.
+
+ The project xml root element in question.
+ True if this project is or imports the xml file; false otherwise.
+
+
+
+ If the ProjectItemElement evaluated to more than one ProjectItem, replaces it with a new ProjectItemElement for each one of them.
+ If the ProjectItemElement did not evaluate into more than one ProjectItem, does nothing.
+ Returns true if a split occurred, otherwise false.
+
+
+ A ProjectItemElement could have resulted in several items if it contains wildcards or item or property expressions.
+ Before any edit to a ProjectItem (remove, rename, set metadata, or remove metadata) this must be called to make
+ sure that the edit does not affect any other ProjectItems originating in the same ProjectItemElement.
+
+ For example, an item xml with an include of "@(x)" could evaluate to items "a", "b", and "c". If "b" is removed, then the original
+ item xml must be removed and replaced with three, then the one corresponding to "b" can be removed.
+
+ This is an unsophisticated approach; the best that can be said is that the result will likely be correct, if not ideal.
+ For example, perhaps the user would rather remove the item from the original list "x" instead of expanding the list.
+ Or, perhaps the user would rather the property in "$(p)\a;$(p)\b" not be expanded when "$(p)\b" is removed.
+ If that's important, the host can manipulate the ProjectItemElement's directly, instead, and it can be as fastidious as it wishes.
+
+
+
+
+ Examines the provided ProjectItemElement to see if it has a wildcard that would match the
+ item we wish to add, and does not have a condition or an exclude.
+ Works conservatively - if there is anything that might cause doubt, considers the candidate to not be suitable.
+ Returns true if it is suitable, otherwise false.
+
+
+ Outside this class called ONLY from ProjectItem.Rename(string name).
+
+
+
+
+ Before an item changes its item type, it must be removed from
+ our datastructures, which key off item type.
+ This should be called ONLY by ProjectItems, in this situation.
+
+
+
+
+ After an item has changed its item type, it needs to be added back again,
+ since our data structures key off the item type.
+ This should be called ONLY by ProjectItems, in this situation.
+
+
+
+
+ Provided a property that is already part of this project, does a best-effort expansion
+ of the unevaluated value provided and sets it as the evaluated value.
+
+
+ On project in order to keep Project's expander hidden.
+
+
+
+
+ Provided an item element that has been renamed with a new unevaluated include,
+ returns a best effort guess at the evaluated include that results.
+ If the best effort expansion produces anything other than one item, it just
+ returns the unevaluated include.
+ This is not at all generalized, but useful for the majority case where an item is a very
+ simple file name with perhaps a property prefix.
+
+
+ On project in order to keep Project's expander hidden.
+
+
+
+
+ Provided a metadatum that is already part of this project, does a best-effort expansion
+ of the unevaluated value provided and returns the resulting value.
+ This is a interim expansion only: it may not be the value that a full project reevaluation would produce.
+ The metadata table passed in is that of the parent item or item definition.
+
+
+ On project in order to keep Project's expander hidden.
+
+
+
+
+ Called by the project collection to indicate to this project that it is no longer loaded.
+
+
+
+
+ Verify that the project has not been unloaded from its collection.
+ Once it's been unloaded, it cannot be used.
+
+
+
+
+ Verify that the provided object location is in the same file as the project.
+ If it is not, throws an InvalidOperationException indicating that imported evaluated objects should not be modified.
+ This prevents, for example, accidentally updating something like the OutputPath property, that you want be in the
+ main project, but for some reason was actually read in from an imported targets file.
+
+
+
+
+ Internal project evaluation implementation.
+
+
+
+
+ Backing data; stored in a nested class so it can be passed to the Evaluator to fill
+ in on re-evaluation, without having to expose property setters for that purpose.
+ Also it makes it easy to re-evaluate this project without creating a new project object.
+
+
+
+
+ The highest version of the backing ProjectRootElements (including imports) that this object was last evaluated from.
+ Edits to the ProjectRootElement either by this Project or another Project increment the number.
+ If that number is different from this one a reevaluation is necessary at some point.
+
+
+
+
+ The version of the tools information in the project collection against we were last evaluated.
+
+
+
+
+ Whether the project has been explicitly marked as dirty. Generally this is not necessary to set; all edits affecting
+ this project will automatically make it dirty. However there are potential corner cases where it is necessary to mark it dirty
+ directly. For example, if the project has an import conditioned on a file existing on disk, and the file did not exist at
+ evaluation time, then someone subsequently writes the file, the project will not know that reevaluation would be productive,
+ and would not dirty itself. In such a case the host should help us by setting the dirty flag explicitly.
+
+
+
+
+ This controls whether or not the building of targets/tasks is enabled for this
+ project. This is for security purposes in case a host wants to closely
+ control which projects it allows to run targets/tasks.
+
+
+
+
+ The load settings, such as to ignore missing imports.
+ This is retained after construction as it will be needed for reevaluation.
+
+
+
+
+ The delegate registered with the ProjectRootElement to be called if the file name
+ is changed. Retained so that ultimately it can be unregistered.
+ If it has been set to null, the project has been unloaded from its collection.
+
+
+
+
+ Indicates if the process of loading the project is allowed to interact with the user.
+
+
+
+
+
+
+ The owning project object.
+ ProjectRootElement to use.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ Sub-toolset version to explicitly evaluate the toolset with. May be null.
+ The to use for evaluation.
+
+
+
+ Construct over a text reader over project xml, evaluating with specified
+ global properties and toolset, either or both of which may be null.
+ Project will be added to the specified project collection when it is named.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+
+ The owning project object.
+ Xml reader to read project from.
+ Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.
+ Tools version to evaluate with. May be null.
+ Sub-toolset version to explicitly evaluate the toolset with. May be null.
+ The load settings for this project.
+ The evaluation context to use in case reevaluation is required.
+
+
+
+ Construct over an existing project file, evaluating with the specified global properties and
+ using the tools version provided, either or both of which may be null.
+ Project is added to the global project collection.
+ Throws InvalidProjectFileException if the evaluation fails.
+ Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.
+ May throw IO-related exceptions.
+
+ The owning project object.
+ The project file.
+ The global properties. May be null.
+ The tools version. May be null.
+ Sub-toolset version to explicitly evaluate the toolset with. May be null.
+ The load settings for this project.
+ The evaluation context to use in case reevaluation is required.
+
+
+
+ Gets or sets the project collection which contains this project.
+ Can never be null.
+ Cannot be modified.
+
+
+
+
+ Certain item operations split the item element in multiple elements if the include
+ contains globs, references to items or properties, or multiple item values.
+
+ The items operations that may expand item elements are:
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+
+ When this property is set to true, the previous item operations throw an
+ instead of expanding the item element.
+
+
+
+
+ Whether build is enabled for this project.
+
+
+
+
+ Explicitly enabled
+
+
+
+
+ Explicitly disabled
+
+
+
+
+ No explicit setting, uses the setting on the
+ project collection.
+ This is the default.
+
+
+
+
+ The backing Xml project.
+ Can never be null.
+
+
+ There is no setter here as that doesn't make sense. If you have a new ProjectRootElement, evaluate it into a new Project.
+
+
+
+
+ Whether this project is dirty such that it needs reevaluation.
+ This may be because its underlying XML has changed (either through this project or another)
+ either the XML of the main project or an imported file;
+ or because its toolset may have changed.
+
+
+
+
+ See .
+
+ The key to check for its value.
+ Whether the key is in the global properties dictionary.
+
+
+
+ See .
+
+ The number of properties in the global properties dictionary
+
+
+
+ See .
+
+ An IEnumerable of the keys and values of the global properties dictionary
+
+
+
+ Read only dictionary of the global properties used in the evaluation
+ of this project.
+
+
+ This is the publicly exposed getter, that translates into a read-only dead IDictionary<string, string>.
+
+ In order to easily tell when we're dirtied, setting and removing global properties is done with
+ SetGlobalProperty and RemoveGlobalProperty.
+
+
+
+
+ Item types in this project.
+ This is an ordered collection.
+
+
+ data.ItemTypes is a KeyCollection, so it doesn't need any
+ additional read-only protection.
+
+
+
+
+ Properties in this project.
+ Since evaluation has occurred, this is an unordered collection.
+
+
+
+
+ Collection of possible values implied for properties contained in the conditions found on properties,
+ property groups, imports, and whens.
+
+ For example, if the following conditions existed on properties in a project:
+
+ Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"
+ Condition="'$(Configuration)' == 'Release'"
+
+ the table would be populated with
+
+ { "Configuration", { "Debug", "Release" }}
+ { "Platform", { "x86" }}
+
+ This is used by Visual Studio to determine the configurations defined in the project.
+
+
+
+
+ Read-only dictionary of item definitions in this project.
+ Keyed by item type.
+
+
+
+
+ Items in this project, ordered within groups of item types.
+
+
+
+
+ Items in this project, ordered within groups of item types,
+ including items whose conditions evaluated to false, or that were
+ contained within item groups who themselves had conditioned evaluated to false.
+ This is useful for hosts that wish to display all items, even if they might not be part
+ of the build in the current configuration.
+
+
+
+
+ All the files that during evaluation contributed to this project, as ProjectRootElements,
+ with the ProjectImportElement that caused them to be imported.
+ This does not include projects that were never imported because a condition on an Import element was false.
+ The outer ProjectRootElement that maps to this project itself is not included.
+
+
+ This can be used by the host to figure out what projects might be impacted by a change to a particular file.
+ It could also be used, for example, to find the .user file, and use its ProjectRootElement to modify properties in it.
+
+
+
+
+ This list will contain duplicate imports if an import is imported multiple times. However, only the first import was used in evaluation.
+
+
+
+
+ Targets in the project. The key to the dictionary is the target's name.
+ Overridden targets are not included in this collection.
+ This collection is read-only.
+
+
+
+
+ Properties encountered during evaluation. These are read during the first evaluation pass.
+ Unlike those returned by the Properties property, these are ordered, and includes any properties that
+ were subsequently overridden by others with the same name. It does not include any
+ properties whose conditions did not evaluate to true.
+ It does not include any properties added since the last evaluation.
+
+
+
+
+ Item definition metadata encountered during evaluation. These are read during the second evaluation pass.
+ Unlike those returned by the ItemDefinitions property, these are ordered, and include any metadata that
+ were subsequently overridden by others with the same name and item type. It does not include any
+ elements whose conditions did not evaluate to true.
+ It does not include any item definition metadata added since the last evaluation.
+
+
+
+
+ Items encountered during evaluation. These are read during the third evaluation pass.
+ Unlike those returned by the Items property, these are ordered with respect to all other items
+ encountered during evaluation, not just ordered with respect to items of the same item type.
+ In some applications, like the F# language, this complete mutual ordering is significant, and such hosts
+ can use this property.
+ It does not include any elements whose conditions did not evaluate to true.
+ It does not include any items added since the last evaluation.
+
+
+
+
+ The tools version this project was evaluated with, if any.
+ Not necessarily the same as the tools version on the Project tag, if any;
+ it may have been externally specified, for example with a /tv switch.
+ The actual tools version on the Project tag, can be gotten from Xml.ToolsVersion.
+ Cannot be changed once the project has been created.
+
+
+ Set by construction.
+
+
+
+
+ The sub-toolset version that, combined with the ToolsVersion, was used to determine
+ the toolset properties for this project.
+
+
+
+
+ The root directory for this project.
+ Is never null: in-memory projects use the current directory from the time of load.
+
+
+
+
+ The full path to this project's file.
+ May be null, if the project was not loaded from disk.
+ Setter renames the project, if it already had a name.
+
+
+
+
+ Whether ReevaluateIfNecessary is temporarily disabled.
+ This is useful when the host expects to make a number of reads and writes
+ to the project, and wants to temporarily sacrifice correctness for performance.
+
+
+
+
+ Whether MarkDirty() is temporarily disabled.
+ This allows, for example, a global property to be set without the project getting
+ marked dirty for reevaluation as a consequence.
+
+
+
+
+ This controls whether or not the building of targets/tasks is enabled for this
+ project. This is for security purposes in case a host wants to closely
+ control which projects it allows to run targets/tasks. By default, for a newly
+ created project, we will use whatever setting is in the parent project collection.
+ When build is disabled, the Build method on this class will fail. However if
+ the host has already created a ProjectInstance, it can still build it. (It is
+ free to put a similar check around where it does this.)
+
+
+
+
+ Location of the originating file itself, not any specific content within it.
+ If the file has not been given a name, returns an empty location.
+
+
+
+
+ Obsolete. Use instead.
+
+
+
+
+ The ID of the last evaluation for this Project.
+ A project is always evaluated upon construction and can subsequently get evaluated multiple times via
+
+
+ It is an arbitrary number that changes when this project reevaluates.
+ Hosts don't know whether an evaluation actually happened in an interval, but they can compare this number to
+ their previously stored value to find out, and if so perhaps decide to update their own state.
+ Note that the number may not increase monotonically.
+
+ This number corresponds to the and can be used to connect
+ evaluation logging events back to the Project instance.
+
+
+
+
+ List of names of the properties that, while global, are still treated as overridable.
+
+
+
+
+ The logging service used for evaluation errors.
+
+
+
+
+ See .
+
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ See .
+
+ The type of items to return.
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ See .
+
+ The string to perform matching against.
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ See .
+
+ The string to perform matching against.
+ The type of items to return.
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ See .
+
+ ///
+ The ProjectItem object that indicates: the itemspec to match and the item type to constrain the search in.
+ The search is also constrained on item elements appearing before the item element that produced this .
+ The element that produced this is included in the results.
+
+
+ The evaluation context to use in case reevaluation is required.
+ To avoid reevaluation use .
+
+
+
+
+ Some project APIs need to do analysis that requires the Evaluator to record more data than usual as it evaluates.
+ This method checks if the Evaluator was run with the extra required settings and if not, does a re-evaluation.
+ If a re-evaluation was necessary, it saves this information so a next call does not re-evaluate.
+
+ Using this method avoids storing extra data in memory when its not needed.
+
+
+
+
+
+ Since:
+ - we have no proper AST and interpreter for itemspecs that we can do analysis on
+ - GetItemProvenance needs to have correct counts for exclude strings (as correct as it can get while doing it after evaluation)
+
+ The temporary hack is to use the expander to expand the strings, and if any property or item references were encountered, return Provenance.Inconclusive.
+
+
+
+
+ Returns an iterator over the "logical project". The logical project is defined as
+ the unevaluated project obtained from the single MSBuild file that is the result
+ of inlining the text of all imports of the original MSBuild project manifest file.
+
+
+
+
+ Get any property in the project that has the specified name,
+ otherwise returns null.
+
+
+
+
+ Get the unescaped value of a property in this project, or
+ an empty string if it does not exist.
+
+
+ A property with a value of empty string and no property
+ at all are not distinguished between by this method.
+ That makes it easier to use. To find out if a property is set at
+ all in the project, use GetProperty(name).
+
+
+
+
+ Set or add a property with the specified name and value.
+ Overwrites the value of any property with the same name already in the collection if it did not originate in an imported file.
+ If there is no such existing property, uses this heuristic:
+ Updates the last existing property with the specified name that has no condition on itself or its property group, if any,
+ and is in this project file rather than an imported file.
+ Otherwise, adds a new property in the first property group without a condition, creating a property group if necessary after
+ the last existing property group, else at the start of the project.
+ Returns the property set.
+ Evaluates on a best-effort basis:
+ -expands with all properties. Properties that are defined in the XML below the new property may be used, even though in a real evaluation they would not be.
+ -only this property is evaluated. Anything else that would depend on its value is not affected.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+
+
+ Change a global property after the project has been evaluated.
+ If the value changes, this makes the project require reevaluation.
+ If the value changes, returns true, otherwise false.
+
+
+
+
+ Adds an item with metadata to the project.
+ Metadata may be null, indicating no metadata.
+ Does not modify the XML if a wildcard expression would already include the new item.
+ Evaluates on a best-effort basis:
+ -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be.
+ -only this item is evaluated. Other items that might depend on it is not affected.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+
+
+ Adds an item with metadata to the project.
+ Metadata may be null, indicating no metadata.
+ Makes no effort to see if an existing wildcard would already match the new item, unless it is the first item in an item group.
+ Makes no effort to locate the new item near similar items.
+ Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type.
+ Evaluates on a best-effort basis:
+ -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be.
+ -only this item is evaluated. Other items that might depend on it is not affected.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+
+
+ All the items in the project of the specified
+ type.
+ If there are none, returns an empty list.
+ Use AddItem or RemoveItem to modify items in this project.
+
+
+ data.GetItems returns a read-only collection, so no need to re-wrap it here.
+
+
+
+
+ All the items in the project of the specified
+ type, irrespective of whether the conditions on them evaluated to true.
+ This is a read-only list: use AddItem or RemoveItem to modify items in this project.
+
+
+ ItemDictionary[] returns a read only collection, so no need to wrap it.
+
+
+
+
+ Returns all items that have the specified evaluated include.
+ For example, all items that have the evaluated include "bar.cpp".
+ Typically there will be zero or one, but sometimes there are two items with the
+ same path and different item types, or even the same item types. This will return
+ them all.
+
+
+ data.GetItemsByEvaluatedInclude already returns a read-only collection, so no need
+ to wrap it further.
+
+
+
+
+ Removes the specified property.
+ Property must be associated with this project.
+ Property must not originate from an imported file.
+ Returns true if the property was in this evaluated project, otherwise false.
+ As a convenience, if the parent property group becomes empty, it is also removed.
+ Updates the evaluated project, but does not affect anything else in the project until reevaluation. For example,
+ if "p" is removed, it will be removed from the evaluated project, but "q" which is evaluated from "$(p)" will not be modified until reevaluation.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state.
+
+
+
+
+ Removes a global property.
+ If it was set, returns true, and marks the project
+ as requiring reevaluation.
+
+
+
+
+ Removes an item from the project.
+ Item must be associated with this project.
+ Item must not originate from an imported file.
+ Returns true if the item was in this evaluated project, otherwise false.
+ As a convenience, if the parent item group becomes empty, it is also removed.
+ If the item originated from a wildcard or semicolon separated expression, expands that expression into multiple items first.
+ Updates the evaluated project, but does not affect anything else in the project until reevaluation. For example,
+ if an item of type "i" is removed, "j" which is evaluated from "@(i)" will not be modified until reevaluation.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.
+
+
+ Normally this will return true, since if the item isn't in the project, it will throw.
+ The exception is removing an item that was only in ItemsIgnoringCondition.
+
+
+
+
+ Removes all the specified items from the project.
+ Items that are not associated with this project are skipped.
+
+
+ Removing one item could cause the backing XML
+ to be expanded, which could zombie (disassociate) the next item.
+ To make this case easy for the caller, if an item
+ is not associated with this project it is simply skipped.
+
+
+
+
+ Evaluates the provided string by expanding items and properties,
+ as if it was found at the very end of the project file.
+ This is useful for some hosts for which this kind of best-effort
+ evaluation is sufficient.
+ Does not expand bare metadata expressions.
+
+
+
+
+ See .
+
+ Project instance creation settings.
+ The evaluation context to use in case reevaluation is required.
+
+
+
+
+ Called to forcibly mark the project as dirty requiring reevaluation. Generally this is not necessary to set; all edits affecting
+ this project will automatically make it dirty. However there are potential corner cases where it is necessary to mark the project dirty
+ directly. For example, if the project has an import conditioned on a file existing on disk, and the file did not exist at
+ evaluation time, then someone subsequently creates that file, the project cannot know that reevaluation would be productive.
+ In such a case the host can help us by setting the dirty flag explicitly so that ReevaluateIfNecessary()
+ will recognize an evaluation is indeed necessary.
+ Does not mark the underlying project file as requiring saving.
+
+
+
+
+ See .
+
+ The to use. See .
+
+
+
+ Saves a "logical" or "preprocessed" project file, that includes all the imported
+ files as if they formed a single file.
+
+
+
+
+ See .
+
+ Targets to build.
+ List of loggers.
+ Remote loggers for multi proc logging.
+ The evaluation context to use in case reevaluation is required.
+
+
+
+ Tests whether a given project IS or IMPORTS some given project xml root element.
+
+ The project xml root element in question.
+ True if this project is or imports the xml file; false otherwise.
+
+
+
+ If the ProjectItemElement evaluated to more than one ProjectItem, replaces it with a new ProjectItemElement for each one of them.
+ If the ProjectItemElement did not evaluate into more than one ProjectItem, does nothing.
+ Returns true if a split occurred, otherwise false.
+
+
+ A ProjectItemElement could have resulted in several items if it contains wildcards or item or property expressions.
+ Before any edit to a ProjectItem (remove, rename, set metadata, or remove metadata) this must be called to make
+ sure that the edit does not affect any other ProjectItems originating in the same ProjectItemElement.
+
+ For example, an item xml with an include of "@(x)" could evaluate to items "a", "b", and "c". If "b" is removed, then the original
+ item xml must be removed and replaced with three, then the one corresponding to "b" can be removed.
+
+ This is an unsophisticated approach; the best that can be said is that the result will likely be correct, if not ideal.
+ For example, perhaps the user would rather remove the item from the original list "x" instead of expanding the list.
+ Or, perhaps the user would rather the property in "$(p)\a;$(p)\b" not be expanded when "$(p)\b" is removed.
+ If that's important, the host can manipulate the ProjectItemElement's directly, instead, and it can be as fastidious as it wishes.
+
+
+
+
+ Examines the provided ProjectItemElement to see if it has a wildcard that would match the
+ item we wish to add, and does not have a condition or an exclude.
+ Works conservatively - if there is anything that might cause doubt, considers the candidate to not be suitable.
+ Returns true if it is suitable, otherwise false.
+
+
+ Outside this class called ONLY from ProjectItem.Rename(string name).
+
+
+
+
+ Before an item changes its item type, it must be removed from
+ our datastructures, which key off item type.
+ This should be called ONLY by ProjectItems, in this situation.
+
+
+
+
+ After an item has changed its item type, it needs to be added back again,
+ since our data structures key off the item type.
+ This should be called ONLY by ProjectItems, in this situation.
+
+
+
+
+ Provided a property that is already part of this project, does a best-effort expansion
+ of the unevaluated value provided and sets it as the evaluated value.
+
+
+ On project in order to keep Project's expander hidden.
+
+
+
+
+ Provided an item element that has been renamed with a new unevaluated include,
+ returns a best effort guess at the evaluated include that results.
+ If the best effort expansion produces anything other than one item, it just
+ returns the unevaluated include.
+ This is not at all generalized, but useful for the majority case where an item is a very
+ simple file name with perhaps a property prefix.
+
+
+ On project in order to keep Project's expander hidden.
+
+
+
+
+ Provided a metadatum that is already part of this project, does a best-effort expansion
+ of the unevaluated value provided and returns the resulting value.
+ This is a interim expansion only: it may not be the value that a full project reevaluation would produce.
+ The metadata table passed in is that of the parent item or item definition.
+
+
+ On project in order to keep Project's expander hidden.
+
+
+
+
+ Called by the project collection to indicate to this project that it is no longer loaded.
+
+
+
+
+ Verify that the provided object location is in the same file as the project.
+ If it is not, throws an InvalidOperationException indicating that imported evaluated objects should not be modified.
+ This prevents, for example, accidentally updating something like the OutputPath property, that you want be in the
+ main project, but for some reason was actually read in from an imported targets file.
+
+
+
+
+ Common code for the AddItem methods.
+
+
+
+
+ Helper for and .
+ If the item is not associated with a project, returns false.
+ If the item is not present in the evaluated project, returns false.
+ If the item is associated with another project, throws ArgumentException.
+ Otherwise removes the item and returns true.
+
+
+
+
+ Re-evaluates the project using the specified logging service.
+
+
+
+
+ Re-evaluates the project using the specified logging service and load settings.
+
+
+
+
+ Creates a project instance based on this project using the specified logging service.
+
+
+
+
+ Common code for the constructors.
+ Applies global properties that are on the collection.
+ Global properties provided for the project overwrite any global properties from the collection that have the same name.
+ Global properties may be null.
+ Tools version may be null.
+
+
+
+
+ Raised when any XML in the underlying ProjectRootElement has changed.
+
+
+
+
+ Tries to find a ProjectItemElement already in the project file XML that has a wildcard that would match the
+ item we wish to add, does not have a condition or an exclude, and is within an itemgroup without a condition.
+
+ For perf reasons, this method does several jobs in one.
+ If it finds a suitable existing item element, it returns that as the out parameter, otherwise the out parameter returns null.
+ Otherwise, if it finds an item element suitable to be just below our new element, it returns that.
+ Otherwise, if it finds an item group at least that's suitable to put our element in somewhere, it returns that.
+
+ Returns null if the include of the item being added itself has wildcards, or semicolons, as the case is too difficult.
+
+
+
+
+ Recursive helper for GetLogicalProject.
+
+
+
+
+ Internal
+
+ Note: For deeper integration of remote project we might need to expose [some] of this functionality via IProjectLink3.
+
+
+
+
+ Encapsulates the backing data of a Project, so that it can be passed to the Evaluator to
+ fill in on a re-evaluation without having to expose property setters.
+
+
+ This object is only passed to the Evaluator.
+
+
+
+
+ Almost always, projects have the same set of targets because they all import the same ones.
+ So we keep around the last set seen and if ours is the same at the end of evaluation, unify the references.
+
+
+
+
+ List of names of the properties that, while global, are still treated as overridable.
+
+
+
+
+ Constructor taking the immutable global properties and tools version.
+ Tools version may be null.
+
+
+
+
+ Whether evaluation should collect items ignoring condition,
+ as well as items respecting condition; and collect
+ conditioned properties, as well as regular properties.
+
+
+
+
+ Collection of all evaluated item definitions, one per item-type.
+
+
+
+
+ DefaultTargets specified in the project, or
+ the logically first target if no DefaultTargets is
+ specified in the project.
+
+
+
+
+ The global properties to evaluate with, if any.
+ Can never be null.
+ Read-only; to use different global properties, evaluate yourself a new project.
+
+
+
+
+ A dictionary of all of the properties read from environment variables during evaluation.
+
+
+
+
+ List of names of the properties that, while global, are still treated as overridable.
+
+
+
+
+ InitialTargets specified in the project, plus those
+ in all imports, gathered depth-first.
+
+
+
+
+ Sets or retrieves the list of targets which run before the keyed target.
+
+
+
+
+ Sets or retrieves the list of targets which run after the keyed target.
+
+
+
+
+ The externally specified tools version, if any.
+ For example, the tools version from a /tv switch.
+ Not necessarily the same as the tools version from the project tag or of the toolset used.
+ May be null.
+ Flows through to called projects.
+
+
+
+
+ The toolset data used during evaluation.
+
+
+
+
+ The externally specified sub-toolset version that, combined with the ToolsVersion, is used to determine
+ the toolset properties for this project.
+
+
+
+
+ The sub-toolset version that, combined with the ToolsVersion, was used to determine
+ the toolset properties for this project.
+
+
+
+
+ Items in this project, ordered within groups of item types.
+ Protected by an upcast to IEnumerable.
+
+
+
+
+ List of items that link the XML items and evaluated items,
+ evaluated as if their conditions were true.
+ This is useful for hosts that wish to display all items regardless of their condition.
+ This is an ordered collection.
+
+
+
+
+ Collection of properties that link the XML properties and evaluated properties.
+ Since evaluation has occurred, this is an unordered collection.
+ Includes any global and reserved properties.
+
+
+
+
+ Collection of possible values implied for properties contained in the conditions found on properties,
+ property groups, imports, and whens.
+
+ For example, if the following conditions existed on properties in a project:
+
+ Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"
+ Condition="'$(Configuration)' == 'Release'"
+
+ the table would be populated with
+
+ { "Configuration", { "Debug", "Release" }}
+ { "Platform", { "x86" }}
+
+ This is used by Visual Studio to determine the configurations defined in the project.
+
+
+
+
+
+
+
+ The root directory for this project.
+
+
+
+
+ Registry of usingtasks, for build.
+
+
+
+
+ Get the item types that have at least one item.
+ Read only collection.
+
+
+ item.ItemTypes is a KeyCollection, so it doesn't need any
+ additional read-only protection.
+
+
+
+
+ Properties encountered during evaluation. These are read during the first evaluation pass.
+ Unlike those returned by the Properties property, these are ordered, and includes any properties that
+ were subsequently overridden by others with the same name. It does not include any
+ properties whose conditions did not evaluate to true.
+ It does not include any properties added since the last evaluation.
+
+
+
+
+ Item definition metadata encountered during evaluation. These are read during the second evaluation pass.
+ Unlike those returned by the ItemDefinitions property, these are ordered, and include any metadata that
+ were subsequently overridden by others with the same name and item type. It does not include any
+ elements whose conditions did not evaluate to true.
+ It does not include any item definition metadata added since the last evaluation.
+
+
+
+
+ Items encountered during evaluation. These are read during the third evaluation pass.
+ Unlike those returned by the Items property, these are ordered.
+ It does not include any elements whose conditions did not evaluate to true.
+ It does not include any items added since the last evaluation.
+
+
+
+
+ Expander to use to expand any expressions encountered after the project has been fully evaluated.
+ For example, to expand the values of any properties added at design time.
+ It's convenient to store it here.
+
+
+
+
+ Whether something in this data has been modified since evaluation.
+ For example, a global property has been set.
+
+
+
+
+ Collection of all evaluated item definitions, one per item-type.
+
+
+
+
+ Project that owns this data.
+
+
+
+
+ Targets in the project, used to build.
+
+
+
+
+ Complete list of all imports pulled in during evaluation.
+ This includes the outer project itself.
+
+
+
+
+ Complete list of all imports pulled in during evaluation including duplicate imports.
+ This includes the outer project itself.
+
+
+
+
+ The toolsversion that was originally specified on the project's root element.
+
+
+
+
+ Whether when we read a ToolsVersion other than the current one in the Project tag, we treat it as the current one.
+
+
+
+
+ expose mutable precalculated cache to outside so that other can take advantage of the cache as well.
+
+
+
+
+ Prepares the data object for evaluation.
+
+
+
+
+ Indicates to the data block that evaluation has completed,
+ so for example it can mark datastructures read-only.
+
+
+
+
+ Adds a new item.
+
+
+
+
+ Adds a new item to the collection of all items ignoring condition.
+
+
+
+
+ Properties encountered during evaluation. These are read during the first evaluation pass.
+ Unlike those returned by the Properties property, these are ordered, and includes any properties that
+ were subsequently overridden by others with the same name. It does not include any
+ properties whose conditions did not evaluate to true.
+
+
+
+
+ Item definition metadata encountered during evaluation. These are read during the second evaluation pass.
+ Unlike those returned by the ItemDefinitions property, these are ordered, and include any metadata that
+ were subsequently overridden by others with the same name and item type. It does not include any
+ elements whose conditions did not evaluate to true.
+
+
+
+
+ Items encountered during evaluation. These are read during the third evaluation pass.
+ Unlike those returned by the Items property, these are ordered.
+ It does not include any elements whose conditions did not evaluate to true.
+ It does not include any items added since the last evaluation.
+
+
+
+
+ Adds a new item definition.
+
+
+
+
+ Gets an existing item definition, if any.
+
+
+
+
+ Sets a property which is not derived from Xml.
+
+
+
+
+ Sets a property derived from Xml.
+
+
+
+
+ Retrieves an existing target, if any.
+
+
+
+
+ Adds the specified target, overwriting any existing target with the same name.
+
+
+
+
+ Record an import opened during evaluation.
+ This is used to check later whether any of them have been changed.
+
+
+ This may include imported files that ended up contributing nothing to the evaluated project.
+ These might otherwise have no strong references to them at all.
+ If they are dirtied, though, they might affect the evaluated project; and that's why we record them.
+ Mostly these will be common imports, so they'll be shared anyway.
+
+
+
+
+ Record a duplicate import, possible a duplicate import opened during evaluation.
+
+
+
+
+ Evaluates the provided string by expanding items and properties,
+ using the current items and properties available.
+ This is useful for the immediate window.
+ Does not expand bare metadata expressions.
+
+
+ Not for internal use.
+
+
+
+
+ Evaluates the provided string as a condition by expanding items and properties,
+ using the current items and properties available, then doing a logical evaluation.
+ This is useful for the immediate window.
+ Does not expand bare metadata expressions.
+
+
+ Not for internal use.
+
+
+
+
+ Returns a list of items of the specified type.
+ If there are none, returns an empty list.
+
+
+ ItemDictionary returns a read-only collection, so no need to wrap it here.
+
+ The type of items to return.
+ A list of matching items.
+
+
+
+ Returns the property with the specified name or null if it was not present.
+
+ The property name.
+ The property.
+
+
+
+ Returns the property with the specified name or null if it was not present.
+
+ The property.
+
+
+
+ Removes an item.
+ Returns true if it was previously present, otherwise false.
+
+
+
+
+ Returns all items that have the specified evaluated include.
+ For example, all items that have the evaluated include "bar.cpp".
+ Typically there will be no more than one, but sometimes there are two items with the
+ same path and different item types, or even the same item types. This will return
+ them all.
+
+
+ Assumes that the evaluated include value is unescaped.
+
+
+
+
+ Get the value of a property in this project, or
+ an empty string if it does not exist.
+ Returns the unescaped value.
+
+
+ A property with a value of empty string and no property
+ at all are not distinguished between by this method.
+ That makes it easier to use. To find out if a property is set at
+ all in the project, use GetProperty(name).
+
+
+
+
+ Data class representing a result from and its overloads.
+ This represents all globs found in an item include together with the item element it came from,
+ the excludes that were present on that item, and all the Remove item elements pertaining to the Include item element.
+
+
+
+
+ Gets the original that contained the globs.
+
+
+
+
+ Gets all the evaluated glob strings (properties expanded) from the include.
+
+
+
+
+ A representing the include globs. It also takes the excludes and relevant removes into consideration.
+
+
+
+
+ Gets an containing strings that were excluded.
+
+
+
+
+ Gets an containing strings that were later removed via the Remove element.
+
+
+
+
+ Constructor.
+
+
+
+
+ Bit flag enum that specifies how a string representing an item matched against an itemspec.
+
+
+
+
+ Undefined is the bottom element and should not appear in actual results
+
+
+
+
+ A string matched against a string literal from an itemspec
+
+
+
+
+ A string matched against a glob pattern from an itemspec
+
+
+
+
+ Inconclusive means that the match is indirect, coming from either property or item references.
+
+
+
+
+ Enum that specifies how an item element references an item.
+
+
+
+
+ The element referenced the item by an Include.
+
+
+
+
+ The element referenced the item by an Exclude.
+
+
+
+
+ The element referenced the item by an Update.
+
+
+
+
+ The element referenced the item by a Remove.
+
+
+
+
+ Data class representing a result from and its overloads.
+
+
+
+
+ Gets the that was performed.
+
+
+
+
+ Gets the that contains the operation.
+
+
+
+
+ Gets the of how the item appeared in the operation.
+
+
+
+
+ Gets the number of occurrences of the item.
+
+
+
+
+ Initializes an instance of the ProvenanceResult class.
+
+
+
+
+ An evaluated design-time item
+
+
+ Edits to this object will indirectly dirty the containing project because they will modify the backing XML.
+
+
+ We cannot use a copy-on-write table for the metadata, as ProjectMetadata objects are mutable. However,
+ we do use it for build-time items.
+
+
+
+
+ Project that this item lives in.
+ ProjectItems always live in a project.
+ Used to get item definitions and project directory.
+
+
+
+
+ Fragment of the original include that led to this item,
+ with properties expanded but not wildcards. Escaped as necessary
+
+
+ This is ONLY used to figure out %(RecursiveDir) when it is requested.
+ It's likely too expensive to figure that out if it isn't needed, so we store
+ the necessary material here.
+
+
+
+
+ Item definitions are stored in one single table shared by all items of a particular item type.
+
+ When an item is created from another item, such as by using an expression like Include="@(x)",
+ any item definition metadata those source items have must override any item definition metadata
+ associated with the new item type.
+
+ Copying all those item definition metadata into real metadata on this item would be very inefficient, because
+ it would turn a single shared table into a separate table for every item.
+
+ Instead, we get a reference to the item definition of the source items, and consult
+ that table before we consult our own item type's item definition. Since item definitions can't change at this point,
+ it's safe to reference their original table.
+
+ If our item gets copied again, we need a reference to the inherited item definition and we need the real item
+ definition of the source items. Thus a list is created. On copying, a list is created, beginning with a clone
+ of any list the source item had, and ending with the item definition list of the source item type.
+
+ When we look up a metadata value we look at
+ (1) directly associated metadata and built-in metadata
+ (2) the inherited item definition list, starting from the top
+ (3) the item definition associated with our item type
+
+
+
+
+ Backing XML item.
+ Can never be null
+
+
+
+
+ Evaluated include.
+ The original XML may have evaluated to several of these items,
+ each with a different include.
+ May be empty, for example from expanding an empty list or from a transform with undefined metadata.
+ Escaped as necessary
+
+
+
+
+ Collection of metadata that link the XML metadata and evaluated metadata.
+ Since evaluation has occurred, this is an unordered collection.
+ May be null.
+
+
+ Lazily created, as there are lots of items
+ that have no metadata at all.
+
+
+
+
+ Cached value of the fullpath metadata. All other metadata are computed on demand.
+
+
+
+
+ External projects support
+
+
+
+
+ Called by the Evaluator during project evaluation.
+ Direct metadata may be null, indicating no metadata. It is assumed to have already been cloned.
+ Inherited item definition metadata may be null. It is assumed that its list has already been cloned.
+ ProjectMetadata objects may be shared with other items.
+
+
+
+
+ Backing XML item.
+ Can never be null.
+
+
+
+
+ Gets or sets the type of this item.
+
+
+
+
+ Gets or sets the unevaluated value of the Include.
+
+
+
+
+ Gets the evaluated value of the include, unescaped.
+
+
+
+
+ Gets the evaluated value of the include, escaped as necessary.
+
+
+
+
+ The directory of the project being built
+ Never null: If there is no project filename yet, it will use the current directory
+
+
+
+
+ Project that this item lives in.
+ ProjectItems always live in a project.
+
+
+
+
+ If the item originated in an imported file, returns true.
+ Otherwise returns false.
+
+
+
+
+ Metadata directly on the item, if any.
+ Does not include metadata from item definitions.
+ Does not include built-in metadata.
+ Never returns null.
+
+
+
+
+ Count of direct metadata on this item, if any.
+ Does NOT count any metadata inherited from item definitions.
+ Does not count built-in metadata, such as "FullPath".
+
+
+
+
+ Metadata on the item, if any. Includes metadata specified by the definition, if any.
+ If there is no metadata, returns an empty collection.
+ Does not include built-in metadata, such as "FullPath".
+ Get the values of built-in metadata using .
+ This is a read-only collection. To modify the metadata, use .
+
+
+
+
+ Count of metadata on this item, if any.
+ Includes any metadata inherited from item definitions.
+ Includes both custom and built-in metadata.
+
+
+
+
+ Implementation of IKeyed exposing the item type, so items
+ can be put in a dictionary conveniently.
+
+
+
+
+ Internal version of Metadata that returns
+ a full ICollection.
+ Unordered collection of evaluated metadata on the item.
+ If there is no metadata, returns an empty collection.
+ Does not include built-in metadata.
+ Includes any from item definitions not masked by directly set metadata.
+ This is a read-only collection. To modify the metadata, use .
+
+
+
+
+ Accesses the unescaped evaluated include prior to wildcard expansion
+
+
+
+
+ Accesses the evaluated include prior to wildcard expansion
+
+
+
+
+ Accesses the inherited item definitions, if any.
+ Used ONLY by the ProjectInstance, when cloning a ProjectItem.
+
+
+
+
+ Gets an evaluated metadata on this item.
+ Potentially includes a metadata from an item definition.
+ Does not return built-in metadata, such as "FullPath".
+ Returns null if not found.
+
+
+
+
+ Get the evaluated value of a metadata on this item, possibly from an item definition.
+ Returns empty string if it does not exist.
+ To determine whether a piece of metadata does not exist vs. simply has no value, use HasMetadata.
+ May be used to access the value of built-in metadata, such as "FullPath".
+ Attempting to get built-in metadata on a value that is not a valid path throws InvalidOperationException.
+
+
+
+
+ Returns true if a particular piece of metadata is defined on this item,
+ otherwise false.
+ Includes built-in metadata and metadata inherited from item definitions.
+
+
+
+
+ See GetMetadataValue for a more detailed explanation.
+ Returns the escaped value of the metadatum requested.
+
+
+
+
+ Gets any existing ProjectMetadata on the item, or
+ else any on an applicable item definition.
+ This is ONLY called during evaluation.
+ Does not return built-in metadata, such as "FullPath".
+ Returns null if not found.
+
+
+
+
+ Adds a ProjectMetadata to the item.
+ This is ONLY called during evaluation and does not affect the XML.
+
+
+
+
+ Adds metadata with the specified name and value to the item.
+ Updates an existing metadata if one already exists with the same name on the item directly, as opposed to inherited from an item definition.
+ Updates the evaluated project, but does not affect anything else in the project until reevaluation. For example,
+ if a piece of metadata named "m" is added on item of type "i", it does not affect "j" which is evaluated from "@(j->'%(m)')" until reevaluation.
+ Also if the unevaluated value of "m" is set to something that is modified by evaluation, such as "$(p)", the evaluated value will be set to literally "$(p)" until reevaluation.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state without a reevaluation.
+ Returns the new or existing metadatum.
+
+ Unevaluated value is assumed to be escaped as necessary
+
+
+
+ Overload of . Adds the option of not splitting the item element and thus affecting all sibling items.
+ Sibling items are defined as all ProjectItem instances that were created from the same item element.
+
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state without a reevaluation
+
+ /// Metadata name
+ Metadata value
+
+ If true, adds direct metadata to the from which this originated. The intent is to affect all other sibling items.
+
+ Returns the new or existing metadatum.
+
+
+
+ Removes any metadata with the specified name.
+ Returns true if the evaluated metadata existed, otherwise false.
+ If the metadata name is one of the built-in metadata, like "FullPath", throws InvalidArgumentException.
+ If the metadata originates in an item definition, and was not overridden, throws InvalidOperationException.
+
+
+
+
+ Renames the item.
+ Equivalent to setting the value.
+ Generally, no expansion occurs. This is because it would potentially result in several items,
+ which is not meaningful semantics when renaming a single item.
+ However if the item does not need to be split (which would invalidate its ProjectItemElement),
+ and the new value expands to exactly one item, then its evaluated include is updated
+ with the expanded value, rather than the unexpanded value.
+
+
+ Even if the new value expands to zero items, we do not expand it.
+ The common case we are interested in for expansion here is setting something
+ like "$(sourcesroot)\foo.cs" and expanding that to a single item.
+ If say "@(foo)" is set as the new name, and it expands to blank, that might
+ be surprising to the host and maybe even unhandled, if on full reevaluation
+ it wouldn’t expand to blank. That’s why we're being cautious and supporting
+ the most common scenario only.
+ Many hosts will do a ReevaluateIfNecessary before reading anyway.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name specified.
+ If no value is available, returns empty string.
+ Value, if escaped, remains escaped.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name and item type specified.
+ If no value is available, returns empty string.
+ If item type is null, it is ignored, otherwise it must match.
+ Value, if escaped, remains escaped.
+
+
+
+
+ Returns the value if it exists.
+ If no value is available, returns null.
+ If item type is null, it is ignored, otherwise it must match.
+ Value, if escaped, remains escaped.
+
+
+
+
+ Changes the item type of this item.
+ Until reevaluation puts it in the correct place, it will be placed at
+ the end of the list of items of its new type.
+
+
+ This is a little involved, as it requires replacing
+ the XmlElement, and updating the project's datastructures.
+
+
+
+
+ Creates new xml objects for itself, disconnecting from the old xml objects.
+ Called ONLY by
+
+
+ Called when breaking up a single ProjectItemElement that evaluates into several ProjectItems.
+
+
+
+
+ Helper to get the value of a built-in metadatum with
+ the specified name, if any.
+
+
+
+
+ Retrieves the named metadata from the item definition, if any.
+ If it is not present, returns null
+
+ The metadata name.
+ The value if it exists, null otherwise.
+
+
+
+ A class factory for ProjectItems.
+
+
+
+
+ The Project with which each item should be associated.
+
+
+
+
+ The project item's XML
+
+
+
+
+ Creates an item factory which does not specify an item xml. The item xml must
+ be specified later.
+
+ The project for items generated.
+
+
+
+ Constructor
+
+ The project for items generated.
+ The xml for items generated.
+
+
+
+ Item type that items created by this factory will have.
+
+
+
+
+ Set the item xml from which items will be created.
+ Used by the evaluator only.
+
+
+
+
+ Creates an item with the specified type and evaluated include.
+ Used for making items from "just strings" and from expressions like "@(Compile, ';')"
+
+ The include.
+ The path to the project that defined the item.
+ A new project item.
+
+ NOTE: defining project is ignored because we already know the ItemElement associated with
+ this item, and use that for where it is defined.
+
+
+
+
+ Creates an item based on the provided item, but with
+ the project and xml of this factory. Metadata is cloned,
+ but continues to point to the original ProjectMetadataElement objects.
+ This is to support the scenario Include="@(i)" where we are copying
+ metadata, and are happy to see changes in the original metadata, but
+ setting metadata should create new XML.
+
+
+ NOTE: defining project is ignored because we already know the ItemElement associated with
+ this item, and use that for where it is defined.
+
+
+
+
+ Creates an item based on the provided item, but with
+ the project and xml of this factory and the specified include. Metadata is cloned,
+ but continues to point to the original ProjectMetadataElement objects.
+ This is to support this scenario: Include="@(i->'xxx')"
+
+
+ If the item type of the source is the same as the item type of the destination,
+ then it's not necessary to copy metadata originating in an item definition.
+ If it's not, we have to clone that too.
+
+
+ NOTE: defining project is ignored because we already know the ItemElement associated with
+ this item, and use that for where it is defined.
+
+
+
+
+ Creates an item with the specified include and include before wildcard expansion.
+ This is to support creating items from an include that may have a wildcard expression in it.
+
+
+ NOTE: defining project is ignored because we already know the ItemElement associated with
+ this item, and use that for where it is defined.
+
+
+
+
+ Applies the supplied metadata to the destination item.
+
+
+
+
+ Creates an item based on the provided item, with the specified include and item type.
+
+
+
+
+ Implementation of IMetadataTable that can be passed to expander
+ to expose only built-in metadata on this item.
+
+
+
+
+ Backing item
+
+
+
+
+ Constructor.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name specified.
+ If no value is available, returns empty string.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name and item type specified.
+ If item type is null, it is ignored.
+ If no value is available, returns empty string.
+
+
+
+
+ Returns the value if it exists, null otherwise.
+ If item type is null, it is ignored.
+
+
+
+
+ An evaluated item definition for a particular item-type.
+
+
+ Note that these are somewhat different to items. Like items, they can have metadata; like properties, the metadata
+ can override each other. So during evaluation all the item definitions for a type are rolled together (assuming
+ their conditions are true) to create one ProjectItemDefinition for each type. For this reason, the ProjectItemDefinition
+ often will not point to a single ProjectItemDefinitionElement. The metadata within, however, will each point to a single
+ ProjectMetadataElement, and these can be added, removed, and modified.
+
+
+
+
+ Project that this item definition lives in.
+ ProjectItemDefinitions always live in a project.
+ Used to evaluate any updates to child metadata.
+
+
+
+
+ Item type, for example "Compile", that this item definition applies to
+
+
+
+
+ Collection of metadata that link the XML metadata and instance metadata
+ Since evaluation has occurred, this is an unordered collection.
+
+
+
+
+ Called by the Evaluator during project evaluation.
+
+
+ Assumes that the itemType string originated in a ProjectItemDefinitionElement and therefore
+ was already validated.
+
+
+
+
+ Project that this item lives in.
+ ProjectDefinitions always live in a project.
+
+
+
+
+ Type of this item definition.
+
+
+
+
+ Metadata on the item definition.
+ If there is no metadata, returns empty collection.
+ This is a read-only collection.
+
+
+
+
+ Count of metadata on the item definition.
+
+
+
+
+ Implementation of IKeyed exposing the item type, so these
+ can be put in a dictionary conveniently.
+
+
+
+
+ Get any metadata in the item that has the specified name,
+ otherwise returns null
+
+
+
+
+ Get the value of any metadata in the item that has the specified
+ name, otherwise returns null
+
+
+
+
+ Sets a new metadata value on the ItemDefinition.
+
+ Unevaluated value is assumed to be escaped as necessary
+
+
+
+ Sets a new metadata value on the ItemDefinition.
+ This is ONLY called during evaluation and does not affect the XML.
+
+
+
+
+ Retrieves the value of the named metadatum.
+
+ The metadatum to retrieve.
+ The value, or an empty string if there is none by that name.
+
+
+
+ Retrieves the value of the named metadatum.
+
+ The type of item.
+ The metadatum to retrieve.
+ The value, or an empty string if there is none by that name.
+
+
+
+ Retrieves the value of the named metadatum, or null if it doesn't exist
+
+ The type of item.
+ The metadatum to retrieve.
+ The value, or null if there is none by that name.
+
+
+
+ An evaluated design-time metadatum.
+ Parented either by a ProjectItemDefinition or a ProjectItem.
+
+
+ Never used to represent built-in metadata, like %(Filename). There is always a backing XML object.
+
+
+
+
+ Parent item or item definition that this metadatum lives in.
+ ProjectMetadata's always live in a project and always have a parent.
+ The project can be gotten from this parent.
+ Used to evaluate any updates.
+
+
+
+
+ Backing XML metadata.
+ Can never be null.
+
+
+
+
+ Evaluated value
+
+
+
+
+ Any immediately previous metadatum (from item definition or item) that was overridden by this one during evaluation.
+ This would include all metadata with the same name that lie above in the logical
+ project file, who are on item definitions of the same type, and whose conditions evaluated to true.
+ If this metadatum is on an item, it would include any previous metadatum with the same name on the same item whose condition
+ evaluated to true, and following that any item definition metadata.
+ If there are none above this is null.
+ If the project has not been reevaluated since the last modification this value may be incorrect.
+
+
+
+
+ External projects support
+
+
+
+
+ Creates a metadata backed by XML.
+ Constructed during evaluation of a project.
+
+
+
+
+ Name of the metadata
+
+
+
+
+ Gets the evaluated metadata value.
+ Cannot be set directly: only the unevaluated value can be set.
+ Is never null.
+
+
+
+
+ Gets or sets the unevaluated metadata value.
+
+ As well as updating the unevaluated value, the setter updates the evaluated value, but does not affect anything else in the project until reevaluation. For example,
+ --if a piece of metadata named "m" is modified on item of type "i", it does not affect "j" which is evaluated from "@(j->'%(m)')" until reevaluation.
+ --if the unevaluated value of "m" is set to something that is modified by evaluation, such as "$(p)", the evaluated value will be set to "$(p)" until reevaluation.
+ This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state.
+
+ Setting metadata through a ProjectItem may cause the underlying ProjectItemElement to be split, if it originated with an itemlist, wildcard, or semicolon expression,
+ because it was clear that the caller intended to only affect that particular item.
+ Setting metadata through a ProjectMetadata does not cause any splitting, because we assume the caller presumably intends to affect all items using the underlying
+ ProjectMetadataElement. At least, this seems a reasonable assumption, and it avoids the need for metadata to hold a pointer to their containing items.
+
+
+ The containing project will be dirtied by the XML modification. Unevaluated values are assumed to be passed in escaped as necessary.
+
+
+
+
+ Backing XML metadata.
+ Can never be null.
+
+
+
+
+ Project that this metadatum lives in.
+ ProjectMetadata's always live in a project.
+
+
+
+
+ The item type of the parent item definition or item.
+
+
+
+
+ Any immediately previous metadatum (from item definition or item) that was overridden by this one during evaluation.
+ This would include all metadata with the same name that lie above in the logical
+ project file, who are on item definitions of the same type, and whose conditions evaluated to true.
+ If this metadatum is on an item, it would include any previous metadatum with the same name on the same item whose condition
+ evaluated to true, and following that any item definition metadata.
+ If there are none above this is null.
+ If the project has not been reevaluated since the last modification this value may be incorrect.
+
+
+
+
+ If the metadatum originated in an imported file, returns true.
+ Otherwise returns false.
+
+
+
+
+ Location of the element
+
+
+
+
+ Location of the condition attribute
+
+
+
+
+ Implementation of IKeyed exposing the metadata name, so metadata
+ can be put in a dictionary conveniently.
+
+
+
+
+ Implementation of IValued
+
+
+
+
+ Gets the evaluated metadata value.
+ Cannot be set directly: only the unevaluated value can be set.
+ Is never null.
+
+
+
+
+ Compares this metadata to another for equivalence.
+
+ The other metadata
+ True if they are equivalent, false otherwise.
+
+
+
+ Deep clone a metadatum, retaining the same parent.
+
+
+
+
+ An evaluated design-time property
+
+
+
+
+ Project that this property lives in.
+ ProjectProperty's always live in a project.
+ Used to evaluate any updates.
+
+
+
+
+ Evaluated value of the property. Escaped as necessary.
+
+
+
+
+ Creates a property.
+
+
+
+
+ Name of the property.
+ Cannot be set.
+
+
+ If this could be set, it would be necessary to have a callback
+ so that the containing collections could be updated, as they use the name as
+ their key.
+
+
+
+
+ Gets the evaluated property value.
+ Cannot be set directly: only the unevaluated value can be set.
+ Is never null.
+
+
+ Unescaped value of the evaluated property
+
+
+
+
+ Gets the evaluated property value.
+ Cannot be set directly: only the unevaluated value can be set.
+ Is never null.
+
+
+ Evaluated property escaped as necessary
+
+
+
+
+ Gets or sets the unevaluated property value.
+ Updates the evaluated value in the project, although this is not sure to be correct until re-evaluation.
+
+
+
+
+ Whether the property originated from the environment (or the toolset)
+
+
+
+
+ Whether the property is a global property
+
+
+
+
+ Whether the property is a reserved property,
+ like 'MSBuildProjectFile'.
+
+
+
+
+ Backing XML property.
+ Null only if this is a global, environment, or built-in property.
+
+
+
+
+ Project that this property lives in.
+ ProjectProperty's always live in a project.
+
+
+
+
+ Any immediately previous property that was overridden by this one during evaluation.
+ This would include all properties with the same name that lie above in the logical
+ project file, and whose conditions evaluated to true.
+ If there are none above this is null.
+ If the project has not been reevaluated since the last modification this value may be incorrect.
+
+
+
+
+ If the property originated in an imported file, returns true.
+ If the property originates from the environment, a global property, or is a built-in property, returns false.
+ Otherwise returns false.
+
+
+
+
+ Implementation of IKeyed exposing the property name, so properties
+ can be put in a dictionary conveniently.
+
+
+
+
+ Implementation of IValued
+
+
+
+
+ Compares this property to another for equivalence.
+
+ The other property.
+ True if the properties are equivalent, false otherwise.
+
+
+
+ Creates a property without backing XML.
+ Property MAY BE global, and property MAY HAVE a reserved name (such as "MSBuildProjectDirectory") if indicated.
+ This is ONLY to be used by the Evaluator (and Project.SetGlobalProperty) and ONLY for Global, Environment, and Built-in properties.
+ All other properties originate in XML, and should have a backing XML object.
+
+
+
+
+ Creates a regular evaluated property, with backing XML.
+ Called by Project.SetProperty.
+ Property MAY NOT have reserved name and MAY NOT overwrite a global property.
+ Predecessor is any immediately previous property that was overridden by this one during evaluation and may be null.
+
+
+
+
+ Called ONLY by the project in order to update the evaluated value
+ after a property set occurring between full evaluations.
+
+
+ Method instead of a setter on EvaluatedValue to try to make clear its limited purpose.
+
+
+
+
+ Looks for a matching global property.
+
+
+ The reason we do this and not just look at project.GlobalProperties is
+ that when the project is being loaded, the GlobalProperties collection is already populated. When we do our
+ evaluation, we may attempt to add some properties, such as environment variables, to the master Properties
+ collection. As GlobalProperties are supposed to override these and thus be added last, we can't check against
+ the GlobalProperties collection as they are being added. The correct behavior is to always check against the
+ collection which is accumulating properties as we go, which is the Properties collection. Once the project has
+ been fully populated, this method will also ensure that further properties do not attempt to override global
+ properties, as those will have the global property flag set.
+
+ The project to compare with.
+ The property name to look up
+ True if there is a matching global property, false otherwise.
+
+
+
+ Regular property, originating in an XML node, but with no predecessor (property with same name that it overrode during evaluation)
+
+
+
+
+ Backing XML property.
+ Never null.
+
+
+
+
+ Creates a regular evaluated property, with backing XML.
+ Called by Project.SetProperty.
+ Property MAY NOT have reserved name and MAY NOT overwrite a global property.
+ Predecessor is any immediately previous property that was overridden by this one during evaluation and may be null.
+
+
+
+
+ Name of the property.
+ Cannot be set.
+
+
+ If this could be set, it would be necessary to have a callback
+ so that the containing collections could be updated, as they use the name as
+ their key.
+
+
+
+
+ Gets or sets the unevaluated property value.
+ Updates the evaluated value in the project, although this is not sure to be correct until re-evaluation.
+
+
+ The containing project will be dirtied by the XML modification.
+ If there is no XML backing, the evaluated value returned is the value of the property that has been
+ escaped as necessary.
+
+
+
+
+ Whether the property originated from the environment (or the toolset)
+
+
+
+
+ Whether the property is a global property
+
+
+
+
+ Whether the property is a reserved property,
+ like 'MSBuildProjectFile'.
+
+
+
+
+ Backing XML property.
+
+
+
+
+ Any immediately previous property that was overridden by this one during evaluation.
+ This would include all properties with the same name that lie above in the logical
+ project file, and whose conditions evaluated to true.
+ In this class this is null.
+ If the project has not been reevaluated since the last modification this value may be incorrect.
+
+
+
+
+ If the property originated in an imported file, returns true.
+ Otherwise returns false.
+
+
+
+
+ Regular property, originating in an XML node, and with a predecessor (property with same name that was overridden during evaluation)
+
+
+
+
+ Any immediately previous property that was overridden by this one during evaluation.
+ This would include all properties with the same name that lie above in the logical
+ project file, and whose conditions evaluated to true.
+ If there are none above this is null.
+ If the project has not been reevaluated since the last modification this value may be incorrect.
+
+
+
+
+ Creates a regular evaluated property, with backing XML.
+ Called by Project.SetProperty.
+ Property MAY NOT have reserved name and MAY NOT overwrite a global property.
+ Predecessor is any immediately previous property that was overridden by this one during evaluation and may be null.
+
+
+
+
+ Any immediately previous property that was overridden by this one during evaluation.
+ This would include all properties with the same name that lie above in the logical
+ project file, and whose conditions evaluated to true.
+ If there are none above this is null.
+ If the project has not been reevaluated since the last modification this value may be incorrect.
+
+
+
+
+ Global/environment/toolset properties are the minority;
+ they don't originate with XML, so we must store their name (instead)
+
+
+
+
+ Name of the property.
+
+
+
+
+ Creates a property without backing XML.
+ Property MAY BE global, and property MAY HAVE a reserved name (such as "MSBuildProjectDirectory") if indicated.
+ This is ONLY to be used by the Evaluator (and Project.SetGlobalProperty) and ONLY for Global, Environment, and Built-in properties.
+ All other properties originate in XML, and should have a backing XML object.
+
+
+
+
+ Name of the property.
+ Cannot be set.
+
+
+ If this could be set, it would be necessary to have a callback
+ so that the containing collections could be updated, as they use the name as
+ their key.
+
+
+
+
+ Gets or sets the unevaluated property value.
+ Updates the evaluated value in the project, although this is not sure to be correct until re-evaluation.
+
+
+ The containing project will be dirtied.
+ As there is no XML backing, the evaluated value returned is the value of the property that has been
+ escaped as necessary.
+
+
+
+
+ Whether the property originated from the environment (or the toolset)
+
+
+
+
+ Whether the property is a global property
+
+
+
+
+ Whether the property is a reserved property,
+ like 'MSBuildProjectFile'.
+
+
+
+
+ Backing XML property.
+ Null because this is a global, environment, or built-in property.
+
+
+
+
+ Any immediately previous property that was overridden by this one during evaluation.
+ Because these properties are not backed by XML, they cannot have precedessors.
+
+
+
+
+ Whether the property originated in an imported file.
+ Because these properties did not originate in an XML file, this always returns null.
+
+
+
+
+ Encapsulates an import relationship in an evaluated project
+ between a ProjectImportElement and the ProjectRootElement of the
+ imported project.
+
+
+
+
+ Initializes a new instance of the struct.
+
+
+
+
+ Initializes a new instance of the struct.
+
+
+
+
+ Gets the element doing the import.
+ Null if this is the top project
+
+
+
+
+ Gets one of the imported projects.
+
+
+
+
+ Non null if this import was an sdk import.
+
+
+
+
+ Whether the importing element is itself imported.
+
+
+
+
+ Aggregation of a set of properties that correspond to a particular sub-toolset.
+
+
+
+
+ VisualStudioVersion that corresponds to this subtoolset
+
+
+
+
+ The properties defined by the subtoolset.
+
+
+
+
+ Constructor that associates a set of properties with a sub-toolset version.
+
+
+
+
+ Private constructor for translation
+
+
+
+
+ VisualStudioVersion that corresponds to this subtoolset
+
+
+
+
+ The properties that correspond to this particular sub-toolset.
+
+
+
+
+ Translates the sub-toolset.
+
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Delegate for loading an Xml file, for unit testing.
+
+ The path to load.
+ An Xml document.
+
+
+
+ Aggregation of a toolset version (eg. "2.0"), tools path, and optional set of associated properties.
+ Toolset is immutable.
+
+
+
+
+ these files list all default tasks and task assemblies that do not need to be explicitly declared by projects
+
+
+
+
+ these files list all Override tasks and task assemblies that do not need to be explicitly declared by projects
+
+
+
+
+ Regkey that we check to see whether Dev10 is installed. This should exist if any SKU of Dev10 is installed,
+ but is not removed even when the last version of Dev10 is uninstalled, due to 10.0\bsln sticking around.
+
+
+
+
+ Regkey that we check to see whether Dev10 Ultimate is installed. This will exist if it is installed, and be
+ properly removed after it has been uninstalled.
+
+
+
+
+ Regkey that we check to see whether Dev10 Premium is installed. This will exist if it is installed, and be
+ properly removed after it has been uninstalled.
+
+
+
+
+ Regkey that we check to see whether Dev10 Professional is installed. This will exist if it is installed, and be
+ properly removed after it has been uninstalled.
+
+
+
+
+ Regkey that we check to see whether C# Express 2010 is installed. This will exist if it is installed, and be
+ properly removed after it has been uninstalled.
+
+
+
+
+ Regkey that we check to see whether VB Express 2010 is installed. This will exist if it is installed, and be
+ properly removed after it has been uninstalled.
+
+
+
+
+ Regkey that we check to see whether VC Express 2010 is installed. This will exist if it is installed, and be
+ properly removed after it has been uninstalled.
+
+
+
+
+ Regkey that we check to see whether VWD Express 2010 is installed. This will exist if it is installed, and be
+ properly removed after it has been uninstalled.
+
+
+
+
+ Regkey that we check to see whether LightSwitch 2010 is installed. This will exist if it is installed, and be
+ properly removed after it has been uninstalled.
+
+
+
+
+ Null if it hasn't been figured out yet; true if (some variation of) Visual Studio 2010 is installed on
+ the current machine, false otherwise.
+
+
+
+
+ Name of the tools version
+
+
+
+
+ The MSBuildBinPath (and ToolsPath) for this tools version
+
+
+
+
+ The properties defined by the toolset.
+
+
+
+
+ Path to look for msbuild override task files.
+
+
+
+
+ ToolsVersion to use as the default ToolsVersion for this version of MSBuild
+
+
+
+
+ The environment properties
+
+
+
+
+ The build-global properties
+
+
+
+
+ indicates if the default tasks file has already been scanned
+
+
+
+
+ indicates if the override tasks file has already been scanned
+
+
+
+
+ holds all the default tasks we know about and the assemblies they exist in
+
+
+
+
+ holds all the override tasks we know about and the assemblies they exist in
+
+
+
+
+ Delegate to retrieving files. For unit testing only.
+
+
+
+
+ Delegate to check to see if a directory exists
+
+
+
+
+ Delegate for loading Xml. For unit testing only.
+
+
+
+
+ Expander to expand the properties and items in the using tasks files
+
+
+
+
+ SubToolsets that map to this toolset.
+
+
+
+
+ If no sub-toolset is specified, this is the default sub-toolset version. Null == no default
+ sub-toolset, just use the base toolset.
+
+
+
+
+ Map of project import properties to their list of fall-back search paths
+
+
+
+
+ Constructor taking only tools version and a matching tools path
+
+ Name of the toolset
+ Path to this toolset's tasks and targets
+ The project collection from which to obtain the properties.
+ The path to search for msbuild overridetasks files.
+
+
+
+ Constructor that also associates a set of properties with the tools version
+
+ Name of the toolset
+ Path to this toolset's tasks and targets
+
+ Properties that should be associated with the Toolset.
+ May be null, in which case an empty property group will be used.
+
+ The project collection that this toolset should inherit from
+ The override tasks path.
+
+
+
+ Constructor that also associates a set of properties with the tools version
+
+ Name of the toolset
+ Path to this toolset's tasks and targets
+
+ Properties that should be associated with the Toolset.
+ May be null, in which case an empty property group will be used.
+
+ The project collection that this toolset should inherit from
+ The set of sub-toolsets to add to this toolset
+ The override tasks path.
+
+
+
+ Constructor taking only tools version and a matching tools path
+
+ Name of the toolset
+ Path to this toolset's tasks and targets
+ A containing the environment properties.
+ A containing the global properties.
+ The override tasks path.
+ ToolsVersion to use as the default ToolsVersion for this version of MSBuild.
+
+
+
+ Constructor that also associates a set of properties with the tools version
+
+ Name of the toolset
+ Path to this toolset's tasks and targets
+
+ Properties that should be associated with the Toolset.
+ May be null, in which case an empty property group will be used.
+
+ A containing the environment properties.
+ A containing the global properties.
+ A list of to use.
+ The override tasks path.
+ ToolsVersion to use as the default ToolsVersion for this version of MSBuild.
+ Map of parameter name to property search paths for use during Import.
+
+
+
+ Additional constructor to make unit testing the TaskRegistry support easier
+
+
+ Internal for unit test purposes only.
+
+ Name of the toolset
+ Path to this toolset's tasks and targets
+
+ Properties that should be associated with the Toolset.
+ May be null, in which case an empty property group will be used.
+
+ The project collection.
+ A delegate to intercept GetFiles calls. For unit testing.
+ A delegate to intercept Xml load calls. For unit testing.
+ The override tasks path.
+
+
+
+
+ Private constructor for serialization.
+
+
+
+
+ Returns a ProjectImportPathMatch struct for the first property found in the expression for which
+ project import search paths is enabled.
+ Expression to search for properties in (first level only, not recursive)
+ List of search paths or ProjectImportPathMatch.None if empty
+
+
+
+
+ Name of this toolset
+
+
+
+
+ Path to this toolset's tasks and targets. Corresponds to $(MSBuildToolsPath) in a project or targets file.
+
+
+
+
+ Properties associated with the toolset
+
+
+
+
+ The set of sub-toolsets associated with this toolset.
+
+
+
+
+ Returns the default sub-toolset version for this sub-toolset. Heuristic used is:
+ 1) If Visual Studio 2010 is installed and our ToolsVersion is "4.0", use the base toolset, and return
+ a sub-toolset version of "10.0", to be set as a publicly visible property so that e.g. targets can
+ consume it. This is to handle the fact that Visual Studio 2010 did not have any concept of sub-toolsets.
+ 2) Otherwise, use the highest-versioned sub-toolset found. Sub-toolsets with numbered versions will
+ be ordered numerically; any additional sub-toolsets will be prepended to the beginning of the list in
+ the order found. We use the highest-versioned sub-toolset because, in the absence of any other information,
+ we assume that higher-versioned tools will be more likely to be able to generate something more correct.
+
+ Will return null if there is no sub-toolset available (and Dev10 is not installed).
+
+
+
+
+ Null if it hasn't been figured out yet; true if (some variation of) Visual Studio 2010 is installed on
+ the current machine, false otherwise.
+
+
+ Internal so that unit tests can use it too.
+
+
+
+
+ Path to look for msbuild override task files.
+
+
+
+
+ ToolsVersion to use as the default ToolsVersion for this version of MSBuild
+
+
+
+
+ Map of properties to their list of fall-back search paths
+
+
+
+
+ Map of MSBuildExtensionsPath properties to their list of fallback search paths
+
+
+
+
+ Function for serialization.
+
+
+
+
+ Generates the sub-toolset version to be used with this toolset. Sub-toolset version is based on:
+ 1. If "VisualStudioVersion" is set as a property on the toolset itself (global or environment),
+ use that.
+ 2. Otherwise, use the default sub-toolset version for this toolset.
+
+ The sub-toolset version returned may be null; if so, that means that no sub-toolset should be used,
+ just the base toolset on its own. The sub-toolset version returned may not map to an existing
+ sub-toolset.
+
+
+
+
+ Generates the sub-toolset version to be used with this toolset. Sub-toolset version is based on:
+ 1. If the "VisualStudioVersion" global property exists in the set of properties passed to us, use it.
+ 2. Otherwise, if "VisualStudioVersion" is set as a property on the toolset itself (global or environment),
+ use that.
+ 3. Otherwise, use Visual Studio version from solution file if it maps to an existing sub-toolset.
+ 4. Otherwise, use the default sub-toolset version for this toolset.
+
+ The sub-toolset version returned may be null; if so, that means that no sub-toolset should be used,
+ just the base toolset on its own. The sub-toolset version returned may not map to an existing
+ sub-toolset.
+
+ The global properties dictionary may be null.
+
+
+
+
+ Given a property name and a sub-toolset version, searches for that property first in the
+ sub-toolset, then falls back to the base toolset if necessary, and returns the property
+ if it was found.
+
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Given a search path and a task pattern get a list of task or override task files.
+
+
+
+
+ Generates the sub-toolset version to be used with this toolset. Sub-toolset version is based on:
+ 1. If the "VisualStudioVersion" global property exists in the set of properties passed to us, use it.
+ 2. Otherwise, if "VisualStudioVersion" is set as a property on the toolset itself (global or environment),
+ use that.
+ 3. Otherwise, use Visual Studio version from solution file if it maps to an existing sub-toolset.
+ 4. Otherwise, use the default sub-toolset version for this toolset.
+
+ The sub-toolset version returned may be null; if so, that means that no sub-toolset should be used,
+ just the base toolset on its own. The sub-toolset version returned may not map to an existing
+ sub-toolset.
+
+ The global properties dictionary may be null.
+
+
+
+
+ Generates the sub-toolset version to be used with this toolset. Sub-toolset version is based on:
+ 1. If the "VisualStudioVersion" global property exists in the set of properties passed to us, use it.
+ 2. Otherwise, if "VisualStudioVersion" is set as a property on the toolset itself (global or environment),
+ use that.
+ 3. Otherwise, use Visual Studio version from solution file if it maps to an existing sub-toolset.
+ 4. Otherwise, use the default sub-toolset version for this toolset.
+
+ The sub-toolset version returned may be null; if so, that means that no sub-toolset should be used,
+ just the base toolset on its own. The sub-toolset version returned may not map to an existing
+ sub-toolset.
+
+ The global properties dictionary may be null.
+
+
+
+
+ Return a task registry stub for the tasks in the *.tasks file for this toolset
+
+ The logging services used to log during task registration.
+ The build event context used to log during task registration.
+ The to use.
+ The task registry
+
+
+
+ Get SubToolset version using Visual Studio version from Dev 12 solution file
+
+
+
+
+ Return a task registry for the override tasks in the *.overridetasks file for this toolset
+
+ The logging services used to log during task registration.
+ The build event context used to log during task registration.
+ The to use.
+ The task registry
+
+
+
+ Used to load information about default MSBuild tasks i.e. tasks that do not need to be explicitly declared in projects
+ with the <UsingTask> element. Default task information is read from special files, which are located in the same
+ directory as the MSBuild binaries.
+
+
+ 1) a default tasks file needs the <Project> root tag in order to be well-formed
+ 2) the XML declaration tag <?xml ...> is ignored
+ 3) comment tags are always ignored regardless of their placement
+ 4) the rest of the tags are expected to be <UsingTask> tags
+
+ The logging services to use to log during this registration.
+ The build event context to use to log during this registration.
+ The to use.
+
+
+
+ Initialize the properties which are used to evaluate the tasks files.
+
+
+
+
+ Used to load information about MSBuild override tasks i.e. tasks that override tasks declared in tasks or project files.
+
+
+
+
+ Do the actual loading of the tasks or override tasks file and register the tasks in the task registry
+
+
+
+
+ Class used to read toolset configurations.
+
+
+
+
+ A section of a toolset configuration
+
+
+
+
+ Delegate used to read application configurations
+
+
+
+
+ Flag indicating that an attempt has been made to read the configuration
+
+
+
+
+ Character used to separate search paths specified for MSBuildExtensionsPath* in
+ the config file
+
+
+
+
+ Caching MSBuild exe configuration.
+ Used only by ReadApplicationConfiguration factory function (default) as oppose to unit tests config factory functions
+ which must not cache configs.
+
+
+
+
+ Cached values of tools version -> project import search paths table
+
+
+
+
+ Default constructor
+
+
+
+
+ Constructor taking a delegate for unit test purposes only
+
+
+
+
+ Returns the list of tools versions
+
+
+
+
+ Returns the default tools version, or null if none was specified
+
+
+
+
+ Returns the path to find override tasks, or null if none was specified
+
+
+
+
+ DefaultOverrideToolsVersion attribute on msbuildToolsets element, specifying the tools version that should be used by
+ default to build projects with this version of MSBuild.
+
+
+
+
+ Lazy getter for the ToolsetConfigurationSection
+ Returns null if the section is not present
+
+
+
+
+ Provides an enumerator over property definitions for a specified tools version
+
+
+
+
+ Provides an enumerator over the set of sub-toolset names available to a particular
+ tools version. MSBuild config files do not currently support sub-toolsets, so
+ we return nothing.
+
+ The tools version.
+ An enumeration of the sub-toolsets that belong to that tools version.
+
+
+
+ Provides an enumerator over property definitions for a specified sub-toolset version
+ under a specified toolset version. In the ToolsetConfigurationReader case, breaks
+ immediately because we do not currently support sub-toolsets in the configuration file.
+
+ The tools version.
+ The sub-toolset version.
+ An enumeration of property definitions.
+
+
+
+ Returns a map of project property names / list of search paths for the specified toolsVersion and os
+
+
+
+
+ Returns a list of the search paths for a given search path property collection
+
+
+
+
+ Reads the application configuration file.
+ NOTE: this is abstracted into a method to support unit testing GetToolsetDataFromConfiguration().
+ Unit tests wish to avoid reading (nunit.exe) application configuration file.
+
+
+
+
+ Helper class for reading toolsets out of the configuration file.
+
+
+
+
+ Lock for process wide ToolsetConfigurationSection section cache
+
+
+
+
+ Process wide ToolsetConfigurationSection section cache
+
+
+
+
+ Class representing the Toolset element
+
+
+ Internal for unit testing only
+
+
+
+
+ ToolsVersion attribute of the element
+
+
+
+
+ Property element collection
+
+
+
+
+ Collection of all the search paths for project imports, per OS
+
+
+
+
+ Class representing all the per-OS search paths for MSBuildExtensionsPath*
+
+
+
+
+ We use this dictionary to track whether or not we've seen a given
+ searchPaths definition before, since the .NET configuration classes
+ won't perform this check without respect for case.
+
+
+
+
+ Type of the collection
+ This has to be public as cannot change access modifier when overriding
+
+
+
+
+ Throw exception if an element with a duplicate key is added to the collection
+
+
+
+
+ Name of the element
+
+
+
+
+ Gets an element with the specified name
+
+ OS of the element
+ element
+
+
+
+ Gets an element based at the specified position
+
+ position
+ element
+
+
+
+ Returns the key value for the given element
+
+ element whose key is returned
+ key
+
+
+
+ Creates a new element of the collection
+
+ Created element
+
+
+
+ overridden so we can track previously seen elements
+
+
+
+
+ overridden so we can track previously seen elements
+
+
+
+
+ Stores the name of the OS in a case-insensitive map
+ so we can detect if it is specified more than once but with
+ different case
+
+
+
+
+ Class representing searchPaths element for a single OS
+
+
+
+
+ OS attribute of the element
+
+
+
+
+ Property element collection
+
+
+
+
+ Class representing collection of property elements
+
+
+
+
+ We use this dictionary to track whether or not we've seen a given
+ property definition before, since the .NET configuration classes
+ won't perform this check without respect for case.
+
+
+
+
+ Collection type
+ This has to be public as cannot change access modifier when overriding
+
+
+
+
+ Throw exception if an element with a duplicate is added
+
+
+
+
+ name of the element
+
+
+
+
+ Gets an element with the specified name
+
+ name of the element
+ element
+
+
+
+ Gets an element at the specified position
+
+ position
+ element
+
+
+
+ Creates a new element
+
+ element
+
+
+
+ overridden so we can track previously seen property names
+
+
+
+
+ overridden so we can track previously seen property names
+
+
+
+
+ Gets the key for the element
+
+ element
+ key
+
+
+
+ Stores the name of the tools version in a case-insensitive map
+ so we can detect if it is specified more than once but with
+ different case
+
+
+
+
+ This class represents property element
+
+
+
+
+ name attribute
+
+
+
+
+ value attribute
+
+
+
+
+ Class representing the collection of toolset elements
+
+
+ Internal for unit testing only
+
+
+
+
+ We use this dictionary to track whether or not we've seen a given
+ toolset definition before, since the .NET configuration classes
+ won't perform this check without respect for case.
+
+
+
+
+ Type of the collection
+ This has to be public as cannot change access modifier when overriding
+
+
+
+
+ Throw exception if an element with a duplicate key is added to the collection
+
+
+
+
+ Name of the element
+
+
+
+
+ Gets an element with the specified name
+
+ toolsVersion of the element
+ element
+
+
+
+ Gets an element based at the specified position
+
+ position
+ element
+
+
+
+ Returns the key value for the given element
+
+ element whose key is returned
+ key
+
+
+
+ Creates a new element of the collection
+
+ Created element
+
+
+
+ overridden so we can track previously seen tools versions
+
+
+
+
+ overridden so we can track previously seen tools versions
+
+
+
+
+ Stores the name of the tools version in a case-insensitive map
+ so we can detect if it is specified more than once but with
+ different case
+
+
+
+
+ This class is used to programmatically read msbuildToolsets section
+ in from the configuration file. An example of application config file:
+
+ <configuration>
+ <msbuildToolsets default="2.0">
+ <toolset toolsVersion="2.0">
+ <property name="MSBuildBinPath" value="D:\windows\Microsoft.NET\Framework\v2.0.x86ret\"/>
+ <property name="SomeOtherProperty" value="SomeOtherPropertyValue"/>
+ </toolset>
+ <toolset toolsVersion="3.5">
+ <property name="MSBuildBinPath" value="D:\windows\Microsoft.NET\Framework\v3.5.x86ret\"/>
+ </toolset>
+ </msbuildToolsets>
+ </configuration>
+
+
+
+ Internal for unit testing only
+
+
+
+
+ toolsVersion element collection
+
+
+
+
+ default attribute on msbuildToolsets element, specifying the default ToolsVersion
+
+
+
+
+ MsBuildOverrideTasksPath attribute on msbuildToolsets element, specifying the path to find msbuildOverrideTasks files
+
+
+
+
+ DefaultOverrideToolsVersion attribute on msbuildToolsets element, specifying the toolsversion that should be used by
+ default to build projects with this version of MSBuild.
+
+
+
+
+ A class representing a property. Used internally by the toolset readers.
+
+
+
+
+ The property name
+
+
+
+
+ The property value
+
+
+
+
+ The property source
+
+
+
+
+ Creates a new property
+
+ The property name
+ The property value
+ The property source
+
+
+
+ The name of the property
+
+
+
+
+ The value of the property
+
+
+
+
+ A description of the location where the property was defined,
+ such as a registry key path or a path to a config file and
+ line number.
+
+
+
+
+ The abstract base class for all Toolset readers.
+
+
+
+
+ The global properties used to read the toolset.
+
+
+
+
+ The environment properties used to read the toolset.
+
+
+
+
+ Constructor
+
+
+
+
+ Returns the list of tools versions
+
+
+
+
+ Returns the default tools version, or null if none was specified
+
+
+
+
+ Returns the path to find override tasks, or null if none was specified
+
+
+
+
+ ToolsVersion to use as the default ToolsVersion for this version of MSBuild
+
+
+
+
+ Gathers toolset data from the registry and configuration file, if any:
+ allows you to specify which of the registry and configuration file to
+ read from by providing ToolsetInitialization
+
+
+
+
+ Gathers toolset data from the registry and configuration file, if any.
+ NOTE: this method is internal for unit testing purposes only.
+
+
+
+
+ Populates the toolset collection passed in with the toolsets read from some location.
+
+ Internal for unit testing only
+ the default tools version if available, or null otherwise
+
+
+
+ Provides an enumerator over property definitions for a specified tools version
+
+ The tools version.
+ An enumeration of property definitions.
+
+
+
+ Provides an enumerator over the set of sub-toolset names available to a particular
+ toolsversion
+
+ The tools version.
+ An enumeration of the sub-toolsets that belong to that toolsversion.
+
+
+
+ Provides an enumerator over property definitions for a specified sub-toolset version
+ under a specified toolset version.
+
+ The tools version.
+ The sub-toolset version.
+ An enumeration of property definitions.
+
+
+
+ Returns a map of MSBuildExtensionsPath* property names/kind to list of search paths
+
+
+
+
+ Reads all the toolsets and populates the given ToolsetCollection with them
+
+
+
+
+ Reads the settings for a specified tools version
+
+
+
+
+ Processes a particular ToolsetPropertyDefinition into the correct value and location in the initial and/or final property set.
+
+ The ToolsetPropertyDefinition being analyzed.
+ The final set of properties that we wish this toolset property to be added to.
+ The global properties, used for expansion and to make sure none are overridden.
+ The initial properties, used for expansion and added to if "accumulateProperties" is true.
+ If "true", we add this property to the initialProperties dictionary, as well, so that properties later in the toolset can use this value.
+ If this toolset property is the "MSBuildToolsPath" property, we will return the value in this parameter.
+ If this toolset property is the "MSBuildBinPath" property, we will return the value in this parameter.
+ The expander used to expand the value of the properties. Ref because if we are accumulating the properties, we need to re-create the expander to account for the new property value.
+
+
+
+ Expands the given unexpanded property expression using the properties in the
+ given expander.
+
+
+
+
+ Sets the given property in the given property group.
+
+
+
+
+ Given a path, de-relativizes it using the location of the currently
+ executing .exe as the base directory. For example, the path "..\foo"
+ becomes "c:\windows\microsoft.net\framework\foo" if the current exe is
+ "c:\windows\microsoft.net\framework\v3.5.1234\msbuild.exe".
+ If the path is not relative, it is returned without modification.
+ If the path is invalid, it is returned without modification.
+
+
+
+
+ struct representing a reference to MSBuildExtensionsPath* property
+
+
+
+
+ MSBuildExtensionsPathReferenceKind instance for property named "MSBuildExtensionsPath"
+
+
+
+
+ MSBuildExtensionsPathReferenceKind instance for property named "MSBuildExtensionsPath32"
+
+
+
+
+ MSBuildExtensionsPathReferenceKind instance for property named "MSBuildExtensionsPath64"
+
+
+
+
+ MSBuildExtensionsPathReferenceKind instance representing no MSBuildExtensionsPath* property reference
+
+
+
+
+ String representation of the property reference - eg. "MSBuildExtensionsPath32"
+
+
+
+
+ Returns the corresponding property name - eg. "$(MSBuildExtensionsPath32)"
+
+
+
+
+ Tries to find a reference to MSBuildExtensionsPath* property in the given string
+
+
+
+
+ Reads registry at the base key and returns a Dictionary keyed on ToolsVersion.
+ Dictionary contains another dictionary of (property name, property value) pairs.
+ If a registry value is not a string, this will throw a InvalidToolsetDefinitionException.
+ An example of how the registry will look (note that the DefaultToolsVersion is per-MSBuild-version)
+ [HKLM]\SOFTWARE\Microsoft
+ msbuild
+ 3.5
+ @DefaultToolsVersion = 2.0
+ ToolsVersions
+ 2.0
+ @MSBuildToolsPath = D:\SomeFolder
+ 3.5
+ @MSBuildToolsPath = D:\SomeOtherFolder
+ @MSBuildBinPath = D:\SomeOtherFolder
+ @SomePropertyName = PropertyOtherValue
+
+
+
+
+ Registry location for storing tools version dependent data for msbuild
+
+
+
+
+ Cached registry wrapper at root of the msbuild entries
+
+
+
+
+ Default constructor
+
+
+
+
+ Constructor overload accepting a registry wrapper for unit testing purposes only
+
+
+
+
+ Returns the list of tools versions
+
+
+
+
+ Returns the default tools version, or null if none was specified
+
+
+
+
+ Returns the path to find override tasks, or null if none was specified
+
+
+
+
+ ToolsVersion to use as the default ToolsVersion for this version of MSBuild
+
+
+
+
+ Provides an enumerator over property definitions for a specified tools version
+
+ The tools version
+ An enumeration of property definitions
+
+
+
+ Provides an enumerator over the set of sub-toolset names available to a particular
+ toolsversion
+
+ The tools version.
+ An enumeration of the sub-toolsets that belong to that toolsversion.
+
+
+
+ Provides an enumerator over property definitions for a specified sub-toolset version
+ under a specified toolset version.
+
+ The tools version.
+ The sub-toolset version.
+ An enumeration of property definitions.
+
+
+
+ Returns a map of MSBuildExtensionsPath* property names/kind to list of search paths
+
+
+
+
+ Given a registry location containing a property name and value, create the ToolsetPropertyDefinition that maps to it
+
+ Wrapper for the key that we're getting values from
+ The name of the property whose value we wish to generate a ToolsetPropertyDefinition for.
+ A ToolsetPropertyDefinition instance corresponding to the property name requested.
+
+
+
+ Reads a string value from the specified registry key
+
+ wrapper around key
+ name of the value
+ string data in the value
+
+
+
+ Update our table which keeps track of all the properties that are referenced
+ inside of a condition and the string values that they are being tested against.
+ So, for example, if the condition was " '$(Configuration)' == 'Debug' ", we
+ would get passed in leftValue="$(Configuration)" and rightValueExpanded="Debug".
+ This call would add the string "Debug" to the list of possible values for the
+ "Configuration" property.
+
+ This method also handles the case when two or more properties are being
+ concatenated together with a vertical bar, as in '
+ $(Configuration)|$(Platform)' == 'Debug|x86'
+
+ List of possible values, keyed by property name.
+ The raw value on the left side of the operator.
+ The fully expanded value on the right side of the operator.
+
+
+
+ For debugging leaks, a way to disable caching expression trees, to reduce noise
+
+
+
+
+ Evaluates a string representing a condition from a "condition" attribute.
+ If the condition is a malformed string, it throws an InvalidProjectFileException.
+ This method uses cached expression trees to avoid generating them from scratch every time it's called.
+ This method is thread safe and is called from engine and task execution module threads
+
+
+
+
+ Evaluates a string representing a condition from a "condition" attribute.
+ If the condition is a malformed string, it throws an InvalidProjectFileException.
+ This method uses cached expression trees to avoid generating them from scratch every time it's called.
+ This method is thread safe and is called from engine and task execution module threads
+ Logging service may be null.
+
+
+
+
+ Table of conditioned properties and their values.
+ Used to populate configuration lists in some project systems.
+ If this is null, as it is for command line builds, conditioned properties
+ are not recorded.
+
+
+
+
+ May return null if the expression would expand to non-empty and it broke out early.
+ Otherwise, returns the correctly expanded expression.
+
+
+
+
+ Expands the specified expression into a list of TaskItem's.
+
+
+
+
+ Expands the specified expression into a string.
+
+
+
+
+ PRE cache
+
+
+
+
+ All the state necessary for the evaluation of conditionals so that the expression tree
+ is stateless and reusable
+
+
+
+
+ Condition that was parsed. This does not belong here,
+ it belongs to the expression tree, not the condition evaluation state.
+
+
+
+
+ Table of conditioned properties and their values.
+ Used to populate configuration lists in some project systems.
+ If this is null, as it is for command line builds, conditioned properties
+ are not recorded.
+
+
+
+
+ PRE collection.
+
+
+
+
+ May return null if the expression would expand to non-empty and it broke out early.
+ Otherwise, returns the correctly expanded expression.
+
+
+
+
+ Expands the properties and items in the specified expression into a list of taskitems.
+
+ The expression to expand.
+ A list of items.
+
+
+
+ Expands the specified expression into a string.
+
+ The expression to expand.
+
+ The expanded string.
+
+
+
+ Performs logical AND on children
+ Does not update conditioned properties table
+
+
+
+
+ Evaluate as boolean
+
+
+
+
+ Compares for equality
+
+
+
+
+ Compare numbers
+
+
+
+
+ Compare booleans
+
+
+
+
+ Compare strings
+
+
+
+
+ Evaluates a function expression, such as "Exists('foo')"
+
+
+
+
+ Evaluate node as boolean
+
+
+
+
+ Expands properties and items in the argument, and verifies that the result is consistent
+ with a scalar parameter type.
+
+ Function name for errors
+ Argument to be expanded
+
+ True if this is afile name and the path should be normalized
+ Scalar result
+
+
+
+ Check that the number of function arguments is correct.
+
+
+
+
+ Base class for all expression nodes.
+
+
+
+
+ Returns true if this node evaluates to an empty string,
+ otherwise false.
+ (It may be cheaper to determine whether an expression will evaluate
+ to empty than to fully evaluate it.)
+ Implementations should cache the result so that calls after the first are free.
+
+
+
+
+ Value after any item and property expressions are expanded
+
+
+
+
+
+ Value before any item and property expressions are expanded
+
+
+
+
+
+ If any expression nodes cache any state for the duration of evaluation,
+ now's the time to clean it up
+
+
+
+
+ The main evaluate entry point for expression trees
+
+
+
+
+
+
+
+ Get display string for this node for use in the debugger.
+
+
+
+
+ Compares for left > right
+
+
+
+
+ Compare numerically
+
+
+
+
+ Compare Versions. This is only intended to compare version formats like "A.B.C.D" which can otherwise not be compared numerically
+
+
+
+
+
+ Compare mixed numbers and Versions
+
+
+
+
+ Compare mixed numbers and Versions
+
+
+
+
+ Compares for left >= right
+
+
+
+
+ Compare numerically
+
+
+
+
+ Compare Versions. This is only intended to compare version formats like "A.B.C.D" which can otherwise not be compared numerically
+
+
+
+
+
+ Compare mixed numbers and Versions
+
+
+
+
+ Compare mixed numbers and Versions
+
+
+
+
+ Compares for left < right
+
+
+
+
+ Compare numerically
+
+ left input
+ right input
+ true if right is higher than left, false otherwise
+
+
+
+ Compare Versions. This is only intended to compare version formats like "A.B.C.D" which can otherwise not be compared numerically
+
+ left version
+ right version
+ true if right version is higher than left, false otherwise
+
+
+
+ Compare mixed numbers and Versions
+
+ left version
+ right number
+ true if right is higher than major version of left, false otherwise
+
+
+
+ Compare mixed numbers and Versions
+
+ left number
+ right version
+ true if the major version of right is higher than left, false otherwise
+
+
+
+ Compares for left <= right
+
+
+
+
+ Compare numerically
+
+
+
+
+ Compare Versions. This is only intended to compare version formats like "A.B.C.D" which can otherwise not be compared numerically
+
+
+
+
+
+ Compare mixed numbers and Versions
+
+
+
+
+ Compare mixed numbers and Versions
+
+
+
+
+ Evaluates as boolean and evaluates children as boolean, numeric, or string.
+ Order in which comparisons are attempted is numeric, boolean, then string.
+ Updates conditioned properties table.
+
+
+
+
+ Compare numbers
+
+
+
+
+ Compare booleans
+
+
+
+
+ Compare strings
+
+
+
+
+ Evaluates as boolean and evaluates children as boolean, numeric, or string.
+ Order in which comparisons are attempted is numeric, boolean, then string.
+ Updates conditioned properties table.
+
+
+
+
+ Reset temporary state
+
+
+
+
+ Updates the conditioned properties table if it hasn't already been done.
+
+
+
+
+ Compares for inequality
+
+
+
+
+ Compare numbers
+
+
+
+
+ Compare booleans
+
+
+
+
+ Compare strings
+
+
+
+
+ Performs logical NOT on left child
+ Does not update conditioned properties table
+
+
+
+
+ Evaluate as boolean
+
+
+
+
+ Returns unexpanded value with '!' prepended. Useful for error messages.
+
+
+
+
+ Returns expanded value with '!' prepended. Useful for error messages.
+
+
+
+
+ Evaluates a numeric comparison, such as less-than, or greater-or-equal-than
+ Does not update conditioned properties table.
+
+
+
+
+ Compare numbers
+
+
+
+
+ Compare Versions. This is only intended to compare version formats like "A.B.C.D" which can otherwise not be compared numerically
+
+
+
+
+ Compare mixed numbers and Versions
+
+
+
+
+ Compare mixed numbers and Versions
+
+
+
+
+ Evaluate as boolean
+
+
+
+
+ Represents a number - evaluates as numeric.
+
+
+
+
+ Get the unexpanded value
+
+
+
+
+ Get the expanded value
+
+
+
+
+ If any expression nodes cache any state for the duration of evaluation,
+ now's the time to clean it up
+
+
+
+
+ Base class for all nodes that are operands (are leaves in the parse tree)
+
+
+
+
+ Base class for nodes that are operators (have children in the parse tree)
+
+
+
+
+ Value after any item and property expressions are expanded
+
+
+
+
+
+ Value before any item and property expressions are expanded
+
+
+
+
+
+ If any expression nodes cache any state for the duration of evaluation,
+ now's the time to clean it up
+
+
+
+
+ Storage for the left child
+
+
+
+
+ Storage for the right child
+
+
+
+
+ Performs logical OR on children
+ Does not update conditioned properties table
+
+
+
+
+ Evaluate as boolean
+
+
+
+
+ This class implements the grammar for complex conditionals.
+
+ The usage is:
+ Parser p = new Parser(CultureInfo);
+ ExpressionTree t = p.Parse(expression, XmlNode);
+
+ The expression tree can then be evaluated and re-evaluated as needed.
+
+
+ UNDONE: When we copied over the conditionals code, we didn't copy over the unit tests for scanner, parser, and expression tree.
+
+
+
+
+ Location contextual information which are attached to logging events to
+ say where they are in relation to the process, engine, project, target,task which is executing
+
+
+
+
+ Engine Logging Service reference where events will be logged to
+
+
+
+
+ Class: Scanner
+ This class does the scanning of the input and returns tokens.
+ The usage pattern is:
+ Scanner s = new Scanner(expression, CultureInfo)
+ do {
+ s.Advance();
+ while (s.IsNext(Token.EndOfInput));
+
+ After Advance() is called, you can get the current token (s.CurrentToken),
+ check it's type (s.IsNext()), get the string for it (s.NextString()).
+
+
+
+
+ Lazily format resource string to help avoid (in some perf critical cases) even loading
+ resources at all.
+
+
+
+
+ If the lexer errors, it has the best knowledge of the error message to show. For example,
+ 'unexpected character' or 'illformed operator'. This method returns the name of the resource
+ string that the parser should display.
+
+ Intentionally not a property getter to avoid the debugger triggering the Assert dialog
+
+
+
+
+ Advance
+ returns true on successful advance
+ and false on an erroneous token
+
+ Doesn't return error until the bogus input is encountered.
+ Advance() returns true even after EndOfInput is encountered.
+
+
+
+
+ Parses either the $(propertyname) syntax or the %(metadataname) syntax,
+ and returns the parsed string beginning with the '$' or '%', and ending with the
+ closing parenthesis.
+
+
+
+
+
+ Scan for the end of the property expression
+
+ property expression to parse
+ current index to start from
+ If successful, the index corresponds to the end of the property expression.
+ In case of scan failure, it is the error position index.
+ result indicating whether or not the scan was successful.
+
+
+
+ Parses a string of the form $(propertyname).
+
+
+
+
+
+ Parses a string of the form %(itemmetadataname).
+
+
+
+
+
+ Helper to verify that any AllowBuiltInMetadata or AllowCustomMetadata
+ specifications are not respected.
+ Returns true if it is ok, otherwise false.
+
+
+
+
+ Parse any part of the conditional expression that is quoted. It may contain a property, item, or
+ metadata element that needs expansion during evaluation.
+
+
+
+
+ Node representing a string
+
+
+
+
+ Whether the string potentially has expandable content,
+ such as a property expression or escaped character.
+
+
+
+
+ Returns true if this node evaluates to an empty string,
+ otherwise false.
+ It may be cheaper to determine whether an expression will evaluate
+ to empty than to fully evaluate it.
+ Implementations should cache the result so that calls after the first are free.
+
+
+
+
+ Value before any item and property expressions are expanded
+
+
+
+
+
+ Value after any item and property expressions are expanded
+
+
+
+
+
+ If any expression nodes cache any state for the duration of evaluation,
+ now's the time to clean it up
+
+
+
+
+ Should this node be treated as an expansion of VisualStudioVersion, rather than
+ its literal meaning?
+
+
+ Needed to provide a compat shim for numeric/version comparisons
+ on MSBuildToolsVersion, which were fine when it was a number
+ but now cause the project to throw InvalidProjectException when
+ ToolsVersion is "Current". https://github.com/dotnet/msbuild/issues/4150
+
+
+
+
+ This class represents a token in the Complex Conditionals grammar. It's
+ really just a bag that contains the type of the token and the string that
+ was parsed into the token. This isn't very useful for operators, but
+ is useful for strings and such.
+
+
+
+
+ Valid tokens
+
+
+
+
+ Constructor for types that don't have values
+
+
+
+
+
+ Constructor takes the token type and the string that
+ represents the token
+
+
+
+
+
+
+ Constructor takes the token type and the string that
+ represents the token.
+ If the string may contain content that needs expansion, expandable is set.
+
+
+
+
+ Whether the content potentially has expandable content,
+ such as a property expression or escaped character.
+
+
+
+
+
+
+
+
+
+
+
+ Implementation of a metadata table for use by the evaluator.
+ Accumulates ProjectMetadataElement objects and their evaluated value,
+ overwriting any previous metadata with that name.
+
+
+
+
+ The actual metadata dictionary.
+
+
+
+
+ The type of item the metadata should be considered to apply to.
+
+
+
+
+ The expected number of metadata entries in this table.
+
+
+
+
+ Creates a new table using the specified item type.
+
+
+
+
+ Enumerator over the entries in this table
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name specified,
+ whatever the item type.
+ If no value is available, returns empty string.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name and item type specified.
+ If no value is available, returns empty string.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name and item type specified.
+ If no value is available, returns null.
+
+
+
+
+ Adds a metadata entry to the table
+
+
+
+
+ An entry in the evaluator's metadata table.
+
+
+
+
+ Construct a new EvaluatorMetadata
+
+
+
+
+ Gets or sets the metadata Xml
+
+
+
+
+ Gets or sets the evaluated value, unescaped
+
+
+
+
+ Gets or sets the evaluated value, escaped as necessary
+
+
+
+
+ An interface for objects which the Evaluator can use as a destination for evaluation of ProjectRootElement.
+
+ The type of properties to be produced.
+ The type of items to be produced.
+ The type of metadata on those items.
+ The type of item definitions to be produced.
+
+
+
+ The ID of this evaluation
+
+
+
+
+ The (project) directory that should be used during evaluation
+
+
+
+
+ Task classes and locations known to this project.
+ This is the project-specific task registry, which is consulted before
+ the toolset's task registry.
+
+
+
+
+ The toolset data used during evaluation, and which should be used for build.
+
+
+
+
+ The sub-toolset version that should be used with this toolset to determine
+ the full set of properties to be used by the build.
+
+
+
+
+ The externally specified tools version to evaluate with, if any.
+ For example, the tools version from a /tv switch.
+ This is not the tools version specified on the Project tag, if any.
+ May be null.
+
+
+
+
+ Gets the global properties
+
+
+
+
+ List of names of the properties that, while global, are still treated as overridable
+
+
+
+
+ Sets the initial targets
+
+
+
+
+ Sets the default targets
+
+
+
+
+ Sets or retrieves the list of targets which run before the keyed target.
+
+
+
+
+ Sets or retrieves the list of targets which run after the keyed target.
+
+
+
+
+ List of possible values for properties inferred from certain conditions,
+ keyed by the property name.
+
+
+
+
+ Whether evaluation should collect items ignoring condition,
+ as well as items respecting condition; and collect
+ conditioned properties, as well as regular properties
+
+
+
+
+ Tells the evaluator whether it should evaluate elements with false conditions
+
+
+
+
+ Enumerator over properties in this project.
+ Exposed for debugging display.
+
+
+
+
+ Enumerator over all item definitions.
+ Exposed for debugging display.
+ Ideally the dictionary would be exposed, but there are
+ covariance problems. (A dictionary of Key, Value cannot be upcast
+ to a Dictionary of Key, IValue).
+
+
+
+
+ Enumerator over all items.
+ Exposed for debugging display.
+ Ideally the dictionary would be exposed, but there are
+ covariance problems. (A dictionary of Key, Value cannot be upcast
+ to a Dictionary of Key, IValue).
+
+
+
+
+ Evaluation ordered list of project item elements that were evaluated by the Evaluator
+ It means that both the item element's condition and the item group element's conditions evaluated to true
+
+
+
+
+ A dictionary of all of the environment variable properties.
+
+
+
+
+ Prepares the data block for a new evaluation pass
+
+
+
+
+ Indicates to the data block that evaluation has completed,
+ so for example it can mark datastructures read-only.
+
+
+
+
+ Adds a new item
+
+
+
+
+ Adds a new item to the collection of all items ignoring condition
+
+
+
+
+ Adds a new item definition
+
+
+
+
+ Properties encountered during evaluation. These are read during the first evaluation pass.
+ Unlike those returned by the Properties property, these are ordered, and include any properties that
+ were subsequently overridden by others with the same name. It does not include any
+ properties whose conditions did not evaluate to true.
+
+
+
+
+ Item definition metadata encountered during evaluation. These are read during the second evaluation pass.
+ Unlike those returned by the ItemDefinitions property, these are ordered, and include any metadata that
+ were subsequently overridden by others with the same name and item type. It does not include any
+ elements whose conditions did not evaluate to true.
+
+
+
+
+ Items encountered during evaluation. These are read during the third evaluation pass.
+ Unlike those returned by the Items property, these are ordered.
+ It does not include any elements whose conditions did not evaluate to true.
+ It does not include any items added since the last evaluation.
+
+
+
+
+ Retrieves an existing item definition, if any.
+
+
+
+
+ Sets a property which does not come from the Xml.
+
+
+
+
+ Sets a property which comes from the Xml.
+
+
+
+
+ Retrieves an existing target, if any.
+
+
+
+
+ Adds a new target, overwriting any existing target with the same name.
+
+
+
+
+ Record an import opened during evaluation, if appropriate.
+
+
+
+
+ Record an import opened during evaluation, if appropriate.
+
+
+
+
+ Evaluates the provided string by expanding items and properties,
+ using the current items and properties available.
+ This is useful for the immediate window.
+ Does not expand bare metadata expressions.
+
+
+ Not for internal use.
+
+
+
+
+ Evaluates the provided string as a condition by expanding items and properties,
+ using the current items and properties available, then doing a logical evaluation.
+ This is useful for the immediate window.
+ Does not expand bare metadata expressions.
+
+
+ Not for internal use.
+
+
+
+
+ This interface represents an item without exposing its type.
+
+
+
+
+ Gets the evaluated include value for this item, unescaped.
+
+
+
+
+ Gets the evaluated include value for this item, escaped as necessary.
+
+
+
+
+ The directory of the project being built
+ If there is no project filename defined, returns null.
+
+
+
+
+ Returns the metadata with the specified key.
+ Returns an empty string if it does not exist.
+ Attempting to get built-in metadata on a value that is not a valid path throws InvalidOperationException.
+ Metadata value is unescaped.
+
+
+
+
+ Returns the metadata with the specified key.
+ Returns an empty string if it does not exist.
+ Attempting to get built-in metadata on a value that is not a valid path throws InvalidOperationException.
+ Metadata value is the escaped value initially set.
+
+
+
+
+ Interface representing item definition objects for use by the Evaulator.
+
+ Type of metadata objects.
+
+
+
+ Gets any metadatum on this item definition with the specified name.
+
+
+
+
+ Adds the specified metadata to the item definition.
+
+
+
+
+ This interface is used to describe a class which can act as a factory for creating
+ items when the Expander expands certain expressions.
+
+ The type of items this factory can clone from.
+ The type of items this factory will create.
+
+
+
+ The item type of the items that this factory will create.
+ May be null, if the items will not have an itemtype (ie., for ITaskItems)
+ May not be settable (eg., for ITaskItems and for ProjectItems)
+
+
+
+
+ Used in the evaluator
+
+
+
+
+ Creates an item with the specified evaluated include and defining project.
+ Include must not be zero length.
+
+ The include
+ The project from which this item was created
+ A new item instance
+
+
+
+ Creates an item based off the provided item, with cloning semantics.
+ New item is associated with the passed in defining project, not that of the original item.
+
+
+
+
+ Creates an item with the specified include and the metadata from the specified base item
+ New item is associated with the passed in defining project, not that of the original item.
+
+
+
+
+ Creates an item using the specified evaluated include, include before wildcard expansion,
+ and defining project.
+
+
+
+
+ Applies the supplied metadata to the destination items.
+
+
+
+
+ This interface represents an item without exposing its type.
+ It's convenient to not genericise the base interface, to make it easier to use
+ for the majority of code that doesn't call these methods.
+
+ Type of metadata object.
+
+
+
+ Gets any existing metadatum on the item, or
+ else any on an applicable item definition.
+
+
+
+
+ Sets the specified metadata.
+ Predecessor is any preceding overridden metadata
+
+
+
+
+ This interface represents an object which can act as a source of items for the Expander.
+
+ The type of items provided by the implementation.
+
+
+
+ Returns a list of items with the specified item type.
+
+ If there are no items of this type, returns an empty list.
+
+ The item type of items to return.
+ A list of matching items.
+
+
+
+ Table of metadata useable to expand expressions
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name specified.
+ If no value is available, returns empty string.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name and item type specified.
+ If item type is null, it is ignored.
+ If no value is available, returns empty string.
+
+
+
+
+ Returns the value if it exists, null otherwise.
+ If item type is null, it is ignored.
+
+
+
+
+ The Intrinsic class provides static methods that can be accessed from MSBuild's
+ property functions using $([MSBuild]::Function(x,y))
+
+
+
+
+ Add two doubles
+
+
+
+
+ Add two longs
+
+
+
+
+ Subtract two doubles
+
+
+
+
+ Subtract two longs
+
+
+
+
+ Multiply two doubles
+
+
+
+
+ Multiply two longs
+
+
+
+
+ Divide two doubles
+
+
+
+
+ Divide two longs
+
+
+
+
+ Modulo two doubles
+
+
+
+
+ Modulo two longs
+
+
+
+
+ Escape the string according to MSBuild's escaping rules
+
+
+
+
+ Unescape the string according to MSBuild's escaping rules
+
+
+
+
+ Perform a bitwise OR on the first and second (first | second)
+
+
+
+
+ Perform a bitwise AND on the first and second (first & second)
+
+
+
+
+ Perform a bitwise XOR on the first and second (first ^ second)
+
+
+
+
+ Perform a bitwise NOT on the first and second (~first)
+
+
+
+
+ Get the value of the registry key and value, default value is null
+
+
+
+
+ Get the value of the registry key and value
+
+
+
+
+ Get the value of the registry key from one of the RegistryView's specified
+
+
+
+
+ Given the absolute location of a file, and a disc location, returns relative file path to that disk location.
+ Throws UriFormatException.
+
+
+ The base path we want to relativize to. Must be absolute.
+ Should not include a filename as the last segment will be interpreted as a directory.
+
+
+ The path we need to make relative to basePath. The path can be either absolute path or a relative path in which case it is relative to the base path.
+ If the path cannot be made relative to the base path (for example, it is on another drive), it is returned verbatim.
+
+ relative path (can be the full path)
+
+
+
+ Searches upward for a directory containing the specified file, beginning in the specified directory.
+
+ The directory to start the search in.
+ The name of the file to search for.
+ The file system abstraction to use that implements file system operations
+ The full path of the directory containing the file if it is found, otherwise an empty string.
+
+
+
+ Searches upward for the specified file, beginning in the specified .
+
+ The name of the file to search for.
+ An optional directory to start the search in. The default location is the directory
+ The file system abstraction to use that implements file system operations
+ of the file containing the property function.
+ The full path of the file if it is found, otherwise an empty string.
+
+
+
+ Return the string in parameter 'defaultValue' only if parameter 'conditionValue' is empty
+ else, return the value conditionValue
+
+
+
+
+ Returns the string after converting all bytes to base 64 (alphanumeric characters plus '+' and '/'), ending in one or two '='.
+
+ String to encode in base 64.
+ The encoded string.
+
+
+
+ Returns the string after converting from base 64 (alphanumeric characters plus '+' and '/'), ending in one or two '='.
+
+ The string to decode.
+ The decoded string.
+
+
+
+ Legacy implementation that doesn't lead to JIT pulling the new functions from StringTools (so those must not be referenced anywhere in the function body)
+ - for cases where the calling code would erroneously load old version of StringTools alongside of the new version of Microsoft.Build.
+ Should be removed once Wave17_10 is removed.
+
+
+
+
+ Hash the string independent of bitness, target framework and default codepage of the environment.
+ We do not want this to be inlined, as then the Expander would call directly the new overload, and hence
+ JIT load the functions from StringTools - so we would not be able to prevent their loading with ChangeWave as we do now.
+
+
+
+
+ Returns true if a task host exists that can service the requested runtime and architecture
+ values, and false otherwise.
+
+
+
+
+ If the given path doesn't have a trailing slash then add one.
+ If the path is an empty string, does not modify it.
+
+ The path to check.
+ The specified path with a trailing slash.
+
+
+
+ Gets the canonicalized full path of the provided directory and ensures it contains the correct directory separator characters for the current operating system
+ while ensuring it has a trailing slash.
+
+ One or more directory paths to combine and normalize.
+ A canonicalized full directory path with the correct directory separators and a trailing slash.
+
+
+
+ Gets the canonicalized full path of the provided path and ensures it contains the correct directory separator characters for the current operating system.
+
+ One or more paths to combine and normalize.
+ A canonicalized full path with the correct directory separators.
+
+
+
+ Specify whether the current OS platform is
+
+ The platform string. Must be a member of . Case Insensitive
+
+
+
+
+ True if current OS is a Unix system.
+
+
+
+
+
+ True if current OS is a BSD system.
+
+
+
+
+
+ returns if the string contains escaped wildcards
+
+
+
+
+ Following function will parse a keyName and returns the basekey for it.
+ It will also store the subkey name in the out parameter.
+ If the keyName is not valid, we will throw ArgumentException.
+ The return value shouldn't be null.
+ Taken from: \ndp\clr\src\BCL\Microsoft\Win32\Registry.cs
+
+
+
+
+ This interface represents a metadata object.
+
+
+
+
+ Represents the parent of a ProjectMetadata object -
+ either a ProjectItem or a ProjectItemDefinition.
+
+
+
+
+ The owning project
+
+
+
+
+ The item type of the parent item definition or item.
+
+
+
+
+ An interface representing an object which can act as a property.
+
+
+
+
+ Name of the property
+
+
+
+
+ Returns the evaluated, unescaped value for the property.
+
+
+
+
+ Returns the evaluated, escaped value for the property
+
+
+
+
+ An interface representing an object which can provide properties to the Expander.
+
+ The type of properties provided.
+
+
+
+ Returns a property with the specified name, or null if it was not found.
+
+ The property name.
+ The property.
+
+
+
+ Returns a property with the specified name, or null if it was not found.
+ Name is the segment of the provided string with the provided start and end indexes.
+
+
+
+
+ Creates a view of an evaluated project's XML as if it had all been loaded from
+ a single file, instead of being assembled by pulling in imported files as it actually was.
+
+
+ Ideally the result would be buildable on its own, and *usually* this should be the case.
+ Known cases where it wouldn't be buildable:
+ -- $(MSBuildThisFile) and similar properties aren't corrected
+ -- relative path in exists(..) conditions is relative to the imported file
+ -- same for AssemblyFile on UsingTask
+ Paths in item includes are relative to the importing project, though.
+
+
+
+
+ Project to preprocess
+
+
+
+
+ Table to resolve import tags
+
+
+
+
+ Stack of file paths pushed as we follow imports
+
+
+
+
+ Used to keep track of nodes that were added to the document from implicit imports which will be removed later.
+ At the time of adding this feature, cloning is buggy so it is easier to just edit the DOM in memory.
+
+
+
+
+ Table of implicit imports by document. The list per document contains both top and bottom imports.
+
+
+
+
+ Constructor
+
+
+
+
+ Returns an XmlDocument representing the evaluated project's XML as if it all had
+ been loaded from a single file, instead of being assembled by pulling in imported files.
+
+
+
+
+ Root of the preprocessing.
+
+
+
+
+ Creates a table containing implicit imports by project document.
+
+
+
+
+ Adds all implicit import nodes to the specified document.
+
+ The document element to add nodes to.
+
+
+
+ Recursively called method that clones source nodes into nodes in the destination
+ document.
+
+
+
+
+ Handler for which project root element just got added to the cache
+
+
+
+
+ Delegate for StrongCacheEntryRemoved event
+
+
+
+
+ Callback to create a ProjectRootElement if need be
+
+
+
+
+ Event that is fired when an entry in the Strong Cache is removed.
+
+
+
+
+ Event which is fired when a project root element is added to this cache.
+
+
+
+
+ Event which is fired when a project root element in this cache is dirtied.
+
+
+
+
+ Event which is fired when a project is marked dirty.
+
+
+
+
+ Raises the event.
+
+ The dirtied project root element.
+ Details on the PRE and the nature of the change.
+
+
+
+ Raises the event.
+
+ The dirtied project.
+ Details on the Project and the change.
+
+
+
+ Raises an event which is raised when a project root element is added to the cache.
+
+
+
+
+ Raises an event which is raised when a project root element is removed from the strong cache.
+
+
+
+
+ This class is an event that holds which ProjectRootElement was added to the root element cache.
+
+
+
+
+ Takes the root element which was added to the results cache.
+
+
+
+
+ Root element which was just added to the cache.
+
+
+
+
+ Maintains a cache of all loaded ProjectRootElement's for design time purposes.
+ Weak references are held to add added ProjectRootElement's.
+ Strong references are held to a limited number of added ProjectRootElement's.
+
+ 1. Loads of a ProjectRootElement will share any existing loaded ProjectRootElement, rather
+ than loading and parsing a new one. This is the case whether the ProjectRootElement
+ is loaded directly or imported.
+
+ 2. For design time, only a weak reference needs to be held, because all users have a strong reference.
+
+ 3. Because all loads of a ProjectRootElement consult this cache, they can be assured that any
+ entries in this cache are up to date. For example, if a ProjectRootElement is modified and saved,
+ the cached ProjectRootElement will be the loaded one that was saved, so it will be up to date.
+
+ 4. If, after a project has been loaded, an external app changes the project file content on disk, it is
+ important that a subsequent load of that project does not return stale ProjectRootElement. To avoid this, the
+ timestamp of the file on disk is compared to the timestamp of the file at the time that the ProjectRootElement loaded it.
+
+ 5. For build time, some strong references need to be held, as otherwise the ProjectRootElement's for reuseable
+ imports will be collected, and time will be wasted reparsing them. However we do not want to hold strong references
+ to all ProjectRootElement's, consuming memory without end. So a simple priority queue is used. All Adds and Gets boost their
+ entry to the top. As the queue gets too big, low priority entries are dropped.
+
+ No guesses are made at which files are more interesting to cache, beyond the most-recently-used list. For example, ".targets" files
+ or imported files are not treated specially, as this is a potentially unreliable heuristic. Besides, caching a project file itself could
+ be useful, if for example you want to build it twice with different sets of properties.
+
+ Because of the strongly typed list, some ProjectRootElement's will be held onto indefinitely. This is an acceptable price to pay for
+ being able to provide a commonly used ProjectRootElement immediately it's needed. It is mitigated by the list being finite and small, and
+ because we allow ProjectCollection.UnloadAllProjects to hint to us to clear the list.
+
+ Implicit references are those which were loaded as a result of a build, and not explicitly loaded through, for instance, the project
+ collection.
+
+
+
+
+
+ The maximum number of entries to keep strong references to.
+ This has to be strong enough to make sure that key .targets files aren't pushed
+ off by transient loads of non-reusable files like .user files.
+
+
+ Made this as large as 200 because ASP.NET Core (6.0) projects have
+ something like 80-90 imports. This was observed to give a noticeable
+ performance improvement compared to a mid-17.0 MSBuild with the old
+ value of 50.
+
+ If this number is increased much higher, the datastructure may
+ need to be changed from a linked list, since it's currently O(n).
+
+
+
+
+ Whether the cache should log activity to the Debug.Out stream
+
+
+
+
+ Whether the cache should check file content for cache entry invalidation.
+
+
+ Value shall be true only in case of testing. Outside QA tests it shall be false.
+
+
+
+
+ The map of weakly-held ProjectRootElement's
+
+
+ Be sure that the string keys are strongly held, or unpredictable bad
+ behavior will ensue.
+
+
+
+
+ Lock objects keyed by project file path.
+
+
+
+
+ The list of strongly-held ProjectRootElement's
+
+
+
+
+ Whether the cache should check the timestamp of the file on disk
+ whenever it is requested, and update with the latest content of that
+ file if it has changed.
+
+
+
+
+ Locking object for this shared cache
+
+
+
+
+ Creates an empty cache.
+
+
+
+
+ Returns true if given cache entry exists and is outdated.
+
+
+
+
+ Returns an existing ProjectRootElement for the specified file path, if any.
+ If none exists, calls the provided delegate to load one, and adds that to the cache.
+ The reason that it calls back to do this is so that the cache is locked between determining
+ that the entry does not exist and adding the entry.
+
+ If was set to true, and the file on disk has changed since it was cached,
+ it will be reloaded before being returned.
+
+ Thread safe.
+
+
+ Never needs to consult the strong cache as well, since if the item is in there, it will
+ not have left the weak cache.
+ If item is found, boosts it to the top of the strong cache.
+
+ The project file which contains the ProjectRootElement. Must be a full path.
+ The delegate to use to load if necessary. May be null. Must not update the cache.
+ true if the project is explicitly loaded, otherwise false.
+ true to the project was loaded with the formated preserved, otherwise false.
+ The ProjectRootElement instance if one exists. Null otherwise.
+
+
+
+ A helper used by .
+
+
+
+
+ Add an entry to the cache.
+
+
+
+
+ Rename an entry in the cache.
+ Entry must already be in the cache.
+
+
+
+
+ Returns any a ProjectRootElement in the cache with the provided full path,
+ otherwise null.
+
+
+
+
+ Returns any a ProjectRootElement in the cache with the provided full path,
+ otherwise null.
+
+
+
+
+ Discards strong references held by the cache.
+
+
+ The weak cache is never cleared, as we need it to guarantee that the appdomain never
+ has two ProjectRootElement's for a particular file. Attempts to clear out the weak cache
+ resulted in this guarantee being broken and subtle bugs popping up everywhere.
+
+
+
+
+ Clears out the cache.
+ Called when all projects are unloaded and possibly when a build is done.
+
+
+
+
+ Discard any entries (weak and strong) which do not have the explicitlyLoaded flag set.
+
+
+
+
+ Forces a removal of a project root element from the weak cache if it is present.
+
+ The project root element to remove.
+
+ No exception is thrown if this project root element is in use by currently loaded projects
+ by this method. The calling method must know that this is a safe operation.
+ There may of course be strong references to the project root element from customer code.
+ The assumption is that when they instruct the project collection to unload it, which
+ leads to this being called, they are releasing their strong references too (or it doesn't matter)
+
+
+
+
+ Add or rename an entry in the cache.
+ Old full path may be null iff it was not already in the cache.
+
+
+ Must be called within the cache lock.
+
+
+
+
+ Update the strong cache.
+ If the item is already a member of the list, move it to the top.
+ Otherwise, just add it to the top.
+ If the list is too large, remove an entry from the bottom.
+
+
+ Must be called within the cache lock.
+ If the size of strong cache gets large, this needs a faster data structure
+ than a linked list. It's currently O(n).
+
+
+
+
+ Completely remove an entry from this cache
+
+
+ Must be called within the cache lock.
+
+
+
+
+ Completely remove an entry from this cache if it exists.
+
+
+
+
+ Write debugging messages to the Debug.Out stream.
+
+
+
+
+ Write debugging messages to the Debug.Out stream.
+
+
+
+
+ Write debugging messages to the Debug.Out stream.
+
+
+
+
+ Maintains a cache of all loaded ProjectRootElement instances for design time purposes.
+
+ This avoids the LRU cache and class-wide lock used within ProjectRootElementCache and replaces these mechanisms
+ with a single ConcurrentDictionary as a tradeoff for increased performance when evaluating projects in parallel.
+ As a tradeoff, this implementation uses more memory, and is not intended for use when the cache needs to be
+ long-lived e.g. within Visual Studio.
+
+ SimpleProjectRootElementCache is not currently intended for use outside of evaluation. Several code paths
+ executed within a full build take a hard dependency on the strong/weak reference behavior used within
+ ProjectRootElementCache, and further investigation is required to determine the best way to hide these behind
+ an abstraction. As such, any method unused by evaluation will throw NotImplementedException.
+
+
+
+
+ Splits an expression into fragments at semicolons, except where the
+ semicolons are in a macro or separator expression.
+ Fragments are trimmed and empty fragments discarded.
+
+
+ These complex cases prevent us from doing a simple split on ';':
+ (1) Macro expression: @(foo->'xxx;xxx')
+ (2) Separator expression: @(foo, 'xxx;xxx')
+ (3) Combination: @(foo->'xxx;xxx', 'xxx;xxx')
+ We must not split on semicolons in macro or separator expressions like these.
+
+
+
+
+ Returns a whitespace-trimmed and possibly interned substring of the expression.
+
+ Start index of the substring.
+ Length of the substring.
+ Equivalent to _expression.Substring(startIndex, length).Trim() or null if the trimmed substring is empty.
+
+
+
+ Wraps a table of metadata values in which keys
+ may be qualified ("itemtype.name") or unqualified ("name").
+
+
+
+
+ Table of metadata values.
+ Each key may be qualified ("itemtype.name") or unqualified ("name").
+ Unqualified are considered to apply to all item types.
+ May be null, if empty.
+
+
+
+
+ Constructor taking a table of metadata in which keys
+ may be a mixture of qualified ("itemtype.name") and unqualified ("name").
+ Unqualified keys are considered to apply to all item types.
+ Metadata may be null, indicating it is empty.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name specified.
+ If no value is available, returns empty string.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name and item type specified.
+ If no value is available, returns empty string.
+
+
+
+
+ Retrieves any value we have in our metadata table for the metadata name and item type specified.
+ If no value is available, returns null.
+
+
+
+
+ What the shredder should be looking for.
+
+
+
+
+ Don't use
+
+
+
+
+ Shred item types
+
+
+
+
+ Shred metadata not contained inside of a transform.
+
+
+
+
+ Shred both items and metadata not contained in a transform.
+
+
+
+
+ A class which interprets and splits MSBuild expressions
+
+
+
+
+ Splits an expression into fragments at semi-colons, except where the
+ semi-colons are in a macro or separator expression.
+ Fragments are trimmed and empty fragments discarded.
+
+
+ See for rules.
+
+ List expression to split
+ Array of non-empty strings from split list.
+
+
+
+ Given a list of expressions that may contain item list expressions,
+ returns a pair of tables of all item names found, as K=Name, V=String.Empty;
+ and all metadata not in transforms, as K=Metadata key, V=MetadataReference,
+ where metadata key is like "itemname.metadataname" or "metadataname".
+ PERF: Tables are null if there are no entries, because this is quite a common case.
+
+
+
+
+ Returns true if there is a metadata expression (outside of a transform) in the expression.
+
+
+
+
+ Given a subexpression, finds referenced sub transform expressions
+ itemName and separator will be null if they are not found
+ return value will be null if no transform expressions are found
+
+
+
+
+ Given a subexpression, finds referenced sub transform expressions
+ itemName and separator will be null if they are not found
+ return value will be null if no transform expressions are found
+
+
+
+
+ Given a subexpression, finds referenced item names and inserts them into the table
+ as K=Name, V=String.Empty.
+
+
+ We can ignore any semicolons in the expression, since we're not itemizing it.
+
+
+
+
+ Returns true if a single quoted subexpression begins at the specified index
+ and ends before the specified end index.
+ Leaves index one past the end of the second quote.
+
+
+
+
+ Scan for the closing bracket that matches the one we've already skipped;
+ essentially, pushes and pops on a stack of parentheses to do this.
+ Takes the expression and the index to start at.
+ Returns the index of the matching parenthesis, or -1 if it was not found.
+
+
+
+
+ Skip all characters until we find the matching quote character
+
+
+
+
+ Returns true if a item function subexpression begins at the specified index
+ and ends before the specified end index.
+ Leaves index one past the end of the closing paren.
+
+
+
+
+ Returns true if a valid name begins at the specified index.
+ Leaves index one past the end of the name.
+
+
+
+
+ Returns true if the character at the specified index
+ is the specified char.
+ Leaves index one past the character.
+
+
+
+
+ Returns true if the next two characters at the specified index
+ are the specified sequence.
+ Leaves index one past the second character.
+
+
+
+
+ Moves past all whitespace starting at the specified index.
+ Returns the next index, possibly the string length.
+
+
+ Char.IsWhitespace() is not identical in behavior to regex's \s character class,
+ but it's extremely close, and it's what we use in conditional expressions.
+
+ The expression to process.
+ The start location for skipping whitespace, contains the next non-whitespace character on exit.
+
+
+
+ Represents one substring for a single successful capture.
+
+
+
+
+ Captures within this capture
+
+
+
+
+ The position in the original string where the first character of the captured
+ substring was found.
+
+
+
+
+ The length of the captured substring.
+
+
+
+
+ The captured substring from the input string.
+
+
+
+
+ The type of the item within this expression
+
+
+
+
+ The separator, if any, within this expression
+
+
+
+
+ The starting character of the separator within the expression
+
+
+
+
+ The function name, if any, within this expression
+
+
+
+
+ The function arguments, if any, within this expression
+
+
+
+
+ Create an Expression Capture instance
+ Represents a sub expression, shredded from a larger expression
+
+
+
+
+ Create an Expression Capture instance
+ Represents a sub expression, shredded from a larger expression
+
+
+
+
+ Captures within this capture
+
+
+
+
+ The position in the original string where the first character of the captured
+ substring was found.
+
+
+
+
+ The length of the captured substring.
+
+
+
+
+ Gets the captured substring from the input string.
+
+
+
+
+ Gets the captured itemtype.
+
+
+
+
+ Gets the captured itemtype.
+
+
+
+
+ The starting character of the separator.
+
+
+
+
+ The function name, if any, within this expression
+
+
+
+
+ The function arguments, if any, within this expression
+
+
+
+
+ Gets the captured substring from the input string.
+
+
+
+
+ Evaluates a ProjectRootElement, updating the fresh Project.Data passed in.
+ Handles evaluating conditions, expanding expressions, and building up the
+ lists of applicable properties, items, and itemdefinitions, as well as gathering targets and tasks
+ and creating a TaskRegistry from the using tasks.
+
+ The type of properties to produce.
+ The type of items to produce.
+ The type of metadata on those items.
+ The type of item definitions to be produced.
+
+ This class could be improved to do partial (minimal) reevaluation: at present we wipe all state and start over.
+
+
+
+
+ Character used to split InitialTargets and DefaultTargets lists
+
+
+
+
+ Expander for evaluating conditions
+
+
+
+
+ Data containing the ProjectRootElement to evaluate and the slots for
+ items, properties, etc originating from the evaluation.
+
+
+
+
+ List of ProjectItemElement's traversing into imports.
+ Gathered during the first pass to avoid traversing again.
+
+
+
+
+ List of ProjectItemDefinitionElement's traversing into imports.
+ Gathered during the first pass to avoid traversing again.
+
+
+
+
+ List of ProjectUsingTaskElement's traversing into imports.
+ Gathered during the first pass to avoid traversing again.
+ Key is the directory of the file importing the usingTask, which is needed
+ to handle any relative paths in the usingTask.
+
+
+
+
+ List of ProjectTargetElement's traversing into imports.
+ Gathered during the first pass to avoid traversing again.
+
+
+
+
+ Paths to imports already seen and where they were imported from; used to flag duplicate imports
+
+
+
+
+ Depth first collection of InitialTargets strings declared in the main
+ Project and all its imported files, split on semicolons.
+
+
+
+
+ Dictionary of project full paths and a boolean that indicates whether at least one
+ of their targets has the "Returns" attribute set.
+
+
+
+
+ The Project Xml to be evaluated.
+
+
+
+
+ The item factory used to create items from Xml.
+
+
+
+
+ Load settings, such as whether to ignore missing imports.
+
+
+
+
+ The maximum number of nodes to report for evaluation.
+
+
+
+
+ The to use.
+
+
+
+
+ The current build submission ID.
+
+
+
+
+ The evaluation context to use.
+
+
+
+
+ The environment properties with which evaluation should take place.
+
+
+
+
+ The cache to consult for any imports that need loading.
+
+
+
+
+ The logging context to be used and piped down throughout evaluation
+
+
+
+
+ The search paths are machine specific and should not change during builds
+
+
+
+
+ Keeps track of the project that is last modified of the project and all imports.
+
+
+
+
+ Keeps track of the FullPaths of ProjectRootElements that may have been modified as a stream.
+
+
+
+
+ Private constructor called by the static Evaluate method.
+
+
+
+
+ Delegate passed to methods to provide basic expression evaluation
+ ability, without having a language service.
+
+
+
+
+ Delegate passed to methods to provide basic expression evaluation
+ ability, without having a language service.
+
+
+
+
+ Evaluates the project data passed in.
+
+
+ This is the only non-private member of this class.
+ This is a helper static method so that the caller can just do "Evaluator.Evaluate(..)" without
+ newing one up, yet the whole class need not be static.
+
+
+
+
+ Helper that creates a list of ProjectItem's given an unevaluated Include and a ProjectRootElement.
+ Used by both Evaluator.EvaluateItemElement and by Project.AddItem.
+
+
+
+
+ Read the task into an instance.
+ Do not evaluate anything: this occurs during build.
+
+
+
+
+ Read the property-group-under-target into an instance.
+ Do not evaluate anything: this occurs during build.
+
+
+
+
+ Read an onError tag.
+ Do not evaluate anything: this occurs during build.
+
+
+
+
+ Read the item-group-under-target into an instance.
+ Do not evaluate anything: this occurs during build.
+
+
+
+
+ Read the provided target into a target instance.
+ Do not evaluate anything: this occurs during build.
+
+
+
+
+ Do the evaluation.
+ Called by the static helper method.
+
+
+
+
+ Evaluate the properties in the passed in XML, into the project.
+ Does a depth first traversal into Imports.
+ In the process, populates the item, itemdefinition, target, and usingtask lists as well.
+
+
+
+
+ Update the default targets value.
+ We only take the first DefaultTargets value we encounter in a project or import.
+
+
+
+
+ Evaluate the properties in the propertygroup and set the applicable ones on the data passed in
+
+
+
+
+ Evaluate the itemdefinitiongroup and update the definitions library
+
+
+
+
+ Evaluate the items in the itemgroup and add the applicable ones to the data passed in
+
+
+
+
+ Retrieve the matching ProjectTargetInstance from the cache and add it to the provided collection.
+ If it is not cached already, read it and cache it.
+ Do not evaluate anything: this occurs during build.
+
+
+
+
+ Updates the evaluation maps for BeforeTargets and AfterTargets
+
+
+
+
+ Set the built-in properties, most of which are read-only
+
+
+
+
+ Pull in all the environment into our property bag
+
+
+
+
+ Put all the toolset's properties into our property bag
+
+
+
+
+ Put all the global properties into our property bag
+
+
+
+
+ Set a built-in property in the supplied bag.
+ NOT to be used for properties originating in XML.
+ NOT to be used for global properties.
+ NOT to be used for environment properties.
+
+
+
+
+ Evaluate a single ProjectPropertyElement and update the data as appropriate
+
+
+
+
+ Evaluates an itemdefinition element, updating the definitions library.
+
+
+
+
+ Evaluates an import element.
+ If the condition is true, loads the import and continues the pass.
+
+
+ UNDONE: Protect against overflowing the stack by having too many nested imports.
+
+
+
+
+ Evaluates an ImportGroup element.
+ If the condition is true, evaluates the contained imports and continues the pass.
+
+
+ UNDONE: Protect against overflowing the stack by having too many nested imports.
+
+
+
+
+ Choose does not accept a condition.
+
+
+ We enter here in both the property and item passes, since Chooses can contain both.
+ However, we only evaluate the When conditions on the first pass, so we only pulse
+ those states on that pass. On the other pass, it's as if they're not there.
+
+
+
+
+ Evaluates the children of a When or Choose.
+ Returns true if the condition was true, so subsequent
+ WhenElements and Otherwise can be skipped.
+
+
+
+
+ Expands and loads project imports.
+
+ Imports may contain references to "projectImportSearchPaths" defined in the app.config
+ toolset section. If this is the case, this method will search for the imported project
+ in those additional paths if the default fails.
+
+
+
+
+
+ Load and parse the specified project import, which may have wildcards,
+ into one or more ProjectRootElements, if it's Condition evaluates to true
+ Caches the parsed import into the provided collection, so future
+ requests can be satisfied without re-parsing it.
+
+
+
+
+ Load and parse the specified project import, which may have wildcards,
+ into one or more ProjectRootElements.
+ Caches the parsed import into the provided collection, so future
+ requests can be satisfied without re-parsing it.
+
+
+
+
+ Checks if an import matches with another import in its ancestor line of imports.
+
+ The import that is being added.
+ The importing element for this import.
+ True, if and only if this import introduces a circularity.
+
+
+
+ Evaluate a given condition
+
+
+
+
+ Evaluate a given condition, collecting conditioned properties.
+
+
+
+
+ COMPAT: Whidbey used the "current project file/targets" directory for evaluating Import and PropertyGroup conditions
+ Orcas broke this by using the current root project file for all conditions
+ For Dev10+, we'll fix this, and use the current project file/targets directory for Import, ImportGroup and PropertyGroup
+ but the root project file for the rest. Inside of targets will use the root project file as always.
+
+
+
+
+ Throws InvalidProjectException because we failed to import a project which contained a ProjectImportSearchPath fall-back.
+ MSBuildExtensionsPath reference kind found in the Project attribute of the Import element
+ The importing element for this import
+
+
+
+
+ Stringify a list of strings, like {"abc, "def", "foo"} to "abc, def and foo"
+ or {"abc"} to "abc"
+ List of strings to stringify
+ Stringified list
+
+
+
+
+ Represents result of attempting to load imports (ExpandAndLoadImportsFromUnescapedImportExpression*)
+
+
+
+
+ Indicates to the expander what exactly it should expand.
+
+
+
+
+ Invalid
+
+
+
+
+ Expand bare custom metadata, like %(foo), but not built-in
+ metadata, such as %(filename) or %(identity)
+
+
+
+
+ Expand bare built-in metadata, such as %(filename) or %(identity)
+
+
+
+
+ Expand all bare metadata
+
+
+
+
+ Expand only properties
+
+
+
+
+ Expand only item list expressions
+
+
+
+
+ If the expression is going to not be an empty string, break
+ out early
+
+
+
+
+ When an error occurs expanding a property, just leave it unexpanded.
+
+
+ This should only be used in cases where property evaluation isn't critical, such as when attempting to log a
+ message with a best effort expansion of a string, or when discovering partial information during lazy evaluation.
+
+
+
+
+ When an expansion occurs, truncate it to Expander.DefaultTruncationCharacterLimit or Expander.DefaultTruncationItemLimit.
+
+
+
+
+ Issues build message if item references unqualified or qualified metadata odf self - as this can lead to unintended expansion and
+ cross-combination of other items.
+ More info: https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-batching#item-batching-on-self-referencing-metadata
+
+
+
+
+ Expand only properties and then item lists
+
+
+
+
+ Expand only bare metadata and then properties
+
+
+
+
+ Expand only bare custom metadata and then properties
+
+
+
+
+ Expand bare metadata, then properties, then item expressions
+
+
+
+
+ Expands item/property/metadata in expressions.
+ Encapsulates the data necessary for expansion.
+
+
+ Requires the caller to explicitly state what they wish to expand at the point of expansion (explicitly does not have a field for ExpanderOptions).
+ Callers typically use a single expander in many locations, and this forces the caller to make explicit what they wish to expand at the point of expansion.
+
+ Requires the caller to have previously provided the necessary material for the expansion requested.
+ For example, if the caller requests ExpanderOptions.ExpandItems, the Expander will throw if it was not given items.
+
+ Type of the properties used.
+ Type of the items used.
+
+
+
+ A helper struct wrapping a and providing file path conversion
+ as used in e.g. property expansion.
+
+
+ If exactly one value is added and no concatenation takes places, this value is returned without
+ conversion. In other cases values are stringified and attempted to be interpreted as file paths
+ before concatenation.
+
+
+
+
+ The backing , null until the second value is added.
+
+
+
+
+ The first value added to the concatenator. Tracked in its own field so it can be returned
+ without conversion if no concatenation takes place.
+
+
+
+
+ The first value added to the concatenator if it is a span. Tracked in its own field so the
+ functionality doesn't have to be invoked if no concatenation
+ takes place.
+
+
+
+
+ True if this instance is already disposed.
+
+
+
+
+ Adds an object to be concatenated.
+
+
+
+
+ Adds a span to be concatenated.
+
+
+
+
+ Returns the result of the concatenation.
+
+
+ If only one value has been added and it is not a string, it is returned unchanged.
+ In all other cases (no value, one string value, multiple values) the result is a
+ concatenation of the string representation of the values, each additionally subjected
+ to file path adjustment.
+
+
+
+
+ Disposes of the struct by delegating the call to the underlying .
+
+
+
+
+ Throws if this concatenator is already disposed.
+
+
+
+
+ Lazily initializes and populates it with the first value
+ when the second value is being added.
+
+
+
+
+ A limit for truncating string expansions within an evaluated Condition. Properties, item metadata, or item groups will be truncated to N characters such as 'N...'.
+ Enabled by ExpanderOptions.Truncate.
+
+
+
+
+ A limit for truncating string expansions for item groups within an evaluated Condition. N items will be evaluated such as 'A;B;C;...'.
+ Enabled by ExpanderOptions.Truncate.
+
+
+
+
+ Those characters which indicate that an expression may contain expandable
+ expressions.
+
+
+
+
+ The CultureInfo from the invariant culture. Used to avoid allocations for
+ performing IndexOf etc.
+
+
+
+
+ Properties to draw on for expansion.
+
+
+
+
+ Items to draw on for expansion.
+
+
+
+
+ Metadata to draw on for expansion.
+
+
+
+
+ Set of properties which are null during expansion.
+
+
+
+
+ Non-null if the expander was constructed for evaluation.
+
+
+
+
+ Creates an expander passing it some properties to use.
+ Properties may be null.
+
+
+
+
+ Creates an expander passing it some properties to use and the evaluation context.
+ Properties may be null.
+
+
+
+
+ Creates an expander passing it some properties and items to use.
+ Either or both may be null.
+
+
+
+
+ Creates an expander passing it some properties and items to use, and the evaluation context.
+ Either or both may be null.
+
+
+
+
+ Creates an expander passing it some properties, items, and/or metadata to use.
+ Any or all may be null.
+
+
+
+
+ Whether to warn when we set a property for the first time, after it was previously used.
+ Default is false, unless MSBUILDWARNONUNINITIALIZEDPROPERTY is set.
+
+
+
+
+ Accessor for the metadata.
+ Set temporarily during item metadata evaluation.
+
+
+
+
+ If a property is expanded but evaluates to null then it is considered to be un-initialized.
+ We want to keep track of these properties so that we can warn if the property gets set later on.
+
+
+
+
+ Tests to see if the expression may contain expandable expressions, i.e.
+ contains $, % or @.
+
+
+
+
+ Returns true if the expression contains an item vector pattern, else returns false.
+ Used to flag use of item expressions where they are illegal.
+
+
+
+
+ Expands embedded item metadata, properties, and embedded item lists (in that order) as specified in the provided options.
+ This is the standard form. Before using the expanded value, it must be unescaped, and this does that for you.
+
+ If ExpanderOptions.BreakOnNotEmpty was passed, expression was going to be non-empty, and it broke out early, returns null. Otherwise the result can be trusted.
+
+
+
+
+ Expands embedded item metadata, properties, and embedded item lists (in that order) as specified in the provided options.
+ Use this form when the result is going to be processed further, for example by matching against the file system,
+ so literals must be distinguished, and you promise to unescape after that.
+
+ If ExpanderOptions.BreakOnNotEmpty was passed, expression was going to be non-empty, and it broke out early, returns null. Otherwise the result can be trusted.
+
+
+
+
+ Used only for unit tests. Expands the property expression (including any metadata expressions) and returns
+ the result typed (i.e. not converted into a string if the result is a function return).
+
+
+
+
+ Expands embedded item metadata, properties, and embedded item lists (in that order) as specified in the provided options,
+ then splits on semi-colons into a list of strings.
+ Use this form when the result is going to be processed further, for example by matching against the file system,
+ so literals must be distinguished, and you promise to unescape after that.
+
+
+
+
+ Expands embedded item metadata, properties, and embedded item lists (in that order) as specified in the provided options
+ and produces a list of TaskItems.
+ If the expression is empty, returns an empty list.
+ If ExpanderOptions.BreakOnNotEmpty was passed, expression was going to be non-empty, and it broke out early, returns null. Otherwise the result can be trusted.
+
+
+
+
+ Expands embedded item metadata, properties, and embedded item lists (in that order) as specified in the provided options
+ and produces a list of items of the type for which it was specialized.
+ If the expression is empty, returns an empty list.
+ If ExpanderOptions.BreakOnNotEmpty was passed, expression was going to be non-empty, and it broke out early, returns null. Otherwise the result can be trusted.
+
+ Use this form when the result is going to be processed further, for example by matching against the file system,
+ so literals must be distinguished, and you promise to unescape after that.
+
+ Type of items to return.
+
+
+
+ This is a specialized method for the use of TargetUpToDateChecker and Evaluator.EvaluateItemXml only.
+
+ Extracts the items in the given SINGLE item vector.
+ For example, expands @(Compile->'%(foo)') to a set of items derived from the items in the "Compile" list.
+
+ If there is in fact more than one vector in the expression, throws InvalidProjectFileException.
+
+ If there are no item expressions in the expression (for example a literal "foo.cpp"), returns null.
+ If expression expands to no items, returns an empty list.
+ If item expansion is not allowed by the provided options, returns null.
+ If ExpanderOptions.BreakOnNotEmpty was passed, expression was going to be non-empty, and it broke out early, returns null. Otherwise the result can be trusted.
+
+ If the expression is a transform, any transformations to an expression that evaluates to nothing (i.e., because
+ an item has no value for a piece of metadata) are optionally indicated with a null entry in the list. This means
+ that the length of the returned list is always the same as the length of the referenced item list in the input string.
+ That's important for any correlation the caller wants to do.
+
+ If expression was a transform, 'isTransformExpression' is true, otherwise false.
+
+ Item type of the items returned is determined by the IItemFactory passed in; if the IItemFactory does not
+ have an item type set on it, it will be given the item type of the item vector to use.
+
+ Type of the items that should be returned.
+
+
+
+ Returns true if the supplied string contains a valid property name.
+
+
+
+
+ Returns true if ExpanderOptions.Truncate is set and EscapeHatches.DoNotTruncateConditions is not set.
+
+
+
+
+ Scan for the closing bracket that matches the one we've already skipped;
+ essentially, pushes and pops on a stack of parentheses to do this.
+ Takes the expression and the index to start at.
+ Returns the index of the matching parenthesis, or -1 if it was not found.
+ Also returns flags to indicate if a propertyfunction or registry property is likely
+ to be found in the expression.
+
+
+
+
+ Skip all characters until we find the matching quote character.
+
+
+
+
+ Add the argument in the StringBuilder to the arguments list, handling nulls
+ appropriately.
+
+
+
+
+ Extract the first level of arguments from the content.
+ Splits the content passed in at commas.
+ Returns an array of unexpanded arguments.
+ If there are no arguments, returns an empty array.
+
+
+
+
+ Expands bare metadata expressions, like %(Compile.WarningLevel), or unqualified, like %(Compile).
+
+
+ This is a private nested class, exposed only through the Expander class.
+ That allows it to hide its private methods even from Expander.
+
+
+
+
+ Expands all embedded item metadata in the given string, using the bucketed items.
+ Metadata may be qualified, like %(Compile.WarningLevel), or unqualified, like %(Compile).
+
+ The expression containing item metadata references.
+ The metadata to be expanded.
+ Used to specify what to expand.
+ The location information for error reporting purposes.
+ The logging context for this operation.
+ The string with item metadata expanded in-place, escaped.
+
+
+
+ A functor that returns the value of the metadata in the match
+ that is contained in the metadata dictionary it was created with.
+
+
+
+
+ Source of the metadata.
+
+
+
+
+ Whether to expand built-in metadata, custom metadata, or both kinds.
+
+
+
+
+ Constructor taking a source of metadata.
+
+
+
+
+ Expands a single item metadata, which may be qualified with an item type.
+
+
+
+
+ Expands property expressions, like $(Configuration) and $(Registry:HKEY_LOCAL_MACHINE\Software\Vendor\Tools@TaskLocation).
+
+
+ This is a private nested class, exposed only through the Expander class.
+ That allows it to hide its private methods even from Expander.
+
+ Type of the properties used to expand the expression.
+
+
+
+ This method takes a string which may contain any number of
+ "$(propertyname)" tags in it. It replaces all those tags with
+ the actual property values, and returns a new string. For example,
+
+ string processedString =
+ propertyBag.ExpandProperties("Value of NoLogo is $(NoLogo).");
+
+ This code might produce:
+
+ processedString = "Value of NoLogo is true."
+
+ If the sourceString contains an embedded property which doesn't
+ have a value, then we replace that tag with an empty string.
+
+ This method leaves the result escaped. Callers may need to unescape on their own as appropriate.
+
+
+
+
+ This method takes a string which may contain any number of
+ "$(propertyname)" tags in it. It replaces all those tags with
+ the actual property values, and returns a new string. For example,
+
+ string processedString =
+ propertyBag.ExpandProperties("Value of NoLogo is $(NoLogo).");
+
+ This code might produce:
+
+ processedString = "Value of NoLogo is true."
+
+ If the sourceString contains an embedded property which doesn't
+ have a value, then we replace that tag with an empty string.
+
+ This method leaves the result typed and escaped. Callers may need to convert to string, and unescape on their own as appropriate.
+
+
+
+
+ Expand the body of the property, including any functions that it may contain.
+
+
+
+
+ Convert the object into an MSBuild friendly string
+ Arrays are supported.
+ Will not return NULL.
+
+
+
+
+ Look up a simple property reference by the name of the property, e.g. "Foo" when expanding $(Foo).
+
+
+
+
+ Look up a simple property reference by the name of the property, e.g. "Foo" when expanding $(Foo).
+
+
+
+
+ If the property name provided is one of the special
+ per file properties named "MSBuildThisFileXXXX" then returns the value of that property.
+ If the location provided does not have a path (eg., if it comes from a file that has
+ never been saved) then returns empty string.
+ If the property name is not one of those properties, returns empty string.
+
+
+
+
+ Given a string like "Registry:HKEY_LOCAL_MACHINE\Software\Vendor\Tools@TaskLocation", return the value at that location
+ in the registry. If the value isn't found, returns String.Empty.
+ Properties may refer to a registry location by using the syntax for example
+ "$(Registry:HKEY_LOCAL_MACHINE\Software\Vendor\Tools@TaskLocation)", where "HKEY_LOCAL_MACHINE\Software\Vendor\Tools" is the key and
+ "TaskLocation" is the name of the value. The name of the value and the preceding "@" may be omitted if
+ the default value is desired.
+
+
+
+
+ Expands item expressions, like @(Compile), possibly with transforms and/or separators.
+
+ Item vectors are composed of a name, an optional transform, and an optional separator i.e.
+
+ @(<name>->'<transform>','<separator>')
+
+ If a separator is not specified it defaults to a semi-colon. The transform expression is also optional, but if
+ specified, it allows each item in the vector to have its item-spec converted to a different form. The transform
+ expression can reference any custom metadata defined on the item, as well as the pre-defined item-spec modifiers.
+
+ NOTE:
+ 1) white space between <name>, <transform> and <separator> is ignored
+ i.e. @(<name>, '<separator>') is valid
+ 2) the separator is not restricted to be a single character, it can be a string
+ 3) the separator can be an empty string i.e. @(<name>,'')
+ 4) specifying an empty transform is NOT the same as specifying no transform -- the former will reduce all item-specs
+ to empty strings
+
+ if @(files) is a vector for the files a.txt and b.txt, then:
+
+ "my list: @(files)" expands to string "my list: a.txt;b.txt"
+
+ "my list: @(files,' ')" expands to string "my list: a.txt b.txt"
+
+ "my list: @(files, '')" expands to string "my list: a.txtb.txt"
+
+ "my list: @(files, '; ')" expands to string "my list: a.txt; b.txt"
+
+ "my list: @(files->'%(Filename)')" expands to string "my list: a;b"
+
+ "my list: @(files -> 'temp\%(Filename).xml', ' ') expands to string "my list: temp\a.xml temp\b.xml"
+
+ "my list: @(files->'') expands to string "my list: ;".
+
+
+ This is a private nested class, exposed only through the Expander class.
+ That allows it to hide its private methods even from Expander.
+
+
+
+
+ Execute the list of transform functions.
+
+ class, IItem.
+
+
+
+ Expands any item vector in the expression into items.
+
+ For example, expands @(Compile->'%(foo)') to a set of items derived from the items in the "Compile" list.
+
+ If there is no item vector in the expression (for example a literal "foo.cpp"), returns null.
+ If the item vector expression expands to no items, returns an empty list.
+ If item expansion is not allowed by the provided options, returns null.
+ If there is an item vector but concatenated with something else, throws InvalidProjectFileException.
+ If ExpanderOptions.BreakOnNotEmpty was passed, expression was going to be non-empty, and it broke out early, returns null. Otherwise the result can be trusted.
+
+ If the expression is a transform, any transformations to an expression that evaluates to nothing (i.e., because
+ an item has no value for a piece of metadata) are optionally indicated with a null entry in the list. This means
+ that the length of the returned list is always the same as the length of the referenced item list in the input string.
+ That's important for any correlation the caller wants to do.
+
+ If expression was a transform, 'isTransformExpression' is true, otherwise false.
+
+ Item type of the items returned is determined by the IItemFactory passed in; if the IItemFactory does not
+ have an item type set on it, it will be given the item type of the item vector to use.
+
+ Type of the items provided by the item source used for expansion.
+ Type of the items that should be returned.
+
+
+
+ Expands an expression capture into a list of items
+ If the capture uses a separator, then all the items are concatenated into one string using that separator.
+
+ Returns true if ExpanderOptions.BreakOnNotEmpty was passed, expression was going to be non-empty, and so it broke out early.
+
+
+
+ List of items.
+
+ Item1 represents the item string, escaped
+ Item2 represents the original item.
+
+ Item1 differs from Item2's string when it is coming from a transform.
+
+
+ The expander whose state will be used to expand any transforms.
+ The representing the structure of an item expression.
+ to provide the inital items (which may get subsequently transformed, if is a transform expression)>.
+ Location of the xml element containing the .
+ expander options.
+ Wether to include items that evaluated to empty / null.
+
+
+
+ Expands all item vectors embedded in the given expression into a single string.
+ If the expression is empty, returns empty string.
+ If ExpanderOptions.BreakOnNotEmpty was passed, expression was going to be non-empty, and it broke out early, returns null. Otherwise the result can be trusted.
+
+ Type of the items provided.
+
+
+
+ Prepare the stack of transforms that will be executed on a given set of items.
+
+ class, IItem.
+
+
+
+ Expand the match provided into a string, and append that to the provided InternableString.
+ Returns true if ExpanderOptions.BreakOnNotEmpty was passed, expression was going to be non-empty, and so it broke out early.
+
+ Type of source items.
+
+
+
+ The set of functions that called during an item transformation, e.g. @(CLCompile->ContainsMetadata('MetaName', 'metaValue')).
+
+ class, IItem.
+
+
+
+ A cache of previously created item function delegates.
+
+
+
+
+ Delegate that represents the signature of all item transformation functions
+ This is used to support calling the functions by name.
+
+
+
+
+ Get a delegate to the given item transformation function by supplying the name and the
+ Item type that should be used.
+
+
+
+
+ Create an enumerator from a base IEnumerable of items into an enumerable
+ of transformation result which includes the new itemspec and the base item.
+
+
+
+
+ Intrinsic function that returns the number of items in the list.
+
+
+
+
+ Intrinsic function that returns the specified built-in modifer value of the items in itemsOfType
+ Tuple is {current item include, item under transformation}.
+
+
+
+
+ Intrinsic function that returns the subset of items that actually exist on disk.
+
+
+
+
+ Intrinsic function that combines the existing paths of the input items with a given relative path.
+
+
+
+
+ Intrinsic function that returns all ancestor directories of the given items.
+
+
+
+
+ Intrinsic function that returns the DirectoryName of the items in itemsOfType
+ UNDONE: This can be removed in favor of a built-in %(DirectoryName) metadata in future.
+
+
+
+
+ Intrinsic function that returns the contents of the metadata in specified in argument[0].
+
+
+
+
+ Intrinsic function that returns only the items from itemsOfType that have distinct Item1 in the Tuple
+ Using a case sensitive comparison.
+
+
+
+
+ Intrinsic function that returns only the items from itemsOfType that have distinct Item1 in the Tuple
+ Using a case insensitive comparison.
+
+
+
+
+ Intrinsic function that returns only the items from itemsOfType that have distinct Item1 in the Tuple
+ Using a case insensitive comparison.
+
+
+
+
+ Intrinsic function reverses the item list.
+
+
+
+
+ Intrinsic function that transforms expressions like the %(foo) in @(Compile->'%(foo)').
+
+
+
+
+ Intrinsic function that transforms expressions by invoking methods of System.String on the itemspec
+ of the item in the pipeline.
+
+
+
+
+ Intrinsic function that returns the items from itemsOfType with their metadata cleared, i.e. only the itemspec is retained.
+
+
+
+
+ Intrinsic function that returns only those items that have a not-blank value for the metadata specified
+ Using a case insensitive comparison.
+
+
+
+
+ Intrinsic function that returns only those items have the given metadata value
+ Using a case insensitive comparison.
+
+
+
+
+ Intrinsic function that returns those items don't have the given metadata value
+ Using a case insensitive comparison.
+
+
+
+
+ Intrinsic function that returns a boolean to indicate if any of the items have the given metadata value
+ Using a case insensitive comparison.
+
+
+
+
+ Represents all the components of a transform function, including the ability to execute it.
+
+ class, IItem.
+
+
+
+ The delegate that points to the transform function.
+
+
+
+
+ Arguments to pass to the transform function as parsed out of the project file.
+
+
+
+
+ The element location of the transform expression.
+
+
+
+
+ The name of the function that this class will call.
+
+
+
+
+ TransformFunction constructor.
+
+
+
+
+ Arguments to pass to the transform function as parsed out of the project file.
+
+
+
+
+ The element location of the transform expression.
+
+
+
+
+ Execute this transform function with the arguments contained within this TransformFunction instance.
+
+
+
+
+ A functor that returns the value of the metadata in the match
+ that is on the item it was created with.
+
+
+
+
+ The current ItemSpec of the item being matched.
+
+
+
+
+ Item used as the source of metadata.
+
+
+
+
+ Location of the match.
+
+
+
+
+ Constructor.
+
+
+
+
+ Expands the metadata in the match provided into a string result.
+ The match is expected to be the content of a transform.
+ For example, representing "%(Filename.obj)" in the original expression "@(Compile->'%(Filename.obj)')".
+
+
+
+
+ Regular expressions used by the expander.
+ The expander currently uses regular expressions rather than a parser to do its work.
+
+
+
+
+ Regular expression used to match item metadata references embedded in strings.
+ For example, %(Compile.DependsOn) or %(DependsOn).
+
+
+
+
+ Name of the group matching the "name" of a metadatum.
+
+
+
+
+ Name of the group matching the prefix on a metadata expression, for example "Compile." in "%(Compile.Object)".
+
+
+
+
+ Name of the group matching the item type in an item expression or metadata expression.
+
+
+
+
+ regular expression used to match item metadata references outside of item vector transforms.
+
+ PERF WARNING: this Regex is complex and tends to run slowly.
+
+
+
+ Complete description of an item metadata reference, including the optional qualifying item type.
+ For example, %(Compile.DependsOn) or %(DependsOn).
+
+
+
+
+ description of an item vector with a transform, left hand side.
+
+
+
+
+ description of an item vector with a transform, right hand side.
+
+
+
+
+ The type of this function's receiver.
+
+
+
+
+ The name of the function.
+
+
+
+
+ The arguments for the function.
+
+
+
+
+ The expression that this function is part of.
+
+
+
+
+ The property name that this function is applied on.
+
+
+
+
+ The binding flags that will be used during invocation of this function.
+
+
+
+
+ The remainder of the body once the function and arguments have been extracted.
+
+
+
+
+ List of properties which have been used but have not been initialized yet.
+
+
+
+
+ This class represents the function as extracted from an expression
+ It is also responsible for executing the function.
+
+ Type of the properties used to expand the expression.
+
+
+
+ The type of this function's receiver.
+
+
+
+
+ The name of the function.
+
+
+
+
+ The arguments for the function.
+
+
+
+
+ The expression that this function is part of.
+
+
+
+
+ The property name that this function is applied on.
+
+
+
+
+ The binding flags that will be used during invocation of this function.
+
+
+
+
+ The remainder of the body once the function and arguments have been extracted.
+
+
+
+
+ List of properties which have been used but have not been initialized yet.
+
+
+
+
+ Construct a function that will be executed during property evaluation.
+
+
+
+
+ Part of the extraction may result in the name of the property
+ This accessor is used by the Expander
+ Examples of expression root:
+ [System.Diagnostics.Process]::Start
+ SomeMSBuildProperty.
+
+
+
+
+ Extract the function details from the given property function expression.
+
+
+
+
+ Execute the function on the given instance.
+
+
+
+
+ Shortcut to avoid calling into binding if we recognize some most common functions.
+ Binding is expensive and throws first-chance MissingMethodExceptions, which is
+ bad for debugging experience and has a performance cost.
+ A typical binding operation with exception can take ~1.500 ms; this call is ~0.050 ms
+ (rough numbers just for comparison).
+ See https://github.com/dotnet/msbuild/issues/2217.
+
+ The value returned from the function call.
+ Object that the function is called on.
+ arguments.
+ True if the well known function call binding was successful.
+
+
+
+ Shortcut to avoid calling into binding if we recognize some most common constructors.
+ Analogous to TryExecuteWellKnownFunction but guaranteed to not throw.
+
+ The instance as created by the constructor call.
+ Arguments.
+ True if the well known constructor call binding was successful.
+
+
+
+ Try to convert value to int.
+
+
+
+
+ Try to convert value to long.
+
+
+
+
+ Try to convert value to double.
+
+
+
+
+ Given a type name and method name, try to resolve the type.
+
+ May be full name or assembly qualified name.
+ simple name of the method.
+
+
+
+
+ Gets the specified type using the namespace to guess the assembly that its in.
+
+
+
+
+ Get the specified type from the assembly partial name supplied.
+
+
+
+
+ Extracts the name, arguments, binding flags, and invocation type for an indexer
+ Also extracts the remainder of the expression that is not part of this indexer.
+
+
+
+
+ Extracts the name, arguments, binding flags, and invocation type for a static or instance function.
+ Also extracts the remainder of the expression that is not part of this function.
+
+
+
+
+ Coerce the arguments according to the parameter types
+ Will only return null if the coercion didn't work due to an InvalidCastException.
+
+
+
+
+ Make an attempt to create a string showing what we were trying to execute when we failed.
+ This will show any intermediate evaluation which may help the user figure out what happened.
+
+
+
+
+ Check the property function allowlist whether this method is available.
+
+
+
+
+ Construct and instance of objectType based on the constructor or method arguments provided.
+ Arguments must never be null.
+
+
+
+
+ This class wraps information about properties which have been used before they are initialized.
+
+
+
+
+ Lazily allocated collection of properties and the element which used them.
+
+
+
+
+ Are we currently supposed to warn if we used an uninitialized property.
+
+
+
+
+ What is the currently evaluating property element, this is so that we do not add a un initialized property if we are evaluating that property.
+
+
+
+
+ Class which provides access to toolsets.
+
+
+
+
+ A mapping of tools versions to Toolsets, which contain the public Toolsets.
+ This is the collection we use internally.
+
+
+
+
+ Constructor which will load toolsets from the specified locations.
+
+
+
+
+ Constructor from an existing collection of toolsets.
+
+
+
+
+ Private constructor for deserialization
+
+
+
+
+ Retrieves the toolsets.
+
+
+ ValueCollection is already read-only.
+
+
+
+
+ Gets the specified toolset.
+
+
+
+
+ Translates to and from binary form.
+
+
+
+
+ Factory for deserialization.
+
+
+
+
+ Populate Toolsets with a dictionary of (toolset version, Toolset)
+ using information from the registry and config file, if any.
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Enable providing access to external [potentially remote] ProjectCollection.
+
+
+
+
+ Provide the list of remote projects (projects in the remote collection)
+ Note all returned objects will be local "linked" Project object proxies.
+
+ [optional] project full path. Can be null in which case function will return all projects
+
+
+
+ Called when External provider is "disconnected" from the local collection - aka it will be no longer used to extend
+ the projects list.
+ This is triggered by either project collection disposing or when another call to SetExternalProjectsProvider is invoked.
+ The purpose of this call is to allow the external provider release any associate data (caches/connections etc).
+
+
+
+
+ Attach an external project provider to a msbuild ProjectCollection.
+
+ Note at any time there could be only one ExternalProvider attached.
+
+ Can be called with link == null, in which case it will "clear" the external provider on the target collection
+
+
+
+
+ implemented by MSBuild objects that support remote linking;
+
+
+
+
+ Gets the current link, if any. For local objects returns null;
+
+
+
+
+ Provide facility to ExternalProjectsProvider implementation
+ to create local OM objects based on the remote link.
+ These object are fully useful for associated Collection.
+
+
+
+
+ Acquire a instance for a given ProjectCollection.
+ Allows creating a local MSBuild OM objects representing externally hosted Projects.
+
+
+
+
+ Get the underlying "link" proxy for a given MSBuild object model object (null if it is not linked).
+ can be used by ExternalProjectsProvider to prevent double linking when implementing remote calls.
+
+
+
+
+ Check if an msbuild object is local (aka not from External Project)
+
+
+
+
+ Local collection.
+
+
+
+
+ Gets only locally load projects, excluding external
+
+
+
+
+ Creates a regular evaluated property, with backing XML.
+ Called by Project.SetProperty.
+ Property MAY NOT have reserved name and MAY NOT overwrite a global property.
+ Predecessor is any immediately previous property that was overridden by this one during evaluation and may be null.
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Facilitate remoting the and .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Facilitate remoting the and .
+
+
+
+
+ Facilitate remoting the and .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Helps implementing the item type change for remoted objects>.
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate support for remote build.
+
+
+
+
+ Called by the local project collection to indicate to this project that it is no longer loaded.
+
+
+
+
+ Indicates whether a specified key is in the global properties dictionary. This provides a default implementation
+ to avoid a breaking change, but it is often overriden for performance.
+
+ The key to check for in the dictionary
+ True if the key is in the global properties; false otherwise
+
+
+
+ Indicates how many properties are in the global properties dictionary. This provides a default implementation to
+ avoid a breaking change, but it is often overriden for performance.
+
+ The number of properties in the global properties dictionary
+
+
+
+ Allows enumeration over the keys and values in the global properties dictionary. This provides a default
+ implementation to avoid a breaking change, but it can be overriden for performance.
+
+ An enumerable of the keys and values in the global properties dictionary
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ MSBuild object that this meta data belong to.
+ Can be either , or
+ Not a public property on original ProjectMetadata object, but int is needed to create a local proxy object.
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Helper utility for External projects provider implementation to get access of the parent object.
+ At this point this is internal property for .
+
+
+
+
+ Helper utility for External projects provider implementation to get access of the EvaluatedValueEscaped
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+ (note can not Use Xml.Name since for global properties Xml is null;
+
+
+
+
+ Allow implement the for remoted objects.
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Helper utility for External projects provider implementation to get access of the EvaluatedValueEscaped
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external construction objects derived from
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Helps implementation of the .
+
+
+
+
+ helps implementation the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ ExternalProjectsProvider helpers
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ This interface will allow us to share a single field between
+ and
+ for construction objects so therefore not increasing the storage size while supporting
+ external linking.
+ and
+
+
+
+
+ Not null for "external" objects, null for internal objects
+
+
+
+
+ Null for "external" objects, not null for internal objects
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external construction objects derived from
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Supports .
+
+
+
+
+ Supports .
+ return raw xml content of the element if it has exactly 1 text child
+
+
+
+
+ Required to implement Attribute access for remote element.
+
+
+
+
+ Required to implement Attribute access for remote element.
+
+
+
+
+ Required to implement Attribute access for remote element.
+
+
+
+
+ Facilitate remoting to remote .
+
+
+
+
+ Facilitate remoting to remote .
+
+
+
+
+ Utility function for ExternalProjects provider
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Helps implementing sub element indexer.
+
+
+
+
+ Helps implementing sub element indexer.
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Help implement ItemType setter for remote objects.
+
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Help implement rename.
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Help implement rename.
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ Access to remote .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ Facilitate remoting the .
+
+
+
+
+ External projects support.
+ Allow for creating a local representation to external object of type
+
+
+
+
+ Access to remote .
+
+
+
+
+ The thread calling BuildGraph() will act as an implicit worker
+
+
+
+
+ Maintain the state of each node (InProcess and Processed) to detect cycles.
+ Assumes edges have been added between nodes.
+ Returns false if cycles were detected.
+
+
+
+
+ Load a graph with root node at entryProjectFile
+ Maintain a queue of projects to be processed and evaluate projects in parallel
+ Returns false if loading the graph is not successful
+
+
+
+
+ Provides deduping of expensive work by a key, or modeling of a set of deduped work that
+ can be awaited as a unit. Completed results are kept in the collection for reuse.
+
+
+
+
+ Number of workers to process work items.
+
+
+
+
+ Retrieves all completed work items.
+
+
+
+
+ Checks if the work set has been marked as completed.
+
+
+
+
+ Enqueues a work item to the work set.
+
+
+
+
+
+
+ Assists processing items until all the items added to the queue are processed, completes the work set, and
+ propagates any exceptions thrown by workers.
+
+
+
+
+ To avoid calling nuget at graph construction time, the graph is initially constructed with nodes referencing outer build nodes which in turn
+ reference inner build nodes. However at build time, the inner builds are referenced directly by the nodes referencing the outer build.
+ Change the graph to mimic this behaviour.
+ Example: Node -> Outer -> Inner go to: Node -> Outer; Node->Inner; Outer -> Inner. Inner build edges get added to Node.
+
+
+
+
+ Gets the effective global properties for a project reference item.
+
+
+ The behavior of this method should match the logic in the SDK
+
+
+
+
+ Gets the effective global properties for an item that will get passed to .
+
+
+ The behavior of this method matches the hardcoded behaviour of the msbuild task
+ and the parameter can contain other mutations done at build time in targets / tasks
+
+
+
+
+ Given a project and a set of entry targets the project would get called with,
+ parse the project's project reference target specification and compute how the target would call its references.
+
+ The calling code should then call for each of the project's references
+ to get the concrete targets for each reference.
+
+ Project containing the PRT protocol
+ Targets with which will get called
+
+
+
+
+ Constructor creates a build result with results for each graph node.
+
+ The id of the build submission.
+ The set of results for each graph node.
+
+
+
+ Constructs a graph build result with an exception
+
+ The id of the build submission.
+ The exception, if any.
+
+
+
+ Returns the submission id.
+
+
+
+
+ Returns a flag indicating if a circular dependency was detected.
+
+
+
+
+ Returns the exception generated while this result was run, if any.
+
+
+
+
+ Returns the overall result for this result set.
+
+
+
+
+ Returns an enumerator for all build results in this graph build result
+
+
+
+
+ Indexer which sets or returns results for the specified node
+
+ The node
+ The results for the specified node
+ KeyNotFoundException is returned if the specified node doesn't exist when reading this property.
+
+
+
+ A callback used to receive notification that a build has completed.
+
+
+ When this delegate is invoked, the WaitHandle on the BuildSubmission will have been be signalled and the OverallBuildResult will be valid.
+
+
+
+
+ A GraphBuildSubmission represents a graph build request which has been submitted to the BuildManager for processing. It may be used to
+ execute synchronous or asynchronous graph build requests and provides access to the results upon completion.
+
+
+ This class is thread-safe.
+
+
+
+
+ The callback to invoke when the submission is complete.
+
+
+
+
+ The completion event.
+
+
+
+
+ True if it has been invoked
+
+
+
+
+ Constructor
+
+
+
+
+ The BuildManager with which this submission is associated.
+
+
+
+
+ An ID uniquely identifying this request from among other submissions within the same build.
+
+
+
+
+ The asynchronous context provided to , if any.
+
+
+
+
+ A which will be signalled when the build is complete. Valid after or returns, otherwise null.
+
+
+
+
+ Returns true if this submission is complete.
+
+
+
+
+ The results of the build per graph node. Valid only after WaitHandle has become signalled.
+
+
+
+
+ The BuildRequestData being used for this submission.
+
+
+
+
+ Whether the graph build has started.
+
+
+
+
+ Starts the request and blocks until results are available.
+
+ The request has already been started or is already complete.
+
+
+
+ Starts the request asynchronously and immediately returns control to the caller.
+
+ The request has already been started or is already complete.
+
+
+
+ Sets the event signaling that the build is complete.
+
+
+
+
+ If false, the graph is constructed but the nodes are not built.
+
+
+
+
+ GraphBuildRequestData encapsulates all of the data needed to submit a graph build request.
+
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on a project graph.
+
+ The graph to build.
+ The targets to build.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on a project graph.
+
+ The graph to build.
+ The targets to build.
+ The host services to use, if any. May be null.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on a project graph.
+
+ The graph to build.
+ The targets to build.
+ The host services to use, if any. May be null.
+ Flags controlling this build request.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on project files.
+
+ The full path to the project file.
+ The global properties which should be used during evaluation of the project. Cannot be null.
+ The targets to build.
+ The host services to use. May be null.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on project files.
+
+ The full path to the project file.
+ The global properties which should be used during evaluation of the project. Cannot be null.
+ The targets to build.
+ The host services to use. May be null.
+ The to use.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on a project graph entry points.
+
+ The entry point to use in the build.
+ The targets to build.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on a project graph entry points.
+
+ The entry point to use in the build.
+ The targets to build.
+ The host services to use, if any. May be null.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on a project graph entry points.
+
+ The entry point to use in the build.
+ The targets to build.
+ The host services to use, if any. May be null.
+ Flags controlling this build request.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on a project graph entry points.
+
+ The entry points to use in the build.
+ The targets to build.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on a project graph entry points.
+
+ The entry points to use in the build.
+ The targets to build.
+ The host services to use, if any. May be null.
+
+
+
+ Constructs a GraphBuildRequestData for build requests based on a project graph entry points.
+
+ The entry points to use in the build.
+ The targets to build.
+ The host services to use, if any. May be null.
+ Flags controlling this build request.
+
+
+
+ Common constructor.
+
+
+
+
+ The requested project graph to build.
+ May be null.
+
+ The project graph.
+
+
+
+ The project graph entry points.
+ May be null.
+
+ The project graph entry points.
+
+
+
+ The name of the targets to build.
+
+ An array of targets in the project to be built.
+
+
+
+ Extra flags for this BuildRequest.
+
+
+
+
+ Options for how the graph should be built.
+
+
+
+
+ Gets the HostServices object for this request.
+
+
+
+
+ Represents an entry point into the project graph which is comprised of a project file and a set of global properties
+
+
+
+
+ Constructs an entry point with the given project file and no global properties.
+
+ The project file to use for this entry point
+
+
+
+ Constructs an entry point with the given project file and global properties.
+
+ The project file to use for this entry point
+ The global properties to use for this entry point. May be null.
+
+
+
+ Gets the full path to the project file to use for this entry point.
+
+
+
+
+ Gets the global properties to use for this entry point.
+
+
+
+
+ Represents a graph of evaluated projects.
+
+
+
+
+ A callback used for constructing a for a specific
+ instance.
+
+ The path to the project file to parse.
+ The global properties to be used for creating the ProjectInstance.
+ The context for parsing.
+ A instance. This value must not be null.
+
+ The default version of this delegate used by ProjectGraph simply calls the
+ ProjectInstance constructor with information from the parameters. This delegate
+ is provided as a hook to allow scenarios like creating a
+ instance before converting it to a ProjectInstance for use by the ProjectGraph.
+ The returned ProjectInstance will be stored and provided with the ProjectGraph.
+ If this callback chooses to generate an immutable ProjectInstance, e.g. by
+ using with the flag
+ , the resulting ProjectGraph
+ nodes might not be buildable.
+ To avoid corruption of the graph and subsequent builds based on the graph:
+ - all callback parameters must be utilized for creating the ProjectInstance, without any mutations
+ - the project instance should not be mutated in any way, its state should be a
+ full fidelity representation of the project file
+
+
+
+
+ Various metrics on graph construction.
+
+
+
+
+ Gets the project nodes representing the entry points.
+
+
+
+
+ Get an unordered collection of all project nodes in the graph.
+
+
+
+
+ Get a topologically sorted collection of all project nodes in the graph.
+ Referenced projects appear before the referencing projects.
+
+
+
+
+ Constructs a graph starting from the given project file, evaluating with the global project collection and no
+ global properties.
+
+ The project file to use as the entry point in constructing the graph
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given project files, evaluating with the global project collection and no
+ global properties.
+
+ The project files to use as the entry points in constructing the graph
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given project file, evaluating with the provided project collection and no
+ global properties.
+
+ The project file to use as the entry point in constructing the graph
+
+ The collection with which all projects in the graph should be associated. May not be
+ null.
+
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given project files, evaluating with the provided project collection and no
+ global properties.
+
+ The project files to use as the entry points in constructing the graph
+
+ The collection with which all projects in the graph should be associated. May not be
+ null.
+
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given project file, evaluating with the global project collection and no
+ global properties.
+
+ The project file to use as the entry point in constructing the graph
+
+ The collection with which all projects in the graph should be associated. May not be
+ null.
+
+
+ A delegate used for constructing a , called for each
+ project created during graph creation. This value can be null, which uses
+ a default implementation that calls the ProjectInstance constructor. See the remarks
+ on the for other scenarios.
+
+
+ If the evaluation of any project in the graph fails, the InnerException contains
+
+ If a null reference is returned from , the InnerException contains
+
+
+
+
+
+ Constructs a graph starting from the given project file, evaluating with the provided global properties and the
+ global project collection.
+
+ The project file to use as the entry point in constructing the graph
+
+ The global properties to use for all projects. May be null, in which case no global
+ properties will be set.
+
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given project files, evaluating with the provided global properties and the
+ global project collection.
+
+ The project files to use as the entry points in constructing the graph
+
+ The global properties to use for all projects. May be null, in which case no global
+ properties will be set.
+
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given project file, evaluating with the provided global properties and the
+ provided project collection.
+
+ The project file to use as the entry point in constructing the graph
+
+ The global properties to use for all projects. May be null, in which case no global
+ properties will be set.
+
+
+ The collection with which all projects in the graph should be associated. May not be
+ null.
+
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given project files, evaluating with the provided global properties and the
+ provided project collection.
+
+ The project files to use as the entry points in constructing the graph
+
+ The global properties to use for all projects. May be null, in which case no global
+ properties will be set.
+
+
+ The collection with which all projects in the graph should be associated. May not be
+ null.
+
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given graph entry point, evaluating with the global project collection.
+
+ The entry point to use in constructing the graph
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given graph entry points, evaluating with the global project collection.
+
+ The entry points to use in constructing the graph
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given graph entry point, evaluating with the provided project collection.
+
+ The entry point to use in constructing the graph
+
+ The collection with which all projects in the graph should be associated. May not be
+ null.
+
+
+ If the evaluation of any project in the graph fails
+
+
+
+
+ Constructs a graph starting from the given graph entry points, evaluating with the provided project collection.
+
+ The entry points to use in constructing the graph
+
+ The collection with which all projects in the graph should be associated. May not be
+ null.
+
+
+ A delegate used for constructing a , called for each
+ project created during graph creation. This value can be null, which uses
+ a default implementation that calls the ProjectInstance constructor. See the remarks
+ on for other scenarios.
+
+
+ If the evaluation of any project in the graph fails
+
+
+ If a null reference is returned from
+
+
+ If the evaluation is successful but the project graph contains a circular
+ dependency
+
+
+
+
+ Constructs a graph starting from the given graph entry points, evaluating with the provided project collection.
+
+ The entry points to use in constructing the graph
+
+ The collection with which all projects in the graph should be associated. May not be
+ null.
+
+
+ A delegate used for constructing a , called for each
+ project created during graph creation. This value can be null, which uses
+ a default implementation that calls the ProjectInstance constructor. See the remarks
+ on for other scenarios.
+
+
+ The to observe.
+
+
+ If the evaluation of any project in the graph fails
+
+
+ If a null reference is returned from
+
+
+ If the evaluation is successful but the project graph contains a circular
+ dependency
+
+
+
+
+ Constructs a graph starting from the given graph entry points, evaluating with the provided project collection.
+
+ The entry points to use in constructing the graph
+
+ The collection with which all projects in the graph should be associated. May not be
+ null.
+
+
+ A delegate used for constructing a , called for each
+ project created during graph creation. This value can be null, which uses
+ a default implementation that calls the ProjectInstance constructor. See the remarks
+ on for other scenarios.
+
+
+ Number of threads to participate in building the project graph.
+
+
+ The to observe.
+
+
+ If the evaluation of any project in the graph fails
+
+
+ If a null reference is returned from
+
+
+ If the evaluation is successful but the project graph contains a circular
+ dependency
+
+
+
+
+ Gets the target list to be executed for every project in the graph, given a particular target list for the entry
+ project.
+
+
+ This method uses the ProjectReferenceTargets items to determine the targets to run per node. The results can then
+ be used to start building each project individually, assuming a given project is built after its references.
+
+ The target list for the entry project. May be null or empty, in which case the entry
+ projects' default targets will be used.
+
+
+ A dictionary containing the target list for each node. If a node's target list is empty, then no targets were
+ inferred for that node and it should get skipped during a graph based build.
+
+
+
+
+ Represents the node for a particular project in a project graph.
+ A node is defined by (ProjectPath, ToolsVersion, GlobalProperties).
+
+
+
+
+ Gets an unordered collection of graph nodes for projects which this project references.
+
+
+
+
+ Gets a list of graph nodes for projects that have a project reference for this project
+
+
+
+
+ Gets the evaluated project instance represented by this node in the graph.
+
+
+
+
+ This class descibes a central/forwarding logger pair used in multiproc logging.
+
+
+
+
+ Constructor.
+
+ The central logger
+ The description for the forwarding logger.
+
+
+
+ Retrieves the central logger.
+
+
+
+
+ Retrieves the forwarding logger description.
+
+
+
+
+ Comparer for that ignores
+ both and
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Listens to build evaluation finished events and collects profiling information when available
+
+
+
+
+ Accumulates the result of profiling each project. Computing the aggregated result is deferred till the end of the build
+ to interfere as less as possible with evaluation times
+
+
+
+
+ Aggregation of all profiled locations. Computed the first time is called.
+
+
+
+
+ If null, no file is saved to disk
+
+
+
+
+
+
+
+ Creates a logger for testing purposes that gathers profiling information but doesn't save a file to disk with the report
+
+
+
+
+ Gets or sets the verbosity level.
+
+
+ Verbosity is ignored by this logger.
+
+
+
+
+ No specific parameters are used by this logger.
+
+
+
+
+ Subscribes to status events, which is the category for the evaluation finished event.
+
+
+
+
+ On shutdown, the profiler report is written to disk.
+
+
+
+
+ Returns the result of aggregating all profiled projects across a build.
+
+ Whether small items should be pruned. This is called with false on some tests since the result may vary depending on the evaluator speed
+
+ Not thread safe. After this method is called, the assumption is that no new ProjectEvaluationFinishedEventArgs will arrive.
+ In the regular code path, this method is called only once per build. But some test cases may call it multiple times to validate
+ the aggregated data.
+
+
+
+
+ Finds the first ancestor of parentId (which could be itself) that is either an evaluation pass location or a big enough profiled data.
+
+
+
+
+ Pretty prints the aggregated results and saves it to disk.
+
+
+ If the extension of the file to log is 'md', markdown content is generated. Otherwise, it falls
+ back to a tab separated format.
+
+
+
+
+ A logger that serializes all incoming BuildEventArgs in a compressed binary file (*.binlog). The file
+ can later be played back and piped into other loggers (file, console, etc) to reconstruct the log contents
+ as if a real build was happening. Additionally, this format can be read by tools for
+ analysis or visualization. Since the file format preserves structure, tools don't have to parse
+ text logs that erase a lot of useful information.
+
+ The logger is public so that it can be instantiated from MSBuild.exe via command-line switch.
+
+
+
+ Describes whether to collect the project files (including imported project files) used during the build.
+ If the project files are collected they can be embedded in the log file or as a separate zip archive.
+
+
+
+
+ Don't collect any files during the build.
+
+
+
+
+ Embed all project files directly in the log file.
+
+
+
+
+ Create an external .ProjectImports.zip archive for the project files.
+
+
+
+
+ Gets or sets whether to capture and embed project and target source files used during the build.
+
+
+
+ Gets or sets the verbosity level.
+
+ The binary logger Verbosity is always maximum (Diagnostic). It tries to capture as much
+ information as possible.
+
+
+
+
+ Gets or sets the parameters. The only supported parameter is the output log file path (for example, "msbuild.binlog").
+
+
+
+
+ Initializes the logger by subscribing to events of the specified event source and embedded content source.
+
+
+
+
+ Closes the underlying file stream.
+
+
+
+
+ Processes the parameters given to the logger from MSBuild.
+
+
+
+
+
+
+ Indicates the type of record stored in the binary log.
+ There is a record type for each type of build event and there
+ are also few meta-data record types (e.g. string data, lookup data, EOF).
+
+
+
+
+ Interface for replaying a binary log file (*.binlog)
+
+
+
+
+ Event raised when non-textual log record is read.
+ This means all event args and key-value pairs.
+ Strings and Embedded files are not included.
+
+
+
+
+ Enables initialization (e.g. subscription to events) - that is deferred until Replay is triggered.
+ At this point all other possible subscribers should be already subscribed -
+ so it can be determined if raw events or structured events should be replayed.
+
+
+
+
+
+
+ File format version of the binary log file.
+
+
+
+
+ The minimum reader version for the binary log file.
+
+
+
+
+ Raised when the log reader encounters a project import archive (embedded content) in the stream.
+ The subscriber must read the exactly given length of binary data from the stream - otherwise exception is raised.
+ If no subscriber is attached, the data is skipped.
+
+
+
+
+ Provides a method to read a binary log file (*.binlog) and replay all stored BuildEventArgs
+ by implementing IEventSource and raising corresponding events.
+
+ The class is public so that we can call it from MSBuild.exe when replaying a log file.
+
+
+ Touches the static constructor
+ to ensure it initializes
+ and
+
+
+
+ Unknown build events or unknown parts of known build events will be ignored if this is set to true.
+
+
+
+
+
+
+
+ Read the provided binary log file and raise corresponding events for each BuildEventArgs
+
+ The full file path of the binary log file
+
+
+
+ Read the provided binary log file opened as a stream and raise corresponding events for each BuildEventArgs
+
+ Stream over the binlog content.
+
+
+
+
+ Creates a for the provided binary log file.
+ Performs decompression and buffering in the optimal way.
+ Caller is responsible for disposing the returned reader.
+
+
+ BinaryReader of the given binlog file.
+
+
+
+ Creates a for the provided binary log file.
+ Performs decompression and buffering in the optimal way.
+ Caller is responsible for disposing the returned reader.
+
+ Stream over the binlog file
+ BinaryReader of the given binlog file.
+
+
+
+ Creates a for the provided binary reader over binary log file.
+ Caller is responsible for disposing the returned reader.
+
+
+ Indicates whether the passed BinaryReader should be closed on disposing.
+ Unknown build events or unknown parts of known build events will be ignored if this is set to true.
+ BuildEventArgsReader over the given binlog file binary reader.
+
+
+
+ Creates a for the provided binary log file.
+ Performs decompression and buffering in the optimal way.
+ Caller is responsible for disposing the returned reader.
+
+
+ BinaryReader of the given binlog file.
+
+
+
+ Read the provided binary log file and raise corresponding events for each BuildEventArgs
+
+ The full file path of the binary log file
+ A indicating the replay should stop as soon as possible.
+
+
+
+ Read the provided binary log file and raise corresponding events for each BuildEventArgs
+
+ The binary log content binary reader - caller is responsible for disposing.
+ A indicating the replay should stop as soon as possible.
+
+
+
+ Read the provided binary log file and raise corresponding events for each BuildEventArgs
+
+ The binary log content binary reader - caller is responsible for disposing, unless is set to true.
+ Indicates whether the passed BinaryReader should be closed on disposing.
+ A indicating the replay should stop as soon as possible.
+
+
+
+ Read the provided binary log file and raise corresponding events for each BuildEventArgs
+
+ The build events reader - caller is responsible for disposing.
+ A indicating the replay should stop as soon as possible.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An implementation of IEventSource that raises appropriate events for a provided BuildEventArgs object.
+
+ This class is public because BinaryLogReplayEventSource is a derived class.
+ This is abstracted into its own class because it's a useful single-purpose helper that
+ can be used independently as a generic implementation of IEventSource.
+
+
+
+ This event is raised for all BuildEventArgs objects after a more type-specific event
+
+
+
+
+ Raised for BuildStatusEventArgs instances
+
+
+
+
+ Raised for CustomBuildEventArgs instances
+
+
+
+
+ Raised for BuildStartedEventArgs instances
+
+
+
+
+ Raised for BuildFinishedEventArgs instances
+
+
+
+
+ Raised for ProjectStartedEventArgs instances
+
+
+
+
+ Raised for ProjectFinishedEventArgs instances
+
+
+
+
+ Raised for TargetStartedEventArgs instances
+
+
+
+
+ Raised for TargetFinishedEventArgs instances
+
+
+
+
+ Raised for TaskStartedEventArgs instances
+
+
+
+
+ Raised for TaskFinishedEventArgs instances
+
+
+
+
+ Raised for BuildErrorEventArgs instances
+
+
+
+
+ Raised for BuildWarningEventArgs instances
+
+
+
+
+ Raised for BuildMessageEventArgs instances
+
+
+
+
+ Raise one of the events that is appropriate for the type of the BuildEventArgs
+
+
+
+
+ A bitmask to specify which fields on a BuildEventArgs object are present; used in serialization
+
+
+
+
+ Represents a collective set of common properties on BuildEventArgs. Used for deserialization.
+
+
+
+
+ Deserializes and returns BuildEventArgs-derived objects from a BinaryReader
+
+
+
+
+ A list of string records we've encountered so far. If it's a small string, it will be the string directly.
+ If it's a large string, it will be a pointer into a temporary page file where the string content will be
+ written out to. This is necessary so we don't keep all the strings in memory when reading large binlogs.
+ We will OOM otherwise.
+
+
+
+
+ A list of dictionaries we've encountered so far. Dictionaries are referred to by their order in this list.
+
+ This is designed to not hold on to strings. We just store the string indices and
+ hydrate the dictionary on demand before returning.
+
+
+
+ A "page-file" for storing strings we've read so far. Keeping them in memory would OOM the 32-bit MSBuild
+ when reading large binlogs. This is a no-op in a 64-bit process.
+
+
+
+
+ Initializes a new instance of using a instance.
+
+ The to read from.
+ The file format version of the log file being read.
+
+
+
+ Directs whether the passed should be closed when this instance is disposed.
+ Defaults to "false".
+
+
+
+
+ Indicates whether unknown BuildEvents should be silently skipped. Read returns null otherwise.
+ Parameter is supported only if the file format supports forward compatible reading (version is 18 or higher).
+
+
+
+
+ Indicates whether unread parts of BuildEvents (probably added in newer format of particular BuildEvent)should be silently skipped. Exception thrown otherwise.
+ Parameter is supported only if the file format supports forward compatible reading (version is 18 or higher).
+
+
+
+
+ Receives recoverable errors during reading. See for documentation on arguments.
+ Applicable mainly when or is set to true."/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reads the next serialized log record from the .
+
+ ArraySegment containing serialized BuildEventArgs record
+
+
+
+ Reads the next log record from the .
+
+
+ The next .
+ If there are no more records, returns .
+
+
+
+
+ For errors and warnings these 8 fields are written out explicitly
+ (their presence is not marked as a bit in the flags). So we have to
+ read explicitly.
+
+
+
+
+
+ Locates the string in the page file.
+
+
+
+
+ Offset in the file.
+
+
+
+
+ The length of the string in chars (not bytes).
+
+
+
+
+ Stores large strings in a temp file on disk, to avoid keeping all strings in memory.
+ Only creates a file for 32-bit MSBuild.exe, just returns the string directly on 64-bit.
+
+
+
+
+ Serializes BuildEventArgs-derived objects into a provided BinaryWriter
+
+
+
+
+ When writing the current record, first write it to a memory stream,
+ then flush to the originalStream. This is needed so that if we discover
+ that we need to write a string record in the middle of writing the
+ current record, we will write the string record to the original stream
+ and the current record will end up after the string record.
+
+
+
+
+ For NameValueList we need to prefix the storage size
+ (distinct from values count due to variable int encoding)
+ So using same technique as with 'currentRecordStream'.
+
+
+
+
+ The binary writer around the originalStream.
+
+
+
+
+ The binary writer around the currentRecordStream.
+
+
+
+
+ The binary writer we're currently using. Is pointing at the currentRecordWriter usually,
+ but sometimes we repoint it to the originalBinaryWriter temporarily, when writing string
+ and name-value records.
+
+
+
+
+ Hashtable used for deduplicating strings. When we need to write a string,
+ we check in this hashtable first, and if we've seen the string before,
+ just write out its index. Otherwise write out a string record, and then
+ write the string index. A string record is guaranteed to precede its first
+ usage.
+ The reader will read the string records first and then be able to retrieve
+ a string by its index. This allows us to keep the format streaming instead
+ of writing one giant string table at the end. If a binlog is interrupted
+ we'll be able to use all the information we've discovered thus far.
+
+
+
+
+ Hashtable used for deduplicating name-value lists. Same as strings.
+
+
+
+
+ Index 0 is null, Index 1 is the empty string.
+ Reserve indices 2-9 for future use. Start indexing actual strings at 10.
+
+
+
+
+ Let's reserve a few indices for future use.
+
+
+
+
+ 0 is null, 1 is empty string
+ 2-9 are reserved for future use.
+ Start indexing at 10.
+
+
+
+
+ The index of the next record to be written.
+
+
+
+
+ A temporary buffer we use when writing a NameValueList record. Avoids allocating a list each time.
+
+
+
+
+ A temporary buffer we use when hashing a NameValueList record. Stores the indices of hashed strings
+ instead of the actual names and values.
+
+
+
+
+ Raised when an item is encountered with a hint to embed a file into the binlog.
+
+
+
+
+ Initializes a new instance of BuildEventArgsWriter with a BinaryWriter
+
+ A BinaryWriter to write the BuildEventArgs instances to
+
+
+
+ Write a provided instance of BuildEventArgs to the BinaryWriter
+
+
+
+
+ Switches the binaryWriter used by the Write* methods to the direct underlying stream writer
+ until the disposable is disposed. Useful to bypass the currentRecordWriter to write a string,
+ blob or NameValueRecord that should precede the record being currently written.
+
+
+
+
+ In the middle of writing the current record we may discover that we want to write another record
+ preceding the current one, specifically the list of names and values we want to reuse in the
+ future. As we are writing the current record to a MemoryStream first, it's OK to temporarily
+ switch to the direct underlying stream and write the NameValueList record first.
+ When the current record is done writing, the MemoryStream will flush to the underlying stream
+ and the current record will end up after the NameValueList record, as desired.
+
+
+
+
+ Compute the total hash of all items in the nameValueList
+ while simultaneously filling the nameValueIndexListBuffer with the individual
+ hashes of the strings, mirroring the strings in the original nameValueList.
+ This helps us avoid hashing strings twice (once to hash the string individually
+ and the second time when hashing it as part of the nameValueList)
+
+
+
+
+ Hash the string and write a String record if not already hashed.
+
+ Returns the string record index as well as the hash.
+
+
+
+ Creates a zip archive with all the .csproj and .targets encountered during the build.
+ The internal .zip file structure matches closely the layout of the original sources on disk.
+ The .zip file can be used to correlate the file names and positions in the build log file with the
+ actual sources.
+
+
+
+
+ Avoid visiting each file more than once.
+
+
+
+
+ This method doesn't need locking/synchronization because it's only called
+ from a task that is chained linearly
+
+
+
+
+ This method doesn't need locking/synchronization because it's only called
+ from a task that is chained linearly
+
+
+
+
+ We need to this for Extended event args have Dictionary as ExtendedMetadata.
+
+
+
+
+ An object model for binlog embedded files.
+ Used in event.
+
+
+
+
+ Full path of the original file before it was put in the embedded archive.
+
+
+
+
+ Materializes the whole content of the embedded file in memory as a string.
+
+
+
+
+
+ Fully materialized (in-memory) embedded file.
+ Easier to work with (the content is expressed in a single string), but more memory greedy.
+
+
+
+
+ The content of the original file.
+
+
+
+
+
+
+
+ Lazy (streaming) embedded file.
+ Might be favorable for large files, as it doesn't materialize the whole content in memory.
+
+
+
+
+ Stream over the content of the archived file.
+
+
+
+
+ Creates an externally exposable embedded file representation from a (which is an implementation detail currently).
+
+
+
+
+
+
+
+
+
+ Event arguments for event.
+
+
+
+
+ Helper method that allows to subscribe to event via event handler.
+
+ This applies only when subscriber is OK with greedy reading entire content of the file and is interested only in the individual strings (e.g. for sensitive data redaction purposes),
+ without distinction what each individual string means (e.g. they do not care about distinction between path and content or between individual files - they just need all textual data).
+
+
+
+ private void OnStringReadDone(StringReadEventArgs e)
+ {
+ e.StringToBeUsed = e.StringToBeUsed.Replace("foo", "bar");
+ }
+
+ private void SubscribeToEvents()
+ {
+ reader.StringReadDone += OnStringReadDone;
+ reader.ArchiveFileEncountered += ((Action<StringReadEventArgs>)OnStringReadDone).ToArchiveFileHandler();
+ }
+
+
+
+
+
+
+ Materializes the error message.
+ Until it's called the error message is not materialized and no string allocations are made.
+
+ The error message.
+
+
+
+ An event args for event.
+
+
+
+
+ Type of the error that occurred during reading.
+
+
+
+
+ Kind of the record that encountered the error.
+
+
+
+
+ Materializes the error message.
+ Until it's called the error message is not materialized and no string allocations are made.
+
+ The error message.
+
+
+
+ An interface for notifications from BuildEventArgsReader
+
+
+
+
+ An event that allows the subscriber to be notified when a string is read from the binary log.
+ Subscriber may adjust the string by setting property.
+ The passed event arg can be reused and should not be stored.
+
+
+
+
+ An event that allows the caller to be notified when an embedded file is encountered in the binary log.
+ When subscriber is OK with greedy reading entire content of the file and is interested only in the individual strings (e.g. for sensitive data redaction purposes),
+ it can simplify subscribing to this event, by using handler with same signature as handler for and wrapping it via
+ extension.
+
+
+
+ private void OnStringReadDone(StringReadEventArgs e)
+ {
+ e.StringToBeUsed = e.StringToBeUsed.Replace("foo", "bar");
+ }
+
+ private void SubscribeToEvents()
+ {
+ reader.StringReadDone += OnStringReadDone;
+ reader.ArchiveFileEncountered += ((Action<StringReadEventArgs>)OnStringReadDone).ToArchiveFileHandler();
+ }
+
+
+
+
+
+ Receives recoverable errors during reading.
+ Communicates type of the error, kind of the record that encountered the error and the message detailing the error.
+ In case of this is raised before returning the structured representation of a build event
+ that has some extra unknown data in the binlog. In case of other error types this event is raised and the offending build event is skipped and not returned.
+
+
+
+
+ Type of the error that occurred during reading.
+
+
+
+
+ The encountered event is completely unknown to the reader. It cannot interpret any part of it.
+
+
+
+
+ The encountered event is known to the reader and reader is able to read the event as it knows it.
+ However there are some extra data (append only extension to the event in future version), that reader cannot interpret,
+ it can only skip it.
+
+
+
+
+ The encountered event type is known to the reader, but the reader cannot interpret the data of the event.
+ This is probably caused by an event definition changing more than just adding fields.
+ The reader can only skip the event in full.
+
+
+
+
+ Creates bounded read-only, forward-only view over an underlying stream.
+
+
+
+
+
+
+
+ An event args for callback.
+
+
+
+
+ The original string that was read from the binary log.
+
+
+
+
+ The adjusted string (or the original string of none subscriber replaced it) that will be used by the reader.
+
+
+
+
+ Bounded read-only, forward-only view over an underlying stream.
+
+
+
+
+ A wrapper stream that allows position tracking and forward seeking.
+
+
+
+
+ Delegate to use for writing a string to some location like
+ the console window or the IDE build window.
+
+
+
+
+
+ Type of delegate used to set console color.
+
+ Text color
+
+
+
+ Type of delegate used to reset console color.
+
+
+
+
+ This class implements the default logger that outputs event data
+ to the console (stdout).
+ It is a facade: it creates, wraps and delegates to a kind of BaseConsoleLogger,
+ either SerialConsoleLogger or ParallelConsoleLogger.
+
+ This class is not thread safe.
+
+
+
+ Default constructor.
+
+
+
+
+ Create a logger instance with a specific verbosity. This logs to
+ the default console.
+
+ Verbosity level.
+
+
+
+ Initializes the logger, with alternate output handlers.
+
+
+
+
+
+
+
+
+ This is called by every event handler for compat reasons -- see DDB #136924
+ However it will skip after the first call
+
+
+
+
+ Gets or sets the level of detail to show in the event log.
+
+ Verbosity level.
+
+
+
+ A semi-colon delimited list of "key[=value]" parameter pairs.
+
+ null
+
+
+
+ Suppresses the display of project headers. Project headers are
+ displayed by default unless this property is set.
+
+ This is only needed by the IDE logger.
+
+
+
+ Suppresses the display of error and warnings summary.
+
+
+
+
+ Provide access to the write hander delegate so that it can be redirected
+ if necessary (e.g. to a file)
+
+
+
+
+ Apply a parameter.
+ NOTE: This method was public by accident in Whidbey, so it cannot be made internal now. It has
+ no good reason for being public.
+
+
+
+
+ Signs up the console logger for all build events.
+
+ Available events.
+
+
+
+ Initializes the logger.
+
+
+
+
+ The console logger does not need to release any resources.
+ This method does nothing.
+
+
+
+
+ Handler for build started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for build finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for project started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for project finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for target started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for target finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for task started events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Handler for task finished events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Prints an error event
+
+
+
+
+ Prints a warning event
+
+
+
+
+ Prints a message event
+
+
+
+
+ Prints a custom event
+
+
+
+
+ Returns the minimum importance of messages logged by this logger.
+
+
+ The minimum message importance corresponding to this logger's verbosity or (MessageImportance.High - 1)
+ if this logger does not log messages of any importance.
+
+
+
+
+ This class will create a text file which will contain the build log for that node
+
+
+
+
+ Default constructor.
+
+
+
+
+ Initializes the logger.
+
+
+
+
+ Parses out the logger parameters from the Parameters string.
+
+
+
+
+ Apply a parameter
+
+
+
+
+ Initializes the logger.
+
+
+
+
+ Instructs the logger to shut down.
+
+
+
+
+ Gets or sets the object used to redirect build events.
+
+
+
+
+ Gets or sets the identifier of the node which the forwarding logger is attached to.
+
+
+
+
+ Gets or sets . This is currently hard-coded as .
+
+
+
+
+ Gets or sets the parameters.
+
+
+
+
+ Logger that forwards events to a central logger (e.g ConsoleLogger)
+ residing on the parent node.
+
+
+
+
+ Default constructor.
+
+
+
+
+ Gets or sets the level of detail to show in the event log.
+
+ Verbosity level.
+
+
+
+ The console logger takes a single parameter to suppress the output of the errors
+ and warnings summary at the end of a build.
+
+ null
+
+
+
+ This property is set by the build engine to allow a node loggers to forward messages to the
+ central logger
+
+
+
+
+ The identifier of the node.
+
+
+
+
+ Parses out the logger parameters from the Parameters string.
+
+
+
+
+ Logger parameters can be used to enable and disable specific event types.
+ Otherwise, the verbosity is used to choose which events to forward.
+
+
+
+
+ Signs up the console logger for all build events.
+
+
+
+
+ Signs up the console logger for all build events.
+
+
+
+
+ Returns the minimum importance of messages logged by this logger.
+ Forwarding logger might be configured to forward messages of particular importance regardless of the verbosity level of said logger.
+ This method properly reflects that.
+
+
+ The minimum message importance corresponding to this logger's verbosity or configuration of forwarding of messages of particular importance level.
+ If this logger is not configured to forward messages of any importance and verbosity is not explicitly set, then (MessageImportance.High - 1) is returned.
+
+
+
+
+ Called when Engine is done with this logger
+
+
+
+
+ Handler for build events
+
+ sender (should be null)
+ event arguments
+
+
+
+ Tailored handler for BuildMessageEventArgs - fine tunes forwarding of messages.
+
+ sender (should be null)
+ event arguments
+
+
+
+ Forwards the specified event.
+
+ The to forward.
+
+
+
+ Determines whether the current verbosity setting is at least the value
+ passed in.
+
+
+
+
+ Controls the amount of text displayed by the logger
+
+
+
+
+ Console logger parameters.
+
+
+
+
+ Console logger parameters delimiters.
+
+
+
+
+ Strings that users of this logger can pass in to enable specific events or logger output.
+ Also used as keys into our dictionary.
+
+
+
+
+ A pointer to the central logger
+
+
+
+
+ Indicates if the events to forward are being set by the parameters sent to the logger
+ if this is false the events to forward are based on verbosity else verbosity settings will be ignored
+
+
+
+
+ Indicates if the events to forward should include project context events, if not
+ overridden by individual-event forwarding in .
+
+
+
+
+ Console logger should show error and warning summary at the end of build?
+
+
+
+
+ When true, accumulate performance numbers.
+
+
+
+
+ When true the commandline message is sent
+
+
+
+
+ Fine-tuning of BuildMessageEventArgs forwarding
+
+
+
+
+ Fine-tuning of BuildMessageEventArgs forwarding
+
+
+
+
+ Fine-tuning of BuildMessageEventArgs forwarding
+
+
+
+
+ Fine-tuning of BuildMessageEventArgs forwarding
+
+
+
+
+ Id of the node the logger is attached to
+
+
+
+
+ This class is used to contain information about a logger as a collection of values that
+ can be used to instantiate the logger and can be serialized to be passed between different
+ processes.
+
+
+
+
+ Creates a logger description from given data
+
+
+
+
+ Creates a logger description from given data
+
+
+
+
+ This property exposes the logger id which identifies each distributed logger uniquiely
+
+
+
+
+ This property generates the logger name by appending together the class name and assembly name
+
+
+
+
+ Returns the string of logger parameters, null if there are none
+
+
+
+
+ Return the verbosity for this logger (from command line all loggers get same verbosity)
+
+
+
+
+ Create an IForwardingLogger out of the data in this description. This method may throw a variety of
+ reflection exceptions if the data is invalid. It is the resposibility of the caller to handle these
+ exceptions if desired.
+
+
+
+
+
+ Create an ILogger out of the data in this description. This method may throw a variety of
+ reflection exceptions if the data is invalid. It is the resposibility of the caller to handle these
+ exceptions if desired.
+
+
+
+
+
+ Loads a logger from its assembly, instantiates it, and handles errors.
+
+ Instantiated logger.
+
+
+
+ Used for finding loggers when reflecting through assemblies.
+
+
+
+
+ Used for finding loggers when reflecting through assemblies.
+
+
+
+
+ Checks if the given type is a logger class.
+
+ This method is used as a Type Filter delegate.
+ true, if specified type is a logger
+
+
+
+ Checks if the given type is a logger class.
+
+ This method is used as a TypeFilter delegate.
+ true, if specified type is a logger
+
+
+
+ Converts the path to the logger assembly to a full path
+
+
+
+
+ This logger ignores all message-level output, writing errors and warnings to
+ standard error, colored red and yellow respectively.
+
+ It is currently used only when the user requests information about specific
+ properties, items, or target results. In that case, we write the desired output
+ to standard out, but we do not want it polluted with any other kinds of information.
+ Users still might want diagnostic information if something goes wrong, so still
+ output that as necessary.
+
+
+
+
+ A specialization of the ConsoleLogger that logs to a file instead of the console.
+ The output in terms of what is written and how it looks is identical. For example you can
+ log verbosely to a file using the FileLogger while simultaneously logging only high priority events
+ to the console using a ConsoleLogger.
+
+
+ It's unfortunate that this is derived from ConsoleLogger, which is itself a facade; it makes things more
+ complex -- for example, there is parameter parsing in this class, plus in BaseConsoleLogger. However we have
+ to derive FileLogger from ConsoleLogger because it shipped that way in Whidbey.
+
+
+
+
+ Default constructor.
+
+
+
+
+ Signs up the console file logger for all build events.
+ This is the backward-compatible overload.
+
+ Available events.
+
+
+
+ Creates new file for logging
+
+
+
+
+ Multiproc aware initialization
+
+
+
+
+ The handler for the write delegate of the console logger we are deriving from.
+
+ The text to write to the log
+
+
+
+ Shutdown method implementation of ILogger - we need to flush and close our logfile.
+
+
+
+
+ Parses out the logger parameters from the Parameters string.
+
+
+
+
+ Apply a parameter parsed by the file logger.
+
+
+
+
+ logFileName is the name of the log file that we will generate
+ the default value is msbuild.log
+
+
+
+
+ fileWriter is the stream that has been opened on our log file.
+
+
+
+
+ Whether the logger should append to any existing file.
+ Default is to overwrite.
+
+
+
+
+ Whether the logger should flush aggressively to disk.
+ Default is true. This preserves the most information in the case
+ of a crash, but may slow the logger down.
+
+
+
+
+ Encoding for the output. Defaults to ANSI.
+
+
+
+
+ File logger parameters delimiters.
+
+
+
+
+ File logger parameter value split character.
+
+
+
+
+ Represents the location of an implicit import.
+
+
+
+
+ The import is not implicitly added and is explicitly added in a user-specified location.
+
+
+
+
+ The import was implicitly added at the top of the project.
+
+
+
+
+ The import was implicitly added at the bottom of the project.
+
+
+
+
+ ProjectSdkElement represents the Sdk element within the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectSdkElement
+
+
+
+
+ Initialize an non-parented ProjectSdkElement
+
+
+
+
+ Gets or sets the name of the SDK.
+
+
+
+
+ Gets or sets the version of the SDK.
+
+
+
+
+ Gets or sets the minimum version of the SDK required to build the project.
+
+
+
+
+
+
+
+
+
+
+ Creates a non-parented ProjectSdkElement, wrapping an non-parented XmlElement.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ This class is used to generate an MSBuild wrapper project for a solution file.
+
+
+
+
+ Name of the property used to store the path to the solution being built.
+
+
+
+
+ The path node to add in when the output directory for a website is overridden.
+
+
+
+
+ Property set by VS when building projects. It's an XML containing the project configurations for ALL projects in the solution for the currently selected solution configuration.
+
+
+
+
+ The set of properties all projects in the solution should be built with
+
+
+
+
+ The set of properties which identify the configuration and platform to build a project with
+
+
+
+
+ The Special Target name which when is enabled, all P2P references will just execute this target.
+
+
+
+
+ A known list of target names to create. This is for backwards compatibility.
+
+
+
+
+ Version 2.0
+
+
+
+
+ Version 4.0
+
+
+
+
+ The list of global properties we set on each metaproject and which get passed to each project when building.
+
+
+
+
+ The SolutionFile containing information about the solution we're generating a wrapper for.
+
+
+
+
+ The global properties passed under which the project should be opened.
+
+
+
+
+ The ToolsVersion passed on the commandline, if any. May be null.
+
+
+
+
+ The context of this build (used for logging purposes).
+
+
+
+
+ The LoggingService used to log messages.
+
+
+
+
+ The list of targets specified to use.
+
+
+
+
+ The solution configuration selected for this build.
+
+
+
+
+ The to use.
+
+
+
+
+ The current build submission ID.
+
+
+
+
+ Create a solution metaproj with one MSBuild task with all project references.
+
+
+
+
+ Constructor.
+
+
+
+
+ This method generates an MSBuild project file from the list of projects and project dependencies
+ that have been collected from the solution file.
+
+ The parser which contains the solution file.
+ The global properties.
+ Tools Version override (may be null). This should be any tools version explicitly passed to the command-line or from an MSBuild ToolsVersion parameter.
+ The logging context for this project.
+ The logging service.
+ A collection of target names the user requested to be built.
+ An to use.
+ The current build submission ID.
+ An array of ProjectInstances. The first instance is the traversal project, the remaining are the metaprojects for each project referenced in the solution.
+
+
+
+ Adds a new property group with contents of the given solution configuration to the project
+ Internal for unit-testing.
+
+
+
+
+ Add a new error/warning/message tag into the given target
+
+
+
+
+ Normally the active solution configuration/platform is determined when we build the solution
+ wrapper project, not when we create it. However, we need to know them to scan project references
+ for the right project configuration/platform. It's unlikely that references would be conditional,
+ but still possible and we want to get that case right.
+
+
+
+
+ Returns the name of the metaproject for an actual project.
+
+ The full path to the actual project
+ The metaproject path name
+
+
+
+ Figure out what tools version to build the solution wrapper project with. If a /tv
+ switch was passed in, use that; otherwise fall back to the default (12.0).
+
+
+
+
+ Add a call to the ResolveAssemblyReference task to crack the pre-resolved referenced
+ assemblies for the complete list of dependencies, PDBs, satellites, etc. The invoke
+ the Copy task to copy all these files (or at least the ones that RAR determined should
+ be copied local) into the web project's bin directory.
+
+
+
+
+ This code handles the *.REFRESH files that are in the "bin" subdirectory of
+ a web project. These .REFRESH files are just text files that contain absolute or
+ relative paths to the referenced assemblies. The goal of these tasks is to
+ search all *.REFRESH files and extract fully-qualified absolute paths for
+ each of the references.
+
+
+
+
+ Adds an MSBuild task to the specified target
+
+
+
+
+ Takes a project in the solution and a base property name, and creates a new property name
+ that can safely be used as an XML element name, and is also unique to that project (by
+ embedding the project's GUID into the property name.
+
+
+
+
+ Makes a legal item name from a given string by replacing invalid characters with '_'
+
+
+
+
+ Add a new error/warning/message tag into the given target
+
+
+
+
+ A helper method for constructing conditions for a solution configuration
+
+
+ Sample configuration condition:
+ '$(Configuration)' == 'Release' and '$(Platform)' == 'Any CPU'
+
+
+
+
+ Figure out what solution configuration we are going to build, whether or not it actually exists in the solution
+ file.
+
+
+
+
+ Returns true if the specified project will build in the currently selected solution configuration.
+
+
+
+
+ Private method: generates an MSBuild wrapper project for the solution passed in; the MSBuild wrapper
+ project to be generated is the private variable "msbuildProject" and the SolutionFile containing information
+ about the solution is the private variable "solutionFile"
+
+
+
+
+ Given a parsed solution, generate a top level traversal project and the metaprojects representing the dependencies for each real project
+ referenced in the solution.
+
+
+
+
+ Examine each project in the solution, add references and targets for it, and create metaprojects if necessary.
+
+
+
+
+ Adds the standard targets to the traversal project.
+
+
+
+
+ Creates the traversal project instance. This has all of the properties against which we can perform evaluations for the remainder of the process.
+
+
+
+
+ This method adds a new ProjectReference item to the specified instance. The reference will either be to its metaproject (if the project
+ is a web project or has reference of its own) or to the project itself (if it has no references and is a normal MSBuildable project.)
+
+
+
+
+ The value to be passed to the ToolsVersion attribute of the MSBuild task used to directly build a project.
+
+
+
+
+ The value to be passed to the ToolsVersion attribute of the MSBuild task used to directly build a project.
+
+
+
+
+ The value to be assigned to the metadata for a particular project reference. Contains only configuration and platform specified in the project configuration, evaluated.
+
+
+
+
+ Gets the project configuration and platform values as an attribute string for an MSBuild task used to build the project.
+
+
+
+
+ The value to be passed to the Properties attribute of the MSBuild task to build a specific project. Contains reference to project configuration and
+ platform as well as the solution configuration bits.
+
+
+
+
+ Returns true if the specified project can be built directly, without using a metaproject.
+
+
+
+
+ Produces a set of targets which allows the MSBuild scheduler to schedule projects in the order automatically by
+ following their dependencies without enforcing build levels.
+
+
+ We want MSBuild to be able to parallelize the builds of these projects where possible and still honor references.
+ Since the project files referenced by the solution do not (necessarily) themselves contain actual project references
+ to the projects they depend on, we need to synthesize this relationship ourselves. This is done by creating a target
+ which first invokes the project's dependencies, then invokes the actual project itself. However, invoking the
+ dependencies must also invoke their dependencies and so on down the line.
+
+ Additionally, we do not wish to create a separate MSBuild project to contain this target yet we want to parallelize
+ calls to these targets. The way to do this is to pass in different global properties to the same project in the same
+ MSBuild call. MSBuild easily allows this using the AdditionalProperties metadata which can be specified on an Item.
+
+ Assuming the solution project we are generating is called "foo.proj", we can accomplish this parallelism as follows:
+
+
+
+
+
+
+ We now have expressed the top level reference to all projects as @(SolutionReference) and each project's
+ set of references as @(PROJECTNAMEReference). We construct our target as:
+
+
+
+
+
+
+ The first MSBuild call re-invokes the solution project instructing it to build the reference projects for the
+ current project. The second MSBuild call invokes the actual project itself. Because all reference projects have
+ the same additional properties, MSBuild will only build the first one it comes across and the rest will be
+ satisfied from the cache.
+
+
+
+
+ Returns the metaproject name for a given project.
+
+
+
+
+ Adds a set of items which describe the references for this project.
+
+
+
+
+ Adds the targets which build the dependencies and actual project for a metaproject.
+
+
+
+
+ Adds an MSBuild task to a real project.
+
+
+
+
+ Adds an MSBuild task to a single metaproject. This is used in the traversal project.
+
+
+
+
+ Add a target for a Venus project into the XML doc that's being generated. This
+ target will call the AspNetCompiler task.
+
+
+
+
+ Helper method to add a call to the AspNetCompiler task into the given target.
+
+
+
+
+ Adds MSBuild tasks to a project target to pre-resolve its project references
+
+
+
+
+ Add a PropertyGroup to the project for a particular Asp.Net configuration. This PropertyGroup
+ will have the correct values for all the Asp.Net properties for this project and this configuration.
+
+
+
+
+ When adding a target to build a web project, we want to put a Condition on the Target node that
+ effectively says "Only build this target if the web project is active (marked for building) in the
+ current solution configuration.
+
+
+
+
+ Add a target to the project called "GetFrameworkPathAndRedistList". This target calls the
+ GetFrameworkPath task and then CreateItem to populate @(_CombinedTargetFrameworkDirectoriesItem) and
+ @(InstalledAssemblyTables), so that we can pass these into the ResolveAssemblyReference task
+ when building web projects.
+
+
+
+
+ Adds a target for a project whose type is unknown and we cannot build. We will emit an error or warning as appropriate.
+
+
+
+
+ Adds a target which verifies that all of the project references and configurations are valid.
+
+
+
+
+ Creates the target used to build all of the references in the traversal project.
+
+
+
+
+ Adds a task which builds the @(ProjectReference) items.
+
+
+
+
+ Adds a traversal target which invokes a specified target on a single project. This creates targets called "Project", "Project:Rebuild", "Project:Clean", "Project:Publish" etc.
+
+
+
+
+ Retrieves a dictionary representing the global properties which should be transferred to a metaproject.
+
+ The traversal from which the global properties should be obtained.
+ A dictionary of global properties.
+
+
+
+ Figures out what the ToolsVersion should be for child projects (used when scanning
+ for dependencies)
+
+
+
+
+ Normally the active solution configuration/platform is determined when we build the solution
+ wrapper project, not when we create it. However, we need to know them to scan project references
+ for the right project configuration/platform. It's unlikely that references would be conditional,
+ but still possible and we want to get that case right.
+
+
+
+
+ Loads each MSBuild project in this solution and looks for its project-to-project references so that
+ we know what build order we should use when building the solution.
+
+
+
+
+ Adds a dependency to the project based on the specified guid string.
+
+
+ If the string is null or empty, no dependency is added and this is not considered an error.
+
+
+
+
+ Creates default Configuration and Platform values based on solution configurations present in the solution
+
+
+
+
+ Adds a new property group with contents of the given solution configuration to the project.
+
+
+
+
+ Creates the default Venus configuration property based on the selected solution configuration.
+ Unfortunately, Venus projects only expose one project configuration in the IDE (Debug) although
+ they allow building Debug and Release from command line. This means that if we wanted to use
+ the project configuration from the active solution configuration for Venus projects, we'd always
+ end up with Debug and there'd be no way to build the Release configuration. To work around this,
+ we use a special mechanism for choosing ASP.NET project configuration: we set it to Release if
+ we're building a Release solution configuration, and to Debug if we're building a Debug solution
+ configuration. The property is also settable from the command line, in which case it takes
+ precedence over this algorithm.
+
+
+
+
+ Adds solution related build event macros and other global properties to the wrapper project
+
+
+
+
+ Special hack for web projects. It can happen that there is no Release configuration for solutions
+ containing web projects, yet we still want to be able to build the Release configuration for
+ those projects. Since the ASP.NET project configuration defaults to the solution configuration,
+ we allow Release even if it doesn't actually exist in the solution.
+
+
+
+
+ Adds the initial target to the solution wrapper project, necessary for a few message/error tags
+
+
+
+
+ Adds the target which validates that the solution configuration specified by the user is supported.
+
+
+
+
+ Adds the target which validates that the tools version is supported.
+
+
+
+ Adds the target to fetch solution configuration contents for given configuration|platform combo.
+
+
+
+ Abstract base class for MSBuild construction object model elements.
+
+
+
+
+ Parent container object.
+
+
+
+
+ Condition value cached for performance
+
+
+
+
+ Constructor called by ProjectRootElement only.
+ XmlElement is set directly after construction.
+
+
+ Should be protected+internal.
+
+
+
+
+ External projects support
+
+
+
+
+ Constructor called by derived classes, except from ProjectRootElement.
+ Parameters may not be null, except parent.
+
+
+
+
+ Allows data (for example, item metadata) to be represented as an attribute on the parent element instead of as a child element.
+
+
+ If this is true, then the will still be used to hold the data for this (pseudo) ProjectElement, but
+ it will not be added to the Xml tree.
+
+
+
+
+ Gets or sets the Condition value.
+ It will return empty string IFF a condition attribute is legal but it’s not present or has no value.
+ It will return null IFF a Condition attribute is illegal on that element.
+ Removes the attribute if the value to set is empty.
+ It is possible for derived classes to throw an if setting the condition is
+ not applicable for those elements.
+
+ For the "ProjectExtensions" element, the getter returns null and the setter
+ throws an exception for any value.
+
+
+
+ Gets or sets the Label value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Null if this is a ProjectRootElement.
+ Null if this has not been attached to a parent yet.
+
+
+ Parent should only be set by ProjectElementContainer.
+
+
+
+
+
+
+
+ All parent elements of this element, going up to the ProjectRootElement.
+ None if this itself is a ProjectRootElement.
+ None if this itself has not been attached to a parent yet.
+
+
+
+
+ Previous sibling element.
+ May be null.
+
+
+ Setter should ideally be "protected AND internal"
+
+
+
+
+ Next sibling element.
+ May be null.
+
+
+ Setter should ideally be "protected AND internal"
+
+
+
+
+ ProjectRootElement (possibly imported) that contains this Xml.
+ Cannot be null.
+
+
+ Setter ideally would be "protected and internal"
+ There are some tricks here in order to save the space of a field: there are a lot of these objects.
+
+
+
+
+ Location of the "Condition" attribute on this element, if any.
+ If there is no such attribute, returns null.
+
+
+
+
+ Location of the "Label" attribute on this element, if any.
+ If there is no such attribute, returns null;
+
+
+
+
+ Location of the corresponding Xml element.
+ May not be correct if file is not saved, or
+ file has been edited since it was last saved.
+ In the case of an unsaved edit, the location only
+ contains the path to the file that the element originates from.
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the XmlElement associated with this project element.
+ The setter is used when adding new elements.
+ Never null except during load or creation.
+
+
+ This should be protected, but "protected internal" means "OR" not "AND",
+ so this is not possible.
+
+
+
+
+ Gets the XmlDocument associated with this project element.
+
+
+ Never null except during load or creation.
+ This should be protected, but "protected internal" means "OR" not "AND",
+ so this is not possible.
+
+
+
+
+ Returns a shallow clone of this project element.
+
+ The cloned element.
+
+
+
+ Applies properties from the specified type to this instance.
+
+ The element to act as a template to copy from.
+
+
+
+ Hook for subclasses to specify whether the given should be cloned or not
+
+
+
+
+ Called only by the parser to tell the ProjectRootElement its backing XmlElement and its own parent project (itself)
+ This can't be done during construction, as it hasn't loaded the document at that point and it doesn't have a 'this' pointer either.
+
+
+
+
+ Called by ProjectElementContainer to clear the parent when
+ removing an element from its parent.
+
+
+
+
+ Called by a DERIVED CLASS to indicate its XmlElement has changed.
+ This normally shouldn't happen, so it's broken out into an explicit method.
+ An example of when it has to happen is when an item's type is changed.
+ We trust the caller to have fixed up the XmlDocument properly.
+ We ASSUME that attributes were copied verbatim. If this is not the case,
+ any cached attribute values would have to be cleared.
+ If the new element is actually the existing element, does nothing, and does
+ not mark the project dirty.
+
+
+ This should be protected, but "protected internal" means "OR" not "AND",
+ so this is not possible.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+ Marks this element as dirty.
+ The default implementation simply marks the parent as dirty.
+ If there is no parent, because the element has not been parented, do nothing. The parent
+ will be dirtied when the element is added.
+ Accepts a reason for debugging purposes only, and optional reason parameter.
+
+
+ Should ideally be protected+internal.
+
+
+
+
+ Called after a new parent is set. Parent may be null.
+ By default does nothing.
+
+
+
+
+ Returns a shallow clone of this project element.
+
+ The factory to use for creating the new instance.
+ The cloned element.
+
+
+
+ Returns a new instance of this same type.
+ Any properties that cannot be set after creation should be set to copies of values
+ as set for this instance.
+
+ The factory to use for creating the new instance.
+
+
+
+ Special derived variation of ProjectElementContainer used to wrap a ProjectRootElement.
+ This is part of a trick used in ProjectElement to avoid using a separate field for the containing PRE.
+
+
+
+
+ Constructor
+
+
+
+
+ Wrapped ProjectRootElement
+
+
+
+
+ Dummy required implementation
+
+
+
+
+
+
+
+ A container for project elements
+
+
+
+
+ External projects support
+
+
+
+
+ Constructor called by ProjectRootElement only.
+ XmlElement is set directly after construction.
+
+
+ Should ideally be protected+internal.
+
+
+
+
+ Constructor called by derived classes, except from ProjectRootElement.
+ Parameters may not be null, except parent.
+
+
+ Should ideally be protected+internal.
+
+
+
+
+ Get an enumerator over all descendants in a depth-first manner.
+
+
+
+
+ Get enumerable over all the children
+
+
+
+
+ Use this instead of to avoid boxing.
+
+
+
+
+ Get enumerable over all the children, starting from the last
+
+
+
+
+ Number of children of any kind
+
+
+
+
+ First child, if any, otherwise null.
+ Cannot be set directly; use PrependChild().
+
+
+
+
+ Last child, if any, otherwise null.
+ Cannot be set directly; use AppendChild().
+
+
+
+
+ Insert the child after the reference child.
+ Reference child if provided must be parented by this element.
+ Reference child may be null, in which case this is equivalent to PrependChild(child).
+ Throws if the parent is not itself parented.
+ Throws if the reference node does not have this node as its parent.
+ Throws if the node to add is already parented.
+ Throws if the node to add was created from a different project than this node.
+
+
+ Semantics are those of XmlNode.InsertAfterChild.
+
+
+
+
+ Insert the child before the reference child.
+ Reference child if provided must be parented by this element.
+ Reference child may be null, in which case this is equivalent to AppendChild(child).
+ Throws if the parent is not itself parented.
+ Throws if the reference node does not have this node as its parent.
+ Throws if the node to add is already parented.
+ Throws if the node to add was created from a different project than this node.
+
+
+ Semantics are those of XmlNode.InsertBeforeChild.
+
+
+
+
+ Inserts the provided element as the last child.
+ Throws if the parent is not itself parented.
+ Throws if the node to add is already parented.
+ Throws if the node to add was created from a different project than this node.
+
+
+
+
+ Inserts the provided element as the first child.
+ Throws if the parent is not itself parented.
+ Throws if the node to add is already parented.
+ Throws if the node to add was created from a different project than this node.
+
+
+
+
+ Removes the specified child.
+ Throws if the child is not currently parented by this object.
+ This is O(1).
+ May be safely called during enumeration of the children.
+
+
+ This is actually safe to call during enumeration of children, because it
+ doesn't bother to clear the child's NextSibling (or PreviousSibling) pointers.
+ To determine whether a child is unattached, check whether its parent is null,
+ or whether its NextSibling and PreviousSibling point back at it.
+ DO NOT BREAK THIS VERY USEFUL SAFETY CONTRACT.
+
+
+
+
+ Remove all the children, if any.
+
+
+ It is safe to modify the children in this way
+ during enumeration. See .
+
+
+
+
+ Applies properties from the specified type to this instance.
+
+ The element to act as a template to copy from.
+
+
+
+ Appends the provided child.
+ Does not dirty the project, does not add an element, does not set the child's parent,
+ and does not check the parent's future siblings and parent are acceptable.
+ Called during project load, when the child can be expected to
+ already have a parent and its element is already connected to the
+ parent's element.
+ All that remains is to set FirstChild/LastChild and fix up the linked list.
+
+
+
+
+ Returns a clone of this project element and all its children.
+
+ The factory to use for creating the new instance.
+ The parent to append the cloned element to as a child.
+ The cloned element.
+
+
+
+ If child "element" is actually represented as an attribute, update the value in the corresponding Xml attribute
+
+ A child element which might be represented as an attribute
+
+
+
+ Adds a ProjectElement to the Xml tree
+
+ A child to add to the Xml tree, which has already been added to the ProjectElement tree
+
+ The MSBuild construction APIs keep a tree of ProjectElements and a parallel Xml tree which consists of
+ objects from System.Xml. This is a helper method which adds an XmlElement or Xml attribute to the Xml
+ tree after the corresponding ProjectElement has been added to the construction API tree, and fixes up
+ whitespace as necessary.
+
+
+
+
+ Sets the first child in this container
+
+
+
+
+ Common verification for insertion of an element.
+ Reference may be null.
+
+
+
+
+ Verifies that the provided element isn't this element or a parent of it.
+ If it is, throws InvalidOperationException.
+
+
+
+
+ Recurses into the provided container (such as a choose) and finds all child elements, even if nested.
+ Result does NOT include the element passed in.
+ The caller could filter these.
+
+
+
+
+ Enumerable over a series of sibling ProjectElement objects
+
+
+
+
+ The enumerator
+
+
+
+
+ Constructor allowing reverse enumeration
+
+
+
+
+ Get enumerator
+
+
+
+
+ Get non generic enumerator
+
+
+
+
+ Enumerator over a series of sibling ProjectElement objects
+
+
+
+
+ First element
+
+
+
+
+ Whether enumeration should go forwards or backwards.
+ If backwards, the "initial" will be the first returned, then each previous
+ node in turn.
+
+
+
+
+ Constructor taking the first element
+
+
+
+
+ Current element
+ Returns null if MoveNext() hasn't been called
+
+
+
+
+ Current element.
+ Throws if MoveNext() hasn't been called
+
+
+
+
+ Dispose. Do nothing.
+
+
+
+
+ Moves to the next item if any, otherwise returns false
+
+
+
+
+ Return to start
+
+
+
+
+ Initializes a ProjectImportElement instance.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectImportElement
+
+
+
+
+ Initialize an unparented ProjectImportElement
+
+
+
+
+ Gets or sets the Project value.
+
+
+
+
+ Location of the project attribute
+
+
+
+
+ Gets or sets the SDK that contains the import.
+
+
+
+
+ Gets or sets the version associated with this SDK import
+
+
+
+
+ Gets or sets the minimum SDK version required by this import.
+
+
+
+
+ Location of the Sdk attribute
+
+
+
+
+ Gets the of the import. This indicates if the import was implicitly
+ added because of the attribute and the location where the project was
+ imported.
+
+
+
+
+ If the import is an implicit one ( != None) then this element points
+ to the original element which generated this implicit import.
+
+
+
+
+ if applicable to this import element.
+
+
+
+
+ Creates an unparented ProjectImportElement, wrapping an unparented XmlElement.
+ Validates the project value.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Creates an implicit ProjectImportElement as if it was in the project.
+
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ Helper method to update the property if necessary (update only when changed).
+
+ True if the property was updated, otherwise false (no update necessary).
+
+
+
+ ProjectImportGroupElement represents the ImportGroup element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectImportGroupElement
+
+
+
+
+ Initialize an unparented ProjectImportGroupElement
+
+
+
+
+ Get any contained properties.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds a new import after the last import in this import group.
+
+
+
+
+ Creates an unparented ProjectImportGroupElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectItemDefinitionGroupElement represents the ItemGroup element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectItemDefinitionGroupElement
+
+
+
+
+ Initialize an unparented ProjectItemDefinitionGroupElement
+
+
+
+
+ Get a list of child item definitions.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds a new item definition after the last child.
+
+
+
+
+ Creates an unparented ProjectItemDefinitionGroupElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectItemDefinitionElement class represents the Item Definition element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a ProjectItemDefinitionElement instance from a node read from a project file
+
+
+
+
+ Initialize a ProjectItemDefinitionElement instance from a node read from a project file
+
+
+
+
+ Gets the definition's type.
+
+
+
+
+ Get any child metadata definitions.
+
+
+
+
+ Convenience method to add a piece of metadata to this item definition.
+ Adds after any existing metadata. Does not modify any existing metadata.
+
+
+
+
+ Convenience method to add a piece of metadata to this item definition.
+ Adds after any existing metadata. Does not modify any existing metadata.
+
+ The name of the metadata to add
+ The value of the metadata to add
+ If true, then the metadata will be expressed as an attribute instead of a child element, for example
+ <Content CopyToOutputDirectory="PreserveNewest" />
+
+
+
+
+ Creates an unparented ProjectItemDefinitionElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ Do not clone attributes which can be metadata. The corresponding expressed as attribute project elements are responsible for adding their attribute
+
+
+
+
+ ProjectItemGroupElement represents the ItemGroup element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ True if it is known that no child items have wildcards in their
+ include. An optimization helping Project.AddItem.
+ Only reliable if it is true.
+
+
+
+
+ Initialize a parented ProjectItemGroupElement
+
+
+
+
+ Initialize an unparented ProjectItemGroupElement
+
+
+
+
+ Get any child items.
+ This is a live collection.
+
+
+
+
+ True if it is known that no child items have wildcards in their
+ include. An optimization helping Project.AddItem.
+ Only reliable if it is true.
+ ONLY TO BE CALLED by ProjectItemElement.
+ Should be protected+internal.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds a new item ordered by include.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds a new item ordered by include.
+ Metadata may be null, indicating no metadata.
+
+
+
+
+
+
+
+ Creates an unparented ProjectItemGroupElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to the XmlDocument in the appropriate location.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectItemElement class represents the Item element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Include value cached for performance
+
+
+
+
+ Exclude value cached for performance
+
+
+
+
+ Remove value cached for performance
+
+
+
+
+ MatchOnMetadata value cached for performance
+
+
+
+
+ Update value cached for performance
+
+
+
+
+ Whether the include value has wildcards,
+ cached for performance.
+
+
+
+
+ Initialize a parented ProjectItemElement instance
+
+
+
+
+ Initialize an unparented ProjectItemElement instance
+
+
+
+
+ Gets the item's type.
+
+
+
+
+ Gets or sets the Include value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty or null.
+
+
+
+
+ Gets or sets the Exclude value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty or null.
+
+
+
+
+ Gets or sets the Remove value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty or null.
+
+
+
+
+ Gets or sets the Update value.
+
+
+
+
+ Gets or sets the MatchOnMetadata value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty or null.
+
+
+
+
+ Gets or sets the MatchOnMetadataOptions value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty or null.
+
+
+
+
+ Gets or sets the KeepMetadata value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty or null.
+
+
+
+
+ Gets or sets the RemoveMetadata value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty or null.
+
+
+
+
+ Gets or sets the KeepDuplicates value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty or null.
+
+
+
+
+ Whether there are any child metadata elements
+
+
+
+
+ Get any child metadata.
+
+
+
+
+ Location of the include attribute
+
+
+
+
+ Location of the exclude attribute
+
+
+
+
+ Location of the remove attribute
+
+
+
+
+ Location of the update attribute
+
+
+
+
+ Location of the MatchOnMetadata attribute
+
+
+
+
+ Location of the MatchOnMetadataOptions attribute
+
+
+
+
+ Location of the keepMetadata attribute
+
+
+
+
+ Location of the removeMetadata attribute
+
+
+
+
+ Location of the keepDuplicates attribute
+
+
+
+
+ Whether the include value has wildcards,
+ cached for performance.
+
+
+
+
+ Internal helper to get the next ProjectItemElement sibling.
+ If there is none, returns null.
+
+
+
+
+ Convenience method to add a piece of metadata to this item.
+ Adds after any existing metadata. Does not modify any existing metadata.
+
+
+
+
+ Convenience method to add a piece of metadata to this item.
+ Adds after any existing metadata. Does not modify any existing metadata.
+
+ The name of the metadata to add
+ The value of the metadata to add
+ If true, then the metadata will be expressed as an attribute instead of a child element, for example
+ <Reference Include="Libary.dll" HintPath="..\lib\Library.dll" Private="True" />
+
+
+
+
+
+
+
+ Creates an unparented ProjectItemElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent.
+
+
+
+
+ Changes the item type.
+
+
+ The implementation has to actually replace the element to do this.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+ Overridden to update the parent's children-have-no-wildcards flag.
+
+
+
+
+
+
+
+ Do not clone attributes which can be metadata. The corresponding expressed as attribute project elements are responsible for adding their attribute
+
+
+
+
+ ProjectMetadataElement class represents a Metadata element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectMetadataElement
+
+
+
+
+ Initialize an unparented ProjectMetadataElement
+
+
+
+
+ Gets or sets the metadata's type.
+
+
+
+
+ Gets or sets whether this piece of metadata is expressed as an attribute.
+
+
+ If true, then the metadata will be expressed as an attribute instead of a child element, for example
+ <Reference Include="Libary.dll" HintPath="..\lib\Library.dll" Private="True" />
+
+
+
+
+ Gets or sets the unevaluated value.
+ Returns empty string if it is not present.
+
+
+
+
+ Creates an unparented ProjectMetadataElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent.
+
+
+
+
+ Changes the name.
+
+
+ The implementation has to actually replace the element to do this.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectUsingTaskElement represents the Import element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectOnErrorElement
+
+
+
+
+ Initialize an unparented ProjectOnErrorElement
+
+
+
+
+ Gets and sets the value of the ExecuteTargets attribute.
+
+
+ 'Attribute' suffix is for clarity.
+
+
+
+
+ Location of the "ExecuteTargets" attribute on this element, if any.
+ If there is no such attribute, returns null;
+
+
+
+
+ Creates an unparented ProjectOnErrorElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectOtherwiseElement represents the Otherwise element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectOtherwiseElement
+
+
+
+
+ Initialize an unparented ProjectOtherwiseElement
+
+
+
+
+ Condition should never be set, but the getter returns null instead of throwing
+ because a nonexistent condition is implicitly true
+
+
+
+
+ Get an enumerator over any child item groups
+
+
+
+
+ Get an enumerator over any child property groups
+
+
+
+
+ Get an enumerator over any child chooses
+
+
+
+
+ This does not allow conditions, so it should not be called.
+
+
+
+
+ Creates an unparented ProjectOtherwiseElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectOutputElement represents the Output element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectOutputElement
+
+
+
+
+ Initialize an unparented ProjectOutputElement
+
+
+
+
+ Gets or sets the TaskParameter value.
+ Returns empty string if it is not present.
+
+
+
+
+ Whether this represents an output item (as opposed to an output property)
+
+
+
+
+ Whether this represents an output property (as opposed to an output item)
+
+
+
+
+ Gets or sets the ItemType value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+ Unfortunately the attribute name chosen in Whidbey was "ItemName" not ItemType.
+
+
+
+
+ Gets or sets the PropertyName value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Location of the task parameter attribute
+
+
+
+
+ Location of the property name attribute, if any
+
+
+
+
+ Location of the item type attribute, if any
+
+
+
+
+ Creates an unparented ProjectOutputElement, wrapping an unparented XmlElement.
+ Validates the parameters.
+ Exactly one of item name and property name must have a value.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectExtensionsElement represents the ProjectExtensions element in the MSBuild project.
+ ProjectExtensions can contain arbitrary XML content.
+ The ProjectExtensions element is deprecated and provided only for backward compatibility.
+ Use a property instead. Properties can also contain XML content.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectExtensionsElement instance
+
+
+
+
+ Initialize an unparented ProjectExtensionsElement instance
+
+
+
+
+ Condition should never be set, but the getter returns null instead of throwing
+ because a nonexistent condition is implicitly true
+
+
+
+
+ Gets and sets the raw XML content
+
+
+
+
+ This does not allow conditions, so it should not be called.
+
+
+
+
+ Get or set the content of the first sub-element
+ with the provided name.
+
+
+
+
+
+
+
+ Creates a ProjectExtensionsElement parented by a project
+
+
+
+
+ Creates an unparented ProjectExtensionsElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectPropertyGroupElement represents the PropertyGroup element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectPropertyGroupElement
+
+
+
+
+ Initialize an unparented ProjectPropertyGroupElement
+
+
+
+
+ Get any contained properties.
+
+
+
+
+ Get any contained properties.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds a new property after the last property in this property group.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ If there is an existing property with the same name and no condition,
+ updates its value. Otherwise it adds a new property after the last property.
+
+
+
+
+ Creates an unparented ProjectPropertyGroupElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectPropertyElement class represents the Property element in the MSBuild project.
+
+
+ We do not need to use or set the PropertyType enumeration in the CM.
+ The CM does not know about Environment or Global properties, and does not create Output properties.
+ We can just verify that we haven't read a PropertyType.Reserved property ourselves.
+ So the CM only represents Normal properties.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectPropertyElement
+
+
+
+
+ Initialize an unparented ProjectPropertyElement
+
+
+
+
+ Gets or sets the property name.
+
+
+
+
+ Gets or sets the unevaluated value.
+ Returns empty string if it is not present.
+
+
+
+
+ Creates an unparented ProjectPropertyElement, wrapping an unparented XmlElement.
+ Validates name.
+ Caller should then ensure the element is added to the XmlDocument in the appropriate location.
+
+
+
+
+ Changes the name.
+
+
+ The implementation has to actually replace the element to do this.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectTargetElement represents the Target element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Target name cached for performance
+
+
+
+
+ Initialize a parented ProjectTargetElement
+
+
+
+
+ Initialize an unparented ProjectTargetElement
+
+
+
+
+ Get an enumerator over any child item groups
+
+
+
+
+ Get an enumerator over any child property groups
+
+
+
+
+ Get an enumerator over any child tasks
+
+
+
+
+ Get an enumerator over any child onerrors
+
+
+
+
+ Gets and sets the name of the target element.
+
+
+
+
+ Gets or sets the Inputs value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Gets or sets the Outputs value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Gets or sets the TrimDuplicateOutputs value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Gets or sets the DependsOnTargets value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Gets or sets the BeforeTargets value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Gets or sets the AfterTargets value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Gets or sets the Returns value.
+ Returns null if the attribute is not present -- empty string is an allowable
+ value for both getting and setting.
+ Removes the attribute only if the value is set to null.
+
+
+
+
+ Location of the Name attribute
+
+
+
+
+ Location of the Inputs attribute
+
+
+
+
+ Location of the Outputs attribute
+
+
+
+
+ Location of the TrimDuplicateOutputs attribute
+
+
+
+
+ Location of the DependsOnTargets attribute
+
+
+
+
+ Location of the BeforeTargets attribute
+
+
+
+
+ Location of the Returns attribute
+
+
+
+
+ Location of the AfterTargets attribute
+
+
+
+
+ A cache of the last instance which was created from this target.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds an item group after the last child.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds a property group after the last child.
+
+
+
+
+ Convenience method to add a task to this target.
+ Adds after any existing task.
+
+
+
+
+
+
+
+ Creates an unparented ProjectTargetElement, wrapping an unparented XmlElement.
+ Validates the name.
+ Caller should then ensure the element is added to a parent.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+ Marks this element as dirty.
+
+
+
+
+
+
+
+ ProjectTaskElement represents the Task element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ The parameters (excepting condition and continue-on-error)
+
+
+
+
+ Protection for the parameters cache
+
+
+
+
+ Initialize a parented ProjectTaskElement
+
+
+
+
+ Initialize an unparented ProjectTaskElement
+
+
+
+
+ Gets or sets the continue on error value.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Gets or sets the runtime value for the task.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Gets or sets the architecture value for the task.
+ Returns empty string if it is not present.
+ Removes the attribute if the value to set is empty.
+
+
+
+
+ Gets the task name
+
+
+
+
+ Gets any output children.
+
+
+
+
+ Enumerable over the unevaluated parameters on the task.
+ Attributes with their own properties, such as ContinueOnError, are not included in this collection.
+ If parameters differ only by case only the last one will be returned. MSBuild uses only this one.
+ Hosts can still remove the other parameters by using RemoveAllParameters().
+
+
+
+
+ Enumerable over the locations of parameters on the task.
+ Condition and ContinueOnError, which have their own properties, are not included in this collection.
+ If parameters differ only by case only the last one will be returned. MSBuild uses only this one.
+ Hosts can still remove the other parameters by using RemoveAllParameters().
+
+
+
+
+ Location of the "ContinueOnError" attribute on this element, if any.
+ If there is no such attribute, returns null;
+
+
+
+
+ Location of the "MSBuildRuntime" attribute on this element, if any.
+ If there is no such attribute, returns null;
+
+
+
+
+ Location of the "MSBuildArchitecture" attribute on this element, if any.
+ If there is no such attribute, returns null;
+
+
+
+
+ Retrieves a copy of the parameters as used during evaluation.
+
+
+
+
+ Convenience method to add an Output Item to this task.
+ Adds after the last child.
+
+
+
+
+ Convenience method to add a conditioned Output Item to this task.
+ Adds after the last child.
+
+
+
+
+ Convenience method to add an Output Property to this task.
+ Adds after the last child.
+
+
+
+
+ Convenience method to add a conditioned Output Property to this task.
+ Adds after the last child.
+
+
+
+
+ Gets the value of the parameter with the specified name,
+ or empty string if it is not present.
+
+
+
+
+ Adds (or modifies the value of) a parameter on this task
+
+
+
+
+ Removes any parameter on this task with the specified name.
+ If there is no such parameter, does nothing.
+
+
+
+
+ Removes all parameters from the task.
+ Does not remove any "special" parameters: ContinueOnError, Condition, etc.
+
+
+
+
+
+
+
+ Creates an unparented ProjectTaskElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to the XmlDocument in the appropriate location.
+
+
+ Any legal XML element name is allowed. We can't easily verify if the name is a legal XML element name,
+ so this will specifically throw XmlException if it isn't.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ Initialize parameters cache.
+ Must be called within the lock.
+
+
+
+
+ ProjectUsingTaskElement represents the Import element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectUsingTaskElement
+
+
+
+
+ Initialize an unparented ProjectUsingTaskElement
+
+
+
+
+ Gets the value of the AssemblyFile attribute.
+ Returns empty string if it is not present.
+
+
+
+
+ Gets and sets the value of the AssemblyName attribute.
+ Returns empty string if it is not present.
+
+
+
+
+ Gets and sets the value of the TaskName attribute.
+
+
+
+
+ Gets and sets the value of the TaskFactory attribute.
+
+
+
+
+ Gets and sets the value of the Runtime attribute.
+
+
+
+
+ Gets and sets the value of the Architecture attribute.
+
+
+
+
+ Gets and sets the value of the Architecture attribute.
+
+
+
+
+ Get any contained TaskElement.
+
+
+
+
+ Get any contained ParameterGroup.
+
+
+
+
+ Location of the task name attribute
+
+
+
+
+ Location of the assembly file attribute, if any
+
+
+
+
+ Location of the assembly name attribute, if any
+
+
+
+
+ Location of the Runtime attribute, if any
+
+
+
+
+ Location of the Architecture attribute, if any
+
+
+
+
+ Location of the TaskFactory attribute, if any
+
+
+
+
+ Location of the Override attribute, if any
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds a new ParameterGroup to the using task to the end of the using task element
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds a new TaskBody to the using task to the end of the using task element
+
+
+
+
+ Creates an unparented ProjectUsingTaskElement, wrapping an unparented XmlElement.
+ Validates the parameters.
+ Exactly one of assembly file and assembly name must have a value.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ Event handler for the event fired after this project file is named or renamed.
+ If the project file has not previously had a name, oldFullPath is null.
+
+
+
+
+ ProjectRootElement class represents an MSBuild project, an MSBuild targets file or any other file that conforms to MSBuild
+ project file schema.
+ This class and its related classes allow a complete MSBuild project or targets file to be read and written.
+ Comments and whitespace cannot be edited through this model at present.
+
+ Each project root element is associated with exactly one ProjectCollection. This allows the owner of that project collection
+ to control its lifetime and not be surprised by edits via another project collection.
+
+
+
+
+ The singleton delegate that loads projects into the ProjectRootElement
+
+
+
+
+ Used to determine if a file is an empty XML file if it ONLY contains an XML declaration like <?xml version="1.0" encoding="utf-8"?>.
+
+
+
+
+ The default encoding to use / assume for a new project.
+
+
+
+
+ A global counter used to ensure each project version is distinct from every other.
+
+
+ This number is static so that it is unique across the appdomain. That is so that a host
+ can know when a ProjectRootElement has been unloaded (perhaps after modification) and
+ reloaded -- the version won't reset to '0'.
+
+
+
+
+ Version number of this object that was last saved to disk, or last loaded from disk.
+ Used to figure whether this object is dirty for saving.
+ Saving to or loading from a provided stream reader does not modify this value, only saving to or loading from disk.
+ The actual value is meaningless (since the counter is shared with all projects) --
+ it should only be compared to a stored value.
+ Immediately after loading from disk, this has the same value as version.
+
+
+
+
+ The encoding of the project that was (if applicable) loaded off disk, and that will be used to save the project.
+
+ Defaults to UTF8 for new projects.
+
+
+
+ XML namespace specified and used by this project file. If a namespace was not specified in the project file, this
+ value will be string.Empty.
+
+
+
+
+ The project file's location. It can be null if the project is not directly loaded from a file.
+
+
+
+
+ The project file's full path, escaped.
+
+
+
+
+ The directory that the project is in.
+ Essential for evaluating relative paths.
+ If the project is not loaded from disk, returns the current-directory from
+ the time the project was loaded - this is the same behavior as Whidbey/Orcas.
+
+
+
+
+ The time that this object was last changed. If it hasn't
+ been changed since being loaded or created, its value is .
+ Stored as UTC as this is faster when there are a large number of rapid edits.
+
+
+
+
+ The last-write-time of the file that was read, when it was read.
+ This can be used to see whether the file has been changed on disk
+ by an external means.
+
+
+
+
+ Reason it was last marked dirty; unlocalized, for debugging
+
+
+
+
+ Parameter to be formatted into the dirty reason
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a ProjectRootElement instance from a XmlReader.
+ May throw InvalidProjectFileException.
+ Leaves the project dirty, indicating there are unsaved changes.
+ Used to create a root element for solutions loaded by the 3.5 version of the solution wrapper.
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later.
+ Leaves the project dirty, indicating there are unsaved changes.
+
+
+
+
+ Initialize a ProjectRootElement instance over a project with the specified file path.
+ Assumes path is already normalized.
+ May throw InvalidProjectFileException.
+
+
+
+
+ Initialize a ProjectRootElement instance from an existing document.
+ May throw InvalidProjectFileException.
+ Leaves the project dirty, indicating there are unsaved changes.
+
+
+ Do not make public: we do not wish to expose particular XML API's.
+
+
+
+
+ Initialize a ProjectRootElement instance from an existing document.
+ Helper constructor for the > mehtod which needs to check if the document parses
+
+
+ Do not make public: we do not wish to expose particular XML API's.
+
+
+
+
+ Event raised after this project is renamed
+
+
+
+
+ Event raised after the project XML is changed.
+
+
+
+
+ Condition should never be set, but the getter returns null instead of throwing
+ because a nonexistent condition is implicitly true
+
+
+
+
+ Get a read-only collection of the child chooses, if any
+
+
+ The name is inconsistent to make it more understandable, per API review.
+
+
+
+
+ Get a read-only collection of the child item definition groups, if any
+
+
+
+
+ Get a read-only collection of the child item definitions, if any, in all item definition groups anywhere in the project file.
+
+
+
+
+ Get a read-only collection over the child item groups, if any.
+ Does not include any that may not be at the root, i.e. inside Choose elements.
+
+
+
+
+ Get a read-only collection of the child items, if any, in all item groups anywhere in the project file.
+ Not restricted to root item groups: traverses through Choose elements.
+
+
+
+
+ Get a read-only collection of the child import groups, if any.
+
+
+
+
+ Get a read-only collection of the child imports
+
+
+
+
+ Get a read-only collection of the child property groups, if any.
+ Does not include any that may not be at the root, i.e. inside Choose elements.
+
+
+
+
+ Geta read-only collection of the child properties, if any, in all property groups anywhere in the project file.
+ Not restricted to root property groups: traverses through Choose elements.
+
+
+
+
+ Get a read-only collection of the child targets
+
+
+
+
+ Get a read-only collection of the child usingtasks, if any
+
+
+
+
+ Get a read-only collection of the child item groups, if any, in reverse order
+
+
+
+
+ Get a read-only collection of the child item definition groups, if any, in reverse order
+
+
+
+
+ Get a read-only collection of the child import groups, if any, in reverse order
+
+
+
+
+ Get a read-only collection of the child property groups, if any, in reverse order
+
+
+
+
+ The directory that the project is in.
+ Essential for evaluating relative paths.
+ Is never null, even if the FullPath does not contain directory information.
+ If the project has not been loaded from disk and has not been given a path, returns the current-directory from
+ the time the project was loaded - this is the same behavior as Whidbey/Orcas.
+ If the project has not been loaded from disk but has been given a path, this path may not exist.
+
+
+
+
+ Full path to the project file.
+ If the project has not been loaded from disk and has not been given a path, returns null.
+ If the project has not been loaded from disk but has been given a path, this path may not exist.
+ Setter renames the project, if it already had a name.
+
+
+ Updates the ProjectRootElement cache.
+
+
+
+
+ Encoding that the project file is saved in, or will be saved in, unless
+ otherwise specified.
+
+
+ Returns the encoding from the Xml declaration if any, otherwise UTF8.
+
+
+
+
+ Gets or sets the value of DefaultTargets. If there is no DefaultTargets, returns empty string.
+ If the value is null or empty, removes the attribute.
+
+
+
+
+ Gets or sets the value of InitialTargets. If there is no InitialTargets, returns empty string.
+ If the value is null or empty, removes the attribute.
+
+
+
+
+ Gets or sets a semicolon delimited list of software development kits (SDK) that the project uses.
+ If a value is specified, an Sdk.props is simplicity imported at the top of the project and an
+ Sdk.targets is simplicity imported at the bottom from the specified SDK.
+ If the value is null or empty, removes the attribute.
+
+
+
+
+ Gets or sets the value of TreatAsLocalProperty. If there is no tag, returns empty string.
+ If the value being set is null or empty, removes the attribute.
+
+
+
+
+ Gets or sets the value of ToolsVersion. If there is no ToolsVersion, returns empty string.
+ If the value is null or empty, removes the attribute.
+
+
+
+
+ Gets the XML representing this project as a string.
+ Does not remove any dirty flag.
+
+
+ Useful for debugging.
+ Note that we do not expose an XmlDocument or any other specific XML API.
+
+
+
+
+ Whether the XML has been modified since it was last loaded or saved.
+
+
+
+
+ Whether the XML is preserving formatting or not.
+
+
+
+
+ Version number of this object.
+ A host can compare this to a stored version number to determine whether
+ a project's XML has changed, even if it has also been saved since.
+
+ The actual value is meaningless: an edit may increment it more than once,
+ so it should only be compared to a stored value.
+
+
+ Used by the Project class to figure whether changes have occurred that
+ it might want to pick up by reevaluation.
+
+ Used by the ProjectRootElement class to determine whether it needs to save.
+
+ This number is unique to the appdomain. That means that it is possible
+ to know when a ProjectRootElement has been unloaded (perhaps after modification) and
+ reloaded -- the version won't reset to '0'.
+
+ We're assuming we don't have over 2 billion edits.
+
+
+
+
+ The time that this object was last changed. If it hasn't
+ been changed since being loaded or created, its value is .
+
+
+ This is used by the VB/C# project system.
+
+
+
+
+ The last-write-time of the file that was read, when it was read.
+ This can be used to see whether the file has been changed on disk
+ by an external means.
+
+
+
+
+ This does not allow conditions, so it should not be called.
+
+
+
+
+ Location of the originating file itself, not any specific content within it.
+ If the file has not been given a name, returns an empty location.
+ This is a case where it is legitimate to "not have a location".
+
+
+
+
+ Location of the toolsversion attribute, if any
+
+
+
+
+ Location of the defaulttargets attribute, if any
+
+
+
+
+ Location of the initialtargets attribute, if any
+
+
+
+
+ Location of the Sdk attribute, if any
+
+
+
+
+ Location of the TreatAsLocalProperty attribute, if any
+
+
+
+
+ Has the project root element been explicitly loaded for a build or has it been implicitly loaded
+ as part of building another project.
+
+
+ Internal code that wants to set this to true should call .
+ The setter is private to make it more difficult to downgrade an existing PRE to an implicitly loaded state, which should never happen.
+
+
+
+
+ Retrieves the root element cache with which this root element is associated.
+
+
+
+
+ Gets a value indicating whether this PRE is known by its containing collection.
+
+
+
+
+ Indicates whether there are any targets in this project
+ that use the "Returns" attribute. If so, then this project file
+ is automatically assumed to be "Returns-enabled", and the default behavior
+ for targets without Returns attributes changes from using the Outputs to
+ returning nothing by default.
+
+
+
+
+ Gets the ProjectExtensions child, if any, otherwise null.
+
+
+ Not public as we do not wish to encourage the use of ProjectExtensions.
+
+
+
+
+ Returns an unlocalized indication of how this file was last dirtied.
+ This is for debugging purposes only.
+ String formatting only occurs when retrieved.
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later.
+ Uses the global project collection.
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified .
+ Uses the global project collection.
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later.
+ Uses the specified project collection.
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified and .
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later.
+ Uses the global project collection.
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified path and .
+ Uses the global project collection.
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later.
+ Uses the specified project collection.
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later.
+ Uses the specified project collection.
+
+
+
+
+ Initialize a ProjectRootElement instance from an XmlReader.
+ Uses the global project collection.
+ May throw InvalidProjectFileException.
+
+
+
+
+ Initialize a ProjectRootElement instance from an XmlReader.
+ Uses the specified project collection.
+ May throw InvalidProjectFileException.
+
+
+
+
+ Initialize a ProjectRootElement instance from an XmlReader.
+ Uses the specified project collection.
+ May throw InvalidProjectFileException.
+
+
+
+
+ Initialize a ProjectRootElement instance by loading from the specified file path.
+ Uses the global project collection.
+ May throw InvalidProjectFileException.
+
+
+
+
+ Initialize a ProjectRootElement instance by loading from the specified file path.
+ Uses the specified project collection.
+ May throw InvalidProjectFileException.
+
+
+
+
+ Initialize a ProjectRootElement instance by loading from the specified file path.
+ Uses the specified project collection and preserves the formatting of the document if specified.
+
+
+
+
+ Returns the ProjectRootElement for the given path if it has been loaded, or null if it is not currently in memory.
+ Uses the global project collection.
+
+ The path of the ProjectRootElement, cannot be null.
+ The loaded ProjectRootElement, or null if it is not currently in memory.
+
+ It is possible for ProjectRootElements to be brought into memory and discarded due to memory pressure. Therefore
+ this method returning false does not indicate that it has never been loaded, only that it is not currently in memory.
+
+
+
+
+ Returns the ProjectRootElement for the given path if it has been loaded, or null if it is not currently in memory.
+ Uses the specified project collection.
+
+ The path of the ProjectRootElement, cannot be null.
+ The to load the project into.
+ The loaded ProjectRootElement, or null if it is not currently in memory.
+
+ It is possible for ProjectRootElements to be brought into memory and discarded due to memory pressure. Therefore
+ this method returning false does not indicate that it has never been loaded, only that it is not currently in memory.
+
+
+
+
+ Returns the ProjectRootElement for the given path if it has been loaded, or null if it is not currently in memory.
+ Uses the specified project collection.
+
+ The path of the ProjectRootElement, cannot be null.
+ The to load the project into.
+
+ The formatting to open with. Must match the formatting in the collection to succeed.
+
+ The loaded ProjectRootElement, or null if it is not currently in memory.
+
+ It is possible for ProjectRootElements to be brought into memory and discarded due to memory pressure. Therefore
+ this method returning false does not indicate that it has never been loaded, only that it is not currently in memory.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ If import groups exist, inserts into the last one without a condition on it.
+ Otherwise, creates an import at the end of the project.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Creates an import group at the end of the project.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Finds item group with no condition with at least one item of same type, or else adds a new item group;
+ adds the item to that item group with items of the same type, ordered by include.
+
+
+ Per the previous implementation, it actually finds the last suitable item group, not the first.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Finds first item group with no condition with at least one item of same type, or else an empty item group; or else adds a new item group;
+ adds the item to that item group with items of the same type, ordered by include.
+ Does not attempt to check whether the item matches an existing wildcard expression; that is only possible
+ in the evaluated world.
+
+
+ Per the previous implementation, it actually finds the last suitable item group, not the first.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds an item group after the last existing item group, if any; otherwise
+ adds an item group after the last existing property group, if any; otherwise
+ adds a new item group at the end of the project.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Finds first item definition group with no condition with at least one item definition of same item type, or else adds a new item definition group.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds an item definition group after the last existing item definition group, if any; otherwise
+ adds an item definition group after the last existing property group, if any; otherwise
+ adds a new item definition group at the end of the project.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Adds a new property group after the last existing property group, if any; otherwise
+ at the start of the project.
+
+
+
+
+ Convenience method that picks a location based on a heuristic.
+ Updates the last existing property with the specified name that has no condition on itself or its property group, if any.
+ Otherwise, adds a new property in the first property group without a condition, creating a property group if necessary after
+ the last existing property group, else at the start of the project.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Creates a target at the end of the project.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+ Creates a usingtask at the end of the project.
+ Exactly one of assemblyName or assemblyFile must be null.
+
+
+
+
+ Creates a choose.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an import.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an item node.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an item node with an include.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an item definition.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an item definition group.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an item group.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an import group.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates a metadata node.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates a metadata node.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates a metadata node.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an on error node.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an otherwise node.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates an output node.
+ Exactly one of itemType and propertyName must be specified.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates a project extensions node.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates a property group.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates a property.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates a target.
+ Caller must add it to the location of choice in this project.
+
+
+
+
+ Creates a task.
+ Caller must add it to the location of choice in this project.
+
+
+
+
+ Creates a using task.
+ Caller must add it to the location of choice in the project.
+ Exactly one of assembly file and assembly name must be provided.
+
+
+
+
+ Creates a using task.
+ Caller must add it to the location of choice in the project.
+ Exactly one of assembly file and assembly name must be provided.
+ Also allows providing optional runtime and architecture specifiers. Null is OK.
+
+
+
+
+ Creates a ParameterGroup for use in a using task.
+ Caller must add it to the location of choice in the project under a using task.
+
+
+
+
+ Creates a Parameter for use in a using ParameterGroup.
+ Caller must add it to the location of choice in the project under a using task.
+
+
+
+
+ Creates a Task element for use in a using task.
+ Caller must add it to the location of choice in the project under a using task.
+
+
+
+
+ Creates a when.
+ Caller must add it to the location of choice in this project.
+
+
+
+
+ Creates a project SDK element attached to this project.
+
+
+
+
+ Save the project to the file system, if dirty.
+ Uses the Encoding returned by the Encoding property.
+ Creates any necessary directories.
+ May throw IO-related exceptions.
+ Clears the dirty flag.
+
+
+
+
+ Save the project to the file system, if dirty.
+ Creates any necessary directories.
+ May throw IO-related exceptions.
+ Clears the dirty flag.
+
+
+
+
+ Save the project to the file system, if dirty or the path is different.
+ Creates any necessary directories.
+ May throw IO related exceptions.
+ Clears the Dirty flag.
+
+
+
+
+ Save the project to the file system, if dirty or the path is different.
+ Creates any necessary directories.
+ May throw IO related exceptions.
+ Clears the Dirty flag.
+
+
+
+
+ Save the project to the provided TextWriter, whether or not it is dirty.
+ Uses the encoding of the TextWriter.
+ Clears the Dirty flag.
+
+
+
+
+ Returns a clone of this project.
+
+ The cloned element.
+
+
+
+ Reload the existing project root element from its file.
+ An is thrown if the project root element is not associated with any file on disk.
+
+ See
+
+
+
+
+ Reload the existing project root element from the given path
+ An is thrown if the path does not exist.
+
+ See
+
+
+
+
+ Reload the existing project root element from the given
+ A reload operation completely replaces the state of this object. This operation marks the
+ object as dirty (see for side effects).
+
+ If the new state has invalid XML or MSBuild syntax, then this method throws an .
+ When this happens, the state of this object does not change.
+
+ Reloading from an XMLReader will retain the previous root element location (, , ).
+
+
+ Reader to read from
+
+ If set to false, the reload operation will discard any unsaved changes.
+ Otherwise, an is thrown when unsaved changes are present.
+
+
+ Whether the reload should preserve formatting or not. A null value causes the reload to reuse the existing value.
+
+
+
+
+ Initialize an in-memory, empty ProjectRootElement instance that can be saved later.
+ Uses the specified project root element cache.
+
+
+
+
+ Initialize a ProjectRootElement instance by loading from the specified file path.
+ Assumes path is already normalized.
+ Uses the specified project root element cache.
+ May throw InvalidProjectFileException.
+
+
+
+
+ Initialize a ProjectRootElement instance from an existing document.
+ Uses the global project collection.
+ May throw InvalidProjectFileException.
+
+
+ This is ultimately for unit testing.
+ Do not make public: we do not wish to expose particular XML API's.
+
+
+
+
+ Gets a ProjectRootElement representing an MSBuild file.
+ Path provided must be a canonicalized full path.
+ May throw InvalidProjectFileException or an IO-related exception.
+
+
+
+
+ Creates a metadata node.
+ Caller must add it to the location of choice in the project.
+
+
+
+
+ Creates a XmlElement with the specified name in the document
+ containing this project.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+ Marks this project as dirty.
+ Typically called by child elements to indicate that they themselves have become dirty.
+ Accepts a reason for debugging purposes only, and optional reason parameter.
+
+
+ This is sealed because it is virtual and called in a constructor; by sealing it we
+ satisfy the rule that nobody will override it to do something that would rely on
+ unconstructed state.
+ Should be protected+internal.
+
+
+
+
+ Bubbles a Project dirty notification up to the ProjectRootElementCacheBase and ultimately to the ProjectCollection.
+
+ The dirtied project.
+
+
+
+ Sets the property to true to indicate that this PRE
+ should not be removed from the cache until it is explicitly unloaded by some MSBuild client.
+
+
+
+
+ Creates and returns a list of nodes which are implicitly
+ referenced by the Project.
+
+ Current project
+ An containing details of the SDKs referenced by the project.
+
+
+
+ Determines if the specified file is an empty XML file meaning it has no contents, contains only whitespace, or
+ only an XML declaration. If the file does not exist, it is not considered empty.
+
+ The full path to a file to check.
+ true if the file is an empty XML file, otherwise false.
+
+
+
+ Returns a new instance of ProjectRootElement that is affiliated with the same ProjectRootElementCache.
+
+ The factory to use for creating the new instance.
+
+
+
+ Creates a new ProjectRootElement for a specific PRE cache
+
+ The path to the file to load.
+ The cache to load the PRE into.
+
+
+
+ Creates a ProjectRootElement representing a file, where the file may be a .sln instead of
+ an MSBuild format file.
+ Assumes path is already normalized.
+ If the file is in MSBuild format, may throw InvalidProjectFileException.
+ If the file is a solution, will throw an IO-related exception if the file cannot be read.
+
+
+
+
+ Constructor helper to load an XmlDocumentWithLocation from a path.
+ Assumes path is already normalized.
+ May throw InvalidProjectFileException.
+ Never returns null.
+ Does NOT add to the ProjectRootElementCache. Caller should add after verifying subsequent MSBuild parsing succeeds.
+
+ The full path to the document to load.
+ true to preserve the formatting of the document, otherwise false.
+ Whether to load the file in read-only mode.
+
+
+
+ Constructor helper to load an XmlDocumentWithLocation from an XmlReader.
+ May throw InvalidProjectFileException.
+ Never returns null.
+
+
+
+
+ Boost the appdomain-unique version counter for this object.
+ This is done when it is modified, and also when it is loaded.
+
+
+
+
+ ProjectChooseElement represents the Choose element in the MSBuild project.
+ Currently it does not allow a Condition.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectChooseElement
+
+
+
+
+ Initialize an unparented ProjectChooseElement
+
+
+
+
+ Condition should never be set, but the getter returns null instead of throwing
+ because a nonexistent condition is implicitly true
+
+
+
+
+ Get the When children.
+ Will contain at least one entry.
+
+
+
+
+ Get any Otherwise child.
+ May be null.
+
+
+
+
+ This does not allow conditions, so it should not be called.
+
+
+
+
+ Creates an unparented ProjectChooseElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Sets the parent of this element if it is a valid parent,
+ otherwise throws.
+
+
+
+
+
+
+
+ ProjectWhenElement represents the When element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectWhenElement
+
+
+
+
+ Initialize an unparented ProjectWhenElement
+
+
+
+
+ Get an enumerator over any child chooses
+
+
+
+
+ Get an enumerator over any child item groups
+
+
+
+
+ Get an enumerator over any child property groups
+
+
+
+
+ Creates an unparented ProjectPropertyGroupElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ UsingTaskParameterGroupElement represents a ParameterGroup under the using task.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented UsingTaskParameterGroupElement
+
+
+
+
+ Initialize an unparented UsingTaskParameterGroupElement
+
+
+
+
+ Condition should never be set, but the getter returns null instead of throwing
+ because a nonexistent condition is implicitly true
+
+
+
+
+ Get any contained parameters.
+
+
+
+
+ This does not allow conditions, so it should not be called.
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+
+
+
+
+ Convenience method that picks a location based on a heuristic:
+
+
+
+
+ Creates an unparented UsingTaskParameterGroupElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ Verify the parent is a usingTaskElement and that the taskFactory attribute is set
+
+
+
+
+ UsingTaskParameterElement class represents the Parameter element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented UsingTaskParameterElement instance
+
+
+
+
+ Initialize an unparented UsingTaskParameterElement instance
+
+
+
+
+ Condition should never be set, but the getter returns null instead of throwing
+ because a nonexistent condition is implicitly true
+
+
+
+
+ Gets and sets the name of the parameter's name
+
+
+
+
+ Gets or sets the Type attribute returns "System.String" if not set.
+ If null or empty is set the attribute will be removed from the element.
+
+
+
+
+ Gets or sets the output attribute
+
+
+
+
+ Gets or sets the required attribute
+
+
+
+
+ This does not allow conditions, so it should not be called.
+
+
+
+
+ Location of the Type attribute.
+ If there is no such attribute, returns the location of the element,
+ in lieu of the default value it uses for the attribute.
+
+
+
+
+ Location of the Output attribute.
+ If there is no such attribute, returns the location of the element,
+ in lieu of the default value it uses for the attribute.
+
+
+
+
+ Location of the Required attribute.
+ If there is no such attribute, returns the location of the element,
+ in lieu of the default value it uses for the attribute.
+
+
+
+
+ Creates an unparented UsingTaskParameterElement, wrapping an unparented XmlElement.
+ Caller should then ensure the element is added to a parent.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ ProjectUsingTaskBodyElement class represents the Task element under the using task element in the MSBuild project.
+
+
+
+
+ External projects support
+
+
+
+
+ Initialize a parented ProjectUsingTaskBodyElement
+
+
+
+
+ Initialize an unparented ProjectUsingTaskBodyElement
+
+
+
+
+ Condition should never be set, but the getter returns null instead of throwing
+ because a nonexistent condition is implicitly true
+
+
+
+
+ Gets or sets the unevaluated value of the contents of the task xml
+ Returns empty string if it is not present.
+
+
+
+
+ Gets the value of the Evaluate attribute.
+ Returns true if it is not present.
+
+
+
+
+ This does not allow conditions, so it should not be called.
+
+
+
+
+ Location of the "Condition" attribute on this element, if any.
+ If there is no such attribute, returns the location of the element,
+ in lieu of the default value it uses for the attribute.
+
+
+
+
+ Creates an unparented ProjectUsingTaskBodyElement, wrapping an unparented XmlElement.
+ Validates name.
+ Caller should then ensure the element is added to the XmlDocument in the appropriate location.
+
+
+
+
+ Overridden to verify that the potential parent and siblings
+ are acceptable. Throws InvalidOperationException if they are not.
+
+
+
+
+
+
+
+ Verify the parent is a usingTaskElement and that the taskFactory attribute is set
+
+
+
+
+ This represents an entry for a solution configuration
+
+
+
+
+ Default separator between configuration and platform in configuration
+ full names
+
+
+
+
+ Constructor
+
+
+
+
+ The configuration part of this configuration - e.g. "Debug", "Release"
+
+
+
+
+ The platform part of this configuration - e.g. "Any CPU", "Win32"
+
+
+
+
+ The full name of this configuration - e.g. "Debug|Any CPU"
+
+
+
+
+ Given a configuration name and a platform name, compute the full name
+ of this configuration
+
+
+
+
+ This class represents an entry for a project configuration in a solution configuration.
+
+
+
+
+ Constructor
+
+
+
+
+ The configuration part of this configuration - e.g. "Debug", "Release"
+
+
+
+
+ The platform part of this configuration - e.g. "Any CPU", "Win32"
+
+
+
+
+ The full name of this configuration - e.g. "Debug|Any CPU"
+
+
+
+
+ True if this project configuration should be built as part of its parent solution configuration
+
+
+
+
+ This is a hacky method to remove the space in the "Any CPU" platform in project configurations.
+ The problem is that this platform is stored as "AnyCPU" in project files, but the project system
+ reports it as "Any CPU" to the solution configuration manager. Because of that all solution configurations
+ contain the version with a space in it, and when we try and give that name to actual projects,
+ they have no clue what we're talking about. We need to remove the space in project platforms so that
+ the platform name matches the one used in projects.
+
+
+
+
+ An enumeration defining the different types of projects we might find in an SLN.
+
+
+
+
+ Everything else besides the below well-known project types.
+
+
+
+
+ C#, VB, F#, and VJ# projects
+
+
+
+
+ Solution folders appear in the .sln file, but aren't buildable projects.
+
+
+
+
+ ASP.NET projects
+
+
+
+
+ Web Deployment (.wdproj) projects
+
+
+
+
+ Project inside an Enterprise Template project
+
+
+
+
+ A shared project represents a collection of shared files that is not buildable on its own.
+
+
+
+
+ This class represents a project (or SLN folder) that is read in from a solution file.
+
+
+
+
+ Characters that need to be cleansed from a project name.
+
+
+
+
+ Project names that need to be disambiguated when forming a target name
+
+
+
+
+ Character that will be used to replace 'unclean' ones.
+
+
+
+
+ The project configuration in given solution configuration
+ K: full solution configuration name (cfg + platform)
+ V: project configuration
+
+
+
+
+ This project's name
+
+
+
+
+ The path to this project file, relative to the solution location
+
+
+
+
+ Returns the absolute path for this project
+
+
+
+
+ The unique guid associated with this project, in "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" form
+
+
+
+
+ The guid, in "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" form, of this project's
+ parent project, if any.
+
+
+
+
+ List of guids, in "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" form, mapping to projects
+ that this project has a build order dependency on, as defined in the solution file.
+
+
+
+
+ Configurations for this project, keyed off the configuration's full name, e.g. "Debug|x86"
+ They contain only the project configurations from the solution file that fully matched (configuration and platform) against the solution configurations.
+
+
+
+
+ Extension of the project file, if any
+
+
+
+
+ This project's type.
+
+
+
+
+ Only applies to websites -- for other project types, references are
+ either specified as Dependencies above, or as ProjectReferences in the
+ project file, which the solution doesn't have insight into.
+
+
+
+
+ Add the guid of a referenced project to our dependencies list.
+
+
+
+
+ Set the requested project configuration.
+
+
+
+
+ Looks at the project file node and determines (roughly) if the project file is in the MSBuild format.
+ The results are cached in case this method is called multiple times.
+
+ Detailed error message in case we encounter critical problems reading the file
+
+
+
+
+ Find the unique name for this project, e.g. SolutionFolder\SubSolutionFolder\Project_Name
+
+
+
+
+ Gets the original project name with the parent project as it is declared in the solution file, e.g. SolutionFolder\SubSolutionFolder\Project.Name
+
+
+
+
+ Changes the unique name of the project.
+
+
+
+
+ Cleanse the project name, by replacing characters like '@', '$' with '_'
+
+ The name to be cleansed
+ string
+
+
+
+ If the unique project name provided collides with one of the standard Solution project
+ entry point targets (Build, Rebuild, Clean, Publish), then disambiguate it by prepending the string "Solution:"
+
+ The unique name for the project
+ string
+
+
+
+ Check a Project element for known invalid namespace definitions.
+
+ Project XML Element
+ True if the element contains known invalid namespace definitions
+
+
+
+ This class contains the functionality to parse a solution file and return a corresponding
+ MSBuild project file containing the projects and dependencies defined in the solution.
+
+
+
+
+ Constructor
+
+
+
+
+ This property returns the list of warnings that were generated during solution parsing
+
+
+
+
+ This property returns the list of comments that were generated during the solution parsing
+
+
+
+
+ This property returns the list of error codes for warnings/errors that were generated during solution parsing.
+
+
+
+
+ Returns the actual major version of the parsed solution file
+
+
+
+
+ Returns Visual Studio major version
+
+
+
+
+ Returns true if the solution contains any web projects
+
+
+
+
+ Returns true if the solution contains any .wdproj projects. Used to determine
+ whether we need to load up any projects to examine dependencies.
+
+
+
+
+ All projects in this solution, in the order they appeared in the solution file
+
+
+
+
+ The collection of projects in this solution, accessible by their guids as a
+ string in "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" form
+
+
+
+
+ This is the read/write accessor for the solution file which we will parse. This
+ must be set before calling any other methods on this class.
+
+
+
+
+
+ For unit-testing only.
+
+
+
+
+
+ The list of all full solution configurations (configuration + platform) in this solution
+
+
+
+
+ This method takes a path to a solution file, parses the projects and project dependencies
+ in the solution file, and creates internal data structures representing the projects within
+ the SLN.
+
+
+
+
+ Returns "true" if it's a project that's expected to be buildable, or false if it's
+ not (e.g. a solution folder)
+
+ The project in the solution
+ Whether the project is expected to be buildable
+
+
+
+ Given a solution file, parses the header and returns the major version numbers of the solution file
+ and the visual studio.
+ Throws InvalidProjectFileException if the solution header is invalid, or if the version is less than
+ our minimum version.
+
+
+
+
+ Adds a configuration to this solution
+
+
+
+
+ Reads a line from the StreamReader, trimming leading and trailing whitespace.
+
+
+
+
+
+ This method takes a path to a solution file, parses the projects and project dependencies
+ in the solution file, and creates internal data structures representing the projects within
+ the SLN. Used for conversion, which means it allows situations that we refuse to actually build.
+
+
+
+
+ This method takes a path to a solution file, parses the projects and project dependencies
+ in the solution file, and creates internal data structures representing the projects within
+ the SLN.
+
+
+
+
+ Parses the SLN file represented by the StreamReader in this.reader, and populates internal
+ data structures based on the SLN file contents.
+
+
+
+
+ This method searches the first two lines of the solution file opened by the specified
+ StreamReader for the solution file header. An exception is thrown if it is not found.
+
+ The solution file header looks like this:
+
+ Microsoft Visual Studio Solution File, Format Version 9.00
+
+
+
+
+
+ This method parses the Visual Studio version in Dev 12 solution files
+ The version line looks like this:
+
+ VisualStudioVersion = 12.0.20311.0 VSPRO_PLATFORM
+
+ If such a line is found, the version is stored in this.currentVisualStudioVersion
+
+
+
+
+ This method extracts the whole part of the version number from the specified line
+ containing the solution file format header, and throws an exception if the version number
+ is outside of the valid range.
+
+ The solution file header looks like this:
+
+ Microsoft Visual Studio Solution File, Format Version 9.00
+
+
+
+
+
+
+
+ This method processes a "Project" section in the solution file opened by the specified
+ StreamReader, and returns a populated ProjectInSolution instance, if successful.
+ An exception is thrown if the solution file is invalid.
+
+ The format of the parts of a Project section that we care about is as follows:
+
+ Project("{Project type GUID}") = "Project name", "Relative path to project file", "{Project GUID}"
+ ProjectSection(ProjectDependencies) = postProject
+ {Parent project unique name} = {Parent project unique name}
+ ...
+ EndProjectSection
+ EndProject
+
+
+
+
+
+ This method will parse a .etp project recursively and
+ add all the projects found to projects and projectsInOrder
+
+ ETP Project
+
+
+
+ Adds a given project to the project collections of this class
+
+ proj
+
+
+
+ Checks whether a given project has a .etp extension.
+
+
+
+
+
+ Validate relative path of a project
+
+ proj
+
+
+
+ Takes a property name / value that comes from the SLN file for a Venus project, and
+ stores it appropriately in our data structures.
+
+
+
+
+ Strips a single pair of leading/trailing double-quotes from a string.
+
+
+
+
+ Parse the first line of a Project section of a solution file. This line should look like:
+
+ Project("{Project type GUID}") = "Project name", "Relative path to project file", "{Project GUID}"
+
+
+
+
+
+
+
+ Read nested projects section.
+ This is required to find a unique name for each project's target
+
+
+
+
+ Read solution configuration section.
+
+
+ A sample section:
+
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+
+
+
+
+ Read project configurations in solution configurations section.
+
+
+ A sample (incomplete) section:
+
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6185CC21-BE89-448A-B3C0-D1C27112E595}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6185CC21-BE89-448A-B3C0-D1C27112E595}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6185CC21-BE89-448A-B3C0-D1C27112E595}.Debug|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6185CC21-BE89-448A-B3C0-D1C27112E595}.Debug|Mixed Platforms.Build.0 = Release|Any CPU
+ {6185CC21-BE89-448A-B3C0-D1C27112E595}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {A6F99D27-47B9-4EA4-BFC9-25157CBDC281}.Release|Any CPU.ActiveCfg = Release|Win32
+ {A6F99D27-47B9-4EA4-BFC9-25157CBDC281}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {A6F99D27-47B9-4EA4-BFC9-25157CBDC281}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {A6F99D27-47B9-4EA4-BFC9-25157CBDC281}.Release|Win32.ActiveCfg = Release|Win32
+ {A6F99D27-47B9-4EA4-BFC9-25157CBDC281}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+
+ An unprocessed hashtable of entries in this section
+
+
+
+ Read the project configuration information for every project in the solution, using pre-cached
+ solution section data.
+
+ Cached data from the project configuration section
+
+
+
+ Gets the default configuration name for this solution. Usually it's Debug, unless it's not present
+ in which case it's the first configuration name we find.
+
+
+
+
+ Gets the default platform name for this solution. Usually it's Mixed Platforms, unless it's not present
+ in which case it's the first platform name we find.
+
+
+
+
+ This method takes a string representing one of the project's unique names (guid), and
+ returns the corresponding "friendly" name for this project.
+
+
+
+
+
+
+ This method takes a string representing one of the project's unique names (guid), and
+ returns the corresponding relative path to this project.
+
+
+
+
+
+
+ The location of an XML node in a file.
+ Any editing of the project XML through the MSBuild API's will invalidate locations in that XML until the XML is reloaded.
+
+
+ This object is IMMUTABLE, so that it can be passed around arbitrarily.
+ DO NOT make these objects any larger. There are huge numbers of them and they are transmitted between nodes.
+
+
+
+
+ The singleton empty element location.
+
+
+
+
+ The file from which this particular element originated. It may
+ differ from the ProjectFile if, for instance, it was part of
+ an import or originated in a targets file.
+ If not known, returns empty string.
+
+
+
+
+ The line number where this element exists in its file.
+ The first line is numbered 1.
+ Zero indicates "unknown location".
+
+
+
+
+ The column number where this element exists in its file.
+ The first column is numbered 1.
+ Zero indicates "unknown location".
+
+
+
+
+ The location in a form suitable for replacement
+ into a message.
+ Example: "c:\foo\bar.csproj (12,34)"
+ Calling this creates and formats a new string.
+ PREFER TO PUT THE LOCATION INFORMATION AT THE START OF THE MESSAGE INSTEAD.
+ Only in rare cases should the location go within the message itself.
+
+
+
+
+ Gets the empty element location.
+ This is not to be used when something is "missing": that should have a null location.
+ It is to be used for the project location when the project has not been given a name.
+ In that case, it exists, but can't have a specific location.
+
+
+
+
+ Get reasonable hash code.
+
+
+
+
+ Override Equals so that identical
+ fields imply equal objects.
+
+
+
+
+ Location of element.
+
+
+
+
+ Writes the packet to the serializer.
+ Always send as ints, even if ushorts are being used: otherwise it'd
+ need a byte to discriminate and the savings would be microscopic.
+
+
+
+
+ Factory for serialization.
+ Custom factory is needed because this class is abstract and uses a factory pattern.
+
+
+
+
+ Constructor for when we only know the file and nothing else.
+ This is the case when we are creating a new item, for example, and it has
+ not been evaluated from some XML.
+
+
+
+
+ Constructor for the case where we have most or all information.
+ Numerical values must be 1-based, non-negative; 0 indicates unknown
+ File may be null, indicating the file was not loaded from disk.
+
+
+ In AG there are 600 locations that have a file but zero line and column.
+ In theory yet another derived class could be made for these to save 4 bytes each.
+
+
+
+
+ The location in a form suitable for replacement
+ into a message.
+ Example: "c:\foo\bar.csproj (12,34)"
+ Calling this creates and formats a new string.
+ PREFER TO PUT THE LOCATION INFORMATION AT THE START OF THE MESSAGE INSTEAD.
+ Only in rare cases should the location go within the message itself.
+
+
+
+
+ Rarer variation for when the line and column won't each fit in a ushort.
+
+
+
+
+ The source file.
+
+
+
+
+ The source line.
+
+
+
+
+ The source column.
+
+
+
+
+ Constructor for the case where we have most or all information.
+ Numerical values must be 1-based, non-negative; 0 indicates unknown
+ File may be null, indicating the file was not loaded from disk.
+
+
+
+
+ The file from which this particular element originated. It may
+ differ from the ProjectFile if, for instance, it was part of
+ an import or originated in a targets file.
+ If not known, returns empty string.
+
+
+
+
+ The line number where this element exists in its file.
+ The first line is numbered 1.
+ Zero indicates "unknown location".
+
+
+
+
+ The column number where this element exists in its file.
+ The first column is numbered 1.
+ Zero indicates "unknown location".
+
+
+
+
+ For when the line and column each fit in a short - under 65536
+ (almost always will: microsoft.common.targets is less than 5000 lines long)
+ When loading Australian Government, for example, there are over 31,000 ElementLocation
+ objects so this saves 4 bytes each = 123KB
+
+ A "very small" variation that used two bytes (or halves of a short) would fit about half of them
+ and save 4 more bytes each, but the CLR packs each field to 4 bytes, so it isn't actually any smaller.
+
+
+
+
+ The source file.
+
+
+
+
+ The source line.
+
+
+
+
+ The source column.
+
+
+
+
+ Constructor for the case where we have most or all information.
+ Numerical values must be 1-based, non-negative; 0 indicates unknown
+ File may be null or empty, indicating the file was not loaded from disk.
+
+
+
+
+ The file from which this particular element originated. It may
+ differ from the ProjectFile if, for instance, it was part of
+ an import or originated in a targets file.
+ If not known, returns empty string.
+
+
+
+
+ The line number where this element exists in its file.
+ The first line is numbered 1.
+ Zero indicates "unknown location".
+
+
+
+
+ The column number where this element exists in its file.
+ The first column is numbered 1.
+ Zero indicates "unknown location".
+
+
+
+
+ The location something in the registry
+
+
+ This object is IMMUTABLE, so that it can be passed around arbitrarily.
+ This is not public because the current implementation only provides correct data for unedited projects.
+ DO NOT make it public without considering a solution to this problem.
+
+
+
+
+ The location.
+
+
+
+
+ Constructor taking the registry location.
+
+
+
+
+ Private constructor for deserialization
+
+
+
+
+ Not relevant, returns empty string.
+
+
+
+
+ Not relevant, returns 0.
+
+
+
+
+ Not relevant, returns 0.
+
+
+
+
+ The location in a form suitable for replacement
+ into a message.
+
+
+
+
+ Reads or writes the packet to the serializer.
+
+
+
+
+ Factory for serialization.
+
+
+
+
+ Derivation of XmlAttribute to implement IXmlLineInfo
+
+
+
+
+ Line, column, file information
+
+
+
+
+ Constructor without location information
+
+
+
+
+ Constructor with location information
+
+
+
+
+ Returns the line number if available, else 0.
+ IXmlLineInfo member.
+
+
+
+
+ Returns the column number if available, else 0.
+ IXmlLineInfo member.
+
+
+
+
+ Provides an ElementLocation for this attribute.
+
+
+ Should have at least the file name if the containing project has been given a file name,
+ even if it wasn't loaded from disk, or has been edited since. That's because we set that
+ path on our XmlDocumentWithLocation wrapper class.
+
+
+
+
+ Whether location is available.
+ IXmlLineInfo member.
+
+
+
+
+ Improvement to XmlDocument that during load attaches location information to all elements and attributes.
+ We don't need a real XmlDocument, as we are careful not to expose Xml types in our public API.
+
+
+ XmlDocument has many members, and this can't substitute for all of them. Location finding probably won't work if
+ certain XmlDocument members are used. So for extra robustness, this could wrap an XmlDocument instead,
+ and expose the small number of members that the MSBuild code actually uses.
+
+
+
+
+ Used to cache strings used in attribute values and comments.
+
+
+
+
+ Used to cache tag names in loaded files.
+
+
+
+
+ Whether we can selectively load as read-only (eg just when in program files directory)
+
+
+
+
+ Reader we've hooked
+
+
+
+
+ Path to the file loaded, if any, otherwise null.
+ Easier to intercept and store than to derive it from the XmlDocument.BaseUri property.
+
+
+
+
+ Local cache of strings for attribute values and comments. Used for testing.
+
+
+
+
+ Whether we can expect to never save this file.
+ In such a case, we can discard as much as possible on load, like comments and whitespace.
+
+
+
+
+ Location of the element to be created via 'CreateElement' call. So that we can
+ receive and use location from the caller up the stack even if we are being called via
+ internal methods.
+
+
+
+
+ Constructor
+
+
+
+
+ Constructor
+
+
+
+
+ Whether to load files read only
+
+
+
+
+ Not determined
+
+
+
+
+ Always load writeable
+
+
+
+
+ Always load read-only, to save memory
+
+
+
+
+ Load read only selectively, Eg., just when file names begin with "Microsoft."
+
+
+
+
+ Path to the file loaded if any, otherwise null.
+ If the XmlDocument hasn't been loaded from a file, we wouldn't have a full path.
+ However the project might actually have been given a path - it might even have been saved.
+ In order to allow created elements to be able to provide a location with at least
+ that path, the setter here should be called when the project is given a path.
+ It may be set to null.
+
+
+
+
+ Sets or gets the string cache used by this XmlDocument.
+
+
+ When a particular instance has not been set will use the global string cache. The ability
+ to use a particular instance is useful for tests.
+
+
+
+
+ Loads from an XmlReader, intercepting the reader.
+
+
+ This method is called within XmlDocument by all other
+ Load(..) overloads, and by LoadXml(..), so however the client loads XML,
+ we will grab the reader.
+
+
+
+
+ Grab the path to the file, for use in our location information.
+
+
+
+
+ Called during parse, to add an element.
+
+
+ We create our own kind of element, that we can give location information to.
+ In order to pass the location through the callchain, that contains XmlDocument function
+ that then calls back to our XmlDocumentWithLocation (so we cannot use call stack via passing via parameters),
+ we use async local field, that simulates variable on call stack.
+
+
+
+
+ Called during load, to add an element.
+
+
+ We create our own kind of element, that we can give location information to.
+
+
+
+
+ Called during load, to add an attribute.
+
+
+ We create our own kind of attribute, that we can give location information to.
+
+
+
+
+ Create a whitespace node.
+ Overridden to cache attribute values.
+
+
+
+
+ Create a whitespace node. The definition of "significant" whitespace is obscure
+ and does not include whitespace in text values in element content, which we always want to keep.
+ Overridden to cache attribute values.
+
+
+
+
+ Create a text node.
+ Overridden to cache attribute values.
+
+
+
+
+ Create a comment node.
+ Overridden in order to cache comment strings.
+
+
+
+
+ Override Save to verify file was not loaded as readonly
+
+
+
+
+ Override Save to verify file was not loaded as readonly
+
+
+
+
+ Override Save to verify file was not loaded as readonly
+
+
+
+
+ Override Save to verify file was not loaded as readonly
+
+
+
+
+ Override IsReadOnly property to correctly indicate the mode to callers
+
+
+
+
+ Reset state for unit tests that want to set the env var
+
+
+
+
+ Called when the XmlDocument is unloaded to remove this XML's
+ contribution to the string interning cache.
+ Does NOT zombie the ProjectRootElement or anything else.
+
+
+
+
+ Determine whether we should load this file read only.
+ We decide yes if it is in program files or the OS directory, and the file name starts with "microsoft", else no.
+ We are very selective because we don't want to load files read only that the host might want to save, nor
+ any files in which comments within property/metadata values might be significant - MSBuild does not discard those, normally.
+
+
+
+
+ Determine whether we would ever load read only
+
+
+
+
+ Throw if this was loaded read only
+
+
+
+
+ Derivation of XmlElement to implement IXmlLineInfo
+
+
+ It would be nice to add some helper overloads of base class members that
+ downcast their return values to XmlElement/AttributeWithLocation. However
+ C# doesn't currently allow covariance in method overloading, only on delegates.
+ The caller must bravely downcast.
+
+
+
+
+ Line, column, file information
+
+
+
+
+ Constructor without location information
+
+
+
+
+ Constructor with location information
+
+
+
+
+ Returns the line number if available, else 0.
+ IXmlLineInfo member.
+
+
+
+
+ Returns the column number if available, else 0.
+ IXmlLineInfo member.
+
+
+
+
+ Provides an ElementLocation for this element, using the path to the file containing
+ this element as the project file entry.
+ Element location may be incorrect, if it was not loaded from disk.
+ Does not return null.
+
+
+ Should have at least the file name if the containing project has been given a file name,
+ even if it wasn't loaded from disk, or has been edited since. That's because we set that
+ path on our XmlDocumentWithLocation wrapper class.
+
+
+
+
+ Whether location is available.
+ IXmlLineInfo member.
+
+
+
+
+ Returns the XmlAttribute with the specified name or null if a matching attribute was not found.
+
+
+
+
+ Overridden to convert the display of the element from open form (separate open and closed tags) to closed form
+ (single closed tag) if the last child is being removed. This is simply for tidiness of the project file.
+ For example, removing the only piece of metadata from an item will leave behind one tag instead of two.
+
+
+
+
+ Gets the location of any attribute on this element with the specified name.
+ If there is no such attribute, returns null.
+
+
+
+
+ XmlNameTable that is thread safe for concurrent users.
+
+
+ Fortunately the standard implementation has only four accessible members
+ and all of them are virtual so we can easily add locks.
+
+
+
+
+ Synchronization object.
+
+
+
+
+ Add a string to the table.
+
+
+
+
+ Add a string to the table, passed in as
+ an extent in a char array.
+
+
+
+
+ Get a string from the table.
+
+
+
+
+ Get a string from the table, passed in as
+ an extent in a char array.
+
+
+
+
+ Parses a project from raw XML into strongly typed objects
+
+
+
+
+ Maximum nesting level of Choose elements. No reasonable project needs more than this
+
+
+
+
+ Valid attribute list when only Condition and Label are valid
+
+
+
+
+ Valid attribute list for item
+
+
+
+
+ Valid attributes list for item which is case-insensitive.
+
+
+
+
+ Valid attributes on import element
+
+
+
+
+ Valid attributes on usingtask element
+
+
+
+
+ Valid attributes on target element
+
+
+
+
+ Valid attributes on error element
+
+
+
+
+ Valid attributes on output element
+
+
+
+
+ Valid attributes on UsingTaskParameter element
+
+
+
+
+ Valid attributes on UsingTaskTask element
+
+
+
+
+ The ProjectRootElement to parse into
+
+
+
+
+ The document to parse from
+
+
+
+
+ Whether a ProjectExtensions node has been encountered already.
+ It's not supposed to appear more than once.
+
+
+
+
+ Private constructor to give static semantics
+
+
+
+
+ Parses the document into the provided ProjectRootElement.
+ Throws InvalidProjectFileExceptions for syntax errors.
+
+
+ The code markers here used to be around the Project class constructor in the old code.
+ In the new code, that's not very interesting; we are repurposing to wrap parsing the XML.
+
+
+
+
+ Parses the project into the ProjectRootElement
+
+
+
+
+ Parse a ProjectPropertyGroupElement from the element
+
+
+
+
+ Parse a ProjectItemGroupElement
+
+
+
+
+ Parse a ProjectItemElement
+
+
+
+
+ Parse a ProjectMetadataElement
+
+
+
+
+ Parse a ProjectImportGroupElement
+
+ The XML element to parse
+ The parent .
+ A ProjectImportGroupElement derived from the XML element passed in
+
+
+
+ Parse a ProjectImportElement that is contained in an ImportGroup
+
+
+
+
+ Parse a UsingTaskParameterGroupElement from the element
+
+
+
+
+ Parse a ProjectUsingTaskElement
+
+
+
+
+ Parse a ProjectTargetElement
+
+
+
+
+ Parse a ProjectTaskElement
+
+
+
+
+ Parse a ProjectOutputElement
+
+
+
+
+ Parse a ProjectItemDefinitionGroupElement
+
+
+
+
+ Pasre a ProjectItemDefinitionElement
+
+
+
+
+ Parse a ProjectChooseElement
+
+
+
+
+ Parse a ProjectWhenElement
+
+
+
+
+ Parse a ProjectOtherwiseElement
+
+
+
+
+ Parse the children of a When or Otherwise
+
+
+
+
+ Parse a ProjectExtensionsElement
+
+
+
+
+ Parse a ProjectSdkElement
+
+
+
+
+ This class will cache string values for loaded Xml files.
+
+
+
+
+ Start off with a large size as there are very many strings in common scenarios and resizing is expensive.
+ Note that there is a single instance of this cache for the lifetime of the process (albeit cleared out on XML unload)
+ Australian Govt has about 3000 strings; a single VC project with all its various XML files has about 4000 strings.
+
+
+
+
+ Store interned strings, and also a ref count, one per document using them.
+
+
+
+
+ Store all the strings a document is using, so their ref count can be decremented.
+
+
+
+
+ Locking object for this shared cache
+
+
+
+
+ Public constructor.
+
+
+
+
+ Obtain the number of entries contained in the cache.
+
+
+
+
+ Obtain the number of documents contained in the cache.
+
+
+
+
+ Add the given string to the cache or return the existing string if it is already
+ in the cache.
+ Constant time operation.
+
+
+
+
+ Find the matching string in the cache.
+ Constant time operation.
+
+ String to find in the cache.
+ Existing string in the cache, or null if it is not contained.
+
+
+
+ Indicates that a document's entries should be removed.
+ If document is unknown, does nothing.
+ Complexity proportional to the number of strings in the document,
+ if the document is anywhere in the cache, otherwise O(1).
+
+
+
+
+ Verifies that each string entry has only one instance in the system.
+ Enable the conditional if and while you make any modifications to the class, then disable as it is very slow.
+
+
+
+
+ Handle event that is fired when an entry in the project root element cache is removed
+ from its strong cache.
+
+
+ When an entry is removed from a project root element cache's strong cache, we will remove
+ its entries from our string cache. Otherwise the string cache ends up being the only one
+ holding references to the Xml documents that have already been dropped.
+
+
+
+
+ Represents an entry in the ProjectStringCache.
+ Can't be a struct because the copy-by-value and the ref counting don't go well together.
+
+
+
+
+ Cached string
+
+
+
+
+ Number of XmlDocuments where this string is included.
+
+
+
+
+ Constructor.
+ Caller must then do Increment().
+
+
+
+
+ Key to find it
+
+
+
+
+ Number of documents using this string
+
+
+
+
+ Get the cached string.
+
+
+
+
+ Indicates that this entry is included in the given document.
+ Callers must verify that we were not already adreffed for this document.
+
+
+
+
+ Removes a container for this entry.
+ Callers must verify that this was not already reffed and not subsequently dereffed.
+
+
+
+
+ Common constructor arguments.
+
+
+
+
+ Global properties to evaluate with.
+
+
+
+
+ Tools version to evaluate with
+
+
+
+
+ Sub-toolset version to explicitly evaluate the toolset with.
+
+
+
+
+ The the project is added to. Default is .
+
+
+
+
+ The to use for evaluation.
+
+
+
+
+ The to use for evaluation.
+
+
+
+
+ Provides to be used for evaluation.
+
+
+
+
+ Gets or sets a value indicating if loading the project is allowed to interact with the user.
+
+
+
+
+ An exception representing the case where the build was aborted by request, as opposed to being
+ unceremoniously shut down due to another kind of error exception.
+
+
+ This is public because it may be returned in the Exceptions collection of a BuildResult.
+ If you add fields to this class, add a custom serialization constructor and override GetObjectData().
+
+
+
+
+ Constructs a standard BuildAbortedException.
+
+
+
+
+ Constructs a BuildAbortedException with an additional message attached.
+
+
+
+
+ Constructs a BuildAbortedException with an additional message attached and an inner exception.
+
+
+
+
+ Protected constructor used for (de)serialization.
+ If we ever add new members to this class, we'll need to update this.
+
+
+
+
+ Gets the error code (if any) associated with the exception message.
+
+ Error code string, or null.
+
+
+
+ ISerializable method which we must override since Exception implements this interface
+ If we ever add new members to this class, we'll need to update this.
+
+
+
+
+ An exception representing the case where a BuildRequest has caused a circular project dependency. This is used to
+ terminate the request builder which initiated the failure path.
+
+
+ If you add fields to this class, add a custom serialization constructor and override GetObjectData().
+
+
+
+
+ Constructs a standard BuildAbortedException.
+
+
+
+
+ Constructor for deserialization.
+
+
+
+
+ This exception is used to wrap an unhandled exception from a logger. This exception aborts the build, and it can only be
+ thrown by the MSBuild engine.
+
+
+
+
+ Default constructor.
+
+
+ This constructor only exists to satisfy .NET coding guidelines. Use the rich constructor instead.
+
+
+
+
+
+ Creates an instance of this exception using the specified error message.
+
+
+ This constructor only exists to satisfy .NET coding guidelines. Use the rich constructor instead.
+
+
+
+
+
+
+ Creates an instance of this exception using the specified error message and inner exception.
+
+
+ This constructor only exists to satisfy .NET coding guidelines. Use the rich constructor instead.
+
+
+
+
+
+
+
+ Creates an instance of this exception using rich error information.
+ Internal for unit testing
+
+ This is the only usable constructor.
+
+
+ Can be null.
+
+
+
+
+
+
+ Protected constructor used for (de)serialization.
+ If we ever add new members to this class, we'll need to update this.
+
+
+
+
+
+
+ ISerializable method which we must override since Exception implements this interface
+ If we ever add new members to this class, we'll need to update this.
+
+
+
+
+
+
+ Provide default values for optional members
+
+
+
+
+ Don't actually have anything to do in the method, but the method is required when implementing an optional field
+
+
+
+
+ Gets the details of the build event (if any) that was being logged.
+
+ The build event args, or null.
+
+
+
+ Gets the error code associated with this exception's message (not the inner exception).
+
+ The error code string.
+
+
+
+ Gets the F1-help keyword associated with this error, for the host IDE.
+
+ The keyword string.
+
+
+
+ True if the exception occurred during logger initialization
+
+
+
+
+ Throws an instance of this exception using rich error information.
+
+
+ Can be null.
+
+
+
+
+
+
+ This exception is thrown whenever there is a problem with the user's XML project file. The problem might be semantic or
+ syntactical. The latter would be of a type typically caught by XSD validation (if it was performed by the project writer).
+
+
+
+
+ Default constructor.
+
+
+ This constructor only exists to satisfy .NET coding guidelines. Use a rich constructor whenever possible.
+
+
+
+
+ Creates an instance of this exception using the specified error message.
+
+
+ This constructor only exists to satisfy .NET coding guidelines. Use a rich constructor whenever possible.
+
+
+
+
+
+ Creates an instance of this exception using the specified error message and inner exception.
+
+
+ This constructor only exists to satisfy .NET coding guidelines. Use a rich constructor whenever possible.
+
+
+
+
+
+
+ Creates an instance of this exception using the specified error message and inner invalid project file exception.
+ This is used in order to wrap and exception rather than rethrow it verbatim, which would reset the callstack.
+ The assumption is that all the metadata for the outer exception comes from the inner exception, eg., they have the same error code.
+
+
+
+
+ Protected constructor used for (de)serialization.
+ If we ever add new members to this class, we'll need to update this.
+
+
+
+
+
+
+ ISerializable method which we must override since Exception implements this interface
+ If we ever add new members to this class, we'll need to update this.
+
+
+
+
+
+
+ Creates an instance of this exception using rich error information.
+
+ This constructor is preferred over the basic constructors.
+ The invalid project file (can be empty string).
+ The invalid line number in the project (set to zero if not available).
+ The invalid column number in the project (set to zero if not available).
+ The end of a range of invalid lines in the project (set to zero if not available).
+ The end of a range of invalid columns in the project (set to zero if not available).
+ Error message for exception.
+ Error sub-category that describes the error (can be null).
+ The error code (can be null).
+ The F1-help keyword for the host IDE (can be null).
+
+
+
+ Creates an instance of this exception using rich error information.
+
+ This constructor is preferred over the basic constructors.
+ The invalid project file (can be empty string).
+ The invalid line number in the project (set to zero if not available).
+ The invalid column number in the project (set to zero if not available).
+ The end of a range of invalid lines in the project (set to zero if not available).
+ The end of a range of invalid columns in the project (set to zero if not available).
+ Error message for exception.
+ Error sub-category that describes the error (can be null).
+ The error code (can be null).
+ The F1-help keyword for the host IDE (can be null).
+ Any inner exception. May be null.
+
+
+
+ Gets the exception message including the affected project file (if any).
+
+ The complete message string.
+
+
+
+ Gets the exception message not including the project file.
+
+ The error message string only.
+
+
+
+ Gets the file (if any) associated with this exception.
+ This may be an imported file.
+
+
+ The name is poorly chosen as this may be a targets file,
+ but the name has shipped now.
+
+ Project filename/path string, or null.
+
+
+
+ Gets the invalid line number (if any) in the project.
+
+ The invalid line number, or zero.
+
+
+
+ Gets the invalid column number (if any) in the project.
+
+ The invalid column number, or zero.
+
+
+
+ Gets the last line number (if any) of a range of invalid lines in the project.
+
+ The last invalid line number, or zero.
+
+
+
+ Gets the last column number (if any) of a range of invalid columns in the project.
+
+ The last invalid column number, or zero.
+
+
+
+ Gets the error sub-category (if any) that describes the type of this error.
+
+ The sub-category string, or null.
+
+
+
+ Gets the error code (if any) associated with the exception message.
+
+ Error code string, or null.
+
+
+
+ Gets the F1-help keyword (if any) associated with this error, for the host IDE.
+
+ The keyword string, or null.
+
+
+
+ Whether the exception has already been logged. Allows the exception to be logged at the
+ most appropriate location, but continue to be propagated.
+
+
+
+
+ Exception subclass that ToolsetReaders should throw.
+
+
+
+
+ The MSBuild error code corresponding with this exception.
+
+
+
+
+ Basic constructor.
+
+
+
+
+ Basic constructor.
+
+
+
+
+
+ Basic constructor.
+
+
+
+
+
+
+ Basic constructor.
+
+
+
+
+ Constructor that takes an MSBuild error code
+
+
+
+
+
+
+ Constructor that takes an MSBuild error code
+
+
+
+
+
+
+
+ ISerializable method which we must override since Exception implements this interface
+ If we ever add new members to this class, we'll need to update this.
+
+
+
+
+
+
+ The MSBuild error code corresponding with this exception, or
+ null if none was specified.
+
+
+
+
+ Throws an InvalidToolsetDefinitionException.
+
+ PERF WARNING: calling a method that takes a variable number of arguments
+ is expensive, because memory is allocated for the array of arguments -- do
+ not call this method repeatedly in performance-critical scenarios
+
+
+
+
+
+
+ Throws an InvalidToolsetDefinitionException including a specified inner exception,
+ which may be interesting to hosts.
+
+ PERF WARNING: calling a method that takes a variable number of arguments
+ is expensive, because memory is allocated for the array of arguments -- do
+ not call this method repeatedly in performance-critical scenarios
+
+
+
+
+ Generic exception used to wrap exceptions thrown during Registry access.
+
+
+
+
+ Basic constructor.
+
+
+
+
+ Basic constructor.
+
+
+
+
+
+ Basic constructor.
+
+
+
+
+
+
+ Constructor that takes a string description of the registry
+ key or value causing the error.
+
+
+
+
+
+
+ Since this class implements Iserializable this constructor is required to be implemented.
+
+
+
+
+ Constructor that takes a string description of the registry
+ key or value causing the error.
+
+
+
+
+
+
+
+ A composite glob that returns a match for an input if any of its
+ inner globs match the input (disjunction).
+
+
+
+
+ The direct children of this composite
+
+
+
+
+ Constructor
+
+ Children globs. Input gets shallow cloned
+
+
+
+ Constructor
+
+ Children globs. Input gets shallow cloned
+
+
+
+ Constructor
+
+ First child glob.
+ Second child glob.
+
+
+
+ Constructor
+
+ Children globs.
+
+
+
+
+
+
+ Creates an that aggregates multiple other globs
+ such that the resulting glob matches when any inner glob matches (disjunction).
+
+
+
+ When contains no elements, a singleton glob is
+ returned that never matches, regardless of input.
+
+
+ When contains one element, that single element is
+ returned directly. This avoids allocating a redundant wrapper instance.
+
+
+ An enumeration of globs to compose.
+ The logical disjunction of the input globs.
+
+
+
+ A glob that never returns a match.
+
+
+
+
+ Singleton instance of this type.
+
+
+
+
+ Extensions for
+
+
+
+
+ Retrieve all the objects from the given composite.
+
+ A glob composite
+
+
+
+
+ A glob with gaps. The gaps are represented as other globs.
+ For example, to express a glob that matches all .cs files except the ones containing "foo" and the ones under bin directories, one can use:
+
+ new MSBuildGlobWithGaps(
+ MSBuildGlob.Parse("**/*.cs"), // matches all .cs files
+ new CompositeGlob( // a composite glob to combine all the gaps
+ MSBuildGlob.Parse("**/*foo*.cs"), // matches .cs files containing "foo"
+ MSBuildGlob.Parse("**/bin/**/*.cs") // matches .cs files under bin directories
+ )
+ )
+
+
+
+
+
+ The main glob used for globbing operations.
+
+
+
+
+ Glob which will be subtracted from the .
+
+
+
+
+ Constructor
+
+ The main glob
+ The gap glob
+
+
+
+ Constructor
+
+ The main glob
+ The gap glob
+
+
+
+ Constructor
+
+ The main glob
+ The gap glob
+
+
+
+
+
+
+ Represents a parsed MSBuild glob.
+ An MSBuild glob is composed of three parts:
+ - fixed directory part: "a/b/" in "a/b/**/*test*/**/*.cs"
+ - wildcard directory part: "**/*test*/**/" in "a/b/**/*test*/**/*.cs"
+ - file name part: "*.cs" in "a/b/**/*test*/**/*.cs"
+
+
+
+
+ The fixed directory part.
+
+
+
+
+ The wildcard directory part
+
+
+
+
+ The file name part
+
+
+
+
+ Whether the glob was parsed sucsesfully from a string.
+ Illegal glob strings contain:
+ - invalid path characters (other than the wildcard characters themselves)
+ - "..."
+ - ":"
+ In addition, the wildcard directory part:
+ - cannot contain ".."
+ - if ** is present it must appear alone between slashes
+
+
+
+
+
+
+
+ Similar to but also provides the match groups for the glob parts
+
+
+
+
+
+
+ Parse the given into a using a given
+ .
+
+
+ The root of the glob.
+ The fixed directory part of the glob and the match arguments ( and )
+ will get normalized against this root.
+ If empty, the current working directory is used.
+ Cannot be null, and cannot contain invalid path arguments.
+
+ The string to parse
+
+
+
+
+ See .
+ The glob root, if the glob is not fully qualified, will be the current working directory.
+
+
+
+
+
+
+ Return type of
+
+
+
+
+ Whether the argument was matched against the glob
+
+
+
+
+ The fixed directory part match
+
+
+
+
+ The wildcard directory part match
+
+
+
+
+ The file name part match
+
+
+
+
+ Exposes the globbing semantics of the MSBuild engine.
+
+
+
+
+ Matches the given against the glob.
+ Matching is path aware:
+ - slashes are normalized
+ - arguments representing relative paths are normalized against the glob's root.
+ For example, the glob **/*.cs does not match ../a.cs, since ../a.cs points outside of the glob root.
+
+ Returns false if contains invalid path or file characters.
+
+ The string to match. If the string represents a relative path, it will get normalized against the glob's root. Cannot be null.
+
+
+
+
+ A specialized collection used when element data originates in an immutable Project.
+
+
+
+
+ Wraps the Project's values.
+
+
+
+
+ A specialized collection used when item data originates in an immutable Project.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Simple replacement for System.Version used to implement version
+ comparison intrinic property functions.
+
+ Allows major version only (e.g. "3" is 3.0.0.0), ignores leading 'v'
+ (e.g. "v3.0" is 3.0.0.0).
+
+ Ignores semver prerelease and metadata portions (e.g. "1.0.0-preview+info"
+ is 1.0.0.0).
+
+ Treats unspecified components as 0 (e.g. x == x.0 == x.0.0 == x.0.0.0).
+
+ Ignores leading and trailing whitespace, but does not tolerate whitespace
+ between components, unlike System.Version.
+
+ Also unlike System.Version, '+' is ignored as semver metadata as described
+ above, not tolerated as positive sign of integer component.
+
+
+ Tolerating leading 'v' allows using $(TargetFrameworkVersion) directly.
+
+ Ignoring semver portions allows, for example, checking >= major.minor
+ while still in development of that release.
+
+ Implemented as a struct to avoid heap allocation. Parsing is done
+ without heap allocation at all on .NET Core. However, on .NET Framework,
+ the integer component substrings are allocated as there is no int.Parse
+ on span there.
+
+
+
+
+ Gets a value indicating whether any elements are in this collection
+ that match a given condition.
+
+
+ This extension method accepts an argument which is then passed, on the stack, to the predicate.
+ This allows using a static lambda, which can avoid a per-call allocation of a closure object.
+
+ The type of element contained by the collection.
+ The type of argument passed to .
+ The array to check.
+ The predicate.
+ The argument to pass to .
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.CSharp.CrossTargeting.targets b/msvc/MSBuild/Current/Bin/Microsoft.CSharp.CrossTargeting.targets
new file mode 100644
index 0000000000000000000000000000000000000000..31aecd05acf69ab5c4022dc59d0508570b231aa7
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.CSharp.CrossTargeting.targets
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed\Microsoft.CSharp.DesignTime.targets
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.CSharp.CurrentVersion.targets b/msvc/MSBuild/Current/Bin/Microsoft.CSharp.CurrentVersion.targets
new file mode 100644
index 0000000000000000000000000000000000000000..23602667ba3460b9b9ade31d2331c19285dc9d1a
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.CSharp.CurrentVersion.targets
@@ -0,0 +1,372 @@
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ $(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.CSharp.targets
+ $(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.Microsoft.CSharp.targets
+
+
+
+
+
+ .cs
+ C#
+ Managed
+ true
+ true
+ true
+ true
+ true
+ {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Properties
+
+
+
+
+
+ File
+
+
+ BrowseObject
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Temporary Remove="@(_Temporary)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Temporary Remove="@(_Temporary)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+ <_DebugSymbolsIntermediatePathTemporary Include="$(PdbFile)"/>
+
+ <_DebugSymbolsIntermediatePath Include="@(_DebugSymbolsIntermediatePathTemporary->'%(RootDir)%(Directory)%(Filename).pdb')"/>
+
+
+
+ $(CoreCompileDependsOn);_ComputeNonExistentFileProperty;ResolveCodeAnalysisRuleSet
+ true
+
+
+
+
+
+
+ $(NoWarn);1701;1702
+
+
+
+
+ $(NoWarn);2008
+
+
+
+
+
+
+
+
+
+
+ $(AppConfig)
+
+
+ $(IntermediateOutputPath)$(TargetName).compile.pdb
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ $(RoslynTargetsPath)\Microsoft.CSharp.Core.targets
+
+
+
+
+
+
+
+ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed\Microsoft.CSharp.DesignTime.targets
+
+
+
+
+
+
+
+
+
+
+
+// <autogenerated />
+using System%3b
+using System.Reflection%3b
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute("$(TargetFrameworkMoniker)", FrameworkDisplayName = "$(TargetFrameworkMonikerDisplayName)")]
+
+
+
+
+
+ true
+
+ true
+ true
+
+ $([System.Globalization.CultureInfo]::CurrentUICulture.Name)
+
+
+
+
+
+ <_ExplicitReference Include="$(FrameworkPathOverride)\mscorlib.dll" />
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.CSharp.targets b/msvc/MSBuild/Current/Bin/Microsoft.CSharp.targets
new file mode 100644
index 0000000000000000000000000000000000000000..c8c42d93eedba188baa754ad600a669b6c215bce
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.CSharp.targets
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+ $(MSBuildToolsPath)\Microsoft.CSharp.CrossTargeting.targets
+
+
+
+
+ $(MSBuildToolsPath)\Microsoft.CSharp.CurrentVersion.targets
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Common.CrossTargeting.targets b/msvc/MSBuild/Current/Bin/Microsoft.Common.CrossTargeting.targets
new file mode 100644
index 0000000000000000000000000000000000000000..ed36eb29ab92a0a116bcb969af47b9b03b610831
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Common.CrossTargeting.targets
@@ -0,0 +1,263 @@
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ThisProjectBuildMetadata Include="$(MSBuildProjectFullPath)">
+ @(_TargetFrameworkInfo)
+ @(_TargetFrameworkInfo->'%(TargetFrameworkMonikers)')
+ @(_TargetFrameworkInfo->'%(TargetPlatformMonikers)')
+ $(_AdditionalPropertiesFromProject)
+ false
+ @(_TargetFrameworkInfo->'%(IsRidAgnostic)')
+
+
+ false
+ $(Platform)
+ $(Platforms)
+
+
+
+
+
+
+
+ <_TargetFramework Include="$(TargetFrameworks)" />
+
+ <_TargetFrameworkNormalized Include="@(_TargetFramework->Trim()->Distinct())" />
+ <_InnerBuildProjects Include="$(MSBuildProjectFile)">
+ TargetFramework=%(_TargetFrameworkNormalized.Identity)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Build
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $([MSBuild]::IsRunningFromVisualStudio())
+ $([MSBuild]::GetToolsDirectory32())\..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets
+ $(MSBuildToolsPath)\NuGet.targets
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+ false
+
+ true
+
+
+
+
+
+ true
+
+
+
+
+ <_DirectoryBuildTargetsFile Condition="'$(_DirectoryBuildTargetsFile)' == ''">Directory.Build.targets
+ <_DirectoryBuildTargetsBasePath Condition="'$(_DirectoryBuildTargetsBasePath)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), '$(_DirectoryBuildTargetsFile)'))
+ $([System.IO.Path]::Combine('$(_DirectoryBuildTargetsBasePath)', '$(_DirectoryBuildTargetsFile)'))
+
+
+
+
+
+ false
+
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Common.CurrentVersion.targets b/msvc/MSBuild/Current/Bin/Microsoft.Common.CurrentVersion.targets
new file mode 100644
index 0000000000000000000000000000000000000000..5005813395b90bd58a39c3b02933a2bc6a168ae2
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Common.CurrentVersion.targets
@@ -0,0 +1,6859 @@
+
+
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+ 10.0
+
+
+
+ $(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.Common.targets
+ $(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.Microsoft.Common.targets
+ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ReportingServices\Microsoft.ReportingServices.targets
+
+
+
+
+
+
+ Managed
+
+
+
+
+ .NETFramework
+ v4.0
+
+
+
+
+ Any CPU,x86,x64,Itanium
+ Any CPU,x86,x64
+
+
+
+
+
+
+
+
+ true
+
+ true
+
+
+
+ $(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion),Profile=$(TargetFrameworkProfile)
+ $(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)
+
+
+ $(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)
+
+ $([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries($(TargetFrameworkIdentifier), $(TargetFrameworkVersion), $(TargetFrameworkProfile), $(PlatformTarget), $(TargetFrameworkRootPath), $(TargetFrameworkFallbackSearchPaths)))
+ $(MSBuildFrameworkToolsPath)
+
+
+
+ Windows
+ 7.0
+ $(TargetPlatformSdkRootOverride)\
+ $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v$(TargetPlatformVersion)', InstallationFolder, null, RegistryView.Registry32, RegistryView.Default))
+ $([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKLocation($(TargetPlatformIdentifier), $(TargetPlatformVersion)))
+ $(TargetPlatformSdkPath)Windows Metadata
+ $(TargetPlatformSdkPath)References\CommonConfiguration\Neutral
+ $(TargetPlatformSdkMetadataLocation)
+ true
+ $(WinDir)\System32\WinMetadata
+ $(TargetPlatformIdentifier),Version=$(TargetPlatformVersion)
+ $([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion)))
+
+
+
+
+
+
+ <_OriginalPlatform>$(Platform)
+
+ <_OriginalConfiguration>$(Configuration)
+
+ <_OutputPathWasMissing Condition="'$(_OriginalPlatform)' != '' and '$(_OriginalConfiguration)' != '' and '$(OutputPath)' == ''">true
+
+ true
+
+
+
+ AnyCPU
+ $(Platform)
+ Debug
+ $(Configuration)
+
+ bin\
+ $(BaseOutputPath)\
+ $(BaseOutputPath)$(Configuration)\
+ $(BaseOutputPath)$(PlatformName)\$(Configuration)\
+ $(OutputPath)\
+
+ obj\
+ $(BaseIntermediateOutputPath)\
+ $(BaseIntermediateOutputPath)$(Configuration)\
+ $(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\
+ $(IntermediateOutputPath)\
+
+
+
+
+ $(TargetType)
+ library
+ exe
+
+ true
+
+
+ <_DebugSymbolsProduced>false
+ <_DebugSymbolsProduced Condition="'$(DebugSymbols)'=='true'">true
+ <_DebugSymbolsProduced Condition="'$(DebugType)'=='none'">false
+ <_DebugSymbolsProduced Condition="'$(DebugType)'=='pdbonly'">true
+ <_DebugSymbolsProduced Condition="'$(DebugType)'=='full'">true
+ <_DebugSymbolsProduced Condition="'$(DebugType)'=='portable'">true
+ <_DebugSymbolsProduced Condition="'$(DebugType)'=='embedded'">false
+ <_DebugSymbolsProduced Condition="'$(ProduceOnlyReferenceAssembly)'=='true'">false
+
+
+ <_DocumentationFileProduced>true
+ <_DocumentationFileProduced Condition="'$(DocumentationFile)'==''">false
+
+
+ false
+
+
+
+
+
+ <_InvalidConfigurationError Condition=" '$(SkipInvalidConfigurations)' != 'true' ">true
+ <_InvalidConfigurationWarning Condition=" '$(SkipInvalidConfigurations)' == 'true' ">true
+
+
+
+
+ .exe
+ .exe
+ .exe
+ .dll
+ .netmodule
+ .winmdobj
+
+
+
+
+ true
+
+ $(OutputPath)
+
+
+ $(OutDir)\
+ $(MSBuildProjectName)
+
+
+
+ $(OutDir)$(ProjectName)\
+
+ $(MSBuildProjectName)
+ $(RootNamespace)
+ $(AssemblyName)
+
+ $(MSBuildProjectFile)
+
+ $(MSBuildProjectExtension)
+
+ $(TargetName).winmd
+ $(WinMDExpOutputWindowsMetadataFilename)
+ $(TargetName)$(TargetExt)
+
+
+
+
+
+
+ <_DeploymentPublishableProjectDefault Condition="'$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">true
+ $(_DeploymentPublishableProjectDefault)
+
+ <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='library'">Native.$(AssemblyName).manifest
+
+ <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='winexe'">$(TargetFileName).manifest
+
+ <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='exe'">$(TargetFileName).manifest
+
+ <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='appcontainerexe'">$(TargetFileName).manifest
+
+ $(AssemblyName).application
+
+ $(AssemblyName).xbap
+
+ $(GenerateManifests)
+
+ <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='library'">Native.$(AssemblyName)
+ <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='winexe'">$(AssemblyName).exe
+ <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='exe'">$(AssemblyName).exe
+ <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='appcontainerexe'">$(AssemblyName).exe
+ <_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' != 'true'">$(AssemblyName).application
+ <_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' == 'true'">$(AssemblyName).xbap
+
+ <_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'=='true'">.deploy
+ <_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'!='true'">
+
+ <_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'=='true'">$(UpdateInterval)
+ <_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'=='true'">$(UpdateIntervalUnits)
+ <_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'!='true'">0
+ <_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'!='true'">Days
+ <_DeploymentBuiltMinimumRequiredVersion Condition="'$(UpdateRequired)'=='true' and '$(Install)'=='true'">$(MinimumRequiredVersion)
+
+ <_DeploymentLauncherBased Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">true
+
+ 100
+
+
+
+
+ *
+ $(UICulture)
+
+
+
+
+ <_OutputPathItem Include="$(OutDir)"/>
+
+ <_UnmanagedRegistrationCache Include="$(BaseIntermediateOutputPath)$(MSBuildProjectFile).UnmanagedRegistration.cache"/>
+ <_ResolveComReferenceCache Include="$(IntermediateOutputPath)$(MSBuildProjectFile).ResolveComReference.cache"/>
+
+
+
+
+
+ $([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))))
+
+
+ $(TargetDir)$(TargetFileName)
+
+ $([MSBuild]::NormalizePath($(TargetDir), 'ref', $(TargetFileName)))
+ $([MSBuild]::NormalizePath($(MSBuildProjectDirectory), $(IntermediateOutputPath), 'ref', $(TargetFileName)))
+
+
+ $([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))
+
+
+ $(ProjectDir)$(ProjectFileName)
+
+
+
+
+
+
+
+
+
+ *Undefined*
+ *Undefined*
+
+ *Undefined*
+
+ *Undefined*
+
+ *Undefined*
+
+ *Undefined*
+
+
+
+
+ true
+
+ true
+
+
+
+ true
+ false
+
+
+
+ $(MSBuildProjectFile).FileListAbsolute.txt
+
+ false
+
+ true
+ true
+ <_ResolveReferenceDependencies Condition="'$(_ResolveReferenceDependencies)' == ''">false
+ <_GetChildProjectCopyToOutputDirectoryItems Condition="'$(_GetChildProjectCopyToOutputDirectoryItems)' == ''">true
+ false
+ false
+
+
+
+ <_GenerateBindingRedirectsIntermediateAppConfig>$(IntermediateOutputPath)$(TargetFileName).config
+
+
+
+ $(MSBuildProjectFile)
+
+ $(MSBuildProjectFile.Substring(0,8)).$([MSBuild]::StableStringHash($(MSBuildProjectFile)).ToString("X8"))
+ $(MSBuildCopyMarkerName).Up2Date
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).compile.pdb" Condition="'$(OutputType)' == 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/>
+ <_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).pdb" Condition="'$(OutputType)' != 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/>
+ <_DebugSymbolsOutputPath Include="@(_DebugSymbolsIntermediatePath->'$(OutDir)%(Filename)%(Extension)')" />
+
+
+
+ $(IntermediateOutputPath)$(TargetName).pdb
+ <_WinMDDebugSymbolsOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDExpOutputPdb)'))))
+
+
+
+ $(IntermediateOutputPath)$(TargetName).xml
+ <_WinMDDocFileOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDOutputDocumentationFile)'))))
+
+
+
+ <_IntermediateWindowsMetadataPath>$(IntermediateOutputPath)$(WinMDExpOutputWindowsMetadataFilename)
+ <_WindowsMetadataOutputPath>$(OutDir)$(WinMDExpOutputWindowsMetadataFilename)
+
+
+
+
+ <_DeploymentManifestEntryPoint Include="@(IntermediateAssembly)">
+ $(TargetFileName)
+
+
+
+
+ <_DeploymentManifestIconFile Include="$(ApplicationIcon)" Condition="Exists('$(ApplicationIcon)')">
+ $(ApplicationIcon)
+
+
+
+
+ $(_DeploymentTargetApplicationManifestFileName)
+
+
+
+ <_ApplicationManifestFinal Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)">
+ $(_DeploymentTargetApplicationManifestFileName)
+
+
+
+
+ $(TargetDeployManifestFileName)
+
+
+
+ <_DeploymentIntermediateTrustInfoFile Include="$(IntermediateOutputPath)$(TargetName).TrustInfo.xml" Condition="'$(TargetZone)'!=''"/>
+
+
+
+
+ <_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(UpdateUrl)
+ <_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(InstallUrl)
+ <_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(PublishUrl)
+ <_DeploymentUrl Condition="!('$(UpdateUrl)'=='') and '$(Install)'=='false'">
+ <_DeploymentUrl Condition="'$(_DeploymentUrl)'!=''">$(_DeploymentUrl)$(TargetDeployManifestFileName)
+
+ <_DeploymentUrl Condition="'$(UpdateUrl)'=='' and !('$(Install)'=='true' and '$(UpdateEnabled)'=='true')">
+ <_DeploymentUrl Condition="'$(ExcludeDeploymentUrl)'=='true'">
+
+
+
+
+ <_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true'">$(InstallUrl)
+ <_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true' and '$(InstallUrl)'==''">$(PublishUrl)
+ <_DeploymentComponentsUrl Condition="'$(BootstrapperComponentsLocation)'=='Absolute'">$(BootstrapperComponentsUrl)
+
+
+
+
+ $(PublishDir)\
+ $(OutputPath)app.publish\
+
+
+
+
+ $(PublishDir)
+ $(ClickOncePublishDir)\
+
+
+
+
+
+ $(PlatformTarget)
+
+
+ msil
+ amd64
+ ia64
+ x86
+ arm
+
+
+
+ true
+
+
+
+
+ $(Platform)
+ msil
+ amd64
+ ia64
+ x86
+ arm
+
+
+ None
+ $(PROCESSOR_ARCHITECTURE)
+
+
+
+
+ CLR2
+ CLR4
+ CurrentRuntime
+
+ true
+ false
+
+ $(PlatformTarget)
+ x86
+ x64
+ CurrentArchitecture
+
+
+
+
+ Client
+
+
+
+
+ false
+
+
+
+
+
+ true
+ true
+ false
+
+
+
+
+ AssemblyFoldersEx
+ Software\Microsoft\$(TargetFrameworkIdentifier)
+ Software\Microsoft\Microsoft SDKs\$(TargetPlatformIdentifier)
+ $([MSBuild]::GetToolsDirectory32())\AssemblyFolders.config
+ {AssemblyFoldersFromConfig:$(AssemblyFoldersConfigFile),$(TargetFrameworkVersion)};
+
+
+
+ .winmd;
+ .dll;
+ .exe
+
+
+
+
+ .pdb;
+ .xml;
+ .pri;
+ .dll.config;
+ .exe.config
+
+
+
+ Full
+
+
+
+
+ {CandidateAssemblyFiles}
+ $(AssemblySearchPaths);$(ReferencePath)
+ $(AssemblySearchPaths);{HintPathFromItem}
+ $(AssemblySearchPaths);{TargetFrameworkDirectory}
+ $(AssemblySearchPaths);$(AssemblyFoldersConfigFileSearchPath)
+ $(AssemblySearchPaths);{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)}
+ $(AssemblySearchPaths);{AssemblyFolders}
+ $(AssemblySearchPaths);{GAC}
+ $(AssemblySearchPaths);{RawFileName}
+ $(AssemblySearchPaths);$(OutDir)
+
+
+
+
+ false
+
+
+
+
+ $(NoWarn)
+ $(WarningsAsErrors)
+ $(WarningsNotAsErrors)
+
+
+
+
+ $(MSBuildThisFileDirectory)$(LangName)\
+
+
+
+
+ $(MSBuildThisFileDirectory)en-US\
+
+
+
+
+
+
+ Project
+
+
+
+ BrowseObject
+
+
+
+ File
+
+
+
+ Invisible
+
+
+
+ File;BrowseObject
+
+
+
+ File;ProjectSubscriptionService
+
+
+
+
+ $(DefineCommonItemSchemas)
+
+
+
+
+
+ ;BrowseObject
+
+
+ ProjectSubscriptionService;BrowseObject
+
+
+
+
+ ;BrowseObject
+
+
+ ProjectSubscriptionService;BrowseObject
+
+
+
+
+ ;BrowseObject
+
+
+ ProjectSubscriptionService;BrowseObject
+
+
+
+
+
+
+
+
+
+
+ Never
+
+
+ Never
+
+
+ Never
+
+
+ Never
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+ <_GlobalPropertiesToRemoveFromProjectReferences Condition="'$(PassOutputPathToReferencedProjects)'=='false'">$(_GlobalPropertiesToRemoveFromProjectReferences);OutputPath
+
+
+
+
+
+
+
+ <_InvalidConfigurationMessageText>The BaseOutputPath/OutputPath property is not set for project '$(MSBuildProjectFile)'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='$(_OriginalConfiguration)' Platform='$(_OriginalPlatform)'.
+ <_InvalidConfigurationMessageText Condition="'$(BuildingInsideVisualStudio)' == 'true'">$(_InvalidConfigurationMessageText) This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.
+ <_InvalidConfigurationMessageText Condition="'$(BuildingInsideVisualStudio)' != 'true'">$(_InvalidConfigurationMessageText) You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ x86
+
+
+
+
+
+
+
+
+
+
+
+
+ BeforeBuild;
+ CoreBuild;
+ AfterBuild
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BuildOnlySettings;
+ PrepareForBuild;
+ PreBuildEvent;
+ ResolveReferences;
+ PrepareResources;
+ ResolveKeySource;
+ Compile;
+ ExportWindowsMDFile;
+ UnmanagedUnregistration;
+ GenerateSerializationAssemblies;
+ CreateSatelliteAssemblies;
+ GenerateManifests;
+ GetTargetPath;
+ PrepareForRun;
+ UnmanagedRegistration;
+ IncrementalClean;
+ PostBuildEvent
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' != ''">$(MSBuildProjectDefaultTargets)
+ <_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' == ''">Build
+
+
+ BeforeRebuild;
+ Clean;
+ $(_ProjectDefaultTargets);
+ AfterRebuild;
+
+
+
+ BeforeRebuild;
+ Clean;
+ Build;
+ AfterRebuild;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Build
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Build
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Build
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+ true
+
+
+
+
+
+
+
+ $(PrepareForBuildDependsOn);GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata
+
+
+
+
+
+
+ $(TargetFileName).config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @(_TargetFramework40DirectoryItem)
+ @(_TargetFramework35DirectoryItem)
+ @(_TargetFramework30DirectoryItem)
+ @(_TargetFramework20DirectoryItem)
+
+ @(_TargetFramework20DirectoryItem)
+ @(_TargetFramework40DirectoryItem)
+ @(_TargetedFrameworkDirectoryItem)
+ @(_TargetFrameworkSDKDirectoryItem)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(_TargetFrameworkDirectories);$(TargetFrameworkDirectory);$(WinFXAssemblyDirectory)
+ $(TargetFrameworkDirectory);$(TargetPlatformWinMDLocation)
+
+
+
+
+
+ true
+
+
+
+ $(AssemblySearchPaths.Replace('{AssemblyFolders}', '').Split(';'))
+
+
+
+
+
+
+
+
+ $(TargetFrameworkDirectory);@(DesignTimeFacadeDirectories)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Temp Remove="@(_Temp)" />
+
+
+
+
+
+
+
+
+
+
+ <_Temp Remove="@(_Temp)" />
+
+
+
+
+
+
+
+
+
+
+ <_Temp Remove="@(_Temp)" />
+
+
+
+
+
+
+
+
+
+
+ <_Temp Remove="@(_Temp)" />
+
+
+
+
+
+
+
+
+
+
+ <_Temp Remove="@(_Temp)" />
+
+
+
+
+
+
+
+
+
+
+ <_Temp Remove="@(_Temp)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(PlatformTargetAsMSBuildArchitecture)
+
+
+
+
+ $(TargetFrameworkAsMSBuildRuntime)
+
+
+ CurrentRuntime
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BeforeResolveReferences;
+ AssignProjectConfiguration;
+ ResolveProjectReferences;
+ FindInvalidProjectReferences;
+ ResolveNativeReferences;
+ ResolveAssemblyReferences;
+ GenerateBindingRedirects;
+ GenerateBindingRedirectsUpdateAppConfig;
+ ResolveComReferences;
+ AfterResolveReferences
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+ true
+ true
+ false
+
+
+ false
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectReferenceWithConfiguration>
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_MSBuildProjectReference Include="@(ProjectReferenceWithConfiguration)" Condition="'$(BuildingInsideVisualStudio)'!='true' and '@(ProjectReferenceWithConfiguration)'!=''"/>
+
+
+
+
+ <_MSBuildProjectReferenceExistent Include="@(_MSBuildProjectReference)" Condition="Exists('%(Identity)')"/>
+ <_MSBuildProjectReferenceNonexistent Include="@(_MSBuildProjectReference)" Condition="!Exists('%(Identity)')"/>
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+ <_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SetPlatform)' != ''">
+ true
+
+
+
+
+ <_ProjectReferencePlatformPossibilities Include="@(_MSBuildProjectReferenceExistent)"
+ Condition="'%(_MSBuildProjectReferenceExistent.SkipGetPlatformProperties)' != 'true'"/>
+
+
+
+
+
+ <_ProjectReferencePlatformPossibilities Condition="'$(MSBuildProjectExtension)' != '.vcxproj' and '$(MSBuildProjectExtension)' != '.nativeproj' and '%(_ProjectReferencePlatformPossibilities.IsVcxOrNativeProj)' == 'true'">
+
+ x86=Win32
+
+
+
+ <_ProjectReferencePlatformPossibilities Condition="('$(MSBuildProjectExtension)' == '.vcxproj' or '$(MSBuildProjectExtension)' == '.nativeproj') and '%(_ProjectReferencePlatformPossibilities.IsVcxOrNativeProj)' != 'true'">
+ Win32=x86
+
+
+
+
+
+
+
+
+
+
+
+ Platform=%(ProjectsWithNearestPlatform.NearestPlatform)
+
+
+
+
+ %(ProjectsWithNearestPlatform.UndefineProperties);Platform
+
+
+ <_MSBuildProjectReferenceExistent Remove="@(_MSBuildProjectReferenceExistent)" Condition="'%(_MSBuildProjectReferenceExistent.SkipGetPlatformProperties)' != 'true'"/>
+ <_MSBuildProjectReferenceExistent Include="@(ProjectsWithNearestPlatform)"/>
+
+
+
+
+
+
+
+
+ $(NuGetTargetMoniker)
+ $(TargetFrameworkMoniker)
+
+
+
+
+ <_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and ('%(Extension)' == '.vcxproj' or '%(Extension)' == '.nativeproj')">
+
+ true
+ %(_MSBuildProjectReferenceExistent.UndefineProperties);TargetFramework
+
+
+
+
+
+ <_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SetTargetFramework)' != ''">
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectReferenceTargetFrameworkPossibilitiesOriginalItemSpec Include="@(_ProjectReferenceTargetFrameworkPossibilities->'%(OriginalItemSpec)')"/>
+ <_ProjectReferenceTargetFrameworkPossibilities Remove="@(_ProjectReferenceTargetFrameworkPossibilities)" />
+ <_ProjectReferenceTargetFrameworkPossibilities Include="@(_ProjectReferenceTargetFrameworkPossibilitiesOriginalItemSpec)"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TargetFramework=%(AnnotatedProjects.NearestTargetFramework)
+
+
+
+
+ %(AnnotatedProjects.UndefineProperties);TargetFramework
+
+
+
+
+ %(AnnotatedProjects.UndefineProperties);RuntimeIdentifier;SelfContained
+
+
+
+ <_MSBuildProjectReferenceExistent Remove="@(_MSBuildProjectReferenceExistent)" Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true'" />
+ <_MSBuildProjectReferenceExistent Include="@(AnnotatedProjects)" />
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ThisProjectBuildMetadata Include="$(MSBuildProjectFullPath)">
+ @(_TargetFrameworkInfo)
+ @(_TargetFrameworkInfo->'%(TargetFrameworkMonikers)')
+ @(_TargetFrameworkInfo->'%(TargetPlatformMonikers)')
+ $(_AdditionalPropertiesFromProject)
+ true
+ @(_TargetFrameworkInfo->'%(IsRidAgnostic)')
+
+ true
+ $(Platform)
+ $(Platforms)
+
+ @(ProjectConfiguration->'%(Platform)'->Distinct())
+
+
+
+
+
+
+
+
+ <_AdditionalTargetFrameworkInfoPropertyWithValue Include="@(AdditionalTargetFrameworkInfoProperty)">
+ $(%(AdditionalTargetFrameworkInfoProperty.Identity))
+
+
+
+
+ <_UseAttributeForTargetFrameworkInfoPropertyNames Condition="'$(_UseAttributeForTargetFrameworkInfoPropertyNames)' == ''">false
+
+
+
+
+
+
+
+ <_TargetFrameworkInfo Include="$(TargetFramework)">
+ $(TargetFramework)
+ $(TargetFrameworkMoniker)
+ $(TargetPlatformMoniker)
+ None
+ $(_AdditionalTargetFrameworkInfoProperties)
+
+
+ $(IsRidAgnostic)
+ true
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+ AssignProjectConfiguration;
+ _SplitProjectReferencesByFileExistence;
+ _GetProjectReferenceTargetFrameworkProperties;
+ _GetProjectReferencePlatformProperties
+
+
+
+
+
+
+
+
+
+
+ $(ProjectReferenceBuildTargets)
+
+
+ ProjectReference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ResolvedProjectReferencePaths Remove="@(_ResolvedProjectReferencePaths)" Condition="'%(_ResolvedProjectReferencePaths.ResolveableAssembly)' == 'false'" />
+
+ <_ResolvedProjectReferencePaths>
+ %(_ResolvedProjectReferencePaths.OriginalItemSpec)
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))">
+ %(ReferencePath.ProjectReferenceOriginalItemSpec)
+
+
+
+
+
+
+
+
+ $(GetTargetPathDependsOn)
+
+
+
+
+
+
+ $(GetTargetPathDependsOn)
+
+
+
+
+
+
+ $(TargetPlatformMoniker)
+ $(TargetPlatformIdentifier)
+ $(TargetFrameworkIdentifier)
+ $(TargetFrameworkVersion.TrimStart('vV'))
+ $(TargetRefPath)
+ @(CopyUpToDateMarker)
+
+
+
+
+
+
+
+
+
+ %(_ApplicationManifestFinal.FullPath)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResolveProjectReferences;
+ FindInvalidProjectReferences;
+ GetFrameworkPaths;
+ GetReferenceAssemblyPaths;
+ PrepareForBuild;
+ ResolveSDKReferences;
+ ExpandSDKReferences;
+
+
+
+
+
+
+ <_ReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
+ <_ReferenceInstalledAssemblySubsets Include="$(TargetFrameworkSubset)" />
+
+
+
+
+ $(IntermediateOutputPath)$(MSBuildProjectFile).AssemblyReference.cache
+
+
+
+
+ <_ResolveAssemblyReferencesApplicationConfigFileForExes Include="@(AppConfigWithTargetPath)" Condition="'$(AutoGenerateBindingRedirects)'=='true' or '$(AutoUnifyAssemblyReferences)'=='false'"/>
+
+
+
+
+ <_FindDependencies Condition="'$(BuildingProject)' != 'true' and '$(_ResolveReferenceDependencies)' != 'true'">false
+ true
+ false
+ Warning
+ $(BuildingProject)
+ $(BuildingProject)
+ $(BuildingProject)
+ false
+
+
+
+
+
+
+ true
+
+
+
+
+
+ false
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %(FullPath)
+
+
+
+ %(ReferencePath.Identity)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_NewGenerateBindingRedirectsIntermediateAppConfig Condition="Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)')">true
+ $(_GenerateBindingRedirectsIntermediateAppConfig)
+
+
+
+
+
+ $(TargetFileName).config
+
+
+
+
+
+
+ Software\Microsoft\Microsoft SDKs
+ $(LocalAppData)\Microsoft SDKs;$(MSBuildProgramFiles32)\Microsoft SDKs
+
+ $(MSBuildProgramFiles32)\Microsoft SDKs\Windows Kits\10;$(MSBuildProgramFiles32)\Windows Kits\10
+
+
+ true
+ Windows
+ 8.1
+
+
+ false
+ WindowsPhoneApp
+ 8.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GetInstalledSDKLocations
+
+
+
+
+ Debug
+ Retail
+ Retail
+ $(ProcessorArchitecture)
+ Neutral
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GetReferenceTargetPlatformMonikers
+
+
+
+
+
+
+
+
+
+
+ <_ResolvedProjectReferencePaths Remove="@(InvalidProjectReferences)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResolveSDKReferences
+
+
+
+ .winmd;
+ .dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ false
+ false
+
+ $(TargetFrameworkSDKToolsDirectory)
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ResolveAssemblyReference'))"/>
+
+
+
+
+
+
+ {CandidateAssemblyFiles};
+ $(ReferencePath);
+ {HintPathFromItem};
+ {TargetFrameworkDirectory};
+ {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
+ {RawFileName};
+ $(TargetDir)
+
+
+
+
+
+
+ GetFrameworkPaths;
+ GetReferenceAssemblyPaths;
+ ResolveReferences
+
+
+
+
+
+
+ <_DesignTimeReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
+
+
+
+ $(IntermediateOutputPath)$(MSBuildProjectFile)DesignTimeResolveAssemblyReferences.cache
+
+
+
+
+ {CandidateAssemblyFiles};
+ $(ReferencePath);
+ {HintPathFromItem};
+ {TargetFrameworkDirectory};
+ {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
+ {RawFileName};
+ $(OutDir)
+
+
+
+
+ false
+ false
+ false
+ false
+ false
+ true
+ false
+
+
+
+ <_DesignTimeReferenceAssemblies Include ="$(DesignTimeReference)" />
+
+
+
+ <_RARResolvedReferencePath Include="@(ReferencePath)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+ $(IntermediateOutputPath)
+
+
+
+
+
+
+ $(PlatformTargetAsMSBuildArchitecture)
+
+ $(TargetFrameworkSDKToolsDirectory)
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(PrepareResourcesDependsOn);
+ PrepareResourceNames;
+ ResGen;
+ CompileLicxFiles
+
+
+
+
+
+
+
+
+ AssignTargetPaths;
+ SplitResourcesByCulture;
+ CreateManifestResourceNames;
+ CreateCustomManifestResourceNames
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Temporary Remove="@(_Temporary)" />
+
+
+
+
+
+
+
+
+
+
+
+ <_Temporary Remove="@(_Temporary)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_LicxFile Include="@(EmbeddedResource)" Condition="'%(Extension)'=='.licx'"/>
+
+
+
+ Resx
+
+
+ Non-Resx
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Resx
+
+
+ Non-Resx
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_MixedResourceWithNoCulture Remove="@(_MixedResourceWithNoCulture)" />
+ <_MixedResourceWithCulture Remove="@(_MixedResourceWithCulture)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResolveAssemblyReferences;SplitResourcesByCulture;BeforeResGen;CoreResGen;AfterResGen
+ FindReferenceAssembliesForReferences
+ true
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Temporary Remove="@(_Temporary)" />
+
+
+
+ $(PlatformTargetAsMSBuildArchitecture)
+
+ $(TargetFrameworkSDKToolsDirectory)
+
+
+
+
+ $(TargetFrameworkAsMSBuildRuntime)
+
+
+ CurrentRuntime
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Temporary Remove="@(_Temporary)" />
+
+
+
+ true
+
+
+ true
+
+
+
+
+ true
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(PlatformTargetAsMSBuildArchitecture)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResolveReferences;
+ ResolveKeySource;
+ SetWin32ManifestProperties;
+ FindReferenceAssembliesForReferences;
+ _GenerateCompileInputs;
+ BeforeCompile;
+ _TimeStampBeforeCompile;
+ _GenerateCompileDependencyCache;
+ CoreCompile;
+ _TimeStampAfterCompile;
+ AfterCompile;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_CoreCompileResourceInputs Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Resx'" />
+ <_CoreCompileResourceInputs Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Non-Resx' " />
+
+
+ <_CoreCompileResourceInputs Include="@(ManifestResourceWithNoCulture)" Condition="'%(ManifestResourceWithNoCulture.EmittedForCompatibilityOnly)'==''">
+ Resx
+ false
+
+ <_CoreCompileResourceInputs Include="@(ManifestNonResxWithNoCultureOnDisk)" Condition="'%(ManifestNonResxWithNoCultureOnDisk.EmittedForCompatibilityOnly)'==''">
+ Non-Resx
+ false
+
+
+
+
+
+
+
+
+
+ true
+ $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_AssemblyTimestampBeforeCompile>%(IntermediateAssembly.ModifiedTime)
+
+
+
+
+
+
+
+ $(IntermediateOutputPath)$(MSBuildProjectFile).SuggestedBindingRedirects.cache
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_AssemblyTimestampAfterCompile>%(IntermediateAssembly.ModifiedTime)
+
+
+
+
+
+
+
+
+ __NonExistentSubDir__\__NonExistentFile__
+
+
+
+
+
+
+
+ <_SGenDllName>$(TargetName).XmlSerializers.dll
+ <_SGenDllCreated>false
+ <_SGenGenerateSerializationAssembliesConfig>$(GenerateSerializationAssemblies)
+ <_SGenGenerateSerializationAssembliesConfig Condition="'$(GenerateSerializationAssemblies)' == ''">Auto
+ <_SGenGenerateSerializationAssembliesConfig Condition="'$(ConfigurationName)'=='Debug' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto'">Off
+ true
+ false
+ true
+
+
+
+
+
+
+ $(PlatformTargetAsMSBuildArchitecture)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(CreateSatelliteAssembliesDependsOn);
+ _GenerateSatelliteAssemblyInputs;
+ ComputeIntermediateSatelliteAssemblies;
+ GenerateSatelliteAssemblies
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_SatelliteAssemblyResourceInputs Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Resx'" />
+ <_SatelliteAssemblyResourceInputs Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Non-Resx'" />
+
+
+ <_SatelliteAssemblyResourceInputs Include="@(ManifestResourceWithCulture)" Condition="'%(ManifestResourceWithCulture.EmittedForCompatibilityOnly)'==''">
+ Resx
+ true
+
+ <_SatelliteAssemblyResourceInputs Include="@(ManifestNonResxWithCultureOnDisk)" Condition="'%(ManifestNonResxWithCultureOnDisk.EmittedForCompatibilityOnly)'==''">
+ Non-Resx
+ true
+
+
+
+
+
+
+
+
+
+
+ <_ALExeToolPath Condition="'$(_ALExeToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreateManifestResourceNames
+
+
+
+
+
+
+
+ %(EmbeddedResource.Culture)
+ %(EmbeddedResource.Culture)\$(TargetName).resources.dll
+
+
+
+
+
+
+
+
+ $(Win32Manifest)
+
+
+
+
+
+
+
+
+
+ <_DeploymentBaseManifest>$(ApplicationManifest)
+ <_DeploymentBaseManifest Condition="'$(_DeploymentBaseManifest)'==''">@(_DeploymentBaseManifestWithTargetPath)
+
+
+ true
+
+
+
+
+
+
+
+ $(ApplicationManifest)
+ $(ApplicationManifest)
+
+
+
+
+
+
+
+ $(_FrameworkVersion40Path)\default.win32manifest
+
+
+
+
+
+
+
+
+
+ SetWin32ManifestProperties;
+ GenerateApplicationManifest;
+ GenerateDeploymentManifest
+
+
+
+
+
+
+
+ <_DeploymentPublishFileOfTypeManifestEntryPoint Include="@(PublishFile)" Condition="'%(FileType)'=='ManifestEntryPoint'"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_DeploymentCopyApplicationManifest>true
+
+
+
+
+
+
+
+
+ <_DeploymentManifestTargetFrameworkMoniker>$(TargetFrameworkMoniker)
+ <_DeploymentManifestTargetFrameworkVersion>$(TargetFrameworkVersion)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_DeploymentManifestTargetFrameworkVersion Condition="'$(DeploymentManifestTargetFrameworkVersionOverride)' == ''">v4.5
+ <_DeploymentManifestTargetFrameworkVersion Condition="'$(DeploymentManifestTargetFrameworkVersionOverride)' != ''">$(DeploymentManifestTargetFrameworkVersionOverride)
+ <_DeploymentManifestTargetFrameworkMoniker>.NETFramework,Version=$(_DeploymentManifestTargetFrameworkVersion)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_DeploymentManifestEntryPoint Remove="@(_DeploymentManifestEntryPoint)"/>
+ <_DeploymentManifestEntryPoint Include="@(_DeploymentManifestLauncherEntryPoint)"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_DeploymentManifestType>Native
+
+
+
+
+
+
+
+
+ <_DeploymentManifestVersion>@(_IntermediateAssemblyIdentity->'%(Version)')
+
+
+
+
+
+
+
+
+
+
+ <_SGenDllsRelatedToCurrentDll Include="@(_ReferenceSerializationAssemblyPaths->'%(FullPath)')" Condition="'%(Extension)' == '.dll'"/>
+ <_SGenDllsRelatedToCurrentDll Include="@(SerializationAssembly->'%(FullPath)')" Condition="'%(Extension)' == '.dll'"/>
+
+
+
+ <_CopyLocalFalseRefPaths Include="@(ReferencePath)" Condition="'%(CopyLocal)' == 'false'" />
+ <_CopyLocalFalseRefPathsWithExclusion Include="@(_CopyLocalFalseRefPaths)"
+ Exclude="@(ReferenceCopyLocalPaths);@(_NETStandardLibraryNETFrameworkLib)" />
+
+
+
+ <_ClickOnceSatelliteAssemblies Include="@(IntermediateSatelliteAssembliesWithTargetPath);@(ReferenceSatellitePaths)" />
+
+
+
+
+ <_DeploymentReferencePaths Include="@(ReferenceCopyLocalPaths)"
+ Condition="('%(Extension)' == '.dll' Or '%(Extension)' == '.exe' Or '%(Extension)' == '.md') and ('%(ReferenceCopyLocalPaths.CopyToPublishDirectory)' != 'false')">
+ true
+
+ <_DeploymentReferencePaths Include="@(_CopyLocalFalseRefPathsWithExclusion)" />
+
+
+
+
+ <_ManifestManagedReferences Include="@(_DeploymentReferencePaths);@(ReferenceDependencyPaths);@(_SGenDllsRelatedToCurrentDll);@(SerializationAssembly);@(ReferenceCOMWrappersToCopyLocal)"
+ Exclude="@(_ClickOnceSatelliteAssemblies);@(_ReferenceScatterPaths);@(_ExcludedAssembliesFromManifestGeneration)" />
+
+
+
+
+
+ <_ClickOnceRuntimeCopyLocalItems Include="@(RuntimeTargetsCopyLocalItems)"
+ Condition="'%(RuntimeTargetsCopyLocalItems.CopyLocal)' == 'true'" />
+
+ <_ClickOnceRuntimeCopyLocalItems Include="@(NativeCopyLocalItems)"
+ Condition="'%(NativeCopyLocalItems.CopyLocal)' == 'true'" />
+ <_ClickOnceRuntimeCopyLocalItems Remove="@(_DeploymentReferencePaths)" />
+
+
+ <_ClickOnceTransitiveContentItemsTemp Include="@(_TransitiveItemsToCopyToOutputDirectory->WithoutMetadataValue('CopyToPublishDirectory', 'Never')->'%(TargetPath)')" Condition="'$(PublishProtocol)' == 'ClickOnce'" >
+ %(Identity)
+
+ <_ClickOnceTransitiveContentItems Include="@(_ClickOnceTransitiveContentItemsTemp->'%(SavedIdentity)')" Condition="'%(Identity)'=='@(PublishFile)' Or '%(Extension)'=='.exe' Or '%(Extension)'=='.dll'" />
+
+
+ <_ClickOnceContentItems Include="@(ContentWithTargetPath->WithoutMetadataValue('CopyToPublishDirectory', 'Never'))" />
+ <_ClickOnceContentItems Include="@(_ClickOnceTransitiveContentItems)" />
+
+
+
+ <_ClickOnceNoneItemsTemp Include="@(_NoneWithTargetPath->WithoutMetadataValue('CopyToPublishDirectory', 'Never')->'%(TargetPath)')" Condition="'$(PublishProtocol)'=='Clickonce' And ('%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' or '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest')">
+ %(Identity)
+
+ <_ClickOnceNoneItems Include="@(_ClickOnceNoneItemsTemp->'%(SavedIdentity)')" Condition="'%(Identity)'=='@(PublishFile)' Or '%(Extension)'=='.exe' Or '%(Extension)'=='.dll'" />
+
+ <_ClickOnceFiles Include="@(_ClickOnceContentItems);@(_DeploymentManifestIconFile);@(AppConfigWithTargetPath);@(NetCoreRuntimeJsonFilesForClickOnce);@(_ClickOnceRuntimeCopyLocalItems);@(_ClickOnceNoneItems)" />
+
+
+ <_ClickOnceNoneItemsTemp Remove="@(_ClickOnceNoneItemsTemp)"/>
+ <_ClickOnceNoneItems Remove="@(_ClickOnceNoneItems)"/>
+ <_ClickOnceTransitiveContentItemsTemp Remove="@(_ClickOnceTransitiveContentItemsTemp)"/>
+ <_ClickOnceTransitiveContentItems Remove="@(_ClickOnceTransitiveContentItems)"/>
+ <_ClickOnceContentItems Remove="@(_ClickOnceContentItems)"/>
+ <_ClickOnceRuntimeCopyLocalItems Remove="@(_ClickOnceRuntimeCopyLocalItems)"/>
+
+
+
+
+ <_ClickOnceFiles Include="$(PublishedSingleFilePath);@(_DeploymentManifestIconFile)"/>
+ <_ClickOnceFiles Include="@(_FilesExcludedFromBundle)"/>
+
+
+ <_FileAssociationIcons Include="%(FileAssociation.DefaultIcon)"/>
+ <_ClickOnceFiles Include="@(ContentWithTargetPath)" Condition="'%(Identity)'=='@(_FileAssociationIcons)'"/>
+
+
+
+
+
+
+
+
+ <_ManifestManagedReferences Remove="@(_ReadyToRunCompileList)" />
+ <_ClickOnceFiles Remove="@(_ReadyToRunCompileList)" />
+ <_ClickOnceFiles Include="@(_ReadyToRunFilesToPublish)" />
+ <_ClickOnceTargetFile Include="@(_ReadyToRunFilesToPublish)" Condition="'%(Filename)%(Extension)' == '$(TargetFileName)'" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_DeploymentManifestDependencies Include="@(_DeploymentManifestDependenciesUnfiltered)"
+ Condition="!('%(_DeploymentManifestDependenciesUnfiltered.CopyLocal)' == 'false' And '%(_DeploymentManifestDependenciesUnfiltered.DependencyType)' != 'Install')" />
+
+
+
+ <_DeploymentManifestType>ClickOnce
+
+
+
+
+ <_DeploymentPlatformTarget Condition="'$(_DeploymentLauncherBased)' != 'true'">$(PlatformTarget)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ false
+
+
+
+
+
+ CopyFilesToOutputDirectory
+
+
+
+
+
+
+
+
+ false
+ false
+
+
+
+
+
+
+ false
+ false
+ false
+
+
+
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_TargetsThatPrepareProjectReferences>_SplitProjectReferencesByFileExistence
+
+
+ true
+
+ <_TargetsThatPrepareProjectReferences Condition=" '$(MSBuildCopyContentTransitively)' == 'true' ">
+ AssignProjectConfiguration;
+ _SplitProjectReferencesByFileExistence
+
+
+
+ AssignTargetPaths;
+ $(_TargetsThatPrepareProjectReferences);
+ _GetProjectReferenceTargetFrameworkProperties;
+ _PopulateCommonStateForGetCopyToOutputDirectoryItems
+
+
+
+ <_RecursiveTargetForContentCopying>GetCopyToOutputDirectoryItems
+
+ <_RecursiveTargetForContentCopying Condition=" '$(MSBuildCopyContentTransitively)' == 'false' ">_GetCopyToOutputDirectoryItemsFromThisProject
+
+
+
+
+
+ <_GCTODIKeepDuplicates>false
+ <_GCTODIKeepMetadata>CopyToOutputDirectory;TargetPath
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_CopyToOutputDirectoryTransitiveItems KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <_CopyToOutputDirectoryTransitiveItems KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+
+
+
+
+ <_AllChildProjectItemsWithTargetPath Remove="@(_AllChildProjectItemsWithTargetPath)"/>
+
+
+
+
+ <_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'!=''"/>
+ <_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'!=''"/>
+
+
+
+ <_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='Always' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'!=''"/>
+ <_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='PreserveNewest' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'!=''"/>
+
+
+
+ <_CompileItemsToCopy Include="@(Compile->'%(FullPath)')" Condition="('%(Compile.CopyToOutputDirectory)'=='Always' or '%(Compile.CopyToOutputDirectory)'=='PreserveNewest') AND '%(Compile.MSBuildSourceProjectFile)'!=''"/>
+
+
+
+
+
+
+
+ <_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+
+
+
+ <_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'!=''"/>
+ <_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'!=''"/>
+
+
+
+
+
+
+
+ <_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'==''"/>
+ <_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'==''"/>
+
+
+
+ <_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='Always' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'==''"/>
+ <_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='PreserveNewest' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'==''"/>
+
+
+
+ <_CompileItemsToCopy Include="@(Compile->'%(FullPath)')" Condition="('%(Compile.CopyToOutputDirectory)'=='Always' or '%(Compile.CopyToOutputDirectory)'=='PreserveNewest') AND '%(Compile.MSBuildSourceProjectFile)'==''"/>
+
+
+
+
+
+
+
+ <_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+
+
+
+ <_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'==''"/>
+ <_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'==''"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_TransitiveItemsToCopyToOutputDirectory Remove="@(_ThisProjectItemsToCopyToOutputDirectory)" MatchOnMetadata="TargetPath" MatchOnMetadataOptions="PathLike" />
+
+
+
+ <_TransitiveItemsToCopyToOutputDirectoryAlways KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_TransitiveItemsToCopyToOutputDirectory->'%(FullPath)')" Condition="'%(_TransitiveItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='Always'"/>
+ <_TransitiveItemsToCopyToOutputDirectoryPreserveNewest KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_TransitiveItemsToCopyToOutputDirectory->'%(FullPath)')" Condition="'%(_TransitiveItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='PreserveNewest'"/>
+
+ <_ThisProjectItemsToCopyToOutputDirectoryAlways KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_ThisProjectItemsToCopyToOutputDirectory->'%(FullPath)')" Condition="'%(_ThisProjectItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='Always'"/>
+ <_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_ThisProjectItemsToCopyToOutputDirectory->'%(FullPath)')" Condition="'%(_ThisProjectItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='PreserveNewest'"/>
+
+
+ <_SourceItemsToCopyToOutputDirectoryAlways Include="@(_TransitiveItemsToCopyToOutputDirectoryAlways);@(_ThisProjectItemsToCopyToOutputDirectoryAlways)"/>
+ <_SourceItemsToCopyToOutputDirectory Include="@(_TransitiveItemsToCopyToOutputDirectoryPreserveNewest);@(_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest)"/>
+
+
+
+
+ <_TransitiveItemsToCopyToOutputDirectoryAlways Remove="@(_TransitiveItemsToCopyToOutputDirectoryAlways)"/>
+ <_TransitiveItemsToCopyToOutputDirectoryPreserveNewest Remove="@(_TransitiveItemsToCopyToOutputDirectoryPreserveNewest)"/>
+
+ <_ThisProjectItemsToCopyToOutputDirectoryAlways Remove="@(_ThisProjectItemsToCopyToOutputDirectoryAlways)"/>
+ <_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest Remove="@(_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest)"/>
+ <_ThisProjectItemsToCopyToOutputDirectory Remove="@(_ThisProjectItemsToCopyToOutputDirectory)"/>
+
+
+
+
+
+
+
+
+
+ %(CopyToOutputDirectory)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_DocumentationFileProduced Condition="!Exists('@(DocFileItem)')">false
+
+
+
+
+
+
+
+
+ <_DebugSymbolsProduced Condition="!Exists('@(_DebugSymbolsIntermediatePath)')">false
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_SGenDllCreated Condition="Exists('$(IntermediateOutputPath)$(_SGenDllName)')">true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(PlatformTargetAsMSBuildArchitecture)
+
+
+
+
+ $(TargetFrameworkAsMSBuildRuntime)
+
+
+ CurrentRuntime
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_CleanOrphanFileWrites Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanCurrentFileWrites)"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_CleanRemainingFileWritesAfterIncrementalClean Include="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)" Exclude="@(_CleanOrphanFilesDeleted)"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_CleanPriorFileWrites Include="@(_CleanUnfilteredPriorFileWrites)" Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_CleanCurrentFileWritesWithNoReferences Include="@(_CleanCurrentFileWritesInOutput);@(_CleanCurrentFileWritesInIntermediate)" Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BeforeClean;
+ UnmanagedUnregistration;
+ CoreClean;
+ CleanReferencedProjects;
+ CleanPublishFolder;
+ AfterClean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_CleanRemainingFileWritesAfterClean Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanPriorFileWritesDeleted)"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CleanPublishFolder;
+ $(_RecursiveTargetForContentCopying);
+ _DeploymentGenerateTrustInfo
+ $(DeploymentComputeClickOnceManifestInfoDependsOn)
+
+
+
+
+
+
+ SetGenerateManifests;
+ Build;
+ PublishOnly
+
+
+ _DeploymentUnpublishable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+ SetGenerateManifests;
+ PublishBuild;
+ BeforePublish;
+ GenerateManifests;
+ CopyFilesToOutputDirectory;
+ _CopyFilesToPublishFolder;
+ _DeploymentGenerateBootstrapper;
+ ResolveKeySource;
+ _DeploymentSignClickOnceDeployment;
+ AfterPublish
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BuildOnlySettings;
+ PrepareForBuild;
+ ResolveReferences;
+ PrepareResources;
+ ResolveKeySource;
+ GenerateSerializationAssemblies;
+ CreateSatelliteAssemblies;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_DeploymentApplicationFolderName>Application Files\$(AssemblyName)_$(_DeploymentApplicationVersionFragment)
+ <_DeploymentApplicationDir>$(ClickOncePublishDir)$(_DeploymentApplicationFolderName)\
+
+
+
+
+ false
+ false
+
+
+
+ '$(_DeploymentApplicationDir)%(TargetPath)');
+ @(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
+ @(_DeploymentManifestFiles->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
+ @(ReferenceComWrappersToCopyLocal->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
+ @(ResolvedIsolatedComModules->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
+ @(_DeploymentLooseManifestFile->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)')"
+ SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
+ OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
+ Retries="$(CopyRetryCount)"
+ UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
+ UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)"
+ RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+
+
+
+
+
+
+
+
+
+ '$(_DeploymentApplicationDir)%(TargetPath)');
+ @(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
+ @(PublishedSingleFileToBeCopied->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)')"
+ SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
+ OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
+ Retries="$(CopyRetryCount)"
+ UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
+ UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)"
+ RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ $(TargetPath)
+ $(TargetFileName)
+ true
+
+
+
+
+
+
+ true
+ $(TargetPath)
+ $(TargetFileName)
+
+
+
+
+
+ PrepareForBuild
+ true
+
+
+
+
+
+ <_BuiltProjectOutputGroupOutputIntermediate Include="@(BuiltProjectOutputGroupKeyOutput)"/>
+
+
+
+
+ <_BuiltProjectOutputGroupOutputIntermediate Include="$(AppConfig)" Condition="'$(AddAppConfigToBuildOutputs)'=='true'">
+ $(TargetDir)$(TargetFileName).config
+ $(TargetFileName).config
+
+ $(AppConfig)
+
+
+
+
+ <_IsolatedComReference Include="@(COMReference)" Condition=" '%(COMReference.Isolated)' == 'true' "/>
+ <_IsolatedComReference Include="@(COMFileReference)" Condition=" '%(COMFileReference.Isolated)' == 'true' "/>
+
+
+
+
+ <_BuiltProjectOutputGroupOutputIntermediate Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)" Condition="('@(NativeReference)'!='' or '@(_IsolatedComReference)'!='') And Exists('$(OutDir)$(_DeploymentTargetApplicationManifestFileName)')">
+ $(_DeploymentTargetApplicationManifestFileName)
+
+ $(OutDir)$(_DeploymentTargetApplicationManifestFileName)
+
+
+
+
+
+
+
+ %(_BuiltProjectOutputGroupOutputIntermediate.FullPath)
+
+
+
+
+
+
+
+
+
+
+
+
+ @(_DebugSymbolsOutputPath->'%(FullPath)')
+ @(_DebugSymbolsIntermediatePath->'%(Filename)%(Extension)')
+
+
+
+
+
+
+
+ @(WinMDExpFinalOutputPdbItem->'%(FullPath)')
+ @(WinMDExpOutputPdbItem->'%(Filename)%(Extension)')
+
+
+
+
+
+
+
+
+
+
+
+
+ @(FinalDocFile->'%(FullPath)')
+ true
+ @(DocFileItem->'%(Filename)%(Extension)')
+
+
+
+
+
+
+
+ @(WinMDExpFinalOutputDocItem->'%(FullPath)')
+ @(WinMDOutputDocumentationFileItem->'%(Filename)%(Extension)')
+
+
+
+
+
+
+
+ $(SatelliteDllsProjectOutputGroupDependsOn);PrepareForBuild;PrepareResourceNames
+
+
+
+
+
+
+ %(EmbeddedResource.Culture)\$(TargetName).resources.dll
+ %(EmbeddedResource.Culture)
+
+
+
+
+
+
+ $(TargetDir)%(SatelliteDllsProjectOutputGroupOutputIntermediate.TargetPath)
+
+ %(SatelliteDllsProjectOutputGroupOutputIntermediate.Identity)
+
+
+
+
+
+
+
+ PrepareForBuild;AssignTargetPaths
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(MSBuildProjectFullPath)
+ $(ProjectFileName)
+
+
+
+
+
+
+
+
+
+
+ PrepareForBuild;AssignTargetPaths
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @(_OutputPathItem->'%(FullPath)$(_SGenDllName)')
+ $(_SGenDllName)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResolveSDKReferences;ExpandSDKReferences
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(CommonOutputGroupsDependsOn);
+ BuildOnlySettings;
+ PrepareForBuild;
+ AssignTargetPaths;
+ ResolveReferences
+
+
+
+
+
+
+
+
+
+ $(BuiltProjectOutputGroupDependenciesDependsOn);
+ $(CommonOutputGroupsDependsOn)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(DebugSymbolsProjectOutputGroupDependenciesDependsOn);
+ $(CommonOutputGroupsDependsOn)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SatelliteDllsProjectOutputGroupDependenciesDependsOn);
+ $(CommonOutputGroupsDependsOn)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(DocumentationProjectOutputGroupDependenciesDependsOn);
+ $(CommonOutputGroupsDependsOn)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SGenFilesOutputGroupDependenciesDependsOn);
+ $(CommonOutputGroupsDependsOn)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ReferenceCopyLocalPathsOutputGroupDependsOn);
+ $(CommonOutputGroupsDependsOn)
+
+
+
+
+
+
+
+ %(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)
+
+
+
+
+
+
+
+
+ $(DesignerRuntimeImplementationProjectOutputGroupDependsOn);
+ $(CommonOutputGroupsDependsOn)
+
+
+
+
+
+
+
+
+
+
+
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeAnalysis\Microsoft.CodeAnalysis.targets
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TeamTest\Microsoft.TeamTest.targets
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\Microsoft.AppXPackage.Targets
+
+
+
+
+
+
+
+
+
+ $([MSBuild]::IsRunningFromVisualStudio())
+ $([MSBuild]::GetToolsDirectory32())\..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets
+ $(MSBuildToolsPath)\NuGet.targets
+
+
+
+
+
+
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Common.Test.targets b/msvc/MSBuild/Current/Bin/Microsoft.Common.Test.targets
new file mode 100644
index 0000000000000000000000000000000000000000..f6762a1b7c9c72bbbb87f07a08ff73db5ce76910
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Common.Test.targets
@@ -0,0 +1,25 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Common.overridetasks b/msvc/MSBuild/Current/Bin/Microsoft.Common.overridetasks
new file mode 100644
index 0000000000000000000000000000000000000000..10096fd011ca03ffc1da5748b370af70e8a9d914
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Common.overridetasks
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Common.targets b/msvc/MSBuild/Current/Bin/Microsoft.Common.targets
new file mode 100644
index 0000000000000000000000000000000000000000..71b284b30d4e01a586109885f433442b96021abc
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Common.targets
@@ -0,0 +1,64 @@
+
+
+
+
+ $(MSBuildToolsPath)\Microsoft.Common.CurrentVersion.targets
+
+
+
+
+
+
+
+ false
+
+ true
+
+
+
+
+
+ true
+
+
+
+
+ <_DirectoryBuildTargetsFile Condition="'$(_DirectoryBuildTargetsFile)' == ''">Directory.Build.targets
+ <_DirectoryBuildTargetsBasePath Condition="'$(_DirectoryBuildTargetsBasePath)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), '$(_DirectoryBuildTargetsFile)'))
+ $([System.IO.Path]::Combine('$(_DirectoryBuildTargetsBasePath)', '$(_DirectoryBuildTargetsFile)'))
+
+
+
+
+
+
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Common.tasks b/msvc/MSBuild/Current/Bin/Microsoft.Common.tasks
new file mode 100644
index 0000000000000000000000000000000000000000..ff66668379c2d08cf89fd3da218862cd3b00460a
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Common.tasks
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Data.Entity.targets b/msvc/MSBuild/Current/Bin/Microsoft.Data.Entity.targets
new file mode 100644
index 0000000000000000000000000000000000000000..8cabb42f57b086013e20a472e16ad81a79695f50
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Data.Entity.targets
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.IO.Redist.xml b/msvc/MSBuild/Current/Bin/Microsoft.IO.Redist.xml
new file mode 100644
index 0000000000000000000000000000000000000000..44902e3f3e6d772478379cc798035104db812ab3
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.IO.Redist.xml
@@ -0,0 +1,1943 @@
+
+
+
+ Microsoft.IO.Redist
+
+
+
+
+ Creates a directory symbolic link identified by that points to .
+
+ The absolute path where the symbolic link should be created.
+ The target directory of the symbolic link.
+ A instance that wraps the newly created directory symbolic link.
+ or is .
+ or is empty.
+ -or-
+ is not an absolute path.
+ -or-
+ or contains invalid path characters.
+ A file or directory already exists in the location of .
+ -or-
+ An I/O error occurred.
+
+
+
+ Gets the target of the specified directory link.
+
+ The path of the directory link.
+ to follow links to the final target; to return the immediate next link.
+ A instance if exists, independently if the target exists or not. if is not a link.
+ The directory on does not exist.
+ -or-
+ The link's file system entry type is inconsistent with that of its target.
+ -or-
+ Too many levels of symbolic links.
+ When is , the maximum number of symbolic links that are followed are 40 on Unix and 63 on Windows.
+
+
+ Provides a lower level view of to help process and filter find results.
+ Provides a lower level view of to help process and filter find results.
+
+
+ Returns the full path for the find results, based on the initially provided path.
+ A string representing the full path.
+
+
+ Gets the full path of the directory this entry resides in.
+ The full path of this entry's directory.
+
+
+ Gets the full path of the root directory used for the enumeration.
+ The root directory.
+
+
+ Gets the root directory for the enumeration as specified in the constructor.
+ The original root directory.
+
+
+ Gets the file name for this entry.
+ This entry's file name.
+
+
+ Gets the attributes for this entry.
+ The attributes for this entry.
+
+
+ Gets the length of the file, in bytes.
+ The file length in bytes.
+
+
+ Gets the creation time for the entry or the oldest available time stamp if the operating system does not support creation time stamps.
+ The creation time for the entry.
+
+
+ Gets a datetime offset that represents the last access time in UTC.
+ The last access time in UTC.
+
+
+ Gets a datetime offset that represents the last write time in UTC.
+ The last write time in UTC.
+
+
+ Gets a value that indicates whether this entry is a directory.
+ if the entry is a directory; otherwise, .
+
+
+ Gets a value that indicates whether the file has the hidden attribute.
+ if the file has the hidden attribute; otherwise, .
+
+
+ Converts the value of this instance to a .
+ The value of this instance as a .
+
+
+ Returns the full path of the find result.
+ A string representing the full path.
+
+
+
+ Enumerable that allows utilizing custom filter predicates and tranform delegates.
+
+
+
+
+ Delegate for filtering out find results.
+
+
+
+
+ Delegate for transforming raw find data into a result.
+
+
+
+
+ Validates the directory and expression strings to check that they have no invalid characters, any special DOS wildcard characters in Win32 in the expression get replaced with their proper escaped representation, and if the expression string begins with a directory name, the directory name is moved and appended at the end of the directory string.
+
+ A reference to a directory string that we will be checking for normalization.
+ A reference to a expression string that we will be checking for normalization.
+ The kind of matching we want to check in the expression. If the value is Win32, we will replace special DOS wild characters to their safely escaped representation. This replacement does not affect the normalization status of the expression.
+ if the directory reference string get modified inside this function due to the expression beginning with a directory name. if the directory reference string was not modified.
+
+ The expression is a rooted path.
+ -or-
+ The directory or the expression reference strings contain a null character.
+
+
+ The match type is out of the range of the valid MatchType enum values.
+
+
+
+ Enumerates the file system elements of the provided type that are being searched and filtered by a .
+ The type of the result produced by this file system enumerator.
+ Enumerates the file system elements of the provided type that are being searched and filtered by a .
+
+
+ Encapsulates a find operation.
+ The directory to search in.
+ Enumeration options to use.
+
+
+
+ Encapsulates a find operation.
+
+ The directory to search in.
+ Whether the directory path is already normalized or not.
+ Enumeration options to use.
+
+
+ When overridden in a derived class, determines whether the specified file system entry should be included in the results.
+ A file system entry reference.
+ if the specified file system entry should be included in the results; otherwise, .
+
+
+ When overridden in a derived class, determines whether the specified file system entry should be recursed.
+ A file system entry reference.
+ if the specified directory entry should be recursed into; otherwise, .
+
+
+ When overridden in a derived class, generates the result type from the current entry.
+ A file system entry reference.
+ The result type from the current entry.
+
+
+ When overridden in a derived class, this method is called whenever the end of a directory is reached.
+ The directory path as a read-only span.
+
+
+ When overridden in a derived class, returns a value that indicates whether to continue execution or throw the default exception.
+ The native error code.
+ to continue; to throw the default exception for the given error.
+
+
+ Gets the currently visited element.
+ The currently visited element.
+
+
+ Gets the currently visited object.
+ The currently visited object.
+ This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
+
+
+ Always throws .
+
+
+ Releases the resources used by the current instance of the class.
+
+
+ When overridden in a derived class, releases the unmanaged resources used by the class and optionally releases the managed resources.
+ to release both managed and unmanaged resources; to release only unmanaged resources.
+
+
+
+ Fills the buffer with the next set of data.
+
+ 'true' if new data was found
+
+
+
+ Simple wrapper to allow creating a file handle for an existing directory.
+
+
+
+ Advances the enumerator to the next item of the .
+ if the enumerator successfully advanced to the next item; if the end of the enumerator has been passed.
+
+
+ Provides methods for matching file system names.
+
+
+ Translates the given Win32 expression. Change '*' and '?' to '<', '>' and '"' to match Win32 behavior.
+ The expression to translate.
+ A string with the translated Win32 expression.
+ For compatibility, Windows changes some wildcards to provide a closer match to historical DOS 8.3 filename matching.
+
+
+ Verifies whether the given Win32 expression matches the given name. Supports the following wildcards: '*', '?', '<', '>', '"'. The backslash character '\' escapes.
+ The expression to match with, such as "*.foo".
+ The name to check against the expression.
+ to ignore case (default), if the match should be case-sensitive.
+ if the given expression matches the given name; otherwise, .
+ The syntax of the parameter is based on the syntax used by FileSystemWatcher, which is based on [RtlIsNameInExpression](/windows/win32/devnotes/rtlisnameinexpression), which defines the rules for matching DOS wildcards (`'*'`, `'?'`, `'<'`, `'>'`, `'"'`).
+ Matching will not correspond to Win32 behavior unless you transform the expression using .
+
+
+ Verifies whether the given expression matches the given name. Supports the following wildcards: '*' and '?'. The backslash character '\\' escapes.
+ The expression to match with.
+ The name to check against the expression.
+ to ignore case (default); if the match should be case-sensitive.
+ if the given expression matches the given name; otherwise, .
+
+
+ Provides file and directory enumeration options.
+
+
+
+ For internal use. These are the options we want to use if calling the existing Directory/File APIs where you don't
+ explicitly specify EnumerationOptions.
+
+
+
+
+ Internal singleton for default options.
+
+
+
+ Initializes a new instance of the class with the recommended default options.
+
+
+
+ Converts SearchOptions to FindOptions. Throws if undefined SearchOption.
+
+
+
+ Gets or sets a value that indicates whether to recurse into subdirectories while enumerating. The default is .
+ to recurse into subdirectories; otherwise, .
+
+
+ Gets or sets a value that indicates whether to skip files or directories when access is denied (for example, or ). The default is .
+ to skip innacessible files or directories; otherwise, .
+
+
+ Gets or sets the suggested buffer size, in bytes. The default is 0 (no suggestion).
+ The buffer size.
+ Not all platforms use user allocated buffers, and some require either fixed buffers or a buffer that has enough space to return a full result.
+ One scenario where this option is useful is with remote share enumeration on Windows. Having a large buffer may result in better performance as more results can be batched over the wire (for example, over a network share).
+ A "large" buffer, for example, would be 16K. Typical is 4K.
+ The suggested buffer size will not be used if it has no meaning for the native APIs on the current platform or if it would be too small for getting at least a single result.
+
+
+ Gets or sets the attributes to skip. The default is FileAttributes.Hidden | FileAttributes.System.
+ The attributes to skip.
+
+
+ Gets or sets the match type.
+ One of the enumeration values that indicates the match type.
+ For APIs that allow specifying a match expression, this property allows you to specify how to interpret the match expression.
+ The default is simple matching where '*' is always 0 or more characters and '?' is a single character.
+
+
+ Gets or sets the case matching behavior.
+ One of the enumeration values that indicates the case matching behavior.
+ For APIs that allow specifying a match expression, this property allows you to specify the case matching behavior.
+ The default is to match platform defaults, which are gleaned from the case sensitivity of the temporary folder.
+
+
+ Gets or sets a value that indicates the maximum directory depth to recurse while enumerating, when is set to .
+ A number that represents the maximum directory depth to recurse while enumerating. The default value is .
+ If is set to a negative number, the default value is used.
+ If is set to zero, enumeration returns the contents of the initial directory.
+
+
+ Gets or sets a value that indicates whether to return the special directory entries "." and "..".
+ to return the special directory entries "." and ".."; otherwise, .
+
+
+
+ Copies an existing file to a new file.
+ An exception is raised if the destination file already exists.
+
+
+
+
+ Copies an existing file to a new file.
+ If is false, an exception will be
+ raised if the destination exists. Otherwise it will be overwritten.
+
+
+
+
+ Creates a file symbolic link identified by that points to .
+
+ The path where the symbolic link should be created.
+ The path of the target to which the symbolic link points.
+ A instance that wraps the newly created file symbolic link.
+ or is .
+ or is empty.
+ -or-
+ or contains a null character.
+ A file or directory already exists in the location of .
+ -or-
+ An I/O error occurred.
+
+
+
+ Gets the target of the specified file link.
+
+ The path of the file link.
+ to follow links to the final target; to return the immediate next link.
+ A instance if exists, independently if the target exists or not. if is not a link.
+ The file on does not exist.
+ -or-
+ The link's file system entry type is inconsistent with that of its target.
+ -or-
+ Too many levels of symbolic links.
+ When is , the maximum number of symbolic links that are followed are 40 on Unix and 63 on Windows.
+
+
+
+ Gets reparse point information associated to .
+
+ The immediate link target, absolute or relative or null if the file is not a supported link.
+
+
+
+ Returns 0 on success, otherwise a Win32 error code. Note that
+ classes should use -1 as the uninitialized state for dataInitialized.
+
+ The file path from which the file attribute information will be filled.
+ A struct that will contain the attribute information.
+ Return the error code for not found errors?
+
+
+
+ If this instance represents a link, returns the link target's path.
+ If a link does not exist in , or this instance does not represent a link, returns .
+
+
+
+
+ Creates a symbolic link located in that points to the specified .
+
+ The path of the symbolic link target.
+ is .
+ is empty.
+ -or-
+ This instance was not created passing an absolute path.
+ -or-
+ contains invalid path characters.
+ A file or directory already exists in the location of .
+ -or-
+ An I/O error occurred.
+
+
+
+ Gets the target of the specified link.
+
+ to follow links to the final target; to return the immediate next link.
+ A instance if the link exists, independently if the target exists or not; if this file or directory is not a link.
+ The file or directory does not exist.
+ -or-
+ The link's file system entry type is inconsistent with that of its target.
+ -or-
+ Too many levels of symbolic links.
+ When is , the maximum number of symbolic links that are followed are 40 on Unix and 63 on Windows.
+
+
+
+ Returns the original path. Use FullName or Name properties for the full path or file/directory name.
+
+
+
+ Specifies the type of character casing to match.
+
+
+ Matches using the default casing for the given platform.
+
+
+ Matches respecting character casing.
+
+
+ Matches ignoring character casing.
+
+
+ Specifies the type of wildcard matching to use.
+
+
+ Matches using '*' and '?' wildcards.
+ * matches from zero to any amount of characters. ? matches exactly one character. *.* matches any name with a period in it (with , this would match all items).
+
+
+ Match using Win32 DOS style matching semantics.'*', '?', '<', '>', and '"' are all considered wildcards. Matches in a traditional DOS / Windows command prompt way. *.* matches all files. ? matches collapse to periods. file.??t will match file.t, file.at, and file.txt.
+
+
+
+ Enum describing whether the search operation should
+ retrieve files/directories from the current directory alone
+ or should include all the subdirectories also.
+
+
+
+
+ Include only the current directory in the search operation
+
+
+
+
+ Include the current directory and all the sub-directories
+ underneath it including reparse points in the search operation.
+ This will traverse reparse points (i.e, mounted points and symbolic links)
+ recursively. If the directory structure searched contains a loop
+ because of hard links, the search operation will go on for ever.
+
+
+
+
+ Simple wrapper to safely disable the normal media insertion prompt for
+ removable media (floppies, cds, memory cards, etc.)
+
+
+ Note that removable media file systems lazily load. After starting the OS
+ they won't be loaded until you have media in the drive- and as such the
+ prompt won't happen. You have to have had media in at least once to get
+ the file system to load and then have removed it.
+
+
+
+
+ Returns the directory portion of a file path. This method effectively
+ removes the last segment of the given file path, i.e. it returns a
+ string consisting of all characters up to but not including the last
+ backslash ("\") in the file path. The returned value is null if the
+ specified path is null, empty, or a root (such as "\", "C:", or
+ "\\server\share").
+
+
+ Directory separators are normalized in the returned string.
+
+
+
+
+ Returns the directory portion of a file path. The returned value is empty
+ if the specified path is null, empty, or a root (such as "\", "C:", or
+ "\\server\share").
+
+
+ Unlike the string overload, this method will not normalize directory separators.
+
+
+
+
+ Returns the extension of the given path. The returned value includes the period (".") character of the
+ extension except when you have a terminal period when you get string.Empty, such as ".exe" or ".cpp".
+ The returned value is null if the given path is null or empty if the given path does not include an
+ extension.
+
+
+
+
+ Returns the extension of the given path.
+
+
+ The returned value is an empty ReadOnlySpan if the given path does not include an extension.
+
+
+
+
+ Returns the name and extension parts of the given path. The resulting string contains
+ the characters of path that follow the last separator in path. The resulting string is
+ null if path is null.
+
+
+
+
+ The returned ReadOnlySpan contains the characters of the path that follows the last separator in path.
+
+
+
+
+ Returns the characters between the last separator and last (.) in the path.
+
+
+
+
+ Returns a cryptographically strong random 8.3 string that can be
+ used as either a folder name or a file name.
+
+
+
+
+ Returns true if the path is fixed to a specific drive or UNC path. This method does no
+ validation of the path (URIs will be returned as relative as a result).
+ Returns false if the path specified is relative to the current drive or working directory.
+
+
+ Handles paths that use the alternate directory separator. It is a frequent mistake to
+ assume that rooted paths are not relative. This isn't the case.
+ "C:a" is drive relative- meaning that it will be resolved against the current directory
+ for C: (rooted, but relative). "C:\a" is rooted and not relative (the current directory
+ will not be used to modify the path).
+
+
+ Thrown if is null.
+
+
+
+
+ Tests if a path's file name includes a file extension. A trailing period
+ is not considered an extension.
+
+
+
+
+ Create a relative path from one path to another. Paths will be resolved before calculating the difference.
+ Default path comparison for the active platform will be used (OrdinalIgnoreCase for Windows or Mac, Ordinal for Unix).
+
+ The source path the output should be relative to. This path is always considered to be a directory.
+ The destination path.
+ The relative path or if the paths don't share the same root.
+ Thrown if or is null or an empty string.
+
+
+
+ Trims one trailing directory separator beyond the root of the path.
+
+
+
+
+ Trims one trailing directory separator beyond the root of the path.
+
+
+
+
+ Returns true if the path ends in a directory separator.
+
+
+
+
+ Returns true if the path ends in a directory separator.
+
+
+
+
+ Unlike the string overload, this method will not normalize directory separators.
+
+
+
+
+ Returns the volume name for dos, UNC and device paths.
+
+
+
+
+ Returns offset as -1 if the path is not in Unc format, otherwise returns the root length.
+
+
+
+
+
+ Contains internal volume helpers that are shared between many projects.
+
+
+
+ Wrapper to help with path normalization.
+
+
+
+
+ Normalize the given path.
+
+
+ Normalizes via Win32 GetFullPathName().
+
+ Path to normalize
+ Thrown if we have a string that is too large to fit into a UNICODE_STRING.
+ Thrown if the path is empty.
+ Normalized path
+
+
+
+ Normalize the given path.
+
+
+ Exceptions are the same as the string overload.
+
+
+
+
+ Calls GetFullPathName on the given path.
+
+ The path name. MUST be null terminated after the span.
+ Builder that will store the result.
+
+
+ Contains internal path helpers that are shared between many projects.
+ Contains internal path helpers that are shared between many projects.
+ Contains internal path helpers that are shared between many projects.
+
+
+
+ Returns true if the path starts in a directory separator.
+
+
+
+
+ Get the common path length from the start of the string.
+
+
+
+
+ Gets the count of common characters from the left optionally ignoring case
+
+
+
+
+ Returns true if the two paths have the same root
+
+
+
+
+ Try to remove relative segments from the given path (without combining with a root).
+
+ Input path
+ The length of the root of the given path
+
+
+
+ Try to remove relative segments from the given path (without combining with a root).
+
+ Input path
+ The length of the root of the given path
+ String builder that will store the result
+ "true" if the path was modified
+
+
+
+ Trims one trailing directory separator beyond the root of the path.
+
+
+
+
+ Returns true if the path ends in a directory separator.
+
+
+
+
+ Trims one trailing directory separator beyond the root of the path.
+
+
+
+
+ Returns true if the path ends in a directory separator.
+
+
+
+
+ Returns true if the given character is a valid drive letter
+
+
+
+
+ Adds the extended path prefix (\\?\) if not already a device path, IF the path is not relative,
+ AND the path is more than 259 characters. (> MAX_PATH + null). This will also insert the extended
+ prefix if the path ends with a period or a space. Trailing periods and spaces are normally eaten
+ away from paths during normalization, but if we see such a path at this point it should be
+ normalized and has retained the final characters. (Typically from one of the *Info classes)
+
+
+
+
+ Adds the extended path prefix (\\?\) if not relative or already a device path.
+
+
+
+
+ Returns true if the path uses any of the DOS device path syntaxes. ("\\.\", "\\?\", or "\??\")
+
+
+
+
+ Returns true if the path is a device UNC (\\?\UNC\, \\.\UNC\)
+
+
+
+
+ Returns true if the path uses the canonical form of extended syntax ("\\?\" or "\??\"). If the
+ path matches exactly (cannot use alternate directory separators) Windows will skip normalization
+ and path length checks.
+
+
+
+
+ Gets the length of the root of the path (drive, share, etc.).
+
+
+
+
+ Returns true if the path specified is relative to the current drive or working directory.
+ Returns false if the path is fixed to a specific drive or UNC path. This method does no
+ validation of the path (URIs will be returned as relative as a result).
+
+
+ Handles paths that use the alternate directory separator. It is a frequent mistake to
+ assume that rooted paths (Path.IsPathRooted) are not relative. This isn't the case.
+ "C:a" is drive relative- meaning that it will be resolved against the current directory
+ for C: (rooted, but relative). "C:\a" is rooted and not relative (the current directory
+ will not be used to modify the path).
+
+
+
+
+ True if the given character is a directory separator.
+
+
+
+
+ Normalize separators in the given path. Converts forward slashes into back slashes and compresses slash runs, keeping initial 2 if present.
+ Also trims initial whitespace in front of "rooted" paths (see PathStartSkip).
+
+ This effectively replicates the behavior of the legacy NormalizePath when it was called with fullCheck=false and expandShortpaths=false.
+ The current NormalizePath gets directory separator normalization from Win32's GetFullPathName(), which will resolve relative paths and as
+ such can't be used here (and is overkill for our uses).
+
+ Like the current NormalizePath this will not try and analyze periods/spaces within directory segments.
+
+
+ The only callers that used to use Path.Normalize(fullCheck=false) were Path.GetDirectoryName() and Path.GetPathRoot(). Both usages do
+ not need trimming of trailing whitespace here.
+
+ GetPathRoot() could technically skip normalizing separators after the second segment- consider as a future optimization.
+
+ For legacy .NET Framework behavior with ExpandShortPaths:
+ - It has no impact on GetPathRoot() so doesn't need consideration.
+ - It could impact GetDirectoryName(), but only if the path isn't relative (C:\ or \\Server\Share).
+
+ In the case of GetDirectoryName() the ExpandShortPaths behavior was undocumented and provided inconsistent results if the path was
+ fixed/relative. For example: "C:\PROGRA~1\A.TXT" would return "C:\Program Files" while ".\PROGRA~1\A.TXT" would return ".\PROGRA~1". If you
+ ultimately call GetFullPath() this doesn't matter, but if you don't or have any intermediate string handling could easily be tripped up by
+ this undocumented behavior.
+
+ We won't match this old behavior because:
+
+ 1. It was undocumented
+ 2. It was costly (extremely so if it actually contained '~')
+ 3. Doesn't play nice with string logic
+ 4. Isn't a cross-plat friendly concept/behavior
+
+
+
+
+ Returns true if the path is effectively empty for the current OS.
+ For unix, this is empty or null. For Windows, this is empty, null, or
+ just spaces ((char)32).
+
+
+
+ Returns a comparison that can be used to compare file and directory names for equality.
+
+
+ Gets whether the system is case-sensitive.
+
+
+
+ Provides static methods for converting from Win32 errors codes to exceptions, HRESULTS and error messages.
+
+
+
+
+ Converts, resetting it, the last Win32 error into a corresponding object, optionally
+ including the specified path in the error message.
+
+
+
+
+ Converts the specified Win32 error into a corresponding object, optionally
+ including the specified path in the error message.
+
+
+
+
+ If not already an HRESULT, returns an HRESULT for the specified Win32 error code.
+
+
+
+
+ Returns a Win32 error code for the specified HRESULT if it came from FACILITY_WIN32
+ If not, returns the HRESULT unchanged
+
+
+
+
+ Returns a string message for the specified Win32 error code.
+
+
+
+
+ Get a pinnable reference to the builder.
+ Does not ensure there is a null char after
+ This overload is pattern matched in the C# 7.3+ compiler so you can omit
+ the explicit method call, and write eg "fixed (char* c = builder)"
+
+
+
+
+ Get a pinnable reference to the builder.
+
+ Ensures that the builder has a null char after
+
+
+ Returns the underlying storage of the builder.
+
+
+
+ Returns a span around the contents of the builder.
+
+ Ensures that the builder has a null char after
+
+
+
+ Resize the internal buffer either by doubling current buffer size or
+ by adding to
+ whichever is greater.
+
+
+ Number of chars requested beyond current position.
+
+
+
+
+ Returns a string from the given span, terminating the string at null if present.
+
+
+
+
+ Gets the null-terminated string length of the given span.
+
+
+
+
+ Returns true if the given string equals the given span.
+ The span's logical length is to the first null if present.
+
+
+
+
+ An attribute used to indicate a GC transition should be skipped when making an unmanaged function call.
+
+
+ Example of a valid use case. The Win32 `GetTickCount()` function is a small performance related function
+ that reads some global memory and returns the value. In this case, the GC transition overhead is significantly
+ more than the memory read.
+
+ using System;
+ using System.Runtime.InteropServices;
+ class Program
+ {
+ [DllImport("Kernel32")]
+ [SuppressGCTransition]
+ static extern int GetTickCount();
+ static void Main()
+ {
+ Console.WriteLine($"{GetTickCount()}");
+ }
+ }
+
+
+
+ This attribute is ignored if applied to a method without the .
+
+ Forgoing this transition can yield benefits when the cost of the transition is more than the execution time
+ of the unmanaged function. However, avoiding this transition removes some of the guarantees the runtime
+ provides through a normal P/Invoke. When exiting the managed runtime to enter an unmanaged function the
+ GC must transition from Cooperative mode into Preemptive mode. Full details on these modes can be found at
+ https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/clr-code-guide.md#2.1.8.
+ Suppressing the GC transition is an advanced scenario and should not be done without fully understanding
+ potential consequences.
+
+ One of these consequences is an impact to Mixed-mode debugging (https://docs.microsoft.com/visualstudio/debugger/how-to-debug-in-mixed-mode).
+ During Mixed-mode debugging, it is not possible to step into or set breakpoints in a P/Invoke that
+ has been marked with this attribute. A workaround is to switch to native debugging and set a breakpoint in the native function.
+ In general, usage of this attribute is not recommended if debugging the P/Invoke is important, for example
+ stepping through the native code or diagnosing an exception thrown from the native code.
+
+ The runtime may load the native library for method marked with this attribute in advance before the method is called for the first time.
+ Usage of this attribute is not recommended for platform neutral libraries with conditional platform specific code.
+
+ The P/Invoke method that this attribute is applied to must have all of the following properties:
+ * Native function always executes for a trivial amount of time (less than 1 microsecond).
+ * Native function does not perform a blocking syscall (e.g. any type of I/O).
+ * Native function does not call back into the runtime (e.g. Reverse P/Invoke).
+ * Native function does not throw exceptions.
+ * Native function does not manipulate locks or other concurrency primitives.
+
+ Consequences of invalid uses of this attribute:
+ * GC starvation.
+ * Immediate runtime termination.
+ * Data corruption.
+
+
+
+
+ Base type for all platform-specific API attributes.
+
+
+
+
+ Records the platform that the project targeted.
+
+
+
+
+ Records the operating system (and minimum version) that supports an API. Multiple attributes can be
+ applied to indicate support on multiple operating systems.
+
+
+ Callers can apply a
+ or use guards to prevent calls to APIs on unsupported operating systems.
+
+ A given platform should only be specified once.
+
+
+
+
+ Marks APIs that were removed in a given operating system version.
+
+
+ Primarily used by OS bindings to indicate APIs that are only available in
+ earlier versions.
+
+
+
+
+ Annotates a custom guard field, property or method with a supported platform name and optional version.
+ Multiple attributes can be applied to indicate guard for multiple supported platforms.
+
+
+ Callers can apply a to a field, property or method
+ and use that field, property or method in a conditional or assert statements in order to safely call platform specific APIs.
+
+ The type of the field or property should be boolean, the method return type should be boolean in order to be used as platform guard.
+
+
+
+
+ Annotates the custom guard field, property or method with an unsupported platform name and optional version.
+ Multiple attributes can be applied to indicate guard for multiple unsupported platforms.
+
+
+ Callers can apply a to a field, property or method
+ and use that field, property or method in a conditional or assert statements as a guard to safely call APIs unsupported on those platforms.
+
+ The type of the field or property should be boolean, the method return type should be boolean in order to be used as platform guard.
+
+
+
+ The target file '{0}' is a directory, not a file.
+
+
+ Invalid File or Directory attributes value.
+
+
+ Second path fragment must not be a drive or UNC name.
+
+
+ Path must not be a drive.
+
+
+ File name cannot be null.
+
+
+ Path cannot be null.
+
+
+ Enum value was out of legal range.
+
+
+ Empty file name is not legal.
+
+
+ Empty path name is not legal.
+
+
+ Illegal characters in path '{0}'.
+
+
+ Invalid seek origin.
+
+
+ The directory specified, '{0}', is not a subdirectory of '{1}'.
+
+
+ Path cannot be the empty string or all whitespace.
+
+
+ Cannot create '{0}' because a file or directory with the same name already exists.
+
+
+ The specified directory '{0}' cannot be created.
+
+
+ Unable to read beyond the end of the stream.
+
+
+ The file '{0}' already exists.
+
+
+ Unable to find the specified file.
+
+
+ Could not find file '{0}'.
+
+
+ The file is too long. This operation is currently limited to supporting files less than 2 gigabytes in size.
+
+
+ The link's file system entry type is inconsistent with that of its target: {0}
+
+
+ Could not find a part of the path.
+
+
+ Could not find a part of the path '{0}'.
+
+
+ The specified file name or path is too long, or a component of the specified path is too long.
+
+
+ The process cannot access the file '{0}' because it is being used by another process.
+
+
+ The process cannot access the file because it is being used by another process.
+
+
+ Source and destination path must be different.
+
+
+ Source and destination path must have identical roots. Move will not work across volumes.
+
+
+ [Unknown]
+
+
+ Access to the path is denied.
+
+
+ Access to the path '{0}' is denied.
+
+
+ File encryption is not supported on this platform.
+
+
+ The path '{0}' is too long, or a component of the specified path is too long.
+
+
+ Basepath argument is not fully qualified.
+
+
+ The path is empty.
+
+
+ Drive name must be a root directory (i.e. 'C:\') or a drive letter ('C').
+
+
+ Non-negative number required.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+ Specifies that null is disallowed as an input even if the corresponding type allows it.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns.
+
+
+ Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter may be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that the output will be non-null if the named parameter is non-null.
+
+
+ Initializes the attribute with the associated parameter name.
+
+ The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
+
+
+
+ Gets the associated parameter name.
+
+
+ Applied to a method that will never return under any circumstance.
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+ Initializes the attribute with the specified parameter value.
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+ Specifies that the method or property will ensure that the listed field and property members have not-null values.
+
+
+ Initializes the attribute with a field or property member.
+
+ The field or property member that is promised to be not-null.
+
+
+
+ Initializes the attribute with the list of field and property members.
+
+ The list of field and property members that are promised to be not-null.
+
+
+
+ Gets field or property member names.
+
+
+ Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
+
+
+ Initializes the attribute with the specified return value condition and a field or property member.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+ The field or property member that is promised to be not-null.
+
+
+
+ Initializes the attribute with the specified return value condition and list of field and property members.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+ The list of field and property members that are promised to be not-null.
+
+
+
+ Gets the return value condition.
+
+
+ Gets field or property member names.
+
+
+
+ Blittable version of Windows BOOL type. It is convenient in situations where
+ manual marshalling is required, or to avoid overhead of regular bool marshalling.
+
+
+ Some Windows APIs return arbitrary integer values although the return type is defined
+ as BOOL. It is best to never compare BOOL to TRUE. Always use bResult != BOOL.FALSE
+ or bResult == BOOL.FALSE .
+
+
+
+
+ Blittable version of Windows BOOLEAN type. It is convenient in situations where
+ manual marshalling is required, or to avoid overhead of regular bool marshalling.
+
+
+ Some Windows APIs return arbitrary integer values although the return type is defined
+ as BOOLEAN. It is best to never compare BOOLEAN to TRUE. Always use bResult != BOOLEAN.FALSE
+ or bResult == BOOLEAN.FALSE .
+
+
+
+
+ The link target is a directory.
+
+
+
+
+ Allows creation of symbolic links from a process that is not elevated. Requires Windows 10 Insiders build 14972 or later.
+ Developer Mode must first be enabled on the machine before this option will function.
+
+
+
+
+ Creates a symbolic link.
+
+ The symbolic link to be created.
+ The name of the target for the symbolic link to be created.
+ If it has a device name associated with it, the link is treated as an absolute link; otherwise, the link is treated as a relative link.
+ if the link target is a directory; otherwise.
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use FindFirstFile.
+
+
+
+
+ Returns a string message for the specified Win32 error code.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use GetFileAttributesEx.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use GetFullPathName or PathHelper.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use GetFullPath/PathHelper.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use CopyFileEx.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use CreateDirectory.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use CreateFile.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use CreateFile.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use DeleteFile.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use DeleteVolumeMountPoint.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use MoveFile.
+
+
+
+
+ Moves a file or directory, optionally overwriting existing destination file. NOTE: overwrite must be false for directories.
+
+ Source file or directory
+ Destination file or directory
+ True to overwrite existing destination file. NOTE: must pass false for directories as overwrite of directories is not supported.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use RemoveDirectory.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use SetFileAttributes.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use EncryptFile.
+
+
+
+
+ WARNING: This method does not implicitly handle long paths. Use DecryptFile.
+
+
+
+
+ 100-nanosecond intervals (ticks) since January 1, 1601 (UTC).
+
+
+ For NT times that are defined as longs (LARGE_INTEGER, etc.).
+ Do NOT use for FILETIME unless you are POSITIVE it will fall on an
+ 8 byte boundary.
+
+
+
+
+ 100-nanosecond intervals (ticks) since January 1, 1601 (UTC).
+
+
+
+
+ OBJECT_ATTRIBUTES structure.
+ The OBJECT_ATTRIBUTES structure specifies attributes that can be applied to objects or object handles by routines
+ that create objects and/or return handles to objects.
+
+
+
+
+ Optional handle to root object directory for the given ObjectName.
+ Can be a file system directory or object manager directory.
+
+
+
+
+ Name of the object. Must be fully qualified if RootDirectory isn't set.
+ Otherwise is relative to RootDirectory.
+
+
+
+
+ If null, object will receive default security settings.
+
+
+
+
+ Optional quality of service to be applied to the object. Used to indicate
+ security impersonation level and context tracking mode (dynamic or static).
+
+
+
+
+ Equivalent of InitializeObjectAttributes macro with the exception that you can directly set SQOS.
+
+
+
+
+ This handle can be inherited by child processes of the current process.
+
+
+
+
+ This flag only applies to objects that are named within the object manager.
+ By default, such objects are deleted when all open handles to them are closed.
+ If this flag is specified, the object is not deleted when all open handles are closed.
+
+
+
+
+ Only a single handle can be open for this object.
+
+
+
+
+ Lookups for this object should be case insensitive.
+
+
+
+
+ Create on existing object should open, not fail with STATUS_OBJECT_NAME_COLLISION.
+
+
+
+
+ Open the symbolic link, not its target.
+
+
+
+
+ Length in bytes, not including the null terminator, if any.
+
+
+
+
+ Max size of the buffer in bytes
+
+
+
+
+ SECURITY_QUALITY_OF_SERVICE structure.
+ Used to support client impersonation. Client specifies this to a server to allow
+ it to impersonate the client.
+
+
+
+
+ SECURITY_IMPERSONATION_LEVEL enumeration values.
+ [SECURITY_IMPERSONATION_LEVEL]
+
+
+
+
+ The server process cannot obtain identification information about the client and cannot impersonate the client.
+ [SecurityAnonymous]
+
+
+
+
+ The server process can obtain identification information about the client, but cannot impersonate the client.
+ [SecurityIdentification]
+
+
+
+
+ The server process can impersonate the client's security context on it's local system.
+ [SecurityImpersonation]
+
+
+
+
+ The server process can impersonate the client's security context on remote systems.
+ [SecurityDelegation]
+
+
+
+
+ SECURITY_CONTEXT_TRACKING_MODE
+
+
+
+
+ The server is given a snapshot of the client's security context.
+ [SECURITY_STATIC_TRACKING]
+
+
+
+
+ The server is continually updated with changes.
+ [SECURITY_DYNAMIC_TRACKING]
+
+
+
+
+ FILE_FULL_DIR_INFORMATION structure.
+ Used with GetFileInformationByHandleEx and FileIdBothDirectoryInfo/RestartInfo as well as NtQueryFileInformation.
+ Equivalent to FILE_FULL_DIR_INFO structure.
+
+
+
+
+ Offset in bytes of the next entry, if any.
+
+
+
+
+ Byte offset within the parent directory, undefined for NTFS.
+
+
+
+
+ File attributes.
+
+
+ Note that MSDN documentation isn't correct for this- it can return
+ any FILE_ATTRIBUTE that is currently set on the file, not just the
+ ones documented.
+
+
+
+
+ The length of the file name in bytes (without null).
+
+
+
+
+ The extended attribute size OR the reparse tag if a reparse point.
+
+
+
+
+ Gets the next info pointer or null if there are no more.
+
+
+
+
+ Status
+
+
+
+
+ Request dependent value.
+
+
+
+
+ The completion status, either STATUS_SUCCESS if the operation was completed successfully or
+ some other informational, warning, or error status.
+
+
+
+
+ Reserved for internal use.
+
+
+
+
+ File creation disposition when calling directly to NT APIs.
+
+
+
+
+ Default. Replace or create. Deletes existing file instead of overwriting.
+
+
+ As this potentially deletes it requires that DesiredAccess must include Delete.
+ This has no equivalent in CreateFile.
+
+
+
+
+ Open if exists or fail if doesn't exist. Equivalent to OPEN_EXISTING or
+ .
+
+
+ TruncateExisting also uses Open and then manually truncates the file
+ by calling NtSetInformationFile with FileAllocationInformation and an
+ allocation size of 0.
+
+
+
+
+ Create if doesn't exist or fail if does exist. Equivalent to CREATE_NEW
+ or .
+
+
+
+
+ Open if exists or create if doesn't exist. Equivalent to OPEN_ALWAYS or
+ .
+
+
+
+
+ Open and overwrite if exists or fail if doesn't exist. Equivalent to
+ TRUNCATE_EXISTING or .
+
+
+
+
+ Open and overwrite if exists or create if doesn't exist. Equivalent to
+ CREATE_ALWAYS or .
+
+
+
+
+ Options for creating/opening files with NtCreateFile.
+
+
+
+
+ File being created or opened must be a directory file. Disposition must be FILE_CREATE, FILE_OPEN,
+ or FILE_OPEN_IF.
+
+
+ Can only be used with FILE_SYNCHRONOUS_IO_ALERT/NONALERT, FILE_WRITE_THROUGH, FILE_OPEN_FOR_BACKUP_INTENT,
+ and FILE_OPEN_BY_FILE_ID flags.
+
+
+
+
+ Applications that write data to the file must actually transfer the data into
+ the file before any requested write operation is considered complete. This flag
+ is set automatically if FILE_NO_INTERMEDIATE_BUFFERING is set.
+
+
+
+
+ All accesses to the file are sequential.
+
+
+
+
+ File cannot be cached in driver buffers. Cannot use with AppendData desired access.
+
+
+
+
+ All operations are performed synchronously. Any wait on behalf of the caller is
+ subject to premature termination from alerts.
+
+
+ Cannot be used with FILE_SYNCHRONOUS_IO_NONALERT.
+ Synchronous DesiredAccess flag is required. I/O system will maintain file position context.
+
+
+
+
+ All operations are performed synchronously. Waits in the system to synchronize I/O queuing
+ and completion are not subject to alerts.
+
+
+ Cannot be used with FILE_SYNCHRONOUS_IO_ALERT.
+ Synchronous DesiredAccess flag is required. I/O system will maintain file position context.
+
+
+
+
+ File being created or opened must not be a directory file. Can be a data file, device,
+ or volume.
+
+
+
+
+ Create a tree connection for this file in order to open it over the network.
+
+
+ Not used by device and intermediate drivers.
+
+
+
+
+ Complete the operation immediately with a success code of STATUS_OPLOCK_BREAK_IN_PROGRESS if
+ the target file is oplocked.
+
+
+ Not compatible with ReserveOpfilter or OpenRequiringOplock.
+ Not used by device and intermediate drivers.
+
+
+
+
+ If the extended attributes on an existing file being opened indicate that the caller must
+ understand extended attributes to properly interpret the file, fail the request.
+
+
+ Not used by device and intermediate drivers.
+
+
+
+
+ Accesses to the file can be random, so no sequential read-ahead operations should be performed
+ on the file by FSDs or the system.
+
+
+
+
+ Delete the file when the last handle to it is passed to NtClose. Requires Delete flag in
+ DesiredAccess parameter.
+
+
+
+
+ Open the file by reference number or object ID. The file name that is specified by the ObjectAttributes
+ name parameter includes the 8 or 16 byte file reference number or ID for the file in the ObjectAttributes
+ name field. The device name can optionally be prefixed.
+
+
+ NTFS supports both reference numbers and object IDs. 16 byte reference numbers are 8 byte numbers padded
+ with zeros. ReFS only supports reference numbers (not object IDs). 8 byte and 16 byte reference numbers
+ are not related. Note that as the UNICODE_STRING will contain raw byte data, it may not be a "valid" string.
+ Not used by device and intermediate drivers.
+
+
+ \??\C:\{8 bytes of binary FileID}
+ \device\HardDiskVolume1\{16 bytes of binary ObjectID}
+ {8 bytes of binary FileID}
+
+
+
+
+ The file is being opened for backup intent. Therefore, the system should check for certain access rights
+ and grant the caller the appropriate access to the file before checking the DesiredAccess parameter
+ against the file's security descriptor.
+
+
+ Not used by device and intermediate drivers.
+
+
+
+
+ When creating a file, specifies that it should not inherit the compression bit from the parent directory.
+
+
+
+
+ The file is being opened and an opportunistic lock (oplock) on the file is being requested as a single atomic
+ operation.
+
+
+ The file system checks for oplocks before it performs the create operation and will fail the create with a
+ return code of STATUS_CANNOT_BREAK_OPLOCK if the result would be to break an existing oplock.
+ Not compatible with CompleteIfOplocked or ReserveOpFilter. Windows 7 and up.
+
+
+
+
+ CreateFile2 uses this flag to prevent opening a file that you don't have access to without specifying
+ FILE_SHARE_READ. (Preventing users that can only read a file from denying access to other readers.)
+
+
+ Windows 7 and up.
+
+
+
+
+ The client opening the file or device is session aware and per session access is validated if necessary.
+
+
+ Windows 8 and up.
+
+
+
+
+ This flag allows an application to request a filter opportunistic lock (oplock) to prevent other applications
+ from getting share violations.
+
+
+ Not compatible with CompleteIfOplocked or OpenRequiringOplock.
+ If there are already open handles, the create request will fail with STATUS_OPLOCK_NOT_GRANTED.
+
+
+
+
+ Open a file with a reparse point attribute, bypassing the normal reparse point processing.
+
+
+
+
+ Causes files that are marked with the Offline attribute not to be recalled from remote storage.
+
+
+ More details can be found in Remote Storage documentation (see Basic Concepts).
+ https://technet.microsoft.com/en-us/library/cc938459.aspx
+
+
+
+
+ System.IO.FileAccess looks up these values when creating handles
+
+
+ File Security and Access Rights
+ https://msdn.microsoft.com/en-us/library/windows/desktop/aa364399.aspx
+
+
+
+
+ For a file, the right to read data from the file.
+
+
+ Directory version of this flag is .
+
+
+
+
+ For a directory, the right to list the contents.
+
+
+ File version of this flag is .
+
+
+
+
+ For a file, the right to write data to the file.
+
+
+ Directory version of this flag is .
+
+
+
+
+ For a directory, the right to create a file in a directory.
+
+
+ File version of this flag is .
+
+
+
+
+ For a file, the right to append data to a file. is needed
+ to overwrite existing data.
+
+
+ Directory version of this flag is .
+
+
+
+
+ For a directory, the right to create a subdirectory.
+
+
+ File version of this flag is .
+
+
+
+
+ For a named pipe, the right to create a pipe instance.
+
+
+
+
+ The right to read extended attributes.
+
+
+
+
+ The right to write extended attributes.
+
+
+
+
+ The right to execute the file.
+
+
+ Directory version of this flag is .
+
+
+
+
+ For a directory, the right to traverse the directory.
+
+
+ File version of this flag is .
+
+
+
+
+ For a directory, the right to delete a directory and all
+ the files it contains, including read-only files.
+
+
+
+
+ The right to read attributes.
+
+
+
+
+ The right to write attributes.
+
+
+
+
+ All standard and specific rights. [FILE_ALL_ACCESS]
+
+
+
+
+ The right to delete the object.
+
+
+
+
+ The right to read the information in the object's security descriptor.
+ Doesn't include system access control list info (SACL).
+
+
+
+
+ The right to modify the discretionary access control list (DACL) in the
+ object's security descriptor.
+
+
+
+
+ The right to change the owner in the object's security descriptor.
+
+
+
+
+ The right to use the object for synchronization. Enables a thread to wait until the object
+ is in the signaled state. This is required if opening a synchronous handle.
+
+
+
+
+ Same as READ_CONTROL.
+
+
+
+
+ Same as READ_CONTROL.
+
+
+
+
+ Same as READ_CONTROL.
+
+
+
+
+ Maps internally to | |
+ | | .
+ (For directories, | |
+ | | .)
+
+
+
+
+ Maps internally to | |
+ | | | .
+ (For directories, | | AddFile
+ | | | .)
+
+
+
+
+ Maps internally to | |
+ | .
+ (For directories, | |
+ | .)
+
+
+
+
diff --git a/msvc/MSBuild/Current/Bin/Microsoft.Managed.After.targets b/msvc/MSBuild/Current/Bin/Microsoft.Managed.After.targets
new file mode 100644
index 0000000000000000000000000000000000000000..de6ef533e6d4ce95ec84a0f86ea42ad1d5d1fb0b
--- /dev/null
+++ b/msvc/MSBuild/Current/Bin/Microsoft.Managed.After.targets
@@ -0,0 +1,89 @@
+
+
+
+
+
+ TargetFramework
+ TargetFrameworks
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ <_MainReferenceTargetForBuild Condition="'$(BuildProjectReferences)' == '' or '$(BuildProjectReferences)' == 'true'">.projectReferenceTargetsOrDefaultTargets
+ <_MainReferenceTargetForBuild Condition="'$(_MainReferenceTargetForBuild)' == ''">GetTargetPath
+
+ $(_MainReferenceTargetForBuild);GetNativeManifest;$(_RecursiveTargetForContentCopying);$(ProjectReferenceTargetsForBuild)
+
+
+ <_MainReferenceTargetForPublish Condition="'$(NoBuild)' == 'true'">GetTargetPath
+ <_MainReferenceTargetForPublish Condition="'$(NoBuild)' != 'true'">$(_MainReferenceTargetForBuild)
+ GetTargetFrameworks;$(_MainReferenceTargetForPublish);GetNativeManifest;GetCopyToPublishDirectoryItems;$(ProjectReferenceTargetsForPublish)
+
+
+ $(ProjectReferenceTargetsForBuild);$(ProjectReferenceTargetsForPublish)
+ $(ProjectReferenceTargetsForRebuild);$(ProjectReferenceTargetsForPublish)
+
+ GetCopyToPublishDirectoryItems;$(ProjectReferenceTargetsForGetCopyToPublishDirectoryItems)
+
+
+ .default;$(ProjectReferenceTargetsForBuild)
+
+
+ Clean;$(ProjectReferenceTargetsForClean)
+ $(ProjectReferenceTargetsForClean);$(ProjectReferenceTargetsForBuild);$(ProjectReferenceTargetsForRebuild)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node/node_modules/yarn/LICENSE b/node/node_modules/yarn/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..e32914ea02db9b3f563a035c77d83195b4fa865a
--- /dev/null
+++ b/node/node_modules/yarn/LICENSE
@@ -0,0 +1,26 @@
+BSD 2-Clause License
+
+For Yarn software
+
+Copyright (c) 2016-present, Yarn Contributors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node/node_modules/yarn/README.md b/node/node_modules/yarn/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..1305b9337fda0a60ce9487ba56140c580212183a
--- /dev/null
+++ b/node/node_modules/yarn/README.md
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+ Fast, reliable, and secure dependency management.
+
+
+
+
+
+
+
+
+
+
+---
+
+**Fast:** Yarn caches every package it has downloaded, so it never needs to download the same package again. It also does almost everything concurrently to maximize resource utilization. This means even faster installs.
+
+**Reliable:** Using a detailed but concise lockfile format and a deterministic algorithm for install operations, Yarn is able to guarantee that any installation that works on one system will work exactly the same on another system.
+
+**Secure:** Yarn uses checksums to verify the integrity of every installed package before its code is executed.
+
+## Features
+
+* **Offline Mode.** If you've installed a package before, then you can install it again without an internet connection.
+* **Deterministic.** The same dependencies will be installed in the same exact way on any machine, regardless of installation order.
+* **Network Performance.** Yarn efficiently queues requests and avoids request waterfalls in order to maximize network utilization.
+* **Network Resilience.** A single request that fails will not cause the entire installation to fail. Requests are automatically retried upon failure.
+* **Flat Mode.** Yarn resolves mismatched versions of dependencies to a single version to avoid creating duplicates.
+* **More emojis.** 🐈
+
+## Installing Yarn
+
+Read the [Installation Guide](https://yarnpkg.com/en/docs/install) on our website for detailed instructions on how to install Yarn.
+
+## Using Yarn
+
+Read the [Usage Guide](https://yarnpkg.com/en/docs/usage) on our website for detailed instructions on how to use Yarn.
+
+## Contributing to Yarn
+
+Contributions are always welcome, no matter how large or small. Substantial feature requests should be proposed as an [RFC](https://github.com/yarnpkg/rfcs). Before contributing, please read the [code of conduct](CODE_OF_CONDUCT.md).
+
+See [Contributing](https://yarnpkg.com/org/contributing/).
+
+## Prior art
+
+Yarn wouldn't exist if it wasn't for excellent prior art. Yarn has been inspired by the following projects:
+
+ - [Bundler](https://github.com/bundler/bundler)
+ - [Cargo](https://github.com/rust-lang/cargo)
+ - [npm](https://github.com/npm/cli)
+
+## Credits
+
+Thanks to [Sam Holmes](https://github.com/samholmes) for donating the npm package name!
diff --git a/node/node_modules/yarn/bin/yarn b/node/node_modules/yarn/bin/yarn
new file mode 100644
index 0000000000000000000000000000000000000000..35ad5177ff3a19c7471842c5d9f448dc27eeb0ec
--- /dev/null
+++ b/node/node_modules/yarn/bin/yarn
@@ -0,0 +1,35 @@
+#!/bin/sh
+argv0=$(echo "$0" | sed -e 's,\\,/,g')
+basedir=$(dirname "$(readlink "$0" || echo "$argv0")")
+
+case "$(uname -s)" in
+ Darwin) basedir="$( cd "$( dirname "$argv0" )" && pwd )";;
+ Linux) basedir=$(dirname "$(readlink -f "$0" || echo "$argv0")");;
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+ *MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+command_exists() {
+ command -v "$1" >/dev/null 2>&1;
+}
+
+if command_exists node; then
+ if [ "$YARN_FORCE_WINPTY" = 1 ] || command_exists winpty && test -t 1; then
+ winpty node "$basedir/yarn.js" "$@"
+ else
+ exec node "$basedir/yarn.js" "$@"
+ fi
+ ret=$?
+# Debian and Ubuntu use "nodejs" as the name of the binary, not "node", so we
+# search for that too. See:
+# https://lists.debian.org/debian-devel-announce/2012/07/msg00002.html
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614907
+elif command_exists nodejs; then
+ exec nodejs "$basedir/yarn.js" "$@"
+ ret=$?
+else
+ >&2 echo 'Yarn requires Node.js 4.0 or higher to be installed.'
+ ret=1
+fi
+
+exit $ret
diff --git a/node/node_modules/yarn/bin/yarn.cmd b/node/node_modules/yarn/bin/yarn.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..79c18963451cdaed54c9e6e29658fcc33e57423c
--- /dev/null
+++ b/node/node_modules/yarn/bin/yarn.cmd
@@ -0,0 +1,2 @@
+@echo off
+node "%~dp0\yarn.js" %*
diff --git a/node/node_modules/yarn/bin/yarn.js b/node/node_modules/yarn/bin/yarn.js
new file mode 100644
index 0000000000000000000000000000000000000000..b34883e9486e71f3e1e050bd6d599e80cbfd5d8a
--- /dev/null
+++ b/node/node_modules/yarn/bin/yarn.js
@@ -0,0 +1,31 @@
+#!/usr/bin/env node
+
+/* eslint-disable no-var */
+/* eslint-disable flowtype/require-valid-file-annotation */
+'use strict';
+
+var ver = process.versions.node;
+var majorVer = parseInt(ver.split('.')[0], 10);
+
+if (majorVer < 4) {
+ console.error('Node version ' + ver + ' is not supported, please use Node.js 4.0 or higher.');
+ process.exit(1); // eslint-disable-line no-process-exit
+} else {
+ try {
+ require(__dirname + '/../lib/v8-compile-cache.js');
+ } catch (err) {
+ // We don't have/need this on legacy builds and dev builds
+ }
+
+ // Just requiring this package will trigger a yarn run since the
+ // `require.main === module` check inside `cli/index.js` will always
+ // be truthy when built with webpack :(
+ // `lib/cli` may be `lib/cli/index.js` or `lib/cli.js` depending on the build.
+ var cli = require(__dirname + '/../lib/cli');
+ if (!cli.autoRun) {
+ cli.default().catch(function(error) {
+ console.error(error.stack || error.message || error);
+ process.exitCode = 1;
+ });
+ }
+}
diff --git a/node/node_modules/yarn/bin/yarnpkg b/node/node_modules/yarn/bin/yarnpkg
new file mode 100644
index 0000000000000000000000000000000000000000..f6129c58292b7f74f0d68b4c1c93757093f9de17
--- /dev/null
+++ b/node/node_modules/yarn/bin/yarnpkg
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+require('./yarn.js');
diff --git a/node/node_modules/yarn/bin/yarnpkg.cmd b/node/node_modules/yarn/bin/yarnpkg.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..66ee7511146578f68f9333d3e6b1d3ef6f3f7d10
--- /dev/null
+++ b/node/node_modules/yarn/bin/yarnpkg.cmd
@@ -0,0 +1,2 @@
+@echo off
+"%~dp0\yarn.cmd" %*
diff --git a/node/node_modules/yarn/lib/cli.js b/node/node_modules/yarn/lib/cli.js
new file mode 100644
index 0000000000000000000000000000000000000000..dfd1510fee8c04198e204ab7c8368ba8e9cf7ddf
--- /dev/null
+++ b/node/node_modules/yarn/lib/cli.js
@@ -0,0 +1,154071 @@
+#!/usr/bin/env node
+module.exports =
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // identity function for calling harmony imports with the correct context
+/******/ __webpack_require__.i = function(value) { return value; };
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, {
+/******/ configurable: false,
+/******/ enumerable: true,
+/******/ get: getter
+/******/ });
+/******/ }
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 504);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["a"] = __extends;
+/* unused harmony export __assign */
+/* unused harmony export __rest */
+/* unused harmony export __decorate */
+/* unused harmony export __param */
+/* unused harmony export __metadata */
+/* unused harmony export __awaiter */
+/* unused harmony export __generator */
+/* unused harmony export __exportStar */
+/* unused harmony export __values */
+/* unused harmony export __read */
+/* unused harmony export __spread */
+/* unused harmony export __await */
+/* unused harmony export __asyncGenerator */
+/* unused harmony export __asyncDelegator */
+/* unused harmony export __asyncValues */
+/* unused harmony export __makeTemplateObject */
+/* unused harmony export __importStar */
+/* unused harmony export __importDefault */
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+/* global Reflect, Promise */
+
+var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+};
+
+function __extends(d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+}
+
+var __assign = function() {
+ __assign = Object.assign || function __assign(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ }
+ return __assign.apply(this, arguments);
+}
+
+function __rest(s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
+ t[p[i]] = s[p[i]];
+ return t;
+}
+
+function __decorate(decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+}
+
+function __param(paramIndex, decorator) {
+ return function (target, key) { decorator(target, key, paramIndex); }
+}
+
+function __metadata(metadataKey, metadataValue) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
+}
+
+function __awaiter(thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+}
+
+function __generator(thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+}
+
+function __exportStar(m, exports) {
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+
+function __values(o) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
+ if (m) return m.call(o);
+ return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+}
+
+function __read(o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+}
+
+function __spread() {
+ for (var ar = [], i = 0; i < arguments.length; i++)
+ ar = ar.concat(__read(arguments[i]));
+ return ar;
+}
+
+function __await(v) {
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
+}
+
+function __asyncGenerator(thisArg, _arguments, generator) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
+ function fulfill(value) { resume("next", value); }
+ function reject(value) { resume("throw", value); }
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
+}
+
+function __asyncDelegator(o) {
+ var i, p;
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
+}
+
+function __asyncValues(o) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var m = o[Symbol.asyncIterator], i;
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
+}
+
+function __makeTemplateObject(cooked, raw) {
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+ return cooked;
+};
+
+function __importStar(mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ result.default = mod;
+ return result;
+}
+
+function __importDefault(mod) {
+ return (mod && mod.__esModule) ? mod : { default: mod };
+}
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports) {
+
+module.exports = require("path");
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _promise = __webpack_require__(7);
+
+var _promise2 = _interopRequireDefault(_promise);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = function (fn) {
+ return function () {
+ var gen = fn.apply(this, arguments);
+ return new _promise2.default(function (resolve, reject) {
+ function step(key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (info.done) {
+ resolve(value);
+ } else {
+ return _promise2.default.resolve(value).then(function (value) {
+ step("next", value);
+ }, function (err) {
+ step("throw", err);
+ });
+ }
+ }
+
+ return step("next");
+ });
+ };
+};
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+exports.default = function (instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+};
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(591), __esModule: true };
+
+/***/ }),
+/* 5 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; });
+/* unused harmony export SafeSubscriber */
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isFunction__ = __webpack_require__(143);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(390);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(31);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(262);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(176);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(264);
+/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
+
+
+
+
+
+
+
+var Subscriber = /*@__PURE__*/ (function (_super) {
+ __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](Subscriber, _super);
+ function Subscriber(destinationOrNext, error, complete) {
+ var _this = _super.call(this) || this;
+ _this.syncErrorValue = null;
+ _this.syncErrorThrown = false;
+ _this.syncErrorThrowable = false;
+ _this.isStopped = false;
+ _this._parentSubscription = null;
+ switch (arguments.length) {
+ case 0:
+ _this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */];
+ break;
+ case 1:
+ if (!destinationOrNext) {
+ _this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */];
+ break;
+ }
+ if (typeof destinationOrNext === 'object') {
+ if (destinationOrNext instanceof Subscriber) {
+ _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
+ _this.destination = destinationOrNext;
+ destinationOrNext.add(_this);
+ }
+ else {
+ _this.syncErrorThrowable = true;
+ _this.destination = new SafeSubscriber(_this, destinationOrNext);
+ }
+ break;
+ }
+ default:
+ _this.syncErrorThrowable = true;
+ _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
+ break;
+ }
+ return _this;
+ }
+ Subscriber.prototype[__WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { return this; };
+ Subscriber.create = function (next, error, complete) {
+ var subscriber = new Subscriber(next, error, complete);
+ subscriber.syncErrorThrowable = false;
+ return subscriber;
+ };
+ Subscriber.prototype.next = function (value) {
+ if (!this.isStopped) {
+ this._next(value);
+ }
+ };
+ Subscriber.prototype.error = function (err) {
+ if (!this.isStopped) {
+ this.isStopped = true;
+ this._error(err);
+ }
+ };
+ Subscriber.prototype.complete = function () {
+ if (!this.isStopped) {
+ this.isStopped = true;
+ this._complete();
+ }
+ };
+ Subscriber.prototype.unsubscribe = function () {
+ if (this.closed) {
+ return;
+ }
+ this.isStopped = true;
+ _super.prototype.unsubscribe.call(this);
+ };
+ Subscriber.prototype._next = function (value) {
+ this.destination.next(value);
+ };
+ Subscriber.prototype._error = function (err) {
+ this.destination.error(err);
+ this.unsubscribe();
+ };
+ Subscriber.prototype._complete = function () {
+ this.destination.complete();
+ this.unsubscribe();
+ };
+ Subscriber.prototype._unsubscribeAndRecycle = function () {
+ var _a = this, _parent = _a._parent, _parents = _a._parents;
+ this._parent = null;
+ this._parents = null;
+ this.unsubscribe();
+ this.closed = false;
+ this.isStopped = false;
+ this._parent = _parent;
+ this._parents = _parents;
+ this._parentSubscription = null;
+ return this;
+ };
+ return Subscriber;
+}(__WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */]));
+
+var SafeSubscriber = /*@__PURE__*/ (function (_super) {
+ __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SafeSubscriber, _super);
+ function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
+ var _this = _super.call(this) || this;
+ _this._parentSubscriber = _parentSubscriber;
+ var next;
+ var context = _this;
+ if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isFunction__["a" /* isFunction */])(observerOrNext)) {
+ next = observerOrNext;
+ }
+ else if (observerOrNext) {
+ next = observerOrNext.next;
+ error = observerOrNext.error;
+ complete = observerOrNext.complete;
+ if (observerOrNext !== __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]) {
+ context = Object.create(observerOrNext);
+ if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isFunction__["a" /* isFunction */])(context.unsubscribe)) {
+ _this.add(context.unsubscribe.bind(context));
+ }
+ context.unsubscribe = _this.unsubscribe.bind(_this);
+ }
+ }
+ _this._context = context;
+ _this._next = next;
+ _this._error = error;
+ _this._complete = complete;
+ return _this;
+ }
+ SafeSubscriber.prototype.next = function (value) {
+ if (!this.isStopped && this._next) {
+ var _parentSubscriber = this._parentSubscriber;
+ if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
+ this.__tryOrUnsub(this._next, value);
+ }
+ else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
+ this.unsubscribe();
+ }
+ }
+ };
+ SafeSubscriber.prototype.error = function (err) {
+ if (!this.isStopped) {
+ var _parentSubscriber = this._parentSubscriber;
+ var useDeprecatedSynchronousErrorHandling = __WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling;
+ if (this._error) {
+ if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
+ this.__tryOrUnsub(this._error, err);
+ this.unsubscribe();
+ }
+ else {
+ this.__tryOrSetError(_parentSubscriber, this._error, err);
+ this.unsubscribe();
+ }
+ }
+ else if (!_parentSubscriber.syncErrorThrowable) {
+ this.unsubscribe();
+ if (useDeprecatedSynchronousErrorHandling) {
+ throw err;
+ }
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err);
+ }
+ else {
+ if (useDeprecatedSynchronousErrorHandling) {
+ _parentSubscriber.syncErrorValue = err;
+ _parentSubscriber.syncErrorThrown = true;
+ }
+ else {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err);
+ }
+ this.unsubscribe();
+ }
+ }
+ };
+ SafeSubscriber.prototype.complete = function () {
+ var _this = this;
+ if (!this.isStopped) {
+ var _parentSubscriber = this._parentSubscriber;
+ if (this._complete) {
+ var wrappedComplete = function () { return _this._complete.call(_this._context); };
+ if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
+ this.__tryOrUnsub(wrappedComplete);
+ this.unsubscribe();
+ }
+ else {
+ this.__tryOrSetError(_parentSubscriber, wrappedComplete);
+ this.unsubscribe();
+ }
+ }
+ else {
+ this.unsubscribe();
+ }
+ }
+ };
+ SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
+ try {
+ fn.call(this._context, value);
+ }
+ catch (err) {
+ this.unsubscribe();
+ if (__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) {
+ throw err;
+ }
+ else {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err);
+ }
+ }
+ };
+ SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
+ if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) {
+ throw new Error('bad call');
+ }
+ try {
+ fn.call(this._context, value);
+ }
+ catch (err) {
+ if (__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) {
+ parent.syncErrorValue = err;
+ parent.syncErrorThrown = true;
+ return true;
+ }
+ else {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err);
+ return true;
+ }
+ }
+ return false;
+ };
+ SafeSubscriber.prototype._unsubscribe = function () {
+ var _parentSubscriber = this._parentSubscriber;
+ this._context = null;
+ this._parentSubscriber = null;
+ _parentSubscriber.unsubscribe();
+ };
+ return SafeSubscriber;
+}(Subscriber));
+
+//# sourceMappingURL=Subscriber.js.map
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.OneTimePasswordError = exports.ResponseError = exports.ProcessTermError = exports.SecurityError = exports.ProcessSpawnError = exports.MessageError = undefined;
+
+var _create;
+
+function _load_create() {
+ return _create = _interopRequireDefault(__webpack_require__(210));
+}
+
+var _getPrototypeOf;
+
+function _load_getPrototypeOf() {
+ return _getPrototypeOf = _interopRequireDefault(__webpack_require__(550));
+}
+
+var _setPrototypeOf;
+
+function _load_setPrototypeOf() {
+ return _setPrototypeOf = _interopRequireDefault(__webpack_require__(211));
+}
+
+var _from;
+
+function _load_from() {
+ return _from = _interopRequireDefault(__webpack_require__(53));
+}
+
+var _construct;
+
+function _load_construct() {
+ return _construct = _interopRequireDefault(__webpack_require__(552));
+}
+
+var _classCallCheck2;
+
+function _load_classCallCheck() {
+ return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3));
+}
+
+var _possibleConstructorReturn2;
+
+function _load_possibleConstructorReturn() {
+ return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11));
+}
+
+var _inherits2;
+
+function _load_inherits() {
+ return _inherits2 = _interopRequireDefault(__webpack_require__(10));
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _extendableBuiltin5(cls) {
+ function ExtendableBuiltin() {
+ var instance = (0, (_construct || _load_construct()).default)(cls, (0, (_from || _load_from()).default)(arguments));
+ (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(instance, (0, (_getPrototypeOf || _load_getPrototypeOf()).default)(this));
+ return instance;
+ }
+
+ ExtendableBuiltin.prototype = (0, (_create || _load_create()).default)(cls.prototype, {
+ constructor: {
+ value: cls,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+
+ if ((_setPrototypeOf || _load_setPrototypeOf()).default) {
+ (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(ExtendableBuiltin, cls);
+ } else {
+ ExtendableBuiltin.__proto__ = cls;
+ }
+
+ return ExtendableBuiltin;
+}
+
+function _extendableBuiltin3(cls) {
+ function ExtendableBuiltin() {
+ var instance = (0, (_construct || _load_construct()).default)(cls, (0, (_from || _load_from()).default)(arguments));
+ (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(instance, (0, (_getPrototypeOf || _load_getPrototypeOf()).default)(this));
+ return instance;
+ }
+
+ ExtendableBuiltin.prototype = (0, (_create || _load_create()).default)(cls.prototype, {
+ constructor: {
+ value: cls,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+
+ if ((_setPrototypeOf || _load_setPrototypeOf()).default) {
+ (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(ExtendableBuiltin, cls);
+ } else {
+ ExtendableBuiltin.__proto__ = cls;
+ }
+
+ return ExtendableBuiltin;
+}
+
+function _extendableBuiltin(cls) {
+ function ExtendableBuiltin() {
+ var instance = (0, (_construct || _load_construct()).default)(cls, (0, (_from || _load_from()).default)(arguments));
+ (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(instance, (0, (_getPrototypeOf || _load_getPrototypeOf()).default)(this));
+ return instance;
+ }
+
+ ExtendableBuiltin.prototype = (0, (_create || _load_create()).default)(cls.prototype, {
+ constructor: {
+ value: cls,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+
+ if ((_setPrototypeOf || _load_setPrototypeOf()).default) {
+ (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(ExtendableBuiltin, cls);
+ } else {
+ ExtendableBuiltin.__proto__ = cls;
+ }
+
+ return ExtendableBuiltin;
+}
+
+var MessageError = exports.MessageError = function (_extendableBuiltin2) {
+ (0, (_inherits2 || _load_inherits()).default)(MessageError, _extendableBuiltin2);
+
+ function MessageError(msg, code) {
+ (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, MessageError);
+
+ var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _extendableBuiltin2.call(this, msg));
+
+ _this.code = code;
+ return _this;
+ }
+
+ return MessageError;
+}(_extendableBuiltin(Error));
+
+var ProcessSpawnError = exports.ProcessSpawnError = function (_MessageError) {
+ (0, (_inherits2 || _load_inherits()).default)(ProcessSpawnError, _MessageError);
+
+ function ProcessSpawnError(msg, code, process) {
+ (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ProcessSpawnError);
+
+ var _this2 = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _MessageError.call(this, msg, code));
+
+ _this2.process = process;
+ return _this2;
+ }
+
+ return ProcessSpawnError;
+}(MessageError);
+
+var SecurityError = exports.SecurityError = function (_MessageError2) {
+ (0, (_inherits2 || _load_inherits()).default)(SecurityError, _MessageError2);
+
+ function SecurityError() {
+ (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, SecurityError);
+ return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _MessageError2.apply(this, arguments));
+ }
+
+ return SecurityError;
+}(MessageError);
+
+var ProcessTermError = exports.ProcessTermError = function (_MessageError3) {
+ (0, (_inherits2 || _load_inherits()).default)(ProcessTermError, _MessageError3);
+
+ function ProcessTermError() {
+ (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ProcessTermError);
+ return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _MessageError3.apply(this, arguments));
+ }
+
+ return ProcessTermError;
+}(MessageError);
+
+var ResponseError = exports.ResponseError = function (_extendableBuiltin4) {
+ (0, (_inherits2 || _load_inherits()).default)(ResponseError, _extendableBuiltin4);
+
+ function ResponseError(msg, responseCode) {
+ (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ResponseError);
+
+ var _this5 = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _extendableBuiltin4.call(this, msg));
+
+ _this5.responseCode = responseCode;
+ return _this5;
+ }
+
+ return ResponseError;
+}(_extendableBuiltin3(Error));
+
+var OneTimePasswordError = exports.OneTimePasswordError = function (_extendableBuiltin6) {
+ (0, (_inherits2 || _load_inherits()).default)(OneTimePasswordError, _extendableBuiltin6);
+
+ function OneTimePasswordError(notice) {
+ (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, OneTimePasswordError);
+
+ var _this6 = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _extendableBuiltin6.call(this));
+
+ _this6.notice = notice;
+ return _this6;
+ }
+
+ return OneTimePasswordError;
+}(_extendableBuiltin5(Error));
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(600), __esModule: true };
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getFirstSuitableFolder = exports.readFirstAvailableStream = exports.makeTempDir = exports.hardlinksWork = exports.writeFilePreservingEol = exports.getFileSizeOnDisk = exports.walk = exports.symlink = exports.find = exports.readJsonAndFile = exports.readJson = exports.readFileAny = exports.hardlinkBulk = exports.copyBulk = exports.unlink = exports.glob = exports.link = exports.chmod = exports.lstat = exports.exists = exports.mkdirp = exports.stat = exports.access = exports.rename = exports.readdir = exports.realpath = exports.readlink = exports.writeFile = exports.open = exports.readFileBuffer = exports.lockQueue = exports.constants = undefined;
+
+var _map;
+
+function _load_map() {
+ return _map = _interopRequireDefault(__webpack_require__(42));
+}
+
+var _getIterator2;
+
+function _load_getIterator() {
+ return _getIterator2 = _interopRequireDefault(__webpack_require__(4));
+}
+
+var _promise;
+
+function _load_promise() {
+ return _promise = _interopRequireDefault(__webpack_require__(7));
+}
+
+var _set;
+
+function _load_set() {
+ return _set = _interopRequireDefault(__webpack_require__(16));
+}
+
+var _asyncToGenerator2;
+
+function _load_asyncToGenerator() {
+ return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2));
+}
+
+var buildActionsForCopy = function () {
+ var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) {
+
+ //
+ var build = function () {
+ var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) {
+ var src = data.src,
+ dest = data.dest,
+ type = data.type;
+
+ var onFresh = data.onFresh || noop;
+ var onDone = data.onDone || noop;
+
+ // TODO https://github.com/yarnpkg/yarn/issues/3751
+ // related to bundled dependencies handling
+ if (files.has(dest.toLowerCase())) {
+ reporter.verbose(`The case-insensitive file ${dest} shouldn't be copied twice in one bulk copy`);
+ } else {
+ files.add(dest.toLowerCase());
+ }
+
+ if (type === 'symlink') {
+ yield mkdirp((_path2 || _load_path()).default.dirname(dest));
+ onFresh();
+ actions.symlink.push({
+ dest,
+ linkname: src
+ });
+ onDone();
+ return;
+ }
+
+ if (events.ignoreBasenames.indexOf((_path2 || _load_path()).default.basename(src)) >= 0) {
+ // ignored file
+ return;
+ }
+
+ var srcStat = yield lstat(src);
+ var srcFiles = void 0;
+
+ if (srcStat.isDirectory()) {
+ srcFiles = yield readdir(src);
+ }
+
+ var destStat = void 0;
+ try {
+ // try accessing the destination
+ destStat = yield lstat(dest);
+ } catch (e) {
+ // proceed if destination doesn't exist, otherwise error
+ if (e.code !== 'ENOENT') {
+ throw e;
+ }
+ }
+
+ // if destination exists
+ if (destStat) {
+ var bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink();
+ var bothFolders = srcStat.isDirectory() && destStat.isDirectory();
+ var bothFiles = srcStat.isFile() && destStat.isFile();
+
+ // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving
+ // us modes that aren't valid. investigate this, it's generally safe to proceed.
+
+ /* if (srcStat.mode !== destStat.mode) {
+ try {
+ await access(dest, srcStat.mode);
+ } catch (err) {}
+ } */
+
+ if (bothFiles && artifactFiles.has(dest)) {
+ // this file gets changed during build, likely by a custom install script. Don't bother checking it.
+ onDone();
+ reporter.verbose(reporter.lang('verboseFileSkipArtifact', src));
+ return;
+ }
+
+ if (bothFiles && srcStat.size === destStat.size && (0, (_fsNormalized || _load_fsNormalized()).fileDatesEqual)(srcStat.mtime, destStat.mtime)) {
+ // we can safely assume this is the same file
+ onDone();
+ reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.size, +srcStat.mtime));
+ return;
+ }
+
+ if (bothSymlinks) {
+ var srcReallink = yield readlink(src);
+ if (srcReallink === (yield readlink(dest))) {
+ // if both symlinks are the same then we can continue on
+ onDone();
+ reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink));
+ return;
+ }
+ }
+
+ if (bothFolders) {
+ // mark files that aren't in this folder as possibly extraneous
+ var destFiles = yield readdir(dest);
+ invariant(srcFiles, 'src files not initialised');
+
+ for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) {
+ var _ref6;
+
+ if (_isArray4) {
+ if (_i4 >= _iterator4.length) break;
+ _ref6 = _iterator4[_i4++];
+ } else {
+ _i4 = _iterator4.next();
+ if (_i4.done) break;
+ _ref6 = _i4.value;
+ }
+
+ var _file2 = _ref6;
+
+ if (srcFiles.indexOf(_file2) < 0) {
+ var _loc = (_path2 || _load_path()).default.join(dest, _file2);
+ possibleExtraneous.add(_loc);
+
+ if ((yield lstat(_loc)).isDirectory()) {
+ for (var _iterator5 = yield readdir(_loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) {
+ var _ref7;
+
+ if (_isArray5) {
+ if (_i5 >= _iterator5.length) break;
+ _ref7 = _iterator5[_i5++];
+ } else {
+ _i5 = _iterator5.next();
+ if (_i5.done) break;
+ _ref7 = _i5.value;
+ }
+
+ var _file3 = _ref7;
+
+ possibleExtraneous.add((_path2 || _load_path()).default.join(_loc, _file3));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (destStat && destStat.isSymbolicLink()) {
+ yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest);
+ destStat = null;
+ }
+
+ if (srcStat.isSymbolicLink()) {
+ onFresh();
+ var _linkname = yield readlink(src);
+ actions.symlink.push({
+ dest,
+ linkname: _linkname
+ });
+ onDone();
+ } else if (srcStat.isDirectory()) {
+ yield* function* () {
+ if (!destStat) {
+ reporter.verbose(reporter.lang('verboseFileFolder', dest));
+ yield mkdirp(dest);
+ }
+
+ var destParts = dest.split((_path2 || _load_path()).default.sep);
+ while (destParts.length) {
+ files.add(destParts.join((_path2 || _load_path()).default.sep).toLowerCase());
+ destParts.pop();
+ }
+
+ // push all files to queue
+ invariant(srcFiles, 'src files not initialised');
+ var remaining = srcFiles.length;
+ if (!remaining) {
+ onDone();
+ }
+ for (var _iterator6 = srcFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) {
+ var _ref8;
+
+ if (_isArray6) {
+ if (_i6 >= _iterator6.length) break;
+ _ref8 = _iterator6[_i6++];
+ } else {
+ _i6 = _iterator6.next();
+ if (_i6.done) break;
+ _ref8 = _i6.value;
+ }
+
+ var _file4 = _ref8;
+
+ queue.push({
+ dest: (_path2 || _load_path()).default.join(dest, _file4),
+ onFresh,
+ onDone: function (_onDone) {
+ function onDone() {
+ return _onDone.apply(this, arguments);
+ }
+
+ onDone.toString = function () {
+ return _onDone.toString();
+ };
+
+ return onDone;
+ }(function () {
+ if (--remaining === 0) {
+ onDone();
+ }
+ }),
+ src: (_path2 || _load_path()).default.join(src, _file4)
+ });
+ }
+ }();
+ } else if (srcStat.isFile()) {
+ onFresh();
+ actions.file.push({
+ src,
+ dest,
+ atime: srcStat.atime,
+ mtime: srcStat.mtime,
+ mode: srcStat.mode
+ });
+ onDone();
+ } else {
+ throw new Error(`unsure how to copy this: ${src}`);
+ }
+ });
+
+ return function build(_x5) {
+ return _ref5.apply(this, arguments);
+ };
+ }();
+
+ var artifactFiles = new (_set || _load_set()).default(events.artifactFiles || []);
+ var files = new (_set || _load_set()).default();
+
+ // initialise events
+
+ var _loop = function _loop(item) {
+ var onDone = item.onDone;
+ item.onDone = function () {
+ events.onProgress(item.dest);
+ if (onDone) {
+ onDone();
+ }
+ };
+ };
+
+ for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) {
+ var _ref2;
+
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref2 = _iterator[_i++];
+ } else {
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref2 = _i.value;
+ }
+
+ var item = _ref2;
+
+ _loop(item);
+ }
+ events.onStart(queue.length);
+
+ // start building actions
+ var actions = {
+ file: [],
+ symlink: [],
+ link: []
+ };
+
+ // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items
+ // at a time due to the requirement to push items onto the queue
+ while (queue.length) {
+ var items = queue.splice(0, CONCURRENT_QUEUE_ITEMS);
+ yield (_promise || _load_promise()).default.all(items.map(build));
+ }
+
+ // simulate the existence of some files to prevent considering them extraneous
+ for (var _iterator2 = artifactFiles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) {
+ var _ref3;
+
+ if (_isArray2) {
+ if (_i2 >= _iterator2.length) break;
+ _ref3 = _iterator2[_i2++];
+ } else {
+ _i2 = _iterator2.next();
+ if (_i2.done) break;
+ _ref3 = _i2.value;
+ }
+
+ var _file = _ref3;
+
+ if (possibleExtraneous.has(_file)) {
+ reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', _file));
+ possibleExtraneous.delete(_file);
+ }
+ }
+
+ for (var _iterator3 = possibleExtraneous, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) {
+ var _ref4;
+
+ if (_isArray3) {
+ if (_i3 >= _iterator3.length) break;
+ _ref4 = _iterator3[_i3++];
+ } else {
+ _i3 = _iterator3.next();
+ if (_i3.done) break;
+ _ref4 = _i3.value;
+ }
+
+ var loc = _ref4;
+
+ if (files.has(loc.toLowerCase())) {
+ possibleExtraneous.delete(loc);
+ }
+ }
+
+ return actions;
+ });
+
+ return function buildActionsForCopy(_x, _x2, _x3, _x4) {
+ return _ref.apply(this, arguments);
+ };
+}();
+
+var buildActionsForHardlink = function () {
+ var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) {
+
+ //
+ var build = function () {
+ var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) {
+ var src = data.src,
+ dest = data.dest;
+
+ var onFresh = data.onFresh || noop;
+ var onDone = data.onDone || noop;
+ if (files.has(dest.toLowerCase())) {
+ // Fixes issue https://github.com/yarnpkg/yarn/issues/2734
+ // When bulk hardlinking we have A -> B structure that we want to hardlink to A1 -> B1,
+ // package-linker passes that modules A1 and B1 need to be hardlinked,
+ // the recursive linking algorithm of A1 ends up scheduling files in B1 to be linked twice which will case
+ // an exception.
+ onDone();
+ return;
+ }
+ files.add(dest.toLowerCase());
+
+ if (events.ignoreBasenames.indexOf((_path2 || _load_path()).default.basename(src)) >= 0) {
+ // ignored file
+ return;
+ }
+
+ var srcStat = yield lstat(src);
+ var srcFiles = void 0;
+
+ if (srcStat.isDirectory()) {
+ srcFiles = yield readdir(src);
+ }
+
+ var destExists = yield exists(dest);
+ if (destExists) {
+ var destStat = yield lstat(dest);
+
+ var bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink();
+ var bothFolders = srcStat.isDirectory() && destStat.isDirectory();
+ var bothFiles = srcStat.isFile() && destStat.isFile();
+
+ if (srcStat.mode !== destStat.mode) {
+ try {
+ yield access(dest, srcStat.mode);
+ } catch (err) {
+ // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving
+ // us modes that aren't valid. investigate this, it's generally safe to proceed.
+ reporter.verbose(err);
+ }
+ }
+
+ if (bothFiles && artifactFiles.has(dest)) {
+ // this file gets changed during build, likely by a custom install script. Don't bother checking it.
+ onDone();
+ reporter.verbose(reporter.lang('verboseFileSkipArtifact', src));
+ return;
+ }
+
+ // correct hardlink
+ if (bothFiles && srcStat.ino !== null && srcStat.ino === destStat.ino) {
+ onDone();
+ reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.ino));
+ return;
+ }
+
+ if (bothSymlinks) {
+ var srcReallink = yield readlink(src);
+ if (srcReallink === (yield readlink(dest))) {
+ // if both symlinks are the same then we can continue on
+ onDone();
+ reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink));
+ return;
+ }
+ }
+
+ if (bothFolders) {
+ // mark files that aren't in this folder as possibly extraneous
+ var destFiles = yield readdir(dest);
+ invariant(srcFiles, 'src files not initialised');
+
+ for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator10);;) {
+ var _ref14;
+
+ if (_isArray10) {
+ if (_i10 >= _iterator10.length) break;
+ _ref14 = _iterator10[_i10++];
+ } else {
+ _i10 = _iterator10.next();
+ if (_i10.done) break;
+ _ref14 = _i10.value;
+ }
+
+ var _file6 = _ref14;
+
+ if (srcFiles.indexOf(_file6) < 0) {
+ var _loc2 = (_path2 || _load_path()).default.join(dest, _file6);
+ possibleExtraneous.add(_loc2);
+
+ if ((yield lstat(_loc2)).isDirectory()) {
+ for (var _iterator11 = yield readdir(_loc2), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator11);;) {
+ var _ref15;
+
+ if (_isArray11) {
+ if (_i11 >= _iterator11.length) break;
+ _ref15 = _iterator11[_i11++];
+ } else {
+ _i11 = _iterator11.next();
+ if (_i11.done) break;
+ _ref15 = _i11.value;
+ }
+
+ var _file7 = _ref15;
+
+ possibleExtraneous.add((_path2 || _load_path()).default.join(_loc2, _file7));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (srcStat.isSymbolicLink()) {
+ onFresh();
+ var _linkname2 = yield readlink(src);
+ actions.symlink.push({
+ dest,
+ linkname: _linkname2
+ });
+ onDone();
+ } else if (srcStat.isDirectory()) {
+ yield* function* () {
+ reporter.verbose(reporter.lang('verboseFileFolder', dest));
+ yield mkdirp(dest);
+
+ var destParts = dest.split((_path2 || _load_path()).default.sep);
+ while (destParts.length) {
+ files.add(destParts.join((_path2 || _load_path()).default.sep).toLowerCase());
+ destParts.pop();
+ }
+
+ // push all files to queue
+ invariant(srcFiles, 'src files not initialised');
+ var remaining = srcFiles.length;
+ if (!remaining) {
+ onDone();
+ }
+ for (var _iterator12 = srcFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator12);;) {
+ var _ref16;
+
+ if (_isArray12) {
+ if (_i12 >= _iterator12.length) break;
+ _ref16 = _iterator12[_i12++];
+ } else {
+ _i12 = _iterator12.next();
+ if (_i12.done) break;
+ _ref16 = _i12.value;
+ }
+
+ var _file8 = _ref16;
+
+ queue.push({
+ onFresh,
+ src: (_path2 || _load_path()).default.join(src, _file8),
+ dest: (_path2 || _load_path()).default.join(dest, _file8),
+ onDone: function (_onDone2) {
+ function onDone() {
+ return _onDone2.apply(this, arguments);
+ }
+
+ onDone.toString = function () {
+ return _onDone2.toString();
+ };
+
+ return onDone;
+ }(function () {
+ if (--remaining === 0) {
+ onDone();
+ }
+ })
+ });
+ }
+ }();
+ } else if (srcStat.isFile()) {
+ onFresh();
+ actions.link.push({
+ src,
+ dest,
+ removeDest: destExists
+ });
+ onDone();
+ } else {
+ throw new Error(`unsure how to copy this: ${src}`);
+ }
+ });
+
+ return function build(_x10) {
+ return _ref13.apply(this, arguments);
+ };
+ }();
+
+ var artifactFiles = new (_set || _load_set()).default(events.artifactFiles || []);
+ var files = new (_set || _load_set()).default();
+
+ // initialise events
+
+ var _loop2 = function _loop2(item) {
+ var onDone = item.onDone || noop;
+ item.onDone = function () {
+ events.onProgress(item.dest);
+ onDone();
+ };
+ };
+
+ for (var _iterator7 = queue, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) {
+ var _ref10;
+
+ if (_isArray7) {
+ if (_i7 >= _iterator7.length) break;
+ _ref10 = _iterator7[_i7++];
+ } else {
+ _i7 = _iterator7.next();
+ if (_i7.done) break;
+ _ref10 = _i7.value;
+ }
+
+ var item = _ref10;
+
+ _loop2(item);
+ }
+ events.onStart(queue.length);
+
+ // start building actions
+ var actions = {
+ file: [],
+ symlink: [],
+ link: []
+ };
+
+ // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items
+ // at a time due to the requirement to push items onto the queue
+ while (queue.length) {
+ var items = queue.splice(0, CONCURRENT_QUEUE_ITEMS);
+ yield (_promise || _load_promise()).default.all(items.map(build));
+ }
+
+ // simulate the existence of some files to prevent considering them extraneous
+ for (var _iterator8 = artifactFiles, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator8);;) {
+ var _ref11;
+
+ if (_isArray8) {
+ if (_i8 >= _iterator8.length) break;
+ _ref11 = _iterator8[_i8++];
+ } else {
+ _i8 = _iterator8.next();
+ if (_i8.done) break;
+ _ref11 = _i8.value;
+ }
+
+ var _file5 = _ref11;
+
+ if (possibleExtraneous.has(_file5)) {
+ reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', _file5));
+ possibleExtraneous.delete(_file5);
+ }
+ }
+
+ for (var _iterator9 = possibleExtraneous, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator9);;) {
+ var _ref12;
+
+ if (_isArray9) {
+ if (_i9 >= _iterator9.length) break;
+ _ref12 = _iterator9[_i9++];
+ } else {
+ _i9 = _iterator9.next();
+ if (_i9.done) break;
+ _ref12 = _i9.value;
+ }
+
+ var loc = _ref12;
+
+ if (files.has(loc.toLowerCase())) {
+ possibleExtraneous.delete(loc);
+ }
+ }
+
+ return actions;
+ });
+
+ return function buildActionsForHardlink(_x6, _x7, _x8, _x9) {
+ return _ref9.apply(this, arguments);
+ };
+}();
+
+var copyBulk = exports.copyBulk = function () {
+ var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) {
+ var events = {
+ onStart: _events && _events.onStart || noop,
+ onProgress: _events && _events.onProgress || noop,
+ possibleExtraneous: _events ? _events.possibleExtraneous : new (_set || _load_set()).default(),
+ ignoreBasenames: _events && _events.ignoreBasenames || [],
+ artifactFiles: _events && _events.artifactFiles || []
+ };
+
+ var actions = yield buildActionsForCopy(queue, events, events.possibleExtraneous, reporter);
+ events.onStart(actions.file.length + actions.symlink.length + actions.link.length);
+
+ var fileActions = actions.file;
+
+ var currentlyWriting = new (_map || _load_map()).default();
+
+ yield (_promise2 || _load_promise2()).queue(fileActions, function () {
+ var _ref18 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) {
+ var writePromise = void 0;
+ while (writePromise = currentlyWriting.get(data.dest)) {
+ yield writePromise;
+ }
+
+ reporter.verbose(reporter.lang('verboseFileCopy', data.src, data.dest));
+ var copier = (0, (_fsNormalized || _load_fsNormalized()).copyFile)(data, function () {
+ return currentlyWriting.delete(data.dest);
+ });
+ currentlyWriting.set(data.dest, copier);
+ events.onProgress(data.dest);
+ return copier;
+ });
+
+ return function (_x14) {
+ return _ref18.apply(this, arguments);
+ };
+ }(), CONCURRENT_QUEUE_ITEMS);
+
+ // we need to copy symlinks last as they could reference files we were copying
+ var symlinkActions = actions.symlink;
+ yield (_promise2 || _load_promise2()).queue(symlinkActions, function (data) {
+ var linkname = (_path2 || _load_path()).default.resolve((_path2 || _load_path()).default.dirname(data.dest), data.linkname);
+ reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname));
+ return symlink(linkname, data.dest);
+ });
+ });
+
+ return function copyBulk(_x11, _x12, _x13) {
+ return _ref17.apply(this, arguments);
+ };
+}();
+
+var hardlinkBulk = exports.hardlinkBulk = function () {
+ var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) {
+ var events = {
+ onStart: _events && _events.onStart || noop,
+ onProgress: _events && _events.onProgress || noop,
+ possibleExtraneous: _events ? _events.possibleExtraneous : new (_set || _load_set()).default(),
+ artifactFiles: _events && _events.artifactFiles || [],
+ ignoreBasenames: []
+ };
+
+ var actions = yield buildActionsForHardlink(queue, events, events.possibleExtraneous, reporter);
+ events.onStart(actions.file.length + actions.symlink.length + actions.link.length);
+
+ var fileActions = actions.link;
+
+ yield (_promise2 || _load_promise2()).queue(fileActions, function () {
+ var _ref20 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) {
+ reporter.verbose(reporter.lang('verboseFileLink', data.src, data.dest));
+ if (data.removeDest) {
+ yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(data.dest);
+ }
+ yield link(data.src, data.dest);
+ });
+
+ return function (_x18) {
+ return _ref20.apply(this, arguments);
+ };
+ }(), CONCURRENT_QUEUE_ITEMS);
+
+ // we need to copy symlinks last as they could reference files we were copying
+ var symlinkActions = actions.symlink;
+ yield (_promise2 || _load_promise2()).queue(symlinkActions, function (data) {
+ var linkname = (_path2 || _load_path()).default.resolve((_path2 || _load_path()).default.dirname(data.dest), data.linkname);
+ reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname));
+ return symlink(linkname, data.dest);
+ });
+ });
+
+ return function hardlinkBulk(_x15, _x16, _x17) {
+ return _ref19.apply(this, arguments);
+ };
+}();
+
+var readFileAny = exports.readFileAny = function () {
+ var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (files) {
+ for (var _iterator13 = files, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator13);;) {
+ var _ref22;
+
+ if (_isArray13) {
+ if (_i13 >= _iterator13.length) break;
+ _ref22 = _iterator13[_i13++];
+ } else {
+ _i13 = _iterator13.next();
+ if (_i13.done) break;
+ _ref22 = _i13.value;
+ }
+
+ var _file9 = _ref22;
+
+ if (yield exists(_file9)) {
+ return readFile(_file9);
+ }
+ }
+ return null;
+ });
+
+ return function readFileAny(_x19) {
+ return _ref21.apply(this, arguments);
+ };
+}();
+
+var readJson = exports.readJson = function () {
+ var _ref23 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) {
+ return (yield readJsonAndFile(loc)).object;
+ });
+
+ return function readJson(_x20) {
+ return _ref23.apply(this, arguments);
+ };
+}();
+
+var readJsonAndFile = exports.readJsonAndFile = function () {
+ var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) {
+ var file = yield readFile(loc);
+ try {
+ return {
+ object: (0, (_map2 || _load_map2()).default)(JSON.parse(stripBOM(file))),
+ content: file
+ };
+ } catch (err) {
+ err.message = `${loc}: ${err.message}`;
+ throw err;
+ }
+ });
+
+ return function readJsonAndFile(_x21) {
+ return _ref24.apply(this, arguments);
+ };
+}();
+
+var find = exports.find = function () {
+ var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, dir) {
+ var parts = dir.split((_path2 || _load_path()).default.sep);
+
+ while (parts.length) {
+ var loc = parts.concat(filename).join((_path2 || _load_path()).default.sep);
+
+ if (yield exists(loc)) {
+ return loc;
+ } else {
+ parts.pop();
+ }
+ }
+
+ return false;
+ });
+
+ return function find(_x22, _x23) {
+ return _ref25.apply(this, arguments);
+ };
+}();
+
+var symlink = exports.symlink = function () {
+ var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest) {
+ if (process.platform !== 'win32') {
+ // use relative paths otherwise which will be retained if the directory is moved
+ src = (_path2 || _load_path()).default.relative((_path2 || _load_path()).default.dirname(dest), src);
+ // When path.relative returns an empty string for the current directory, we should instead use
+ // '.', which is a valid fs.symlink target.
+ src = src || '.';
+ }
+
+ try {
+ var stats = yield lstat(dest);
+ if (stats.isSymbolicLink()) {
+ var resolved = dest;
+ if (resolved === src) {
+ return;
+ }
+ }
+ } catch (err) {
+ if (err.code !== 'ENOENT') {
+ throw err;
+ }
+ }
+
+ // We use rimraf for unlink which never throws an ENOENT on missing target
+ yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest);
+
+ if (process.platform === 'win32') {
+ // use directory junctions if possible on win32, this requires absolute paths
+ yield fsSymlink(src, dest, 'junction');
+ } else {
+ yield fsSymlink(src, dest);
+ }
+ });
+
+ return function symlink(_x24, _x25) {
+ return _ref26.apply(this, arguments);
+ };
+}();
+
+var walk = exports.walk = function () {
+ var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir) {
+ var ignoreBasenames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new (_set || _load_set()).default();
+
+ var files = [];
+
+ var filenames = yield readdir(dir);
+ if (ignoreBasenames.size) {
+ filenames = filenames.filter(function (name) {
+ return !ignoreBasenames.has(name);
+ });
+ }
+
+ for (var _iterator14 = filenames, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator14);;) {
+ var _ref28;
+
+ if (_isArray14) {
+ if (_i14 >= _iterator14.length) break;
+ _ref28 = _iterator14[_i14++];
+ } else {
+ _i14 = _iterator14.next();
+ if (_i14.done) break;
+ _ref28 = _i14.value;
+ }
+
+ var name = _ref28;
+
+ var _relative = relativeDir ? (_path2 || _load_path()).default.join(relativeDir, name) : name;
+ var loc = (_path2 || _load_path()).default.join(dir, name);
+ var _stat = yield lstat(loc);
+
+ files.push({
+ relative: _relative,
+ basename: name,
+ absolute: loc,
+ mtime: +_stat.mtime
+ });
+
+ if (_stat.isDirectory()) {
+ files = files.concat((yield walk(loc, _relative, ignoreBasenames)));
+ }
+ }
+
+ return files;
+ });
+
+ return function walk(_x26, _x27) {
+ return _ref27.apply(this, arguments);
+ };
+}();
+
+var getFileSizeOnDisk = exports.getFileSizeOnDisk = function () {
+ var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) {
+ var stat = yield lstat(loc);
+ var size = stat.size,
+ blockSize = stat.blksize;
+
+
+ return Math.ceil(size / blockSize) * blockSize;
+ });
+
+ return function getFileSizeOnDisk(_x29) {
+ return _ref29.apply(this, arguments);
+ };
+}();
+
+var getEolFromFile = function () {
+ var _ref30 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path) {
+ if (!(yield exists(path))) {
+ return undefined;
+ }
+
+ var buffer = yield readFileBuffer(path);
+
+ for (var i = 0; i < buffer.length; ++i) {
+ if (buffer[i] === cr) {
+ return '\r\n';
+ }
+ if (buffer[i] === lf) {
+ return '\n';
+ }
+ }
+ return undefined;
+ });
+
+ return function getEolFromFile(_x30) {
+ return _ref30.apply(this, arguments);
+ };
+}();
+
+var writeFilePreservingEol = exports.writeFilePreservingEol = function () {
+ var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path, data) {
+ var eol = (yield getEolFromFile(path)) || (_os || _load_os()).default.EOL;
+ if (eol !== '\n') {
+ data = data.replace(/\n/g, eol);
+ }
+ yield writeFile(path, data);
+ });
+
+ return function writeFilePreservingEol(_x31, _x32) {
+ return _ref31.apply(this, arguments);
+ };
+}();
+
+var hardlinksWork = exports.hardlinksWork = function () {
+ var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir) {
+ var filename = 'test-file' + Math.random();
+ var file = (_path2 || _load_path()).default.join(dir, filename);
+ var fileLink = (_path2 || _load_path()).default.join(dir, filename + '-link');
+ try {
+ yield writeFile(file, 'test');
+ yield link(file, fileLink);
+ } catch (err) {
+ return false;
+ } finally {
+ yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(file);
+ yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(fileLink);
+ }
+ return true;
+ });
+
+ return function hardlinksWork(_x33) {
+ return _ref32.apply(this, arguments);
+ };
+}();
+
+// not a strict polyfill for Node's fs.mkdtemp
+
+
+var makeTempDir = exports.makeTempDir = function () {
+ var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (prefix) {
+ var dir = (_path2 || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ''}-${Date.now()}-${Math.random()}`);
+ yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dir);
+ yield mkdirp(dir);
+ return dir;
+ });
+
+ return function makeTempDir(_x34) {
+ return _ref33.apply(this, arguments);
+ };
+}();
+
+var readFirstAvailableStream = exports.readFirstAvailableStream = function () {
+ var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) {
+ for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator15);;) {
+ var _ref35;
+
+ if (_isArray15) {
+ if (_i15 >= _iterator15.length) break;
+ _ref35 = _iterator15[_i15++];
+ } else {
+ _i15 = _iterator15.next();
+ if (_i15.done) break;
+ _ref35 = _i15.value;
+ }
+
+ var _path = _ref35;
+
+ try {
+ var fd = yield open(_path, 'r');
+ return (_fs || _load_fs()).default.createReadStream(_path, { fd });
+ } catch (err) {
+ // Try the next one
+ }
+ }
+ return null;
+ });
+
+ return function readFirstAvailableStream(_x35) {
+ return _ref34.apply(this, arguments);
+ };
+}();
+
+var getFirstSuitableFolder = exports.getFirstSuitableFolder = function () {
+ var _ref36 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) {
+ var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : constants.W_OK | constants.X_OK;
+
+ var result = {
+ skipped: [],
+ folder: null
+ };
+
+ for (var _iterator16 = paths, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator16);;) {
+ var _ref37;
+
+ if (_isArray16) {
+ if (_i16 >= _iterator16.length) break;
+ _ref37 = _iterator16[_i16++];
+ } else {
+ _i16 = _iterator16.next();
+ if (_i16.done) break;
+ _ref37 = _i16.value;
+ }
+
+ var _folder = _ref37;
+
+ try {
+ yield mkdirp(_folder);
+ yield access(_folder, mode);
+
+ result.folder = _folder;
+
+ return result;
+ } catch (error) {
+ result.skipped.push({
+ error,
+ folder: _folder
+ });
+ }
+ }
+ return result;
+ });
+
+ return function getFirstSuitableFolder(_x36) {
+ return _ref36.apply(this, arguments);
+ };
+}();
+
+exports.copy = copy;
+exports.readFile = readFile;
+exports.readFileRaw = readFileRaw;
+exports.normalizeOS = normalizeOS;
+
+var _fs;
+
+function _load_fs() {
+ return _fs = _interopRequireDefault(__webpack_require__(12));
+}
+
+var _glob;
+
+function _load_glob() {
+ return _glob = _interopRequireDefault(__webpack_require__(234));
+}
+
+var _os;
+
+function _load_os() {
+ return _os = _interopRequireDefault(__webpack_require__(66));
+}
+
+var _path2;
+
+function _load_path() {
+ return _path2 = _interopRequireDefault(__webpack_require__(1));
+}
+
+var _blockingQueue;
+
+function _load_blockingQueue() {
+ return _blockingQueue = _interopRequireDefault(__webpack_require__(157));
+}
+
+var _promise2;
+
+function _load_promise2() {
+ return _promise2 = _interopRequireWildcard(__webpack_require__(86));
+}
+
+var _promise3;
+
+function _load_promise3() {
+ return _promise3 = __webpack_require__(86);
+}
+
+var _map2;
+
+function _load_map2() {
+ return _map2 = _interopRequireDefault(__webpack_require__(51));
+}
+
+var _fsNormalized;
+
+function _load_fsNormalized() {
+ return _fsNormalized = __webpack_require__(535);
+}
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var constants = exports.constants = typeof (_fs || _load_fs()).default.constants !== 'undefined' ? (_fs || _load_fs()).default.constants : {
+ R_OK: (_fs || _load_fs()).default.R_OK,
+ W_OK: (_fs || _load_fs()).default.W_OK,
+ X_OK: (_fs || _load_fs()).default.X_OK
+};
+
+var lockQueue = exports.lockQueue = new (_blockingQueue || _load_blockingQueue()).default('fs lock');
+
+var readFileBuffer = exports.readFileBuffer = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.readFile);
+var open = exports.open = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.open);
+var writeFile = exports.writeFile = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.writeFile);
+var readlink = exports.readlink = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.readlink);
+var realpath = exports.realpath = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.realpath);
+var readdir = exports.readdir = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.readdir);
+var rename = exports.rename = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.rename);
+var access = exports.access = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.access);
+var stat = exports.stat = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.stat);
+var mkdirp = exports.mkdirp = (0, (_promise3 || _load_promise3()).promisify)(__webpack_require__(241));
+var exists = exports.exists = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.exists, true);
+var lstat = exports.lstat = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.lstat);
+var chmod = exports.chmod = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.chmod);
+var link = exports.link = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.link);
+var glob = exports.glob = (0, (_promise3 || _load_promise3()).promisify)((_glob || _load_glob()).default);
+exports.unlink = (_fsNormalized || _load_fsNormalized()).unlink;
+
+// fs.copyFile uses the native file copying instructions on the system, performing much better
+// than any JS-based solution and consumes fewer resources. Repeated testing to fine tune the
+// concurrency level revealed 128 as the sweet spot on a quad-core, 16 CPU Intel system with SSD.
+
+var CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4;
+
+var fsSymlink = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.symlink);
+var invariant = __webpack_require__(15);
+var stripBOM = __webpack_require__(429);
+
+var noop = function noop() {};
+
+function copy(src, dest, reporter) {
+ return copyBulk([{ src, dest }], reporter);
+}
+
+function _readFile(loc, encoding) {
+ return new (_promise || _load_promise()).default(function (resolve, reject) {
+ (_fs || _load_fs()).default.readFile(loc, encoding, function (err, content) {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(content);
+ }
+ });
+ });
+}
+
+function readFile(loc) {
+ return _readFile(loc, 'utf8').then(normalizeOS);
+}
+
+function readFileRaw(loc) {
+ return _readFile(loc, 'binary');
+}
+
+function normalizeOS(body) {
+ return body.replace(/\r\n/g, '\n');
+}
+
+var cr = '\r'.charCodeAt(0);
+var lf = '\n'.charCodeAt(0);
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+module.exports = require("util");
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _setPrototypeOf = __webpack_require__(211);
+
+var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
+
+var _create = __webpack_require__(210);
+
+var _create2 = _interopRequireDefault(_create);
+
+var _typeof2 = __webpack_require__(316);
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = function (subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
+ }
+
+ subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
+};
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _typeof2 = __webpack_require__(316);
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = function (self, call) {
+ if (!self) {
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ }
+
+ return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
+};
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports) {
+
+module.exports = require("fs");
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getPathKey = getPathKey;
+var os = __webpack_require__(66);
+var path = __webpack_require__(1);
+var userHome = __webpack_require__(101).default;
+
+var _require = __webpack_require__(549),
+ getCacheDir = _require.getCacheDir,
+ getConfigDir = _require.getConfigDir,
+ getDataDir = _require.getDataDir;
+
+var isWebpackBundle = __webpack_require__(792);
+
+var DEPENDENCY_TYPES = exports.DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies', 'peerDependencies'];
+var OWNED_DEPENDENCY_TYPES = exports.OWNED_DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies'];
+
+var RESOLUTIONS = exports.RESOLUTIONS = 'resolutions';
+var MANIFEST_FIELDS = exports.MANIFEST_FIELDS = [RESOLUTIONS].concat(DEPENDENCY_TYPES);
+
+var SUPPORTED_NODE_VERSIONS = exports.SUPPORTED_NODE_VERSIONS = '^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0';
+
+var YARN_REGISTRY = exports.YARN_REGISTRY = 'https://registry.yarnpkg.com';
+var NPM_REGISTRY_RE = exports.NPM_REGISTRY_RE = /https?:\/\/registry\.npmjs\.org/g;
+
+var YARN_DOCS = exports.YARN_DOCS = 'https://yarnpkg.com/en/docs/cli/';
+var YARN_INSTALLER_SH = exports.YARN_INSTALLER_SH = 'https://yarnpkg.com/install.sh';
+var YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi';
+
+var SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version';
+
+// cache version, bump whenever we make backwards incompatible changes
+var CACHE_VERSION = exports.CACHE_VERSION = 6;
+
+// lockfile version, bump whenever we make backwards incompatible changes
+var LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1;
+
+// max amount of network requests to perform concurrently
+var NETWORK_CONCURRENCY = exports.NETWORK_CONCURRENCY = 8;
+
+// HTTP timeout used when downloading packages
+var NETWORK_TIMEOUT = exports.NETWORK_TIMEOUT = 30 * 1000; // in milliseconds
+
+// max amount of child processes to execute concurrently
+var CHILD_CONCURRENCY = exports.CHILD_CONCURRENCY = 5;
+
+var REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid'];
+
+function getPreferredCacheDirectories() {
+ var preferredCacheDirectories = [getCacheDir()];
+
+ if (process.getuid) {
+ // $FlowFixMe: process.getuid exists, dammit
+ preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`));
+ }
+
+ preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`));
+
+ return preferredCacheDirectories;
+}
+
+var PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories();
+var CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir();
+var DATA_DIRECTORY = exports.DATA_DIRECTORY = getDataDir();
+var LINK_REGISTRY_DIRECTORY = exports.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, 'link');
+var GLOBAL_MODULE_DIRECTORY = exports.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, 'global');
+
+var NODE_BIN_PATH = exports.NODE_BIN_PATH = process.execPath;
+var YARN_BIN_PATH = exports.YARN_BIN_PATH = getYarnBinPath();
+
+// Webpack needs to be configured with node.__dirname/__filename = false
+function getYarnBinPath() {
+ if (isWebpackBundle) {
+ return __filename;
+ } else {
+ return path.join(__dirname, '..', 'bin', 'yarn.js');
+ }
+}
+
+var NODE_MODULES_FOLDER = exports.NODE_MODULES_FOLDER = 'node_modules';
+var NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json';
+
+var PNP_FILENAME = exports.PNP_FILENAME = '.pnp.js';
+
+var POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`;
+var FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn');
+
+var META_FOLDER = exports.META_FOLDER = '.yarn-meta';
+var INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity';
+var LOCKFILE_FILENAME = exports.LOCKFILE_FILENAME = 'yarn.lock';
+var METADATA_FILENAME = exports.METADATA_FILENAME = '.yarn-metadata.json';
+var TARBALL_FILENAME = exports.TARBALL_FILENAME = '.yarn-tarball.tgz';
+var CLEAN_FILENAME = exports.CLEAN_FILENAME = '.yarnclean';
+
+var NPM_LOCK_FILENAME = exports.NPM_LOCK_FILENAME = 'package-lock.json';
+var NPM_SHRINKWRAP_FILENAME = exports.NPM_SHRINKWRAP_FILENAME = 'npm-shrinkwrap.json';
+
+var DEFAULT_INDENT = exports.DEFAULT_INDENT = ' ';
+var SINGLE_INSTANCE_PORT = exports.SINGLE_INSTANCE_PORT = 31997;
+var SINGLE_INSTANCE_FILENAME = exports.SINGLE_INSTANCE_FILENAME = '.yarn-single-instance';
+
+var ENV_PATH_KEY = exports.ENV_PATH_KEY = getPathKey(process.platform, process.env);
+
+function getPathKey(platform, env) {
+ var pathKey = 'PATH';
+
+ // windows calls its path "Path" usually, but this is not guaranteed.
+ if (platform === 'win32') {
+ pathKey = 'Path';
+
+ for (var _key in env) {
+ if (_key.toLowerCase() === 'path') {
+ pathKey = _key;
+ }
+ }
+ }
+
+ return pathKey;
+}
+
+var VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = {
+ major: 'red',
+ premajor: 'red',
+ minor: 'yellow',
+ preminor: 'yellow',
+ patch: 'green',
+ prepatch: 'green',
+ prerelease: 'red',
+ unchanged: 'white',
+ unknown: 'red'
+};
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(597), __esModule: true };
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var NODE_ENV = process.env.NODE_ENV;
+
+var invariant = function(condition, format, a, b, c, d, e, f) {
+ if (NODE_ENV !== 'production') {
+ if (format === undefined) {
+ throw new Error('invariant requires an error message argument');
+ }
+ }
+
+ if (!condition) {
+ var error;
+ if (format === undefined) {
+ error = new Error(
+ 'Minified exception occurred; use the non-minified dev environment ' +
+ 'for the full error message and additional helpful warnings.'
+ );
+ } else {
+ var args = [a, b, c, d, e, f];
+ var argIndex = 0;
+ error = new Error(
+ format.replace(/%s/g, function() { return args[argIndex++]; })
+ );
+ error.name = 'Invariant Violation';
+ }
+
+ error.framesToPop = 1; // we don't care about invariant's own frame
+ throw error;
+ }
+};
+
+module.exports = invariant;
+
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(602), __esModule: true };
+
+/***/ }),
+/* 17 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(263);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__ = __webpack_require__(1005);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(112);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(265);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(176);
+/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
+
+
+
+
+
+var Observable = /*@__PURE__*/ (function () {
+ function Observable(subscribe) {
+ this._isScalar = false;
+ if (subscribe) {
+ this._subscribe = subscribe;
+ }
+ }
+ Observable.prototype.lift = function (operator) {
+ var observable = new Observable();
+ observable.source = this;
+ observable.operator = operator;
+ return observable;
+ };
+ Observable.prototype.subscribe = function (observerOrNext, error, complete) {
+ var operator = this.operator;
+ var sink = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__["a" /* toSubscriber */])(observerOrNext, error, complete);
+ if (operator) {
+ operator.call(sink, this.source);
+ }
+ else {
+ sink.add(this.source || (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
+ this._subscribe(sink) :
+ this._trySubscribe(sink));
+ }
+ if (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) {
+ if (sink.syncErrorThrowable) {
+ sink.syncErrorThrowable = false;
+ if (sink.syncErrorThrown) {
+ throw sink.syncErrorValue;
+ }
+ }
+ }
+ return sink;
+ };
+ Observable.prototype._trySubscribe = function (sink) {
+ try {
+ return this._subscribe(sink);
+ }
+ catch (err) {
+ if (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) {
+ sink.syncErrorThrown = true;
+ sink.syncErrorValue = err;
+ }
+ if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_canReportError__["a" /* canReportError */])(sink)) {
+ sink.error(err);
+ }
+ else {
+ console.warn(err);
+ }
+ }
+ };
+ Observable.prototype.forEach = function (next, promiseCtor) {
+ var _this = this;
+ promiseCtor = getPromiseCtor(promiseCtor);
+ return new promiseCtor(function (resolve, reject) {
+ var subscription;
+ subscription = _this.subscribe(function (value) {
+ try {
+ next(value);
+ }
+ catch (err) {
+ reject(err);
+ if (subscription) {
+ subscription.unsubscribe();
+ }
+ }
+ }, reject, resolve);
+ });
+ };
+ Observable.prototype._subscribe = function (subscriber) {
+ var source = this.source;
+ return source && source.subscribe(subscriber);
+ };
+ Observable.prototype[__WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__["a" /* observable */]] = function () {
+ return this;
+ };
+ Observable.prototype.pipe = function () {
+ var operations = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ operations[_i] = arguments[_i];
+ }
+ if (operations.length === 0) {
+ return this;
+ }
+ return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_pipe__["b" /* pipeFromArray */])(operations)(this);
+ };
+ Observable.prototype.toPromise = function (promiseCtor) {
+ var _this = this;
+ promiseCtor = getPromiseCtor(promiseCtor);
+ return new promiseCtor(function (resolve, reject) {
+ var value;
+ _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
+ });
+ };
+ Observable.create = function (subscribe) {
+ return new Observable(subscribe);
+ };
+ return Observable;
+}());
+
+function getPromiseCtor(promiseCtor) {
+ if (!promiseCtor) {
+ promiseCtor = __WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].Promise || Promise;
+ }
+ if (!promiseCtor) {
+ throw new Error('no Promise impl found');
+ }
+ return promiseCtor;
+}
+//# sourceMappingURL=Observable.js.map
+
+
+/***/ }),
+/* 18 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OuterSubscriber; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5);
+/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
+
+
+var OuterSubscriber = /*@__PURE__*/ (function (_super) {
+ __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](OuterSubscriber, _super);
+ function OuterSubscriber() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+ this.destination.next(innerValue);
+ };
+ OuterSubscriber.prototype.notifyError = function (error, innerSub) {
+ this.destination.error(error);
+ };
+ OuterSubscriber.prototype.notifyComplete = function (innerSub) {
+ this.destination.complete();
+ };
+ return OuterSubscriber;
+}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */]));
+
+//# sourceMappingURL=OuterSubscriber.js.map
+
+
+/***/ }),
+/* 19 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["a"] = subscribeToResult;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__InnerSubscriber__ = __webpack_require__(80);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__subscribeTo__ = __webpack_require__(416);
+/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo PURE_IMPORTS_END */
+
+
+function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {
+ if (destination === void 0) {
+ destination = new __WEBPACK_IMPORTED_MODULE_0__InnerSubscriber__["a" /* InnerSubscriber */](outerSubscriber, outerValue, outerIndex);
+ }
+ if (destination.closed) {
+ return;
+ }
+ return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__subscribeTo__["a" /* subscribeTo */])(result)(destination);
+}
+//# sourceMappingURL=subscribeToResult.js.map
+
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* eslint-disable node/no-deprecated-api */
+
+
+
+var buffer = __webpack_require__(94)
+var Buffer = buffer.Buffer
+
+var safer = {}
+
+var key
+
+for (key in buffer) {
+ if (!buffer.hasOwnProperty(key)) continue
+ if (key === 'SlowBuffer' || key === 'Buffer') continue
+ safer[key] = buffer[key]
+}
+
+var Safer = safer.Buffer = {}
+for (key in Buffer) {
+ if (!Buffer.hasOwnProperty(key)) continue
+ if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue
+ Safer[key] = Buffer[key]
+}
+
+safer.Buffer.prototype = Buffer.prototype
+
+if (!Safer.from || Safer.from === Uint8Array.from) {
+ Safer.from = function (value, encodingOrOffset, length) {
+ if (typeof value === 'number') {
+ throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value)
+ }
+ if (value && typeof value.length === 'undefined') {
+ throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)
+ }
+ return Buffer(value, encodingOrOffset, length)
+ }
+}
+
+if (!Safer.alloc) {
+ Safer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
+ }
+ if (size < 0 || size >= 2 * (1 << 30)) {
+ throw new RangeError('The value "' + size + '" is invalid for option "size"')
+ }
+ var buf = Buffer(size)
+ if (!fill || fill.length === 0) {
+ buf.fill(0)
+ } else if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ return buf
+ }
+}
+
+if (!safer.kStringMaxLength) {
+ try {
+ safer.kStringMaxLength = process.binding('buffer').kStringMaxLength
+ } catch (e) {
+ // we can't determine kStringMaxLength in environments where process.binding
+ // is unsupported, so let's not set it
+ }
+}
+
+if (!safer.constants) {
+ safer.constants = {
+ MAX_LENGTH: safer.kMaxLength
+ }
+ if (safer.kStringMaxLength) {
+ safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength
+ }
+}
+
+module.exports = safer
+
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports) {
+
+module.exports = require("crypto");
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Copyright (c) 2012, Mark Cavage. All rights reserved.
+// Copyright 2015 Joyent, Inc.
+
+var assert = __webpack_require__(50);
+var Stream = __webpack_require__(36).Stream;
+var util = __webpack_require__(9);
+
+
+///--- Globals
+
+/* JSSTYLED */
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
+
+
+///--- Internal
+
+function _capitalize(str) {
+ return (str.charAt(0).toUpperCase() + str.slice(1));
+}
+
+function _toss(name, expected, oper, arg, actual) {
+ throw new assert.AssertionError({
+ message: util.format('%s (%s) is required', name, expected),
+ actual: (actual === undefined) ? typeof (arg) : actual(arg),
+ expected: expected,
+ operator: oper || '===',
+ stackStartFunction: _toss.caller
+ });
+}
+
+function _getClass(arg) {
+ return (Object.prototype.toString.call(arg).slice(8, -1));
+}
+
+function noop() {
+ // Why even bother with asserts?
+}
+
+
+///--- Exports
+
+var types = {
+ bool: {
+ check: function (arg) { return typeof (arg) === 'boolean'; }
+ },
+ func: {
+ check: function (arg) { return typeof (arg) === 'function'; }
+ },
+ string: {
+ check: function (arg) { return typeof (arg) === 'string'; }
+ },
+ object: {
+ check: function (arg) {
+ return typeof (arg) === 'object' && arg !== null;
+ }
+ },
+ number: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg);
+ }
+ },
+ finite: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
+ }
+ },
+ buffer: {
+ check: function (arg) { return Buffer.isBuffer(arg); },
+ operator: 'Buffer.isBuffer'
+ },
+ array: {
+ check: function (arg) { return Array.isArray(arg); },
+ operator: 'Array.isArray'
+ },
+ stream: {
+ check: function (arg) { return arg instanceof Stream; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ date: {
+ check: function (arg) { return arg instanceof Date; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ regexp: {
+ check: function (arg) { return arg instanceof RegExp; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ uuid: {
+ check: function (arg) {
+ return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
+ },
+ operator: 'isUUID'
+ }
+};
+
+function _setExports(ndebug) {
+ var keys = Object.keys(types);
+ var out;
+
+ /* re-export standard assert */
+ if (process.env.NODE_NDEBUG) {
+ out = noop;
+ } else {
+ out = function (arg, msg) {
+ if (!arg) {
+ _toss(msg, 'true', arg);
+ }
+ };
+ }
+
+ /* standard checks */
+ keys.forEach(function (k) {
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ var type = types[k];
+ out[k] = function (arg, msg) {
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* optional checks */
+ keys.forEach(function (k) {
+ var name = 'optional' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* arrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'arrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* optionalArrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'optionalArrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* re-export built-in assertions */
+ Object.keys(assert).forEach(function (k) {
+ if (k === 'AssertionError') {
+ out[k] = assert[k];
+ return;
+ }
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ out[k] = assert[k];
+ });
+
+ /* export ourselves (for unit tests _only_) */
+ out._setExports = _setExports;
+
+ return out;
+}
+
+module.exports = _setExports(process.env.NODE_NDEBUG);
+
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(594), __esModule: true };
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _assign = __webpack_require__(23);
+
+var _assign2 = _interopRequireDefault(_assign);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _assign2.default || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+
+ return target;
+};
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.stringify = exports.parse = undefined;
+
+var _getIterator2;
+
+function _load_getIterator() {
+ return _getIterator2 = _interopRequireDefault(__webpack_require__(4));
+}
+
+var _map;
+
+function _load_map() {
+ return _map = _interopRequireDefault(__webpack_require__(42));
+}
+
+var _asyncToGenerator2;
+
+function _load_asyncToGenerator() {
+ return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2));
+}
+
+var _classCallCheck2;
+
+function _load_classCallCheck() {
+ return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3));
+}
+
+var _keys;
+
+function _load_keys() {
+ return _keys = _interopRequireDefault(__webpack_require__(14));
+}
+
+var _parse;
+
+function _load_parse() {
+ return _parse = __webpack_require__(301);
+}
+
+Object.defineProperty(exports, 'parse', {
+ enumerable: true,
+ get: function get() {
+ return _interopRequireDefault(_parse || _load_parse()).default;
+ }
+});
+
+var _stringify;
+
+function _load_stringify() {
+ return _stringify = __webpack_require__(510);
+}
+
+Object.defineProperty(exports, 'stringify', {
+ enumerable: true,
+ get: function get() {
+ return _interopRequireDefault(_stringify || _load_stringify()).default;
+ }
+});
+exports.implodeEntry = implodeEntry;
+exports.explodeEntry = explodeEntry;
+
+var _misc;
+
+function _load_misc() {
+ return _misc = __webpack_require__(28);
+}
+
+var _normalizePattern;
+
+function _load_normalizePattern() {
+ return _normalizePattern = __webpack_require__(52);
+}
+
+var _parse2;
+
+function _load_parse2() {
+ return _parse2 = _interopRequireDefault(__webpack_require__(301));
+}
+
+var _constants;
+
+function _load_constants() {
+ return _constants = __webpack_require__(13);
+}
+
+var _fs;
+
+function _load_fs() {
+ return _fs = _interopRequireWildcard(__webpack_require__(8));
+}
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var invariant = __webpack_require__(15);
+
+var path = __webpack_require__(1);
+var ssri = __webpack_require__(93);
+
+function getName(pattern) {
+ return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name;
+}
+
+function blankObjectUndefined(obj) {
+ return obj && (0, (_keys || _load_keys()).default)(obj).length ? obj : undefined;
+}
+
+function keyForRemote(remote) {
+ return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null);
+}
+
+function serializeIntegrity(integrity) {
+ // We need this because `Integrity.toString()` does not use sorting to ensure a stable string output
+ // See https://git.io/vx2Hy
+ return integrity.toString().split(' ').sort().join(' ');
+}
+
+function implodeEntry(pattern, obj) {
+ var inferredName = getName(pattern);
+ var integrity = obj.integrity ? serializeIntegrity(obj.integrity) : '';
+ var imploded = {
+ name: inferredName === obj.name ? undefined : obj.name,
+ version: obj.version,
+ uid: obj.uid === obj.version ? undefined : obj.uid,
+ resolved: obj.resolved,
+ registry: obj.registry === 'npm' ? undefined : obj.registry,
+ dependencies: blankObjectUndefined(obj.dependencies),
+ optionalDependencies: blankObjectUndefined(obj.optionalDependencies),
+ permissions: blankObjectUndefined(obj.permissions),
+ prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants)
+ };
+ if (integrity) {
+ imploded.integrity = integrity;
+ }
+ return imploded;
+}
+
+function explodeEntry(pattern, obj) {
+ obj.optionalDependencies = obj.optionalDependencies || {};
+ obj.dependencies = obj.dependencies || {};
+ obj.uid = obj.uid || obj.version;
+ obj.permissions = obj.permissions || {};
+ obj.registry = obj.registry || 'npm';
+ obj.name = obj.name || getName(pattern);
+ var integrity = obj.integrity;
+ if (integrity && integrity.isIntegrity) {
+ obj.integrity = ssri.parse(integrity);
+ }
+ return obj;
+}
+
+var Lockfile = function () {
+ function Lockfile() {
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
+ cache = _ref.cache,
+ source = _ref.source,
+ parseResultType = _ref.parseResultType;
+
+ (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Lockfile);
+
+ this.source = source || '';
+ this.cache = cache;
+ this.parseResultType = parseResultType;
+ }
+
+ // source string if the `cache` was parsed
+
+
+ // if true, we're parsing an old yarn file and need to update integrity fields
+ Lockfile.prototype.hasEntriesExistWithoutIntegrity = function hasEntriesExistWithoutIntegrity() {
+ if (!this.cache) {
+ return false;
+ }
+
+ for (var _key in this.cache) {
+ // $FlowFixMe - `this.cache` is clearly defined at this point
+ if (!/^.*@(file:|http)/.test(_key) && this.cache[_key] && !this.cache[_key].integrity) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ Lockfile.fromDirectory = function () {
+ var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, reporter) {
+ // read the manifest in this directory
+ var lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME);
+
+ var lockfile = void 0;
+ var rawLockfile = '';
+ var parseResult = void 0;
+
+ if (yield (_fs || _load_fs()).exists(lockfileLoc)) {
+ rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc);
+ parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc);
+
+ if (reporter) {
+ if (parseResult.type === 'merge') {
+ reporter.info(reporter.lang('lockfileMerged'));
+ } else if (parseResult.type === 'conflict') {
+ reporter.warn(reporter.lang('lockfileConflict'));
+ }
+ }
+
+ lockfile = parseResult.object;
+ } else if (reporter) {
+ reporter.info(reporter.lang('noLockfileFound'));
+ }
+
+ if (lockfile && lockfile.__metadata) {
+ var lockfilev2 = lockfile;
+ lockfile = {};
+ }
+
+ return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type });
+ });
+
+ function fromDirectory(_x2, _x3) {
+ return _ref2.apply(this, arguments);
+ }
+
+ return fromDirectory;
+ }();
+
+ Lockfile.prototype.getLocked = function getLocked(pattern) {
+ var cache = this.cache;
+ if (!cache) {
+ return undefined;
+ }
+
+ var shrunk = pattern in cache && cache[pattern];
+
+ if (typeof shrunk === 'string') {
+ return this.getLocked(shrunk);
+ } else if (shrunk) {
+ explodeEntry(pattern, shrunk);
+ return shrunk;
+ }
+
+ return undefined;
+ };
+
+ Lockfile.prototype.removePattern = function removePattern(pattern) {
+ var cache = this.cache;
+ if (!cache) {
+ return;
+ }
+ delete cache[pattern];
+ };
+
+ Lockfile.prototype.getLockfile = function getLockfile(patterns) {
+ var lockfile = {};
+ var seen = new (_map || _load_map()).default();
+
+ // order by name so that lockfile manifest is assigned to the first dependency with this manifest
+ // the others that have the same remoteKey will just refer to the first
+ // ordering allows for consistency in lockfile when it is serialized
+ var sortedPatternsKeys = (0, (_keys || _load_keys()).default)(patterns).sort((_misc || _load_misc()).sortAlpha);
+
+ for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) {
+ var _ref3;
+
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref3 = _iterator[_i++];
+ } else {
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref3 = _i.value;
+ }
+
+ var pattern = _ref3;
+
+ var pkg = patterns[pattern];
+ var remote = pkg._remote,
+ ref = pkg._reference;
+
+ invariant(ref, 'Package is missing a reference');
+ invariant(remote, 'Package is missing a remote');
+
+ var remoteKey = keyForRemote(remote);
+ var pkgName = getName(pattern);
+
+ var seenKey = remoteKey ? `${remoteKey}#${pkgName}` : null;
+ var seenPattern = seenKey ? seen.get(seenKey) : null;
+
+ if (seenPattern) {
+ // no point in duplicating it
+ lockfile[pattern] = seenPattern;
+ continue;
+ }
+
+ var obj = implodeEntry(pattern, {
+ name: pkgName,
+ version: pkg.version,
+ uid: pkg._uid,
+ resolved: remote.resolved,
+ integrity: remote.integrity,
+ registry: remote.registry,
+ dependencies: pkg.dependencies,
+ peerDependencies: pkg.peerDependencies,
+ optionalDependencies: pkg.optionalDependencies,
+ permissions: ref.permissions,
+ prebuiltVariants: pkg.prebuiltVariants
+ });
+
+ lockfile[pattern] = obj;
+
+ if (seenKey) {
+ seen.set(seenKey, obj);
+ }
+ }
+
+ return lockfile;
+ };
+
+ return Lockfile;
+}();
+
+exports.default = Lockfile;
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports) {
+
+var core = module.exports = { version: '2.5.7' };
+if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
+
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports) {
+
+exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+/* nomin */ var debug;
+/* nomin */ if (typeof process === 'object' &&
+ /* nomin */ process.env &&
+ /* nomin */ process.env.NODE_DEBUG &&
+ /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
+ /* nomin */ debug = function() {
+ /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
+ /* nomin */ args.unshift('SEMVER');
+ /* nomin */ console.log.apply(console, args);
+ /* nomin */ };
+/* nomin */ else
+ /* nomin */ debug = function() {};
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+var MAX_LENGTH = 256;
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+
+// Max safe segment length for coercion.
+var MAX_SAFE_COMPONENT_LENGTH = 16;
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[PRERELEASE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[PRERELEASELOOSE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+var COERCE = R++;
+src[COERCE] = '(?:^|[^\\d])' +
+ '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:$|[^\\d])';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
+re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
+var tildeTrimReplace = '$1~';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+var LONECARET = R++;
+src[LONECARET] = '(?:\\^)';
+
+var CARETTRIM = R++;
+src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
+re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
+var caretTrimReplace = '$1^';
+
+var CARET = R++;
+src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
+var CARETLOOSE = R++;
+src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+var comparatorTrimReplace = '$1$2$3';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i]);
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ if (version.length > MAX_LENGTH)
+ return null;
+
+ var r = loose ? re[LOOSE] : re[FULL];
+ if (!r.test(version))
+ return null;
+
+ try {
+ return new SemVer(version, loose);
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
+
+
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version);
+ }
+
+ if (version.length > MAX_LENGTH)
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ debug('SemVer', version, loose);
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0)
+ throw new TypeError('Invalid major version')
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
+ throw new TypeError('Invalid minor version')
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
+ throw new TypeError('Invalid patch version')
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id;
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
+ return num;
+ }
+ return id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ debug('SemVer.compare', this.version, this.loose, other);
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.length && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ debug('prerelease compare', i, a, b);
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function(release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor = 0;
+ this.major++;
+ this.inc('pre', identifier);
+ break;
+ case 'preminor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor++;
+ this.inc('pre', identifier);
+ break;
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0;
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
+ this.major++;
+ this.minor = 0;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0)
+ this.minor++;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0)
+ this.patch++;
+ this.prerelease = [];
+ break;
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1]))
+ this.prerelease = [identifier, 0];
+ } else
+ this.prerelease = [identifier, 0];
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ this.raw = this.version;
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose, identifier) {
+ if (typeof(loose) === 'string') {
+ identifier = loose;
+ loose = undefined;
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.diff = diff;
+function diff(version1, version2) {
+ if (eq(version1, version2)) {
+ return null;
+ } else {
+ var v1 = parse(version1);
+ var v2 = parse(version2);
+ if (v1.prerelease.length || v2.prerelease.length) {
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return 'pre'+key;
+ }
+ }
+ }
+ return 'prerelease';
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return key;
+ }
+ }
+ }
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.major = major;
+function major(a, loose) {
+ return new SemVer(a, loose).major;
+}
+
+exports.minor = minor;
+function minor(a, loose) {
+ return new SemVer(a, loose).minor;
+}
+
+exports.patch = patch;
+function patch(a, loose) {
+ return new SemVer(a, loose).patch;
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(new SemVer(b, loose));
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a === b;
+ break;
+ case '!==':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a !== b;
+ break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ debug('comparator', comp, loose);
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+
+ debug('comp', this);
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ if (this.operator === '=')
+ this.operator = '';
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else
+ this.semver = new SemVer(m[2], this.loose);
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ debug('Comparator.test', version, this.loose);
+
+ if (this.semver === ANY)
+ return true;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ return cmp(version, this.operator, this.semver, this.loose);
+};
+
+Comparator.prototype.intersects = function(comp, loose) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required');
+ }
+
+ var rangeTmp;
+
+ if (this.operator === '') {
+ rangeTmp = new Range(comp.value, loose);
+ return satisfies(this.value, rangeTmp, loose);
+ } else if (comp.operator === '') {
+ rangeTmp = new Range(this.value, loose);
+ return satisfies(comp.semver, rangeTmp, loose);
+ }
+
+ var sameDirectionIncreasing =
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '>=' || comp.operator === '>');
+ var sameDirectionDecreasing =
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '<=' || comp.operator === '<');
+ var sameSemVer = this.semver.version === comp.semver.version;
+ var differentDirectionsInclusive =
+ (this.operator === '>=' || this.operator === '<=') &&
+ (comp.operator === '>=' || comp.operator === '<=');
+ var oppositeDirectionsLessThan =
+ cmp(this.semver, '<', comp.semver, loose) &&
+ ((this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '<=' || comp.operator === '<'));
+ var oppositeDirectionsGreaterThan =
+ cmp(this.semver, '>', comp.semver, loose) &&
+ ((this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '>=' || comp.operator === '>'));
+
+ return sameDirectionIncreasing || sameDirectionDecreasing ||
+ (sameSemVer && differentDirectionsInclusive) ||
+ oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if (range instanceof Range) {
+ if (range.loose === loose) {
+ return range;
+ } else {
+ return new Range(range.raw, loose);
+ }
+ }
+
+ if (range instanceof Comparator) {
+ return new Range(range.value, loose);
+ }
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ debug('range', range, loose);
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ debug('hyphen replace', range);
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ debug('comparator trim', range, re[COMPARATORTRIM]);
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[CARETTRIM], caretTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+Range.prototype.intersects = function(range, loose) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required');
+ }
+
+ return this.set.some(function(thisComparators) {
+ return thisComparators.every(function(thisComparator) {
+ return range.set.some(function(rangeComparators) {
+ return rangeComparators.every(function(rangeComparator) {
+ return thisComparator.intersects(rangeComparator, loose);
+ });
+ });
+ });
+ });
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ debug('comp', comp);
+ comp = replaceCarets(comp, loose);
+ debug('caret', comp);
+ comp = replaceTildes(comp, loose);
+ debug('tildes', comp);
+ comp = replaceXRanges(comp, loose);
+ debug('xrange', comp);
+ comp = replaceStars(comp, loose);
+ debug('stars', comp);
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0 <1.3.0
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else if (pr) {
+ debug('replaceTilde pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+
+ debug('tilde return', ret);
+ return ret;
+ });
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceCaret(comp, loose);
+ }).join(' ');
+}
+
+function replaceCaret(comp, loose) {
+ debug('caret', comp, loose);
+ var r = loose ? re[CARETLOOSE] : re[CARET];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p)) {
+ if (M === '0')
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
+ } else if (pr) {
+ debug('replaceCaret pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + (+M + 1) + '.0.0';
+ } else {
+ debug('no pr');
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0';
+ }
+
+ debug('caret return', ret);
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ debug('replaceXRanges', comp, loose);
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0';
+ } else {
+ // nothing is forbidden
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
+ // replace X with 0
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>=';
+ if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<';
+ if (xm)
+ M = +M + 1;
+ else
+ m = +m + 1;
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p;
+ } else if (xm) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ }
+
+ debug('xRange return', ret);
+
+ return ret;
+ });
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ debug('replaceStars', comp, loose);
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
+ }
+
+ if (version.prerelease.length) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (var i = 0; i < set.length; i++) {
+ debug(set[i].semver);
+ if (set[i].semver === ANY)
+ continue;
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver;
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch)
+ return true;
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false;
+ }
+
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
+ }
+ return range.test(version);
+}
+
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ var max = null;
+ var maxSV = null;
+ try {
+ var rangeObj = new Range(range, loose);
+ } catch (er) {
+ return null;
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) { // satisfies(v, range, loose)
+ if (!max || maxSV.compare(v) === -1) { // compare(max, v, true)
+ max = v;
+ maxSV = new SemVer(max, loose);
+ }
+ }
+ })
+ return max;
+}
+
+exports.minSatisfying = minSatisfying;
+function minSatisfying(versions, range, loose) {
+ var min = null;
+ var minSV = null;
+ try {
+ var rangeObj = new Range(range, loose);
+ } catch (er) {
+ return null;
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) { // satisfies(v, range, loose)
+ if (!min || minSV.compare(v) === 1) { // compare(min, v, true)
+ min = v;
+ minSV = new SemVer(min, loose);
+ }
+ }
+ })
+ return min;
+}
+
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr;
+function ltr(version, range, loose) {
+ return outside(version, range, '<', loose);
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr;
+function gtr(version, range, loose) {
+ return outside(version, range, '>', loose);
+}
+
+exports.outside = outside;
+function outside(version, range, hilo, loose) {
+ version = new SemVer(version, loose);
+ range = new Range(range, loose);
+
+ var gtfn, ltefn, ltfn, comp, ecomp;
+ switch (hilo) {
+ case '>':
+ gtfn = gt;
+ ltefn = lte;
+ ltfn = lt;
+ comp = '>';
+ ecomp = '>=';
+ break;
+ case '<':
+ gtfn = lt;
+ ltefn = gte;
+ ltfn = gt;
+ comp = '<';
+ ecomp = '<=';
+ break;
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, loose)) {
+ return false;
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i];
+
+ var high = null;
+ var low = null;
+
+ comparators.forEach(function(comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator;
+ low = low || comparator;
+ if (gtfn(comparator.semver, high.semver, loose)) {
+ high = comparator;
+ } else if (ltfn(comparator.semver, low.semver, loose)) {
+ low = comparator;
+ }
+ });
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false;
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false;
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+exports.prerelease = prerelease;
+function prerelease(version, loose) {
+ var parsed = parse(version, loose);
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
+}
+
+exports.intersects = intersects;
+function intersects(r1, r2, loose) {
+ r1 = new Range(r1, loose)
+ r2 = new Range(r2, loose)
+ return r1.intersects(r2)
+}
+
+exports.coerce = coerce;
+function coerce(version) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ var match = version.match(re[COERCE]);
+
+ if (match == null)
+ return null;
+
+ return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
+}
+
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _promise;
+
+function _load_promise() {
+ return _promise = _interopRequireDefault(__webpack_require__(7));
+}
+
+exports.sortAlpha = sortAlpha;
+exports.sortOptionsByFlags = sortOptionsByFlags;
+exports.entries = entries;
+exports.removePrefix = removePrefix;
+exports.removeSuffix = removeSuffix;
+exports.addSuffix = addSuffix;
+exports.hyphenate = hyphenate;
+exports.camelCase = camelCase;
+exports.compareSortedArrays = compareSortedArrays;
+exports.sleep = sleep;
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var _camelCase = __webpack_require__(562);
+
+function sortAlpha(a, b) {
+ // sort alphabetically in a deterministic way
+ var shortLen = Math.min(a.length, b.length);
+ for (var i = 0; i < shortLen; i++) {
+ var aChar = a.charCodeAt(i);
+ var bChar = b.charCodeAt(i);
+ if (aChar !== bChar) {
+ return aChar - bChar;
+ }
+ }
+ return a.length - b.length;
+}
+
+function sortOptionsByFlags(a, b) {
+ var aOpt = a.flags.replace(/-/g, '');
+ var bOpt = b.flags.replace(/-/g, '');
+ return sortAlpha(aOpt, bOpt);
+}
+
+function entries(obj) {
+ var entries = [];
+ if (obj) {
+ for (var _key in obj) {
+ entries.push([_key, obj[_key]]);
+ }
+ }
+ return entries;
+}
+
+function removePrefix(pattern, prefix) {
+ if (pattern.startsWith(prefix)) {
+ pattern = pattern.slice(prefix.length);
+ }
+
+ return pattern;
+}
+
+function removeSuffix(pattern, suffix) {
+ if (pattern.endsWith(suffix)) {
+ return pattern.slice(0, -suffix.length);
+ }
+
+ return pattern;
+}
+
+function addSuffix(pattern, suffix) {
+ if (!pattern.endsWith(suffix)) {
+ return pattern + suffix;
+ }
+
+ return pattern;
+}
+
+function hyphenate(str) {
+ return str.replace(/[A-Z]/g, function (match) {
+ return '-' + match.charAt(0).toLowerCase();
+ });
+}
+
+function camelCase(str) {
+ if (/[A-Z]/.test(str)) {
+ return null;
+ } else {
+ return _camelCase(str);
+ }
+}
+
+function compareSortedArrays(array1, array2) {
+ if (array1.length !== array2.length) {
+ return false;
+ }
+ for (var i = 0, len = array1.length; i < len; i++) {
+ if (array1[i] !== array2[i]) {
+ return false;
+ }
+ }
+ return true;
+}
+
+function sleep(ms) {
+ return new (_promise || _load_promise()).default(function (resolve) {
+ setTimeout(resolve, ms);
+ });
+}
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports) {
+
+module.exports = require("url");
+
+/***/ }),
+/* 30 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var YAMLException = __webpack_require__(132);
+
+var TYPE_CONSTRUCTOR_OPTIONS = [
+ 'kind',
+ 'resolve',
+ 'construct',
+ 'instanceOf',
+ 'predicate',
+ 'represent',
+ 'defaultStyle',
+ 'styleAliases'
+];
+
+var YAML_NODE_KINDS = [
+ 'scalar',
+ 'sequence',
+ 'mapping'
+];
+
+function compileStyleAliases(map) {
+ var result = {};
+
+ if (map !== null) {
+ Object.keys(map).forEach(function (style) {
+ map[style].forEach(function (alias) {
+ result[String(alias)] = style;
+ });
+ });
+ }
+
+ return result;
+}
+
+function Type(tag, options) {
+ options = options || {};
+
+ Object.keys(options).forEach(function (name) {
+ if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
+ throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
+ }
+ });
+
+ // TODO: Add tag format check.
+ this.tag = tag;
+ this.kind = options['kind'] || null;
+ this.resolve = options['resolve'] || function () { return true; };
+ this.construct = options['construct'] || function (data) { return data; };
+ this.instanceOf = options['instanceOf'] || null;
+ this.predicate = options['predicate'] || null;
+ this.represent = options['represent'] || null;
+ this.defaultStyle = options['defaultStyle'] || null;
+ this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
+
+ if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
+ throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
+ }
+}
+
+module.exports = Type;
+
+
+/***/ }),
+/* 31 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(48);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(414);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(143);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(59);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(55);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(411);
+/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */
+
+
+
+
+
+
+var Subscription = /*@__PURE__*/ (function () {
+ function Subscription(unsubscribe) {
+ this.closed = false;
+ this._parent = null;
+ this._parents = null;
+ this._subscriptions = null;
+ if (unsubscribe) {
+ this._unsubscribe = unsubscribe;
+ }
+ }
+ Subscription.prototype.unsubscribe = function () {
+ var hasErrors = false;
+ var errors;
+ if (this.closed) {
+ return;
+ }
+ var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
+ this.closed = true;
+ this._parent = null;
+ this._parents = null;
+ this._subscriptions = null;
+ var index = -1;
+ var len = _parents ? _parents.length : 0;
+ while (_parent) {
+ _parent.remove(this);
+ _parent = ++index < len && _parents[index] || null;
+ }
+ if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isFunction__["a" /* isFunction */])(_unsubscribe)) {
+ var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(_unsubscribe).call(this);
+ if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) {
+ hasErrors = true;
+ errors = errors || (__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */] ?
+ flattenUnsubscriptionErrors(__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e.errors) : [__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e]);
+ }
+ }
+ if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_isArray__["a" /* isArray */])(_subscriptions)) {
+ index = -1;
+ len = _subscriptions.length;
+ while (++index < len) {
+ var sub = _subscriptions[index];
+ if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isObject__["a" /* isObject */])(sub)) {
+ var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(sub.unsubscribe).call(sub);
+ if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) {
+ hasErrors = true;
+ errors = errors || [];
+ var err = __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e;
+ if (err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) {
+ errors = errors.concat(flattenUnsubscriptionErrors(err.errors));
+ }
+ else {
+ errors.push(err);
+ }
+ }
+ }
+ }
+ }
+ if (hasErrors) {
+ throw new __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */](errors);
+ }
+ };
+ Subscription.prototype.add = function (teardown) {
+ if (!teardown || (teardown === Subscription.EMPTY)) {
+ return Subscription.EMPTY;
+ }
+ if (teardown === this) {
+ return this;
+ }
+ var subscription = teardown;
+ switch (typeof teardown) {
+ case 'function':
+ subscription = new Subscription(teardown);
+ case 'object':
+ if (subscription.closed || typeof subscription.unsubscribe !== 'function') {
+ return subscription;
+ }
+ else if (this.closed) {
+ subscription.unsubscribe();
+ return subscription;
+ }
+ else if (typeof subscription._addParent !== 'function') {
+ var tmp = subscription;
+ subscription = new Subscription();
+ subscription._subscriptions = [tmp];
+ }
+ break;
+ default:
+ throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
+ }
+ var subscriptions = this._subscriptions || (this._subscriptions = []);
+ subscriptions.push(subscription);
+ subscription._addParent(this);
+ return subscription;
+ };
+ Subscription.prototype.remove = function (subscription) {
+ var subscriptions = this._subscriptions;
+ if (subscriptions) {
+ var subscriptionIndex = subscriptions.indexOf(subscription);
+ if (subscriptionIndex !== -1) {
+ subscriptions.splice(subscriptionIndex, 1);
+ }
+ }
+ };
+ Subscription.prototype._addParent = function (parent) {
+ var _a = this, _parent = _a._parent, _parents = _a._parents;
+ if (!_parent || _parent === parent) {
+ this._parent = parent;
+ }
+ else if (!_parents) {
+ this._parents = [parent];
+ }
+ else if (_parents.indexOf(parent) === -1) {
+ _parents.push(parent);
+ }
+ };
+ Subscription.EMPTY = (function (empty) {
+ empty.closed = true;
+ return empty;
+ }(new Subscription()));
+ return Subscription;
+}());
+
+function flattenUnsubscriptionErrors(errors) {
+ return errors.reduce(function (errs, err) { return errs.concat((err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) ? err.errors : err); }, []);
+}
+//# sourceMappingURL=Subscription.js.map
+
+
+/***/ }),
+/* 32 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Copyright 2015 Joyent, Inc.
+
+module.exports = {
+ bufferSplit: bufferSplit,
+ addRSAMissing: addRSAMissing,
+ calculateDSAPublic: calculateDSAPublic,
+ calculateED25519Public: calculateED25519Public,
+ calculateX25519Public: calculateX25519Public,
+ mpNormalize: mpNormalize,
+ mpDenormalize: mpDenormalize,
+ ecNormalize: ecNormalize,
+ countZeros: countZeros,
+ assertCompatible: assertCompatible,
+ isCompatible: isCompatible,
+ opensslKeyDeriv: opensslKeyDeriv,
+ opensshCipherInfo: opensshCipherInfo,
+ publicFromPrivateECDSA: publicFromPrivateECDSA,
+ zeroPadToLength: zeroPadToLength,
+ writeBitString: writeBitString,
+ readBitString: readBitString
+};
+
+var assert = __webpack_require__(22);
+var Buffer = __webpack_require__(20).Buffer;
+var PrivateKey = __webpack_require__(40);
+var Key = __webpack_require__(35);
+var crypto = __webpack_require__(21);
+var algs = __webpack_require__(39);
+var asn1 = __webpack_require__(67);
+
+var ec, jsbn;
+var nacl;
+
+var MAX_CLASS_DEPTH = 3;
+
+function isCompatible(obj, klass, needVer) {
+ if (obj === null || typeof (obj) !== 'object')
+ return (false);
+ if (needVer === undefined)
+ needVer = klass.prototype._sshpkApiVersion;
+ if (obj instanceof klass &&
+ klass.prototype._sshpkApiVersion[0] == needVer[0])
+ return (true);
+ var proto = Object.getPrototypeOf(obj);
+ var depth = 0;
+ while (proto.constructor.name !== klass.name) {
+ proto = Object.getPrototypeOf(proto);
+ if (!proto || ++depth > MAX_CLASS_DEPTH)
+ return (false);
+ }
+ if (proto.constructor.name !== klass.name)
+ return (false);
+ var ver = proto._sshpkApiVersion;
+ if (ver === undefined)
+ ver = klass._oldVersionDetect(obj);
+ if (ver[0] != needVer[0] || ver[1] < needVer[1])
+ return (false);
+ return (true);
+}
+
+function assertCompatible(obj, klass, needVer, name) {
+ if (name === undefined)
+ name = 'object';
+ assert.ok(obj, name + ' must not be null');
+ assert.object(obj, name + ' must be an object');
+ if (needVer === undefined)
+ needVer = klass.prototype._sshpkApiVersion;
+ if (obj instanceof klass &&
+ klass.prototype._sshpkApiVersion[0] == needVer[0])
+ return;
+ var proto = Object.getPrototypeOf(obj);
+ var depth = 0;
+ while (proto.constructor.name !== klass.name) {
+ proto = Object.getPrototypeOf(proto);
+ assert.ok(proto && ++depth <= MAX_CLASS_DEPTH,
+ name + ' must be a ' + klass.name + ' instance');
+ }
+ assert.strictEqual(proto.constructor.name, klass.name,
+ name + ' must be a ' + klass.name + ' instance');
+ var ver = proto._sshpkApiVersion;
+ if (ver === undefined)
+ ver = klass._oldVersionDetect(obj);
+ assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1],
+ name + ' must be compatible with ' + klass.name + ' klass ' +
+ 'version ' + needVer[0] + '.' + needVer[1]);
+}
+
+var CIPHER_LEN = {
+ 'des-ede3-cbc': { key: 7, iv: 8 },
+ 'aes-128-cbc': { key: 16, iv: 16 }
+};
+var PKCS5_SALT_LEN = 8;
+
+function opensslKeyDeriv(cipher, salt, passphrase, count) {
+ assert.buffer(salt, 'salt');
+ assert.buffer(passphrase, 'passphrase');
+ assert.number(count, 'iteration count');
+
+ var clen = CIPHER_LEN[cipher];
+ assert.object(clen, 'supported cipher');
+
+ salt = salt.slice(0, PKCS5_SALT_LEN);
+
+ var D, D_prev, bufs;
+ var material = Buffer.alloc(0);
+ while (material.length < clen.key + clen.iv) {
+ bufs = [];
+ if (D_prev)
+ bufs.push(D_prev);
+ bufs.push(passphrase);
+ bufs.push(salt);
+ D = Buffer.concat(bufs);
+ for (var j = 0; j < count; ++j)
+ D = crypto.createHash('md5').update(D).digest();
+ material = Buffer.concat([material, D]);
+ D_prev = D;
+ }
+
+ return ({
+ key: material.slice(0, clen.key),
+ iv: material.slice(clen.key, clen.key + clen.iv)
+ });
+}
+
+/* Count leading zero bits on a buffer */
+function countZeros(buf) {
+ var o = 0, obit = 8;
+ while (o < buf.length) {
+ var mask = (1 << obit);
+ if ((buf[o] & mask) === mask)
+ break;
+ obit--;
+ if (obit < 0) {
+ o++;
+ obit = 8;
+ }
+ }
+ return (o*8 + (8 - obit) - 1);
+}
+
+function bufferSplit(buf, chr) {
+ assert.buffer(buf);
+ assert.string(chr);
+
+ var parts = [];
+ var lastPart = 0;
+ var matches = 0;
+ for (var i = 0; i < buf.length; ++i) {
+ if (buf[i] === chr.charCodeAt(matches))
+ ++matches;
+ else if (buf[i] === chr.charCodeAt(0))
+ matches = 1;
+ else
+ matches = 0;
+
+ if (matches >= chr.length) {
+ var newPart = i + 1;
+ parts.push(buf.slice(lastPart, newPart - matches));
+ lastPart = newPart;
+ matches = 0;
+ }
+ }
+ if (lastPart <= buf.length)
+ parts.push(buf.slice(lastPart, buf.length));
+
+ return (parts);
+}
+
+function ecNormalize(buf, addZero) {
+ assert.buffer(buf);
+ if (buf[0] === 0x00 && buf[1] === 0x04) {
+ if (addZero)
+ return (buf);
+ return (buf.slice(1));
+ } else if (buf[0] === 0x04) {
+ if (!addZero)
+ return (buf);
+ } else {
+ while (buf[0] === 0x00)
+ buf = buf.slice(1);
+ if (buf[0] === 0x02 || buf[0] === 0x03)
+ throw (new Error('Compressed elliptic curve points ' +
+ 'are not supported'));
+ if (buf[0] !== 0x04)
+ throw (new Error('Not a valid elliptic curve point'));
+ if (!addZero)
+ return (buf);
+ }
+ var b = Buffer.alloc(buf.length + 1);
+ b[0] = 0x0;
+ buf.copy(b, 1);
+ return (b);
+}
+
+function readBitString(der, tag) {
+ if (tag === undefined)
+ tag = asn1.Ber.BitString;
+ var buf = der.readString(tag, true);
+ assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' +
+ 'not supported (0x' + buf[0].toString(16) + ')');
+ return (buf.slice(1));
+}
+
+function writeBitString(der, buf, tag) {
+ if (tag === undefined)
+ tag = asn1.Ber.BitString;
+ var b = Buffer.alloc(buf.length + 1);
+ b[0] = 0x00;
+ buf.copy(b, 1);
+ der.writeBuffer(b, tag);
+}
+
+function mpNormalize(buf) {
+ assert.buffer(buf);
+ while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00)
+ buf = buf.slice(1);
+ if ((buf[0] & 0x80) === 0x80) {
+ var b = Buffer.alloc(buf.length + 1);
+ b[0] = 0x00;
+ buf.copy(b, 1);
+ buf = b;
+ }
+ return (buf);
+}
+
+function mpDenormalize(buf) {
+ assert.buffer(buf);
+ while (buf.length > 1 && buf[0] === 0x00)
+ buf = buf.slice(1);
+ return (buf);
+}
+
+function zeroPadToLength(buf, len) {
+ assert.buffer(buf);
+ assert.number(len);
+ while (buf.length > len) {
+ assert.equal(buf[0], 0x00);
+ buf = buf.slice(1);
+ }
+ while (buf.length < len) {
+ var b = Buffer.alloc(buf.length + 1);
+ b[0] = 0x00;
+ buf.copy(b, 1);
+ buf = b;
+ }
+ return (buf);
+}
+
+function bigintToMpBuf(bigint) {
+ var buf = Buffer.from(bigint.toByteArray());
+ buf = mpNormalize(buf);
+ return (buf);
+}
+
+function calculateDSAPublic(g, p, x) {
+ assert.buffer(g);
+ assert.buffer(p);
+ assert.buffer(x);
+ try {
+ var bigInt = __webpack_require__(79).BigInteger;
+ } catch (e) {
+ throw (new Error('To load a PKCS#8 format DSA private key, ' +
+ 'the node jsbn library is required.'));
+ }
+ g = new bigInt(g);
+ p = new bigInt(p);
+ x = new bigInt(x);
+ var y = g.modPow(x, p);
+ var ybuf = bigintToMpBuf(y);
+ return (ybuf);
+}
+
+function calculateED25519Public(k) {
+ assert.buffer(k);
+
+ if (nacl === undefined)
+ nacl = __webpack_require__(72);
+
+ var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k));
+ return (Buffer.from(kp.publicKey));
+}
+
+function calculateX25519Public(k) {
+ assert.buffer(k);
+
+ if (nacl === undefined)
+ nacl = __webpack_require__(72);
+
+ var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k));
+ return (Buffer.from(kp.publicKey));
+}
+
+function addRSAMissing(key) {
+ assert.object(key);
+ assertCompatible(key, PrivateKey, [1, 1]);
+ try {
+ var bigInt = __webpack_require__(79).BigInteger;
+ } catch (e) {
+ throw (new Error('To write a PEM private key from ' +
+ 'this source, the node jsbn lib is required.'));
+ }
+
+ var d = new bigInt(key.part.d.data);
+ var buf;
+
+ if (!key.part.dmodp) {
+ var p = new bigInt(key.part.p.data);
+ var dmodp = d.mod(p.subtract(1));
+
+ buf = bigintToMpBuf(dmodp);
+ key.part.dmodp = {name: 'dmodp', data: buf};
+ key.parts.push(key.part.dmodp);
+ }
+ if (!key.part.dmodq) {
+ var q = new bigInt(key.part.q.data);
+ var dmodq = d.mod(q.subtract(1));
+
+ buf = bigintToMpBuf(dmodq);
+ key.part.dmodq = {name: 'dmodq', data: buf};
+ key.parts.push(key.part.dmodq);
+ }
+}
+
+function publicFromPrivateECDSA(curveName, priv) {
+ assert.string(curveName, 'curveName');
+ assert.buffer(priv);
+ if (ec === undefined)
+ ec = __webpack_require__(130);
+ if (jsbn === undefined)
+ jsbn = __webpack_require__(79).BigInteger;
+ var params = algs.curves[curveName];
+ var p = new jsbn(params.p);
+ var a = new jsbn(params.a);
+ var b = new jsbn(params.b);
+ var curve = new ec.ECCurveFp(p, a, b);
+ var G = curve.decodePointHex(params.G.toString('hex'));
+
+ var d = new jsbn(mpNormalize(priv));
+ var pub = G.multiply(d);
+ pub = Buffer.from(curve.encodePointHex(pub), 'hex');
+
+ var parts = [];
+ parts.push({name: 'curve', data: Buffer.from(curveName)});
+ parts.push({name: 'Q', data: pub});
+
+ var key = new Key({type: 'ecdsa', curve: curve, parts: parts});
+ return (key);
+}
+
+function opensshCipherInfo(cipher) {
+ var inf = {};
+ switch (cipher) {
+ case '3des-cbc':
+ inf.keySize = 24;
+ inf.blockSize = 8;
+ inf.opensslName = 'des-ede3-cbc';
+ break;
+ case 'blowfish-cbc':
+ inf.keySize = 16;
+ inf.blockSize = 8;
+ inf.opensslName = 'bf-cbc';
+ break;
+ case 'aes128-cbc':
+ case 'aes128-ctr':
+ case 'aes128-gcm@openssh.com':
+ inf.keySize = 16;
+ inf.blockSize = 16;
+ inf.opensslName = 'aes-128-' + cipher.slice(7, 10);
+ break;
+ case 'aes192-cbc':
+ case 'aes192-ctr':
+ case 'aes192-gcm@openssh.com':
+ inf.keySize = 24;
+ inf.blockSize = 16;
+ inf.opensslName = 'aes-192-' + cipher.slice(7, 10);
+ break;
+ case 'aes256-cbc':
+ case 'aes256-ctr':
+ case 'aes256-gcm@openssh.com':
+ inf.keySize = 32;
+ inf.blockSize = 16;
+ inf.opensslName = 'aes-256-' + cipher.slice(7, 10);
+ break;
+ default:
+ throw (new Error(
+ 'Unsupported openssl cipher "' + cipher + '"'));
+ }
+ return (inf);
+}
+
+
+/***/ }),
+/* 33 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+const escapeStringRegexp = __webpack_require__(351);
+const ansiStyles = __webpack_require__(447);
+const stdoutColor = __webpack_require__(564).stdout;
+
+const template = __webpack_require__(565);
+
+const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
+
+// `supportsColor.level` → `ansiStyles.color[name]` mapping
+const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
+
+// `color-convert` models to exclude from the Chalk API due to conflicts and such
+const skipModels = new Set(['gray']);
+
+const styles = Object.create(null);
+
+function applyOptions(obj, options) {
+ options = options || {};
+
+ // Detect level if not set manually
+ const scLevel = stdoutColor ? stdoutColor.level : 0;
+ obj.level = options.level === undefined ? scLevel : options.level;
+ obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
+}
+
+function Chalk(options) {
+ // We check for this.template here since calling `chalk.constructor()`
+ // by itself will have a `this` of a previously constructed chalk object
+ if (!this || !(this instanceof Chalk) || this.template) {
+ const chalk = {};
+ applyOptions(chalk, options);
+
+ chalk.template = function () {
+ const args = [].slice.call(arguments);
+ return chalkTag.apply(null, [chalk.template].concat(args));
+ };
+
+ Object.setPrototypeOf(chalk, Chalk.prototype);
+ Object.setPrototypeOf(chalk.template, chalk);
+
+ chalk.template.constructor = Chalk;
+
+ return chalk.template;
+ }
+
+ applyOptions(this, options);
+}
+
+// Use bright blue on Windows as the normal blue color is illegible
+if (isSimpleWindowsTerm) {
+ ansiStyles.blue.open = '\u001B[94m';
+}
+
+for (const key of Object.keys(ansiStyles)) {
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+
+ styles[key] = {
+ get() {
+ const codes = ansiStyles[key];
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
+ }
+ };
+}
+
+styles.visible = {
+ get() {
+ return build.call(this, this._styles || [], true, 'visible');
+ }
+};
+
+ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
+for (const model of Object.keys(ansiStyles.color.ansi)) {
+ if (skipModels.has(model)) {
+ continue;
+ }
+
+ styles[model] = {
+ get() {
+ const level = this.level;
+ return function () {
+ const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
+ const codes = {
+ open,
+ close: ansiStyles.color.close,
+ closeRe: ansiStyles.color.closeRe
+ };
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
+ };
+ }
+ };
+}
+
+ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
+for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
+ if (skipModels.has(model)) {
+ continue;
+ }
+
+ const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
+ styles[bgModel] = {
+ get() {
+ const level = this.level;
+ return function () {
+ const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
+ const codes = {
+ open,
+ close: ansiStyles.bgColor.close,
+ closeRe: ansiStyles.bgColor.closeRe
+ };
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
+ };
+ }
+ };
+}
+
+const proto = Object.defineProperties(() => {}, styles);
+
+function build(_styles, _empty, key) {
+ const builder = function () {
+ return applyStyle.apply(builder, arguments);
+ };
+
+ builder._styles = _styles;
+ builder._empty = _empty;
+
+ const self = this;
+
+ Object.defineProperty(builder, 'level', {
+ enumerable: true,
+ get() {
+ return self.level;
+ },
+ set(level) {
+ self.level = level;
+ }
+ });
+
+ Object.defineProperty(builder, 'enabled', {
+ enumerable: true,
+ get() {
+ return self.enabled;
+ },
+ set(enabled) {
+ self.enabled = enabled;
+ }
+ });
+
+ // See below for fix regarding invisible grey/dim combination on Windows
+ builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';
+
+ // `__proto__` is used because we must return a function, but there is
+ // no way to create a function with a different prototype
+ builder.__proto__ = proto; // eslint-disable-line no-proto
+
+ return builder;
+}
+
+function applyStyle() {
+ // Support varags, but simply cast to string in case there's only one arg
+ const args = arguments;
+ const argsLen = args.length;
+ let str = String(arguments[0]);
+
+ if (argsLen === 0) {
+ return '';
+ }
+
+ if (argsLen > 1) {
+ // Don't slice `arguments`, it prevents V8 optimizations
+ for (let a = 1; a < argsLen; a++) {
+ str += ' ' + args[a];
+ }
+ }
+
+ if (!this.enabled || this.level <= 0 || !str) {
+ return this._empty ? '' : str;
+ }
+
+ // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
+ // see https://github.com/chalk/chalk/issues/58
+ // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
+ const originalDim = ansiStyles.dim.open;
+ if (isSimpleWindowsTerm && this.hasGrey) {
+ ansiStyles.dim.open = '';
+ }
+
+ for (const code of this._styles.slice().reverse()) {
+ // Replace any instances already present with a re-opening code
+ // otherwise only the part of the string until said closing code
+ // will be colored, and the rest will simply be 'plain'.
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
+
+ // Close the styling before a linebreak and reopen
+ // after next line to fix a bleed issue on macOS
+ // https://github.com/chalk/chalk/pull/92
+ str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
+ }
+
+ // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
+ ansiStyles.dim.open = originalDim;
+
+ return str;
+}
+
+function chalkTag(chalk, strings) {
+ if (!Array.isArray(strings)) {
+ // If chalk() was called by itself or with a string,
+ // return the string itself as a string.
+ return [].slice.call(arguments, 1).join(' ');
+ }
+
+ const args = [].slice.call(arguments, 2);
+ const parts = [strings.raw[0]];
+
+ for (let i = 1; i < strings.length; i++) {
+ parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
+ parts.push(String(strings.raw[i]));
+ }
+
+ return template(chalk, parts.join(''));
+}
+
+Object.defineProperties(Chalk.prototype, styles);
+
+module.exports = Chalk(); // eslint-disable-line new-cap
+module.exports.supportsColor = stdoutColor;
+module.exports.default = module.exports; // For TypeScript
+
+
+/***/ }),
+/* 34 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__(38);
+var core = __webpack_require__(26);
+var ctx = __webpack_require__(68);
+var hide = __webpack_require__(77);
+var has = __webpack_require__(89);
+var PROTOTYPE = 'prototype';
+
+var $export = function (type, name, source) {
+ var IS_FORCED = type & $export.F;
+ var IS_GLOBAL = type & $export.G;
+ var IS_STATIC = type & $export.S;
+ var IS_PROTO = type & $export.P;
+ var IS_BIND = type & $export.B;
+ var IS_WRAP = type & $export.W;
+ var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
+ var expProto = exports[PROTOTYPE];
+ var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
+ var key, own, out;
+ if (IS_GLOBAL) source = name;
+ for (key in source) {
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ if (own && has(exports, key)) continue;
+ // export native or passed
+ out = own ? target[key] : source[key];
+ // prevent global pollution for namespaces
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
+ // bind timers to global for call from export context
+ : IS_BIND && own ? ctx(out, global)
+ // wrap global constructors for prevent change them in library
+ : IS_WRAP && target[key] == out ? (function (C) {
+ var F = function (a, b, c) {
+ if (this instanceof C) {
+ switch (arguments.length) {
+ case 0: return new C();
+ case 1: return new C(a);
+ case 2: return new C(a, b);
+ } return new C(a, b, c);
+ } return C.apply(this, arguments);
+ };
+ F[PROTOTYPE] = C[PROTOTYPE];
+ return F;
+ // make static versions for prototype methods
+ })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
+ if (IS_PROTO) {
+ (exports.virtual || (exports.virtual = {}))[key] = out;
+ // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
+ if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
+ }
+ }
+};
+// type bitmap
+$export.F = 1; // forced
+$export.G = 2; // global
+$export.S = 4; // static
+$export.P = 8; // proto
+$export.B = 16; // bind
+$export.W = 32; // wrap
+$export.U = 64; // safe
+$export.R = 128; // real proto method for `library`
+module.exports = $export;
+
+
+/***/ }),
+/* 35 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Copyright 2017 Joyent, Inc.
+
+module.exports = Key;
+
+var assert = __webpack_require__(22);
+var algs = __webpack_require__(39);
+var crypto = __webpack_require__(21);
+var Fingerprint = __webpack_require__(145);
+var Signature = __webpack_require__(71);
+var DiffieHellman = __webpack_require__(266).DiffieHellman;
+var errs = __webpack_require__(70);
+var utils = __webpack_require__(32);
+var PrivateKey = __webpack_require__(40);
+var edCompat;
+
+try {
+ edCompat = __webpack_require__(424);
+} catch (e) {
+ /* Just continue through, and bail out if we try to use it. */
+}
+
+var InvalidAlgorithmError = errs.InvalidAlgorithmError;
+var KeyParseError = errs.KeyParseError;
+
+var formats = {};
+formats['auto'] = __webpack_require__(425);
+formats['pem'] = __webpack_require__(82);
+formats['pkcs1'] = __webpack_require__(268);
+formats['pkcs8'] = __webpack_require__(146);
+formats['rfc4253'] = __webpack_require__(92);
+formats['ssh'] = __webpack_require__(426);
+formats['ssh-private'] = __webpack_require__(183);
+formats['openssh'] = formats['ssh-private'];
+formats['dnssec'] = __webpack_require__(267);
+
+function Key(opts) {
+ assert.object(opts, 'options');
+ assert.arrayOfObject(opts.parts, 'options.parts');
+ assert.string(opts.type, 'options.type');
+ assert.optionalString(opts.comment, 'options.comment');
+
+ var algInfo = algs.info[opts.type];
+ if (typeof (algInfo) !== 'object')
+ throw (new InvalidAlgorithmError(opts.type));
+
+ var partLookup = {};
+ for (var i = 0; i < opts.parts.length; ++i) {
+ var part = opts.parts[i];
+ partLookup[part.name] = part;
+ }
+
+ this.type = opts.type;
+ this.parts = opts.parts;
+ this.part = partLookup;
+ this.comment = undefined;
+ this.source = opts.source;
+
+ /* for speeding up hashing/fingerprint operations */
+ this._rfc4253Cache = opts._rfc4253Cache;
+ this._hashCache = {};
+
+ var sz;
+ this.curve = undefined;
+ if (this.type === 'ecdsa') {
+ var curve = this.part.curve.data.toString();
+ this.curve = curve;
+ sz = algs.curves[curve].size;
+ } else if (this.type === 'ed25519' || this.type === 'curve25519') {
+ sz = 256;
+ this.curve = 'curve25519';
+ } else {
+ var szPart = this.part[algInfo.sizePart];
+ sz = szPart.data.length;
+ sz = sz * 8 - utils.countZeros(szPart.data);
+ }
+ this.size = sz;
+}
+
+Key.formats = formats;
+
+Key.prototype.toBuffer = function (format, options) {
+ if (format === undefined)
+ format = 'ssh';
+ assert.string(format, 'format');
+ assert.object(formats[format], 'formats[format]');
+ assert.optionalObject(options, 'options');
+
+ if (format === 'rfc4253') {
+ if (this._rfc4253Cache === undefined)
+ this._rfc4253Cache = formats['rfc4253'].write(this);
+ return (this._rfc4253Cache);
+ }
+
+ return (formats[format].write(this, options));
+};
+
+Key.prototype.toString = function (format, options) {
+ return (this.toBuffer(format, options).toString());
+};
+
+Key.prototype.hash = function (algo) {
+ assert.string(algo, 'algorithm');
+ algo = algo.toLowerCase();
+ if (algs.hashAlgs[algo] === undefined)
+ throw (new InvalidAlgorithmError(algo));
+
+ if (this._hashCache[algo])
+ return (this._hashCache[algo]);
+ var hash = crypto.createHash(algo).
+ update(this.toBuffer('rfc4253')).digest();
+ this._hashCache[algo] = hash;
+ return (hash);
+};
+
+Key.prototype.fingerprint = function (algo) {
+ if (algo === undefined)
+ algo = 'sha256';
+ assert.string(algo, 'algorithm');
+ var opts = {
+ type: 'key',
+ hash: this.hash(algo),
+ algorithm: algo
+ };
+ return (new Fingerprint(opts));
+};
+
+Key.prototype.defaultHashAlgorithm = function () {
+ var hashAlgo = 'sha1';
+ if (this.type === 'rsa')
+ hashAlgo = 'sha256';
+ if (this.type === 'dsa' && this.size > 1024)
+ hashAlgo = 'sha256';
+ if (this.type === 'ed25519')
+ hashAlgo = 'sha512';
+ if (this.type === 'ecdsa') {
+ if (this.size <= 256)
+ hashAlgo = 'sha256';
+ else if (this.size <= 384)
+ hashAlgo = 'sha384';
+ else
+ hashAlgo = 'sha512';
+ }
+ return (hashAlgo);
+};
+
+Key.prototype.createVerify = function (hashAlgo) {
+ if (hashAlgo === undefined)
+ hashAlgo = this.defaultHashAlgorithm();
+ assert.string(hashAlgo, 'hash algorithm');
+
+ /* ED25519 is not supported by OpenSSL, use a javascript impl. */
+ if (this.type === 'ed25519' && edCompat !== undefined)
+ return (new edCompat.Verifier(this, hashAlgo));
+ if (this.type === 'curve25519')
+ throw (new Error('Curve25519 keys are not suitable for ' +
+ 'signing or verification'));
+
+ var v, nm, err;
+ try {
+ nm = hashAlgo.toUpperCase();
+ v = crypto.createVerify(nm);
+ } catch (e) {
+ err = e;
+ }
+ if (v === undefined || (err instanceof Error &&
+ err.message.match(/Unknown message digest/))) {
+ nm = 'RSA-';
+ nm += hashAlgo.toUpperCase();
+ v = crypto.createVerify(nm);
+ }
+ assert.ok(v, 'failed to create verifier');
+ var oldVerify = v.verify.bind(v);
+ var key = this.toBuffer('pkcs8');
+ var curve = this.curve;
+ var self = this;
+ v.verify = function (signature, fmt) {
+ if (Signature.isSignature(signature, [2, 0])) {
+ if (signature.type !== self.type)
+ return (false);
+ if (signature.hashAlgorithm &&
+ signature.hashAlgorithm !== hashAlgo)
+ return (false);
+ if (signature.curve && self.type === 'ecdsa' &&
+ signature.curve !== curve)
+ return (false);
+ return (oldVerify(key, signature.toBuffer('asn1')));
+
+ } else if (typeof (signature) === 'string' ||
+ Buffer.isBuffer(signature)) {
+ return (oldVerify(key, signature, fmt));
+
+ /*
+ * Avoid doing this on valid arguments, walking the prototype
+ * chain can be quite slow.
+ */
+ } else if (Signature.isSignature(signature, [1, 0])) {
+ throw (new Error('signature was created by too old ' +
+ 'a version of sshpk and cannot be verified'));
+
+ } else {
+ throw (new TypeError('signature must be a string, ' +
+ 'Buffer, or Signature object'));
+ }
+ };
+ return (v);
+};
+
+Key.prototype.createDiffieHellman = function () {
+ if (this.type === 'rsa')
+ throw (new Error('RSA keys do not support Diffie-Hellman'));
+
+ return (new DiffieHellman(this));
+};
+Key.prototype.createDH = Key.prototype.createDiffieHellman;
+
+Key.parse = function (data, format, options) {
+ if (typeof (data) !== 'string')
+ assert.buffer(data, 'data');
+ if (format === undefined)
+ format = 'auto';
+ assert.string(format, 'format');
+ if (typeof (options) === 'string')
+ options = { filename: options };
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalString(options.filename, 'options.filename');
+ if (options.filename === undefined)
+ options.filename = '(unnamed)';
+
+ assert.object(formats[format], 'formats[format]');
+
+ try {
+ var k = formats[format].read(data, options);
+ if (k instanceof PrivateKey)
+ k = k.toPublic();
+ if (!k.comment)
+ k.comment = options.filename;
+ return (k);
+ } catch (e) {
+ if (e.name === 'KeyEncryptedError')
+ throw (e);
+ throw (new KeyParseError(options.filename, format, e));
+ }
+};
+
+Key.isKey = function (obj, ver) {
+ return (utils.isCompatible(obj, Key, ver));
+};
+
+/*
+ * API versions for Key:
+ * [1,0] -- initial ver, may take Signature for createVerify or may not
+ * [1,1] -- added pkcs1, pkcs8 formats
+ * [1,2] -- added auto, ssh-private, openssh formats
+ * [1,3] -- added defaultHashAlgorithm
+ * [1,4] -- added ed support, createDH
+ * [1,5] -- first explicitly tagged version
+ * [1,6] -- changed ed25519 part names
+ */
+Key.prototype._sshpkApiVersion = [1, 6];
+
+Key._oldVersionDetect = function (obj) {
+ assert.func(obj.toBuffer);
+ assert.func(obj.fingerprint);
+ if (obj.createDH)
+ return ([1, 4]);
+ if (obj.defaultHashAlgorithm)
+ return ([1, 3]);
+ if (obj.formats['auto'])
+ return ([1, 2]);
+ if (obj.formats['pkcs1'])
+ return ([1, 1]);
+ return ([1, 0]);
+};
+
+
+/***/ }),
+/* 36 */
+/***/ (function(module, exports) {
+
+module.exports = require("stream");
+
+/***/ }),
+/* 37 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(592), __esModule: true };
+
+/***/ }),
+/* 38 */
+/***/ (function(module, exports) {
+
+// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self
+ // eslint-disable-next-line no-new-func
+ : Function('return this')();
+if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
+
+
+/***/ }),
+/* 39 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Copyright 2015 Joyent, Inc.
+
+var Buffer = __webpack_require__(20).Buffer;
+
+var algInfo = {
+ 'dsa': {
+ parts: ['p', 'q', 'g', 'y'],
+ sizePart: 'p'
+ },
+ 'rsa': {
+ parts: ['e', 'n'],
+ sizePart: 'n'
+ },
+ 'ecdsa': {
+ parts: ['curve', 'Q'],
+ sizePart: 'Q'
+ },
+ 'ed25519': {
+ parts: ['A'],
+ sizePart: 'A'
+ }
+};
+algInfo['curve25519'] = algInfo['ed25519'];
+
+var algPrivInfo = {
+ 'dsa': {
+ parts: ['p', 'q', 'g', 'y', 'x']
+ },
+ 'rsa': {
+ parts: ['n', 'e', 'd', 'iqmp', 'p', 'q']
+ },
+ 'ecdsa': {
+ parts: ['curve', 'Q', 'd']
+ },
+ 'ed25519': {
+ parts: ['A', 'k']
+ }
+};
+algPrivInfo['curve25519'] = algPrivInfo['ed25519'];
+
+var hashAlgs = {
+ 'md5': true,
+ 'sha1': true,
+ 'sha256': true,
+ 'sha384': true,
+ 'sha512': true
+};
+
+/*
+ * Taken from
+ * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf
+ */
+var curves = {
+ 'nistp256': {
+ size: 256,
+ pkcs8oid: '1.2.840.10045.3.1.7',
+ p: Buffer.from(('00' +
+ 'ffffffff 00000001 00000000 00000000' +
+ '00000000 ffffffff ffffffff ffffffff').
+ replace(/ /g, ''), 'hex'),
+ a: Buffer.from(('00' +
+ 'FFFFFFFF 00000001 00000000 00000000' +
+ '00000000 FFFFFFFF FFFFFFFF FFFFFFFC').
+ replace(/ /g, ''), 'hex'),
+ b: Buffer.from((
+ '5ac635d8 aa3a93e7 b3ebbd55 769886bc' +
+ '651d06b0 cc53b0f6 3bce3c3e 27d2604b').
+ replace(/ /g, ''), 'hex'),
+ s: Buffer.from(('00' +
+ 'c49d3608 86e70493 6a6678e1 139d26b7' +
+ '819f7e90').
+ replace(/ /g, ''), 'hex'),
+ n: Buffer.from(('00' +
+ 'ffffffff 00000000 ffffffff ffffffff' +
+ 'bce6faad a7179e84 f3b9cac2 fc632551').
+ replace(/ /g, ''), 'hex'),
+ G: Buffer.from(('04' +
+ '6b17d1f2 e12c4247 f8bce6e5 63a440f2' +
+ '77037d81 2deb33a0 f4a13945 d898c296' +
+ '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' +
+ '2bce3357 6b315ece cbb64068 37bf51f5').
+ replace(/ /g, ''), 'hex')
+ },
+ 'nistp384': {
+ size: 384,
+ pkcs8oid: '1.3.132.0.34',
+ p: Buffer.from(('00' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff fffffffe' +
+ 'ffffffff 00000000 00000000 ffffffff').
+ replace(/ /g, ''), 'hex'),
+ a: Buffer.from(('00' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' +
+ 'FFFFFFFF 00000000 00000000 FFFFFFFC').
+ replace(/ /g, ''), 'hex'),
+ b: Buffer.from((
+ 'b3312fa7 e23ee7e4 988e056b e3f82d19' +
+ '181d9c6e fe814112 0314088f 5013875a' +
+ 'c656398d 8a2ed19d 2a85c8ed d3ec2aef').
+ replace(/ /g, ''), 'hex'),
+ s: Buffer.from(('00' +
+ 'a335926a a319a27a 1d00896a 6773a482' +
+ '7acdac73').
+ replace(/ /g, ''), 'hex'),
+ n: Buffer.from(('00' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff c7634d81 f4372ddf' +
+ '581a0db2 48b0a77a ecec196a ccc52973').
+ replace(/ /g, ''), 'hex'),
+ G: Buffer.from(('04' +
+ 'aa87ca22 be8b0537 8eb1c71e f320ad74' +
+ '6e1d3b62 8ba79b98 59f741e0 82542a38' +
+ '5502f25d bf55296c 3a545e38 72760ab7' +
+ '3617de4a 96262c6f 5d9e98bf 9292dc29' +
+ 'f8f41dbd 289a147c e9da3113 b5f0b8c0' +
+ '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f').
+ replace(/ /g, ''), 'hex')
+ },
+ 'nistp521': {
+ size: 521,
+ pkcs8oid: '1.3.132.0.35',
+ p: Buffer.from((
+ '01ffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffff').replace(/ /g, ''), 'hex'),
+ a: Buffer.from(('01FF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC').
+ replace(/ /g, ''), 'hex'),
+ b: Buffer.from(('51' +
+ '953eb961 8e1c9a1f 929a21a0 b68540ee' +
+ 'a2da725b 99b315f3 b8b48991 8ef109e1' +
+ '56193951 ec7e937b 1652c0bd 3bb1bf07' +
+ '3573df88 3d2c34f1 ef451fd4 6b503f00').
+ replace(/ /g, ''), 'hex'),
+ s: Buffer.from(('00' +
+ 'd09e8800 291cb853 96cc6717 393284aa' +
+ 'a0da64ba').replace(/ /g, ''), 'hex'),
+ n: Buffer.from(('01ff' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff fffffffa' +
+ '51868783 bf2f966b 7fcc0148 f709a5d0' +
+ '3bb5c9b8 899c47ae bb6fb71e 91386409').
+ replace(/ /g, ''), 'hex'),
+ G: Buffer.from(('04' +
+ '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' +
+ '9c648139 053fb521 f828af60 6b4d3dba' +
+ 'a14b5e77 efe75928 fe1dc127 a2ffa8de' +
+ '3348b3c1 856a429b f97e7e31 c2e5bd66' +
+ '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' +
+ '98f54449 579b4468 17afbd17 273e662c' +
+ '97ee7299 5ef42640 c550b901 3fad0761' +
+ '353c7086 a272c240 88be9476 9fd16650').
+ replace(/ /g, ''), 'hex')
+ }
+};
+
+module.exports = {
+ info: algInfo,
+ privInfo: algPrivInfo,
+ hashAlgs: hashAlgs,
+ curves: curves
+};
+
+
+/***/ }),
+/* 40 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Copyright 2017 Joyent, Inc.
+
+module.exports = PrivateKey;
+
+var assert = __webpack_require__(22);
+var Buffer = __webpack_require__(20).Buffer;
+var algs = __webpack_require__(39);
+var crypto = __webpack_require__(21);
+var Fingerprint = __webpack_require__(145);
+var Signature = __webpack_require__(71);
+var errs = __webpack_require__(70);
+var util = __webpack_require__(9);
+var utils = __webpack_require__(32);
+var dhe = __webpack_require__(266);
+var generateECDSA = dhe.generateECDSA;
+var generateED25519 = dhe.generateED25519;
+var edCompat;
+var nacl;
+
+try {
+ edCompat = __webpack_require__(424);
+} catch (e) {
+ /* Just continue through, and bail out if we try to use it. */
+}
+
+var Key = __webpack_require__(35);
+
+var InvalidAlgorithmError = errs.InvalidAlgorithmError;
+var KeyParseError = errs.KeyParseError;
+var KeyEncryptedError = errs.KeyEncryptedError;
+
+var formats = {};
+formats['auto'] = __webpack_require__(425);
+formats['pem'] = __webpack_require__(82);
+formats['pkcs1'] = __webpack_require__(268);
+formats['pkcs8'] = __webpack_require__(146);
+formats['rfc4253'] = __webpack_require__(92);
+formats['ssh-private'] = __webpack_require__(183);
+formats['openssh'] = formats['ssh-private'];
+formats['ssh'] = formats['ssh-private'];
+formats['dnssec'] = __webpack_require__(267);
+
+function PrivateKey(opts) {
+ assert.object(opts, 'options');
+ Key.call(this, opts);
+
+ this._pubCache = undefined;
+}
+util.inherits(PrivateKey, Key);
+
+PrivateKey.formats = formats;
+
+PrivateKey.prototype.toBuffer = function (format, options) {
+ if (format === undefined)
+ format = 'pkcs1';
+ assert.string(format, 'format');
+ assert.object(formats[format], 'formats[format]');
+ assert.optionalObject(options, 'options');
+
+ return (formats[format].write(this, options));
+};
+
+PrivateKey.prototype.hash = function (algo) {
+ return (this.toPublic().hash(algo));
+};
+
+PrivateKey.prototype.toPublic = function () {
+ if (this._pubCache)
+ return (this._pubCache);
+
+ var algInfo = algs.info[this.type];
+ var pubParts = [];
+ for (var i = 0; i < algInfo.parts.length; ++i) {
+ var p = algInfo.parts[i];
+ pubParts.push(this.part[p]);
+ }
+
+ this._pubCache = new Key({
+ type: this.type,
+ source: this,
+ parts: pubParts
+ });
+ if (this.comment)
+ this._pubCache.comment = this.comment;
+ return (this._pubCache);
+};
+
+PrivateKey.prototype.derive = function (newType) {
+ assert.string(newType, 'type');
+ var priv, pub, pair;
+
+ if (this.type === 'ed25519' && newType === 'curve25519') {
+ if (nacl === undefined)
+ nacl = __webpack_require__(72);
+
+ priv = this.part.k.data;
+ if (priv[0] === 0x00)
+ priv = priv.slice(1);
+
+ pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv));
+ pub = Buffer.from(pair.publicKey);
+
+ return (new PrivateKey({
+ type: 'curve25519',
+ parts: [
+ { name: 'A', data: utils.mpNormalize(pub) },
+ { name: 'k', data: utils.mpNormalize(priv) }
+ ]
+ }));
+ } else if (this.type === 'curve25519' && newType === 'ed25519') {
+ if (nacl === undefined)
+ nacl = __webpack_require__(72);
+
+ priv = this.part.k.data;
+ if (priv[0] === 0x00)
+ priv = priv.slice(1);
+
+ pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv));
+ pub = Buffer.from(pair.publicKey);
+
+ return (new PrivateKey({
+ type: 'ed25519',
+ parts: [
+ { name: 'A', data: utils.mpNormalize(pub) },
+ { name: 'k', data: utils.mpNormalize(priv) }
+ ]
+ }));
+ }
+ throw (new Error('Key derivation not supported from ' + this.type +
+ ' to ' + newType));
+};
+
+PrivateKey.prototype.createVerify = function (hashAlgo) {
+ return (this.toPublic().createVerify(hashAlgo));
+};
+
+PrivateKey.prototype.createSign = function (hashAlgo) {
+ if (hashAlgo === undefined)
+ hashAlgo = this.defaultHashAlgorithm();
+ assert.string(hashAlgo, 'hash algorithm');
+
+ /* ED25519 is not supported by OpenSSL, use a javascript impl. */
+ if (this.type === 'ed25519' && edCompat !== undefined)
+ return (new edCompat.Signer(this, hashAlgo));
+ if (this.type === 'curve25519')
+ throw (new Error('Curve25519 keys are not suitable for ' +
+ 'signing or verification'));
+
+ var v, nm, err;
+ try {
+ nm = hashAlgo.toUpperCase();
+ v = crypto.createSign(nm);
+ } catch (e) {
+ err = e;
+ }
+ if (v === undefined || (err instanceof Error &&
+ err.message.match(/Unknown message digest/))) {
+ nm = 'RSA-';
+ nm += hashAlgo.toUpperCase();
+ v = crypto.createSign(nm);
+ }
+ assert.ok(v, 'failed to create verifier');
+ var oldSign = v.sign.bind(v);
+ var key = this.toBuffer('pkcs1');
+ var type = this.type;
+ var curve = this.curve;
+ v.sign = function () {
+ var sig = oldSign(key);
+ if (typeof (sig) === 'string')
+ sig = Buffer.from(sig, 'binary');
+ sig = Signature.parse(sig, type, 'asn1');
+ sig.hashAlgorithm = hashAlgo;
+ sig.curve = curve;
+ return (sig);
+ };
+ return (v);
+};
+
+PrivateKey.parse = function (data, format, options) {
+ if (typeof (data) !== 'string')
+ assert.buffer(data, 'data');
+ if (format === undefined)
+ format = 'auto';
+ assert.string(format, 'format');
+ if (typeof (options) === 'string')
+ options = { filename: options };
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalString(options.filename, 'options.filename');
+ if (options.filename === undefined)
+ options.filename = '(unnamed)';
+
+ assert.object(formats[format], 'formats[format]');
+
+ try {
+ var k = formats[format].read(data, options);
+ assert.ok(k instanceof PrivateKey, 'key is not a private key');
+ if (!k.comment)
+ k.comment = options.filename;
+ return (k);
+ } catch (e) {
+ if (e.name === 'KeyEncryptedError')
+ throw (e);
+ throw (new KeyParseError(options.filename, format, e));
+ }
+};
+
+PrivateKey.isPrivateKey = function (obj, ver) {
+ return (utils.isCompatible(obj, PrivateKey, ver));
+};
+
+PrivateKey.generate = function (type, options) {
+ if (options === undefined)
+ options = {};
+ assert.object(options, 'options');
+
+ switch (type) {
+ case 'ecdsa':
+ if (options.curve === undefined)
+ options.curve = 'nistp256';
+ assert.string(options.curve, 'options.curve');
+ return (generateECDSA(options.curve));
+ case 'ed25519':
+ return (generateED25519());
+ default:
+ throw (new Error('Key generation not supported with key ' +
+ 'type "' + type + '"'));
+ }
+};
+
+/*
+ * API versions for PrivateKey:
+ * [1,0] -- initial ver
+ * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats
+ * [1,2] -- added defaultHashAlgorithm
+ * [1,3] -- added derive, ed, createDH
+ * [1,4] -- first tagged version
+ * [1,5] -- changed ed25519 part names and format
+ */
+PrivateKey.prototype._sshpkApiVersion = [1, 5];
+
+PrivateKey._oldVersionDetect = function (obj) {
+ assert.func(obj.toPublic);
+ assert.func(obj.createSign);
+ if (obj.derive)
+ return ([1, 3]);
+ if (obj.defaultHashAlgorithm)
+ return ([1, 2]);
+ if (obj.formats['auto'])
+ return ([1, 1]);
+ return ([1, 0]);
+};
+
+
+/***/ }),
+/* 41 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.wrapLifecycle = exports.run = exports.install = exports.Install = undefined;
+
+var _set;
+
+function _load_set() {
+ return _set = _interopRequireDefault(__webpack_require__(16));
+}
+
+var _promise;
+
+function _load_promise() {
+ return _promise = _interopRequireDefault(__webpack_require__(7));
+}
+
+var _values;
+
+function _load_values() {
+ return _values = _interopRequireDefault(__webpack_require__(551));
+}
+
+var _extends2;
+
+function _load_extends() {
+ return _extends2 = _interopRequireDefault(__webpack_require__(24));
+}
+
+var _assign;
+
+function _load_assign() {
+ return _assign = _interopRequireDefault(__webpack_require__(23));
+}
+
+var _keys;
+
+function _load_keys() {
+ return _keys = _interopRequireDefault(__webpack_require__(14));
+}
+
+var _getIterator2;
+
+function _load_getIterator() {
+ return _getIterator2 = _interopRequireDefault(__webpack_require__(4));
+}
+
+var _asyncToGenerator2;
+
+function _load_asyncToGenerator() {
+ return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2));
+}
+
+var _classCallCheck2;
+
+function _load_classCallCheck() {
+ return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3));
+}
+
+var install = exports.install = function () {
+ var _ref43 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, lockfile) {
+ yield wrapLifecycle(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ var install = new Install(flags, config, reporter, lockfile);
+ yield install.init();
+ }));
+ });
+
+ return function install(_x16, _x17, _x18, _x19) {
+ return _ref43.apply(this, arguments);
+ };
+}();
+
+var run = exports.run = function () {
+ var _ref45 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) {
+ var lockfile = void 0;
+ var error = 'installCommandRenamed';
+ if (flags.lockfile === false) {
+ lockfile = new (_lockfile || _load_lockfile()).default();
+ } else {
+ lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter);
+ }
+
+ if (args.length) {
+ var exampleArgs = args.slice();
+
+ if (flags.saveDev) {
+ exampleArgs.push('--dev');
+ }
+ if (flags.savePeer) {
+ exampleArgs.push('--peer');
+ }
+ if (flags.saveOptional) {
+ exampleArgs.push('--optional');
+ }
+ if (flags.saveExact) {
+ exampleArgs.push('--exact');
+ }
+ if (flags.saveTilde) {
+ exampleArgs.push('--tilde');
+ }
+ var command = 'add';
+ if (flags.global) {
+ error = 'globalFlagRemoved';
+ command = 'global add';
+ }
+ throw new (_errors || _load_errors()).MessageError(reporter.lang(error, `yarn ${command} ${exampleArgs.join(' ')}`));
+ }
+
+ yield install(config, reporter, flags, lockfile);
+ });
+
+ return function run(_x20, _x21, _x22, _x23) {
+ return _ref45.apply(this, arguments);
+ };
+}();
+
+var wrapLifecycle = exports.wrapLifecycle = function () {
+ var _ref46 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags, factory) {
+ yield config.executeLifecycleScript('preinstall');
+
+ yield factory();
+
+ // npm behaviour, seems kinda funky but yay compatibility
+ yield config.executeLifecycleScript('install');
+ yield config.executeLifecycleScript('postinstall');
+
+ if (!config.production) {
+ if (!config.disablePrepublish) {
+ yield config.executeLifecycleScript('prepublish');
+ }
+ yield config.executeLifecycleScript('prepare');
+ }
+ });
+
+ return function wrapLifecycle(_x24, _x25, _x26) {
+ return _ref46.apply(this, arguments);
+ };
+}();
+
+exports.hasWrapper = hasWrapper;
+exports.setFlags = setFlags;
+
+var _objectPath;
+
+function _load_objectPath() {
+ return _objectPath = _interopRequireDefault(__webpack_require__(244));
+}
+
+var _hooks;
+
+function _load_hooks() {
+ return _hooks = __webpack_require__(311);
+}
+
+var _index;
+
+function _load_index() {
+ return _index = _interopRequireDefault(__webpack_require__(206));
+}
+
+var _errors;
+
+function _load_errors() {
+ return _errors = __webpack_require__(6);
+}
+
+var _integrityChecker;
+
+function _load_integrityChecker() {
+ return _integrityChecker = _interopRequireDefault(__webpack_require__(195));
+}
+
+var _lockfile;
+
+function _load_lockfile() {
+ return _lockfile = _interopRequireDefault(__webpack_require__(25));
+}
+
+var _lockfile2;
+
+function _load_lockfile2() {
+ return _lockfile2 = __webpack_require__(25);
+}
+
+var _packageFetcher;
+
+function _load_packageFetcher() {
+ return _packageFetcher = _interopRequireWildcard(__webpack_require__(197));
+}
+
+var _packageInstallScripts;
+
+function _load_packageInstallScripts() {
+ return _packageInstallScripts = _interopRequireDefault(__webpack_require__(513));
+}
+
+var _packageCompatibility;
+
+function _load_packageCompatibility() {
+ return _packageCompatibility = _interopRequireWildcard(__webpack_require__(196));
+}
+
+var _packageResolver;
+
+function _load_packageResolver() {
+ return _packageResolver = _interopRequireDefault(__webpack_require__(303));
+}
+
+var _packageLinker;
+
+function _load_packageLinker() {
+ return _packageLinker = _interopRequireDefault(__webpack_require__(198));
+}
+
+var _index2;
+
+function _load_index2() {
+ return _index2 = __webpack_require__(61);
+}
+
+var _index3;
+
+function _load_index3() {
+ return _index3 = __webpack_require__(75);
+}
+
+var _autoclean;
+
+function _load_autoclean() {
+ return _autoclean = __webpack_require__(290);
+}
+
+var _constants;
+
+function _load_constants() {
+ return _constants = _interopRequireWildcard(__webpack_require__(13));
+}
+
+var _normalizePattern;
+
+function _load_normalizePattern() {
+ return _normalizePattern = __webpack_require__(52);
+}
+
+var _fs;
+
+function _load_fs() {
+ return _fs = _interopRequireWildcard(__webpack_require__(8));
+}
+
+var _map;
+
+function _load_map() {
+ return _map = _interopRequireDefault(__webpack_require__(51));
+}
+
+var _yarnVersion;
+
+function _load_yarnVersion() {
+ return _yarnVersion = __webpack_require__(96);
+}
+
+var _generatePnpMap;
+
+function _load_generatePnpMap() {
+ return _generatePnpMap = __webpack_require__(536);
+}
+
+var _workspaceLayout;
+
+function _load_workspaceLayout() {
+ return _workspaceLayout = _interopRequireDefault(__webpack_require__(87));
+}
+
+var _resolutionMap;
+
+function _load_resolutionMap() {
+ return _resolutionMap = _interopRequireDefault(__webpack_require__(201));
+}
+
+var _guessName;
+
+function _load_guessName() {
+ return _guessName = _interopRequireDefault(__webpack_require__(159));
+}
+
+var _audit;
+
+function _load_audit() {
+ return _audit = _interopRequireDefault(__webpack_require__(289));
+}
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var deepEqual = __webpack_require__(654);
+
+var emoji = __webpack_require__(242);
+var invariant = __webpack_require__(15);
+var path = __webpack_require__(1);
+var semver = __webpack_require__(27);
+var uuid = __webpack_require__(114);
+var ssri = __webpack_require__(93);
+
+var ONE_DAY = 1000 * 60 * 60 * 24;
+
+/**
+ * Try and detect the installation method for Yarn and provide a command to update it with.
+ */
+
+function getUpdateCommand(installationMethod) {
+ if (installationMethod === 'tar') {
+ return `curl --compressed -o- -L ${(_constants || _load_constants()).YARN_INSTALLER_SH} | bash`;
+ }
+
+ if (installationMethod === 'homebrew') {
+ return 'brew upgrade yarn';
+ }
+
+ if (installationMethod === 'deb') {
+ return 'sudo apt-get update && sudo apt-get install yarn';
+ }
+
+ if (installationMethod === 'rpm') {
+ return 'sudo yum install yarn';
+ }
+
+ if (installationMethod === 'npm') {
+ return 'npm install --global yarn';
+ }
+
+ if (installationMethod === 'chocolatey') {
+ return 'choco upgrade yarn';
+ }
+
+ if (installationMethod === 'apk') {
+ return 'apk update && apk add -u yarn';
+ }
+
+ if (installationMethod === 'portage') {
+ return 'sudo emerge --sync && sudo emerge -au sys-apps/yarn';
+ }
+
+ return null;
+}
+
+function getUpdateInstaller(installationMethod) {
+ // Windows
+ if (installationMethod === 'msi') {
+ return (_constants || _load_constants()).YARN_INSTALLER_MSI;
+ }
+
+ return null;
+}
+
+function normalizeFlags(config, rawFlags) {
+ var flags = {
+ // install
+ har: !!rawFlags.har,
+ ignorePlatform: !!rawFlags.ignorePlatform,
+ ignoreEngines: !!rawFlags.ignoreEngines,
+ ignoreScripts: !!rawFlags.ignoreScripts,
+ ignoreOptional: !!rawFlags.ignoreOptional,
+ force: !!rawFlags.force,
+ flat: !!rawFlags.flat,
+ lockfile: rawFlags.lockfile !== false,
+ pureLockfile: !!rawFlags.pureLockfile,
+ updateChecksums: !!rawFlags.updateChecksums,
+ skipIntegrityCheck: !!rawFlags.skipIntegrityCheck,
+ frozenLockfile: !!rawFlags.frozenLockfile,
+ linkDuplicates: !!rawFlags.linkDuplicates,
+ checkFiles: !!rawFlags.checkFiles,
+ audit: !!rawFlags.audit,
+
+ // add
+ peer: !!rawFlags.peer,
+ dev: !!rawFlags.dev,
+ optional: !!rawFlags.optional,
+ exact: !!rawFlags.exact,
+ tilde: !!rawFlags.tilde,
+ ignoreWorkspaceRootCheck: !!rawFlags.ignoreWorkspaceRootCheck,
+
+ // outdated, update-interactive
+ includeWorkspaceDeps: !!rawFlags.includeWorkspaceDeps,
+
+ // add, remove, update
+ workspaceRootIsCwd: rawFlags.workspaceRootIsCwd !== false
+ };
+
+ if (config.getOption('ignore-scripts')) {
+ flags.ignoreScripts = true;
+ }
+
+ if (config.getOption('ignore-platform')) {
+ flags.ignorePlatform = true;
+ }
+
+ if (config.getOption('ignore-engines')) {
+ flags.ignoreEngines = true;
+ }
+
+ if (config.getOption('ignore-optional')) {
+ flags.ignoreOptional = true;
+ }
+
+ if (config.getOption('force')) {
+ flags.force = true;
+ }
+
+ return flags;
+}
+
+var Install = exports.Install = function () {
+ function Install(flags, config, reporter, lockfile) {
+ (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Install);
+
+ this.rootManifestRegistries = [];
+ this.rootPatternsToOrigin = (0, (_map || _load_map()).default)();
+ this.lockfile = lockfile;
+ this.reporter = reporter;
+ this.config = config;
+ this.flags = normalizeFlags(config, flags);
+ this.resolutions = (0, (_map || _load_map()).default)(); // Legacy resolutions field used for flat install mode
+ this.resolutionMap = new (_resolutionMap || _load_resolutionMap()).default(config); // Selective resolutions for nested dependencies
+ this.resolver = new (_packageResolver || _load_packageResolver()).default(config, lockfile, this.resolutionMap);
+ this.integrityChecker = new (_integrityChecker || _load_integrityChecker()).default(config);
+ this.linker = new (_packageLinker || _load_packageLinker()).default(config, this.resolver);
+ this.scripts = new (_packageInstallScripts || _load_packageInstallScripts()).default(config, this.resolver, this.flags.force);
+ }
+
+ /**
+ * Create a list of dependency requests from the current directories manifests.
+ */
+
+ Install.prototype.fetchRequestFromCwd = function () {
+ var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ var _this = this;
+
+ var excludePatterns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
+ var ignoreUnusedPatterns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+ var patterns = [];
+ var deps = [];
+ var resolutionDeps = [];
+ var manifest = {};
+
+ var ignorePatterns = [];
+ var usedPatterns = [];
+ var workspaceLayout = void 0;
+
+ // some commands should always run in the context of the entire workspace
+ var cwd = this.flags.includeWorkspaceDeps || this.flags.workspaceRootIsCwd ? this.config.lockfileFolder : this.config.cwd;
+
+ // non-workspaces are always root, otherwise check for workspace root
+ var cwdIsRoot = !this.config.workspaceRootFolder || this.config.lockfileFolder === cwd;
+
+ // exclude package names that are in install args
+ var excludeNames = [];
+ for (var _iterator = excludePatterns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) {
+ var _ref2;
+
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref2 = _iterator[_i++];
+ } else {
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref2 = _i.value;
+ }
+
+ var _pattern = _ref2;
+
+ if ((0, (_index3 || _load_index3()).getExoticResolver)(_pattern)) {
+ excludeNames.push((0, (_guessName || _load_guessName()).default)(_pattern));
+ } else {
+ // extract the name
+ var parts = (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(_pattern);
+ excludeNames.push(parts.name);
+ }
+ }
+
+ var stripExcluded = function stripExcluded(manifest) {
+ for (var _iterator2 = excludeNames, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) {
+ var _ref3;
+
+ if (_isArray2) {
+ if (_i2 >= _iterator2.length) break;
+ _ref3 = _iterator2[_i2++];
+ } else {
+ _i2 = _iterator2.next();
+ if (_i2.done) break;
+ _ref3 = _i2.value;
+ }
+
+ var exclude = _ref3;
+
+ if (manifest.dependencies && manifest.dependencies[exclude]) {
+ delete manifest.dependencies[exclude];
+ }
+ if (manifest.devDependencies && manifest.devDependencies[exclude]) {
+ delete manifest.devDependencies[exclude];
+ }
+ if (manifest.optionalDependencies && manifest.optionalDependencies[exclude]) {
+ delete manifest.optionalDependencies[exclude];
+ }
+ }
+ };
+
+ var _loop = function* _loop(registry) {
+ var filename = (_index2 || _load_index2()).registries[registry].filename;
+
+ var loc = path.join(cwd, filename);
+ if (!(yield (_fs || _load_fs()).exists(loc))) {
+ return 'continue';
+ }
+
+ _this.rootManifestRegistries.push(registry);
+
+ var projectManifestJson = yield _this.config.readJson(loc);
+ yield (0, (_index || _load_index()).default)(projectManifestJson, cwd, _this.config, cwdIsRoot);
+
+ (0, (_assign || _load_assign()).default)(_this.resolutions, projectManifestJson.resolutions);
+ (0, (_assign || _load_assign()).default)(manifest, projectManifestJson);
+
+ _this.resolutionMap.init(_this.resolutions);
+ for (var _iterator4 = (0, (_keys || _load_keys()).default)(_this.resolutionMap.resolutionsByPackage), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) {
+ var _ref5;
+
+ if (_isArray4) {
+ if (_i4 >= _iterator4.length) break;
+ _ref5 = _iterator4[_i4++];
+ } else {
+ _i4 = _iterator4.next();
+ if (_i4.done) break;
+ _ref5 = _i4.value;
+ }
+
+ var _packageName = _ref5;
+
+ var _optional = (_objectPath || _load_objectPath()).default.has(manifest.optionalDependencies, _packageName) && _this.flags.ignoreOptional;
+ for (var _iterator8 = _this.resolutionMap.resolutionsByPackage[_packageName], _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator8);;) {
+ var _ref11;
+
+ if (_isArray8) {
+ if (_i8 >= _iterator8.length) break;
+ _ref11 = _iterator8[_i8++];
+ } else {
+ _i8 = _iterator8.next();
+ if (_i8.done) break;
+ _ref11 = _i8.value;
+ }
+
+ var _ref10 = _ref11;
+ var _pattern3 = _ref10.pattern;
+
+ resolutionDeps = [].concat(resolutionDeps, [{ registry, pattern: _pattern3, optional: _optional, hint: 'resolution' }]);
+ }
+ }
+
+ var pushDeps = function pushDeps(depType, manifest, _ref6, isUsed) {
+ var hint = _ref6.hint,
+ optional = _ref6.optional;
+
+ if (ignoreUnusedPatterns && !isUsed) {
+ return;
+ }
+ // We only take unused dependencies into consideration to get deterministic hoisting.
+ // Since flat mode doesn't care about hoisting and everything is top level and specified then we can safely
+ // leave these out.
+ if (_this.flags.flat && !isUsed) {
+ return;
+ }
+ var depMap = manifest[depType];
+ for (var name in depMap) {
+ if (excludeNames.indexOf(name) >= 0) {
+ continue;
+ }
+
+ var _pattern2 = name;
+ if (!_this.lockfile.getLocked(_pattern2)) {
+ // when we use --save we save the dependency to the lockfile with just the name rather than the
+ // version combo
+ _pattern2 += '@' + depMap[name];
+ }
+
+ // normalization made sure packages are mentioned only once
+ if (isUsed) {
+ usedPatterns.push(_pattern2);
+ } else {
+ ignorePatterns.push(_pattern2);
+ }
+
+ _this.rootPatternsToOrigin[_pattern2] = depType;
+ patterns.push(_pattern2);
+ deps.push({ pattern: _pattern2, registry, hint, optional, workspaceName: manifest.name, workspaceLoc: manifest._loc });
+ }
+ };
+
+ if (cwdIsRoot) {
+ pushDeps('dependencies', projectManifestJson, { hint: null, optional: false }, true);
+ pushDeps('devDependencies', projectManifestJson, { hint: 'dev', optional: false }, !_this.config.production);
+ pushDeps('optionalDependencies', projectManifestJson, { hint: 'optional', optional: true }, true);
+ }
+
+ if (_this.config.workspaceRootFolder) {
+ var workspaceLoc = cwdIsRoot ? loc : path.join(_this.config.lockfileFolder, filename);
+ var workspacesRoot = path.dirname(workspaceLoc);
+
+ var workspaceManifestJson = projectManifestJson;
+ if (!cwdIsRoot) {
+ // the manifest we read before was a child workspace, so get the root
+ workspaceManifestJson = yield _this.config.readJson(workspaceLoc);
+ yield (0, (_index || _load_index()).default)(workspaceManifestJson, workspacesRoot, _this.config, true);
+ }
+
+ var workspaces = yield _this.config.resolveWorkspaces(workspacesRoot, workspaceManifestJson);
+ workspaceLayout = new (_workspaceLayout || _load_workspaceLayout()).default(workspaces, _this.config);
+
+ // add virtual manifest that depends on all workspaces, this way package hoisters and resolvers will work fine
+ var workspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.dependencies);
+ for (var _iterator5 = (0, (_keys || _load_keys()).default)(workspaces), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) {
+ var _ref7;
+
+ if (_isArray5) {
+ if (_i5 >= _iterator5.length) break;
+ _ref7 = _iterator5[_i5++];
+ } else {
+ _i5 = _iterator5.next();
+ if (_i5.done) break;
+ _ref7 = _i5.value;
+ }
+
+ var workspaceName = _ref7;
+
+ var workspaceManifest = workspaces[workspaceName].manifest;
+ workspaceDependencies[workspaceName] = workspaceManifest.version;
+
+ // include dependencies from all workspaces
+ if (_this.flags.includeWorkspaceDeps) {
+ pushDeps('dependencies', workspaceManifest, { hint: null, optional: false }, true);
+ pushDeps('devDependencies', workspaceManifest, { hint: 'dev', optional: false }, !_this.config.production);
+ pushDeps('optionalDependencies', workspaceManifest, { hint: 'optional', optional: true }, true);
+ }
+ }
+ var virtualDependencyManifest = {
+ _uid: '',
+ name: `workspace-aggregator-${uuid.v4()}`,
+ version: '1.0.0',
+ _registry: 'npm',
+ _loc: workspacesRoot,
+ dependencies: workspaceDependencies,
+ devDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.devDependencies),
+ optionalDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.optionalDependencies),
+ private: workspaceManifestJson.private,
+ workspaces: workspaceManifestJson.workspaces
+ };
+ workspaceLayout.virtualManifestName = virtualDependencyManifest.name;
+ var virtualDep = {};
+ virtualDep[virtualDependencyManifest.name] = virtualDependencyManifest.version;
+ workspaces[virtualDependencyManifest.name] = { loc: workspacesRoot, manifest: virtualDependencyManifest };
+
+ // ensure dependencies that should be excluded are stripped from the correct manifest
+ stripExcluded(cwdIsRoot ? virtualDependencyManifest : workspaces[projectManifestJson.name].manifest);
+
+ pushDeps('workspaces', { workspaces: virtualDep }, { hint: 'workspaces', optional: false }, true);
+
+ var implicitWorkspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceDependencies);
+
+ for (var _iterator6 = (_constants || _load_constants()).OWNED_DEPENDENCY_TYPES, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) {
+ var _ref8;
+
+ if (_isArray6) {
+ if (_i6 >= _iterator6.length) break;
+ _ref8 = _iterator6[_i6++];
+ } else {
+ _i6 = _iterator6.next();
+ if (_i6.done) break;
+ _ref8 = _i6.value;
+ }
+
+ var type = _ref8;
+
+ for (var _iterator7 = (0, (_keys || _load_keys()).default)(projectManifestJson[type] || {}), _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) {
+ var _ref9;
+
+ if (_isArray7) {
+ if (_i7 >= _iterator7.length) break;
+ _ref9 = _iterator7[_i7++];
+ } else {
+ _i7 = _iterator7.next();
+ if (_i7.done) break;
+ _ref9 = _i7.value;
+ }
+
+ var dependencyName = _ref9;
+
+ delete implicitWorkspaceDependencies[dependencyName];
+ }
+ }
+
+ pushDeps('dependencies', { dependencies: implicitWorkspaceDependencies }, { hint: 'workspaces', optional: false }, true);
+ }
+
+ return 'break';
+ };
+
+ _loop2: for (var _iterator3 = (0, (_keys || _load_keys()).default)((_index2 || _load_index2()).registries), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) {
+ var _ref4;
+
+ if (_isArray3) {
+ if (_i3 >= _iterator3.length) break;
+ _ref4 = _iterator3[_i3++];
+ } else {
+ _i3 = _iterator3.next();
+ if (_i3.done) break;
+ _ref4 = _i3.value;
+ }
+
+ var registry = _ref4;
+
+ var _ret = yield* _loop(registry);
+
+ switch (_ret) {
+ case 'continue':
+ continue;
+
+ case 'break':
+ break _loop2;}
+ }
+
+ // inherit root flat flag
+
+
+ if (manifest.flat) {
+ this.flags.flat = true;
+ }
+
+ return {
+ requests: [].concat(resolutionDeps, deps),
+ patterns,
+ manifest,
+ usedPatterns,
+ ignorePatterns,
+ workspaceLayout
+ };
+ });
+
+ function fetchRequestFromCwd() {
+ return _ref.apply(this, arguments);
+ }
+
+ return fetchRequestFromCwd;
+ }();
+
+ /**
+ * TODO description
+ */
+
+ Install.prototype.prepareRequests = function prepareRequests(requests) {
+ return requests;
+ };
+
+ Install.prototype.preparePatterns = function preparePatterns(patterns) {
+ return patterns;
+ };
+
+ Install.prototype.preparePatternsForLinking = function preparePatternsForLinking(patterns, cwdManifest, cwdIsRoot) {
+ return patterns;
+ };
+
+ Install.prototype.prepareManifests = function () {
+ var _ref12 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ var manifests = yield this.config.getRootManifests();
+ return manifests;
+ });
+
+ function prepareManifests() {
+ return _ref12.apply(this, arguments);
+ }
+
+ return prepareManifests;
+ }();
+
+ Install.prototype.bailout = function () {
+ var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) {
+ // We don't want to skip the audit - it could yield important errors
+ if (this.flags.audit) {
+ return false;
+ }
+ // PNP is so fast that the integrity check isn't pertinent
+ if (this.config.plugnplayEnabled) {
+ return false;
+ }
+ if (this.flags.skipIntegrityCheck || this.flags.force) {
+ return false;
+ }
+ var lockfileCache = this.lockfile.cache;
+ if (!lockfileCache) {
+ return false;
+ }
+ var lockfileClean = this.lockfile.parseResultType === 'success';
+ var match = yield this.integrityChecker.check(patterns, lockfileCache, this.flags, workspaceLayout);
+ if (this.flags.frozenLockfile && (!lockfileClean || match.missingPatterns.length > 0)) {
+ throw new (_errors || _load_errors()).MessageError(this.reporter.lang('frozenLockfileError'));
+ }
+
+ var haveLockfile = yield (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME));
+
+ var lockfileIntegrityPresent = !this.lockfile.hasEntriesExistWithoutIntegrity();
+ var integrityBailout = lockfileIntegrityPresent || !this.config.autoAddIntegrity;
+
+ if (match.integrityMatches && haveLockfile && lockfileClean && integrityBailout) {
+ this.reporter.success(this.reporter.lang('upToDate'));
+ return true;
+ }
+
+ if (match.integrityFileMissing && haveLockfile) {
+ // Integrity file missing, force script installations
+ this.scripts.setForce(true);
+ return false;
+ }
+
+ if (match.hardRefreshRequired) {
+ // e.g. node version doesn't match, force script installations
+ this.scripts.setForce(true);
+ return false;
+ }
+
+ if (!patterns.length && !match.integrityFileMissing) {
+ this.reporter.success(this.reporter.lang('nothingToInstall'));
+ yield this.createEmptyManifestFolders();
+ yield this.saveLockfileAndIntegrity(patterns, workspaceLayout);
+ return true;
+ }
+
+ return false;
+ });
+
+ function bailout(_x3, _x4) {
+ return _ref13.apply(this, arguments);
+ }
+
+ return bailout;
+ }();
+
+ /**
+ * Produce empty folders for all used root manifests.
+ */
+
+ Install.prototype.createEmptyManifestFolders = function () {
+ var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ if (this.config.modulesFolder) {
+ // already created
+ return;
+ }
+
+ for (var _iterator9 = this.rootManifestRegistries, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator9);;) {
+ var _ref15;
+
+ if (_isArray9) {
+ if (_i9 >= _iterator9.length) break;
+ _ref15 = _iterator9[_i9++];
+ } else {
+ _i9 = _iterator9.next();
+ if (_i9.done) break;
+ _ref15 = _i9.value;
+ }
+
+ var registryName = _ref15;
+ var folder = this.config.registries[registryName].folder;
+
+ yield (_fs || _load_fs()).mkdirp(path.join(this.config.lockfileFolder, folder));
+ }
+ });
+
+ function createEmptyManifestFolders() {
+ return _ref14.apply(this, arguments);
+ }
+
+ return createEmptyManifestFolders;
+ }();
+
+ /**
+ * TODO description
+ */
+
+ Install.prototype.markIgnored = function markIgnored(patterns) {
+ for (var _iterator10 = patterns, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator10);;) {
+ var _ref16;
+
+ if (_isArray10) {
+ if (_i10 >= _iterator10.length) break;
+ _ref16 = _iterator10[_i10++];
+ } else {
+ _i10 = _iterator10.next();
+ if (_i10.done) break;
+ _ref16 = _i10.value;
+ }
+
+ var _pattern4 = _ref16;
+
+ var _manifest = this.resolver.getStrictResolvedPattern(_pattern4);
+ var ref = _manifest._reference;
+ invariant(ref, 'expected package reference');
+
+ // just mark the package as ignored. if the package is used by a required package, the hoister
+ // will take care of that.
+ ref.ignore = true;
+ }
+ };
+
+ /**
+ * helper method that gets only recent manifests
+ * used by global.ls command
+ */
+
+
+ Install.prototype.getFlattenedDeps = function () {
+ var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ var _ref18 = yield this.fetchRequestFromCwd(),
+ depRequests = _ref18.requests,
+ rawPatterns = _ref18.patterns;
+
+ yield this.resolver.init(depRequests, {});
+
+ var manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(this.resolver.getManifests(), this.config);
+ this.resolver.updateManifests(manifests);
+
+ return this.flatten(rawPatterns);
+ });
+
+ function getFlattenedDeps() {
+ return _ref17.apply(this, arguments);
+ }
+
+ return getFlattenedDeps;
+ }();
+
+ /**
+ * TODO description
+ */
+
+ Install.prototype.init = function () {
+ var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ var _this2 = this;
+
+ this.checkUpdate();
+
+ // warn if we have a shrinkwrap
+ if (yield (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).NPM_SHRINKWRAP_FILENAME))) {
+ this.reporter.warn(this.reporter.lang('shrinkwrapWarning'));
+ }
+
+ // warn if we have an npm lockfile
+ if (yield (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).NPM_LOCK_FILENAME))) {
+ this.reporter.warn(this.reporter.lang('npmLockfileWarning'));
+ }
+
+ if (this.config.plugnplayEnabled) {
+ this.reporter.info(this.reporter.lang('plugnplaySuggestV2L1'));
+ this.reporter.info(this.reporter.lang('plugnplaySuggestV2L2'));
+ }
+
+ var flattenedTopLevelPatterns = [];
+ var steps = [];
+
+ var _ref20 = yield this.fetchRequestFromCwd(),
+ depRequests = _ref20.requests,
+ rawPatterns = _ref20.patterns,
+ ignorePatterns = _ref20.ignorePatterns,
+ workspaceLayout = _ref20.workspaceLayout,
+ manifest = _ref20.manifest;
+
+ var topLevelPatterns = [];
+
+ var artifacts = yield this.integrityChecker.getArtifacts();
+ if (artifacts) {
+ this.linker.setArtifacts(artifacts);
+ this.scripts.setArtifacts(artifacts);
+ }
+
+ if ((_packageCompatibility || _load_packageCompatibility()).shouldCheck(manifest, this.flags)) {
+ steps.push(function () {
+ var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) {
+ _this2.reporter.step(curr, total, _this2.reporter.lang('checkingManifest'), emoji.get('mag'));
+ yield _this2.checkCompatibility();
+ });
+
+ return function (_x5, _x6) {
+ return _ref21.apply(this, arguments);
+ };
+ }());
+ }
+
+ var audit = new (_audit || _load_audit()).default(this.config, this.reporter, { groups: (_constants || _load_constants()).OWNED_DEPENDENCY_TYPES });
+ var auditFoundProblems = false;
+
+ steps.push(function (curr, total) {
+ return (0, (_hooks || _load_hooks()).callThroughHook)('resolveStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ _this2.reporter.step(curr, total, _this2.reporter.lang('resolvingPackages'), emoji.get('mag'));
+ yield _this2.resolver.init(_this2.prepareRequests(depRequests), {
+ isFlat: _this2.flags.flat,
+ isFrozen: _this2.flags.frozenLockfile,
+ workspaceLayout
+ });
+ topLevelPatterns = _this2.preparePatterns(rawPatterns);
+ flattenedTopLevelPatterns = yield _this2.flatten(topLevelPatterns);
+ return { bailout: !_this2.flags.audit && (yield _this2.bailout(topLevelPatterns, workspaceLayout)) };
+ }));
+ });
+
+ if (this.flags.audit) {
+ steps.push(function (curr, total) {
+ return (0, (_hooks || _load_hooks()).callThroughHook)('auditStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ _this2.reporter.step(curr, total, _this2.reporter.lang('auditRunning'), emoji.get('mag'));
+ if (_this2.flags.offline) {
+ _this2.reporter.warn(_this2.reporter.lang('auditOffline'));
+ return { bailout: false };
+ }
+ var preparedManifests = yield _this2.prepareManifests();
+ // $FlowFixMe - Flow considers `m` in the map operation to be "mixed", so does not recognize `m.object`
+ var mergedManifest = (_assign || _load_assign()).default.apply(Object, [{}].concat((0, (_values || _load_values()).default)(preparedManifests).map(function (m) {
+ return m.object;
+ })));
+ var auditVulnerabilityCounts = yield audit.performAudit(mergedManifest, _this2.lockfile, _this2.resolver, _this2.linker, topLevelPatterns);
+ auditFoundProblems = auditVulnerabilityCounts.info || auditVulnerabilityCounts.low || auditVulnerabilityCounts.moderate || auditVulnerabilityCounts.high || auditVulnerabilityCounts.critical;
+ return { bailout: yield _this2.bailout(topLevelPatterns, workspaceLayout) };
+ }));
+ });
+ }
+
+ steps.push(function (curr, total) {
+ return (0, (_hooks || _load_hooks()).callThroughHook)('fetchStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ _this2.markIgnored(ignorePatterns);
+ _this2.reporter.step(curr, total, _this2.reporter.lang('fetchingPackages'), emoji.get('truck'));
+ var manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this2.resolver.getManifests(), _this2.config);
+ _this2.resolver.updateManifests(manifests);
+ yield (_packageCompatibility || _load_packageCompatibility()).check(_this2.resolver.getManifests(), _this2.config, _this2.flags.ignoreEngines);
+ }));
+ });
+
+ steps.push(function (curr, total) {
+ return (0, (_hooks || _load_hooks()).callThroughHook)('linkStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ // remove integrity hash to make this operation atomic
+ yield _this2.integrityChecker.removeIntegrityFile();
+ _this2.reporter.step(curr, total, _this2.reporter.lang('linkingDependencies'), emoji.get('link'));
+ flattenedTopLevelPatterns = _this2.preparePatternsForLinking(flattenedTopLevelPatterns, manifest, _this2.config.lockfileFolder === _this2.config.cwd);
+ yield _this2.linker.init(flattenedTopLevelPatterns, workspaceLayout, {
+ linkDuplicates: _this2.flags.linkDuplicates,
+ ignoreOptional: _this2.flags.ignoreOptional
+ });
+ }));
+ });
+
+ if (this.config.plugnplayEnabled) {
+ steps.push(function (curr, total) {
+ return (0, (_hooks || _load_hooks()).callThroughHook)('pnpStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ var pnpPath = `${_this2.config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`;
+
+ var code = yield (0, (_generatePnpMap || _load_generatePnpMap()).generatePnpMap)(_this2.config, flattenedTopLevelPatterns, {
+ resolver: _this2.resolver,
+ reporter: _this2.reporter,
+ targetPath: pnpPath,
+ workspaceLayout
+ });
+
+ try {
+ var file = yield (_fs || _load_fs()).readFile(pnpPath);
+ if (file === code) {
+ return;
+ }
+ } catch (error) {}
+
+ yield (_fs || _load_fs()).writeFile(pnpPath, code);
+ yield (_fs || _load_fs()).chmod(pnpPath, 0o755);
+ }));
+ });
+ }
+
+ steps.push(function (curr, total) {
+ return (0, (_hooks || _load_hooks()).callThroughHook)('buildStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ _this2.reporter.step(curr, total, _this2.flags.force ? _this2.reporter.lang('rebuildingPackages') : _this2.reporter.lang('buildingFreshPackages'), emoji.get('hammer'));
+
+ if (_this2.config.ignoreScripts) {
+ _this2.reporter.warn(_this2.reporter.lang('ignoredScripts'));
+ } else {
+ yield _this2.scripts.init(flattenedTopLevelPatterns);
+ }
+ }));
+ });
+
+ if (this.flags.har) {
+ steps.push(function () {
+ var _ref28 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) {
+ var formattedDate = new Date().toISOString().replace(/:/g, '-');
+ var filename = `yarn-install_${formattedDate}.har`;
+ _this2.reporter.step(curr, total, _this2.reporter.lang('savingHar', filename), emoji.get('black_circle_for_record'));
+ yield _this2.config.requestManager.saveHar(filename);
+ });
+
+ return function (_x7, _x8) {
+ return _ref28.apply(this, arguments);
+ };
+ }());
+ }
+
+ if (yield this.shouldClean()) {
+ steps.push(function () {
+ var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) {
+ _this2.reporter.step(curr, total, _this2.reporter.lang('cleaningModules'), emoji.get('recycle'));
+ yield (0, (_autoclean || _load_autoclean()).clean)(_this2.config, _this2.reporter);
+ });
+
+ return function (_x9, _x10) {
+ return _ref29.apply(this, arguments);
+ };
+ }());
+ }
+
+ var currentStep = 0;
+ for (var _iterator11 = steps, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator11);;) {
+ var _ref30;
+
+ if (_isArray11) {
+ if (_i11 >= _iterator11.length) break;
+ _ref30 = _iterator11[_i11++];
+ } else {
+ _i11 = _iterator11.next();
+ if (_i11.done) break;
+ _ref30 = _i11.value;
+ }
+
+ var step = _ref30;
+
+ var stepResult = yield step(++currentStep, steps.length);
+ if (stepResult && stepResult.bailout) {
+ if (this.flags.audit) {
+ audit.summary();
+ }
+ if (auditFoundProblems) {
+ this.reporter.warn(this.reporter.lang('auditRunAuditForDetails'));
+ }
+ this.maybeOutputUpdate();
+ return flattenedTopLevelPatterns;
+ }
+ }
+
+ // fin!
+ if (this.flags.audit) {
+ audit.summary();
+ }
+ if (auditFoundProblems) {
+ this.reporter.warn(this.reporter.lang('auditRunAuditForDetails'));
+ }
+ yield this.saveLockfileAndIntegrity(topLevelPatterns, workspaceLayout);
+ yield this.persistChanges();
+ this.maybeOutputUpdate();
+ this.config.requestManager.clearCache();
+ return flattenedTopLevelPatterns;
+ });
+
+ function init() {
+ return _ref19.apply(this, arguments);
+ }
+
+ return init;
+ }();
+
+ Install.prototype.checkCompatibility = function () {
+ var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ var _ref32 = yield this.fetchRequestFromCwd(),
+ manifest = _ref32.manifest;
+
+ yield (_packageCompatibility || _load_packageCompatibility()).checkOne(manifest, this.config, this.flags.ignoreEngines);
+ });
+
+ function checkCompatibility() {
+ return _ref31.apply(this, arguments);
+ }
+
+ return checkCompatibility;
+ }();
+
+ Install.prototype.persistChanges = function () {
+ var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ // get all the different registry manifests in this folder
+ var manifests = yield this.config.getRootManifests();
+
+ if (yield this.applyChanges(manifests)) {
+ yield this.config.saveRootManifests(manifests);
+ }
+ });
+
+ function persistChanges() {
+ return _ref33.apply(this, arguments);
+ }
+
+ return persistChanges;
+ }();
+
+ Install.prototype.applyChanges = function applyChanges(manifests) {
+ var hasChanged = false;
+
+ if (this.config.plugnplayPersist) {
+ var object = manifests.npm.object;
+
+
+ if (typeof object.installConfig !== 'object') {
+ object.installConfig = {};
+ }
+
+ if (this.config.plugnplayEnabled && object.installConfig.pnp !== true) {
+ object.installConfig.pnp = true;
+ hasChanged = true;
+ } else if (!this.config.plugnplayEnabled && typeof object.installConfig.pnp !== 'undefined') {
+ delete object.installConfig.pnp;
+ hasChanged = true;
+ }
+
+ if ((0, (_keys || _load_keys()).default)(object.installConfig).length === 0) {
+ delete object.installConfig;
+ }
+ }
+
+ return (_promise || _load_promise()).default.resolve(hasChanged);
+ };
+
+ /**
+ * Check if we should run the cleaning step.
+ */
+
+ Install.prototype.shouldClean = function shouldClean() {
+ return (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).CLEAN_FILENAME));
+ };
+
+ /**
+ * TODO
+ */
+
+ Install.prototype.flatten = function () {
+ var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns) {
+ var _this3 = this;
+
+ if (!this.flags.flat) {
+ return patterns;
+ }
+
+ var flattenedPatterns = [];
+
+ for (var _iterator12 = this.resolver.getAllDependencyNamesByLevelOrder(patterns), _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator12);;) {
+ var _ref35;
+
+ if (_isArray12) {
+ if (_i12 >= _iterator12.length) break;
+ _ref35 = _iterator12[_i12++];
+ } else {
+ _i12 = _iterator12.next();
+ if (_i12.done) break;
+ _ref35 = _i12.value;
+ }
+
+ var name = _ref35;
+
+ var infos = this.resolver.getAllInfoForPackageName(name).filter(function (manifest) {
+ var ref = manifest._reference;
+ invariant(ref, 'expected package reference');
+ return !ref.ignore;
+ });
+
+ if (infos.length === 0) {
+ continue;
+ }
+
+ if (infos.length === 1) {
+ // single version of this package
+ // take out a single pattern as multiple patterns may have resolved to this package
+ flattenedPatterns.push(this.resolver.patternsByPackage[name][0]);
+ continue;
+ }
+
+ var options = infos.map(function (info) {
+ var ref = info._reference;
+ invariant(ref, 'expected reference');
+ return {
+ // TODO `and is required by {PARENT}`,
+ name: _this3.reporter.lang('manualVersionResolutionOption', ref.patterns.join(', '), info.version),
+
+ value: info.version
+ };
+ });
+ var versions = infos.map(function (info) {
+ return info.version;
+ });
+ var version = void 0;
+
+ var resolutionVersion = this.resolutions[name];
+ if (resolutionVersion && versions.indexOf(resolutionVersion) >= 0) {
+ // use json `resolution` version
+ version = resolutionVersion;
+ } else {
+ version = yield this.reporter.select(this.reporter.lang('manualVersionResolution', name), this.reporter.lang('answer'), options);
+ this.resolutions[name] = version;
+ }
+
+ flattenedPatterns.push(this.resolver.collapseAllVersionsOfPackage(name, version));
+ }
+
+ // save resolutions to their appropriate root manifest
+ if ((0, (_keys || _load_keys()).default)(this.resolutions).length) {
+ var manifests = yield this.config.getRootManifests();
+
+ for (var _name in this.resolutions) {
+ var version = this.resolutions[_name];
+
+ var _patterns = this.resolver.patternsByPackage[_name];
+ if (!_patterns) {
+ continue;
+ }
+
+ var _manifest2 = void 0;
+ for (var _iterator13 = _patterns, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator13);;) {
+ var _ref36;
+
+ if (_isArray13) {
+ if (_i13 >= _iterator13.length) break;
+ _ref36 = _iterator13[_i13++];
+ } else {
+ _i13 = _iterator13.next();
+ if (_i13.done) break;
+ _ref36 = _i13.value;
+ }
+
+ var _pattern5 = _ref36;
+
+ _manifest2 = this.resolver.getResolvedPattern(_pattern5);
+ if (_manifest2) {
+ break;
+ }
+ }
+ invariant(_manifest2, 'expected manifest');
+
+ var ref = _manifest2._reference;
+ invariant(ref, 'expected reference');
+
+ var object = manifests[ref.registry].object;
+ object.resolutions = object.resolutions || {};
+ object.resolutions[_name] = version;
+ }
+
+ yield this.config.saveRootManifests(manifests);
+ }
+
+ return flattenedPatterns;
+ });
+
+ function flatten(_x11) {
+ return _ref34.apply(this, arguments);
+ }
+
+ return flatten;
+ }();
+
+ /**
+ * Remove offline tarballs that are no longer required
+ */
+
+ Install.prototype.pruneOfflineMirror = function () {
+ var _ref37 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (lockfile) {
+ var mirror = this.config.getOfflineMirrorPath();
+ if (!mirror) {
+ return;
+ }
+
+ var requiredTarballs = new (_set || _load_set()).default();
+ for (var dependency in lockfile) {
+ var resolved = lockfile[dependency].resolved;
+ if (resolved) {
+ var basename = path.basename(resolved.split('#')[0]);
+ if (dependency[0] === '@' && basename[0] !== '@') {
+ requiredTarballs.add(`${dependency.split('/')[0]}-${basename}`);
+ }
+ requiredTarballs.add(basename);
+ }
+ }
+
+ var mirrorFiles = yield (_fs || _load_fs()).walk(mirror);
+ for (var _iterator14 = mirrorFiles, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator14);;) {
+ var _ref38;
+
+ if (_isArray14) {
+ if (_i14 >= _iterator14.length) break;
+ _ref38 = _iterator14[_i14++];
+ } else {
+ _i14 = _iterator14.next();
+ if (_i14.done) break;
+ _ref38 = _i14.value;
+ }
+
+ var file = _ref38;
+
+ var isTarball = path.extname(file.basename) === '.tgz';
+ // if using experimental-pack-script-packages-in-mirror flag, don't unlink prebuilt packages
+ var hasPrebuiltPackage = file.relative.startsWith('prebuilt/');
+ if (isTarball && !hasPrebuiltPackage && !requiredTarballs.has(file.basename)) {
+ yield (_fs || _load_fs()).unlink(file.absolute);
+ }
+ }
+ });
+
+ function pruneOfflineMirror(_x12) {
+ return _ref37.apply(this, arguments);
+ }
+
+ return pruneOfflineMirror;
+ }();
+
+ /**
+ * Save updated integrity and lockfiles.
+ */
+
+ Install.prototype.saveLockfileAndIntegrity = function () {
+ var _ref39 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) {
+ var _this4 = this;
+
+ var resolvedPatterns = {};
+ (0, (_keys || _load_keys()).default)(this.resolver.patterns).forEach(function (pattern) {
+ if (!workspaceLayout || !workspaceLayout.getManifestByPattern(pattern)) {
+ resolvedPatterns[pattern] = _this4.resolver.patterns[pattern];
+ }
+ });
+
+ // TODO this code is duplicated in a few places, need a common way to filter out workspace patterns from lockfile
+ patterns = patterns.filter(function (p) {
+ return !workspaceLayout || !workspaceLayout.getManifestByPattern(p);
+ });
+
+ var lockfileBasedOnResolver = this.lockfile.getLockfile(resolvedPatterns);
+
+ if (this.config.pruneOfflineMirror) {
+ yield this.pruneOfflineMirror(lockfileBasedOnResolver);
+ }
+
+ // write integrity hash
+ if (!this.config.plugnplayEnabled) {
+ yield this.integrityChecker.save(patterns, lockfileBasedOnResolver, this.flags, workspaceLayout, this.scripts.getArtifacts());
+ }
+
+ // --no-lockfile or --pure-lockfile or --frozen-lockfile
+ if (this.flags.lockfile === false || this.flags.pureLockfile || this.flags.frozenLockfile) {
+ return;
+ }
+
+ var lockFileHasAllPatterns = patterns.every(function (p) {
+ return _this4.lockfile.getLocked(p);
+ });
+ var lockfilePatternsMatch = (0, (_keys || _load_keys()).default)(this.lockfile.cache || {}).every(function (p) {
+ return lockfileBasedOnResolver[p];
+ });
+ var resolverPatternsAreSameAsInLockfile = (0, (_keys || _load_keys()).default)(lockfileBasedOnResolver).every(function (pattern) {
+ var manifest = _this4.lockfile.getLocked(pattern);
+ return manifest && manifest.resolved === lockfileBasedOnResolver[pattern].resolved && deepEqual(manifest.prebuiltVariants, lockfileBasedOnResolver[pattern].prebuiltVariants);
+ });
+ var integrityPatternsAreSameAsInLockfile = (0, (_keys || _load_keys()).default)(lockfileBasedOnResolver).every(function (pattern) {
+ var existingIntegrityInfo = lockfileBasedOnResolver[pattern].integrity;
+ if (!existingIntegrityInfo) {
+ // if this entry does not have an integrity, no need to re-write the lockfile because of it
+ return true;
+ }
+ var manifest = _this4.lockfile.getLocked(pattern);
+ if (manifest && manifest.integrity) {
+ var manifestIntegrity = ssri.stringify(manifest.integrity);
+ return manifestIntegrity === existingIntegrityInfo;
+ }
+ return false;
+ });
+
+ // remove command is followed by install with force, lockfile will be rewritten in any case then
+ if (!this.flags.force && this.lockfile.parseResultType === 'success' && lockFileHasAllPatterns && lockfilePatternsMatch && resolverPatternsAreSameAsInLockfile && integrityPatternsAreSameAsInLockfile && patterns.length) {
+ return;
+ }
+
+ // build lockfile location
+ var loc = path.join(this.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME);
+
+ // write lockfile
+ var lockSource = (0, (_lockfile2 || _load_lockfile2()).stringify)(lockfileBasedOnResolver, false, this.config.enableLockfileVersions);
+ yield (_fs || _load_fs()).writeFilePreservingEol(loc, lockSource);
+
+ this._logSuccessSaveLockfile();
+ });
+
+ function saveLockfileAndIntegrity(_x13, _x14) {
+ return _ref39.apply(this, arguments);
+ }
+
+ return saveLockfileAndIntegrity;
+ }();
+
+ Install.prototype._logSuccessSaveLockfile = function _logSuccessSaveLockfile() {
+ this.reporter.success(this.reporter.lang('savedLockfile'));
+ };
+
+ /**
+ * Load the dependency graph of the current install. Only does package resolving and wont write to the cwd.
+ */
+
+
+ Install.prototype.hydrate = function () {
+ var _ref40 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (ignoreUnusedPatterns) {
+ var request = yield this.fetchRequestFromCwd([], ignoreUnusedPatterns);
+ var depRequests = request.requests,
+ rawPatterns = request.patterns,
+ ignorePatterns = request.ignorePatterns,
+ workspaceLayout = request.workspaceLayout;
+
+
+ yield this.resolver.init(depRequests, {
+ isFlat: this.flags.flat,
+ isFrozen: this.flags.frozenLockfile,
+ workspaceLayout
+ });
+ yield this.flatten(rawPatterns);
+ this.markIgnored(ignorePatterns);
+
+ // fetch packages, should hit cache most of the time
+ var manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(this.resolver.getManifests(), this.config);
+ this.resolver.updateManifests(manifests);
+ yield (_packageCompatibility || _load_packageCompatibility()).check(this.resolver.getManifests(), this.config, this.flags.ignoreEngines);
+
+ // expand minimal manifests
+ for (var _iterator15 = this.resolver.getManifests(), _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator15);;) {
+ var _ref41;
+
+ if (_isArray15) {
+ if (_i15 >= _iterator15.length) break;
+ _ref41 = _iterator15[_i15++];
+ } else {
+ _i15 = _iterator15.next();
+ if (_i15.done) break;
+ _ref41 = _i15.value;
+ }
+
+ var _manifest3 = _ref41;
+
+ var ref = _manifest3._reference;
+ invariant(ref, 'expected reference');
+ var type = ref.remote.type;
+ // link specifier won't ever hit cache
+
+ var _loc = '';
+ if (type === 'link') {
+ continue;
+ } else if (type === 'workspace') {
+ if (!ref.remote.reference) {
+ continue;
+ }
+ _loc = ref.remote.reference;
+ } else {
+ _loc = this.config.generateModuleCachePath(ref);
+ }
+ var newPkg = yield this.config.readManifest(_loc);
+ yield this.resolver.updateManifest(ref, newPkg);
+ }
+
+ return request;
+ });
+
+ function hydrate(_x15) {
+ return _ref40.apply(this, arguments);
+ }
+
+ return hydrate;
+ }();
+
+ /**
+ * Check for updates every day and output a nag message if there's a newer version.
+ */
+
+ Install.prototype.checkUpdate = function checkUpdate() {
+ if (this.config.nonInteractive) {
+ // don't show upgrade dialog on CI or non-TTY terminals
+ return;
+ }
+
+ // don't check if disabled
+ if (this.config.getOption('disable-self-update-check')) {
+ return;
+ }
+
+ // only check for updates once a day
+ var lastUpdateCheck = Number(this.config.getOption('lastUpdateCheck')) || 0;
+ if (lastUpdateCheck && Date.now() - lastUpdateCheck < ONE_DAY) {
+ return;
+ }
+
+ // don't bug for updates on tagged releases
+ if ((_yarnVersion || _load_yarnVersion()).version.indexOf('-') >= 0) {
+ return;
+ }
+
+ this._checkUpdate().catch(function () {
+ // swallow errors
+ });
+ };
+
+ Install.prototype._checkUpdate = function () {
+ var _ref42 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ var _this5 = this;
+
+ var latestVersion = yield this.config.requestManager.request({
+ url: (_constants || _load_constants()).SELF_UPDATE_VERSION_URL
+ });
+ invariant(typeof latestVersion === 'string', 'expected string');
+ latestVersion = latestVersion.trim();
+ if (!semver.valid(latestVersion)) {
+ return;
+ }
+
+ // ensure we only check for updates periodically
+ this.config.registries.yarn.saveHomeConfig({
+ lastUpdateCheck: Date.now()
+ });
+
+ if (semver.gt(latestVersion, (_yarnVersion || _load_yarnVersion()).version)) {
+ var installationMethod = yield (0, (_yarnVersion || _load_yarnVersion()).getInstallationMethod)();
+ this.maybeOutputUpdate = function () {
+ _this5.reporter.warn(_this5.reporter.lang('yarnOutdated', latestVersion, (_yarnVersion || _load_yarnVersion()).version));
+
+ var command = getUpdateCommand(installationMethod);
+ if (command) {
+ _this5.reporter.info(_this5.reporter.lang('yarnOutdatedCommand'));
+ _this5.reporter.command(command);
+ } else {
+ var installer = getUpdateInstaller(installationMethod);
+ if (installer) {
+ _this5.reporter.info(_this5.reporter.lang('yarnOutdatedInstaller', installer));
+ }
+ }
+ };
+ }
+ });
+
+ function _checkUpdate() {
+ return _ref42.apply(this, arguments);
+ }
+
+ return _checkUpdate;
+ }();
+
+ /**
+ * Method to override with a possible upgrade message.
+ */
+
+ Install.prototype.maybeOutputUpdate = function maybeOutputUpdate() {};
+
+ return Install;
+}();
+
+function hasWrapper(commander, args) {
+ return true;
+}
+
+function setFlags(commander) {
+ commander.description('Yarn install is used to install all dependencies for a project.');
+ commander.usage('install [flags]');
+ commander.option('-A, --audit', 'Run vulnerability audit on installed packages');
+ commander.option('-g, --global', 'DEPRECATED');
+ commander.option('-S, --save', 'DEPRECATED - save package to your `dependencies`');
+ commander.option('-D, --save-dev', 'DEPRECATED - save package to your `devDependencies`');
+ commander.option('-P, --save-peer', 'DEPRECATED - save package to your `peerDependencies`');
+ commander.option('-O, --save-optional', 'DEPRECATED - save package to your `optionalDependencies`');
+ commander.option('-E, --save-exact', 'DEPRECATED');
+ commander.option('-T, --save-tilde', 'DEPRECATED');
+}
+
+/***/ }),
+/* 42 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(593), __esModule: true };
+
+/***/ }),
+/* 43 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SubjectSubscriber; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subject; });
+/* unused harmony export AnonymousSubject */
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__(5);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(31);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(180);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__ = __webpack_require__(392);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(262);
+/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
+
+
+
+
+
+
+
+var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
+ __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SubjectSubscriber, _super);
+ function SubjectSubscriber(destination) {
+ var _this = _super.call(this, destination) || this;
+ _this.destination = destination;
+ return _this;
+ }
+ return SubjectSubscriber;
+}(__WEBPACK_IMPORTED_MODULE_2__Subscriber__["a" /* Subscriber */]));
+
+var Subject = /*@__PURE__*/ (function (_super) {
+ __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](Subject, _super);
+ function Subject() {
+ var _this = _super.call(this) || this;
+ _this.observers = [];
+ _this.closed = false;
+ _this.isStopped = false;
+ _this.hasError = false;
+ _this.thrownError = null;
+ return _this;
+ }
+ Subject.prototype[__WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () {
+ return new SubjectSubscriber(this);
+ };
+ Subject.prototype.lift = function (operator) {
+ var subject = new AnonymousSubject(this, this);
+ subject.operator = operator;
+ return subject;
+ };
+ Subject.prototype.next = function (value) {
+ if (this.closed) {
+ throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */]();
+ }
+ if (!this.isStopped) {
+ var observers = this.observers;
+ var len = observers.length;
+ var copy = observers.slice();
+ for (var i = 0; i < len; i++) {
+ copy[i].next(value);
+ }
+ }
+ };
+ Subject.prototype.error = function (err) {
+ if (this.closed) {
+ throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */]();
+ }
+ this.hasError = true;
+ this.thrownError = err;
+ this.isStopped = true;
+ var observers = this.observers;
+ var len = observers.length;
+ var copy = observers.slice();
+ for (var i = 0; i < len; i++) {
+ copy[i].error(err);
+ }
+ this.observers.length = 0;
+ };
+ Subject.prototype.complete = function () {
+ if (this.closed) {
+ throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */]();
+ }
+ this.isStopped = true;
+ var observers = this.observers;
+ var len = observers.length;
+ var copy = observers.slice();
+ for (var i = 0; i < len; i++) {
+ copy[i].complete();
+ }
+ this.observers.length = 0;
+ };
+ Subject.prototype.unsubscribe = function () {
+ this.isStopped = true;
+ this.closed = true;
+ this.observers = null;
+ };
+ Subject.prototype._trySubscribe = function (subscriber) {
+ if (this.closed) {
+ throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */]();
+ }
+ else {
+ return _super.prototype._trySubscribe.call(this, subscriber);
+ }
+ };
+ Subject.prototype._subscribe = function (subscriber) {
+ if (this.closed) {
+ throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */]();
+ }
+ else if (this.hasError) {
+ subscriber.error(this.thrownError);
+ return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY;
+ }
+ else if (this.isStopped) {
+ subscriber.complete();
+ return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY;
+ }
+ else {
+ this.observers.push(subscriber);
+ return new __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__["a" /* SubjectSubscription */](this, subscriber);
+ }
+ };
+ Subject.prototype.asObservable = function () {
+ var observable = new __WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */]();
+ observable.source = this;
+ return observable;
+ };
+ Subject.create = function (destination, source) {
+ return new AnonymousSubject(destination, source);
+ };
+ return Subject;
+}(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */]));
+
+var AnonymousSubject = /*@__PURE__*/ (function (_super) {
+ __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](AnonymousSubject, _super);
+ function AnonymousSubject(destination, source) {
+ var _this = _super.call(this) || this;
+ _this.destination = destination;
+ _this.source = source;
+ return _this;
+ }
+ AnonymousSubject.prototype.next = function (value) {
+ var destination = this.destination;
+ if (destination && destination.next) {
+ destination.next(value);
+ }
+ };
+ AnonymousSubject.prototype.error = function (err) {
+ var destination = this.destination;
+ if (destination && destination.error) {
+ this.destination.error(err);
+ }
+ };
+ AnonymousSubject.prototype.complete = function () {
+ var destination = this.destination;
+ if (destination && destination.complete) {
+ this.destination.complete();
+ }
+ };
+ AnonymousSubject.prototype._subscribe = function (subscriber) {
+ var source = this.source;
+ if (source) {
+ return this.source.subscribe(subscriber);
+ }
+ else {
+ return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY;
+ }
+ };
+ return AnonymousSubject;
+}(Subject));
+
+//# sourceMappingURL=Subject.js.map
+
+
+/***/ }),
+/* 44 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var store = __webpack_require__(225)('wks');
+var uid = __webpack_require__(162);
+var Symbol = __webpack_require__(38).Symbol;
+var USE_SYMBOL = typeof Symbol == 'function';
+
+var $exports = module.exports = function (name) {
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+};
+
+$exports.store = store;
+
+
+/***/ }),
+/* 45 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
+ * @license
+ * Lodash
+ * Copyright JS Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.17.10';
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Error message constants. */
+ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
+ FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used as the maximum memoize cache size. */
+ var MAX_MEMOIZE_SIZE = 500;
+
+ /** Used as the internal argument placeholder. */
+ var PLACEHOLDER = '__lodash_placeholder__';
+
+ /** Used to compose bitmasks for cloning. */
+ var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256,
+ WRAP_FLIP_FLAG = 512;
+
+ /** Used as default options for `_.truncate`. */
+ var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
+ var HOT_COUNT = 800,
+ HOT_SPAN = 16;
+
+ /** Used to indicate the type of lazy iteratees. */
+ var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2,
+ LAZY_WHILE_FLAG = 3;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+ /** Used to associate wrap methods with their bit flags. */
+ var wrapFlags = [
+ ['ary', WRAP_ARY_FLAG],
+ ['bind', WRAP_BIND_FLAG],
+ ['bindKey', WRAP_BIND_KEY_FLAG],
+ ['curry', WRAP_CURRY_FLAG],
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+ ['flip', WRAP_FLIP_FLAG],
+ ['partial', WRAP_PARTIAL_FLAG],
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+ ['rearg', WRAP_REARG_FLAG]
+ ];
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ domExcTag = '[object DOMException]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ nullTag = '[object Null]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ undefinedTag = '[object Undefined]',
+ weakMapTag = '[object WeakMap]',
+ weakSetTag = '[object WeakSet]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to match empty string literals in compiled template source. */
+ var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+ /** Used to match HTML entities and HTML characters. */
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reUnescapedHtml = /[&<>"']/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to match template delimiters. */
+ var reEscape = /<%-([\s\S]+?)%>/g,
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+ /** Used to match leading and trailing whitespace. */
+ var reTrim = /^\s+|\s+$/g,
+ reTrimStart = /^\s+/,
+ reTrimEnd = /\s+$/;
+
+ /** Used to match wrap detail comments. */
+ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
+ reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+ reSplitDetails = /,? & /;
+
+ /** Used to match words composed of alphanumeric characters. */
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+ */
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+
+ /** Used to match unescaped characters in compiled string literals. */
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+ /** Used to compose unicode character classes. */
+ var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+ /** Used to compose unicode capture groups. */
+ var rsApos = "['\u2019]",
+ rsAstral = '[' + rsAstralRange + ']',
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+ /** Used to compose unicode regexes. */
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+ /** Used to match apostrophes. */
+ var reApos = RegExp(rsApos, 'g');
+
+ /**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+ var reComboMark = RegExp(rsCombo, 'g');
+
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+ /** Used to match complex or compound words. */
+ var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+ rsUpper + '+' + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+ ].join('|'), 'g');
+
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
+
+ /** Used to detect strings that need a more robust regexp to match words. */
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+ /** Used to assign default `context` object properties. */
+ var contextProps = [
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
+ 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
+ ];
+
+ /** Used to make template sourceURLs easier to identify. */
+ var templateCounter = -1;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /** Used to map Latin Unicode letters to basic Latin letters. */
+ var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+ };
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": '''
+ };
+
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ ''': "'"
+ };
+
+ /** Used to escape characters for inclusion in compiled string literals. */
+ var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseFloat = parseFloat,
+ freeParseInt = parseInt;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
+
+ /** Detect free variable `process` from Node.js. */
+ var freeProcess = moduleExports && freeGlobal.process;
+
+ /** Used to access faster Node.js helpers. */
+ var nodeUtil = (function() {
+ try {
+ // Use `util.types` for Node.js 10+.
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
+
+ if (types) {
+ return types;
+ }
+
+ // Legacy `process.binding('util')` for Node.js < 10.
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
+ } catch (e) {}
+ }());
+
+ /* Node.js helper references. */
+ var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
+ nodeIsDate = nodeUtil && nodeUtil.isDate,
+ nodeIsMap = nodeUtil && nodeUtil.isMap,
+ nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
+ nodeIsSet = nodeUtil && nodeUtil.isSet,
+ nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+
+ /**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEachRight(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+ function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+ }
+
+ /**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array == null ? 0 : array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ var asciiSize = baseProperty('length');
+
+ /**
+ * Converts an ASCII `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function asciiToArray(string) {
+ return string.split('');
+ }
+
+ /**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+ }
+
+ /**
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+ * without support for iteratee shorthands, which iterates over `collection`
+ * using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFindKey(collection, predicate, eachFunc) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = key;
+ return false;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOf(array, value, fromIndex) {
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
+ }
+
+ /**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+ function baseIsNaN(value) {
+ return value !== value;
+ }
+
+ /**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+ function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the key-value pairs.
+ */
+ function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+ }
+
+ /**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function cacheHas(cache, key) {
+ return cache.has(key);
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+ function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1,
+ length = strSymbols.length;
+
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+ function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+ function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ ++result;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+ var deburrLetter = basePropertyOf(deburredLetters);
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+ /**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+ }
+
+ /**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
+
+ /**
+ * Checks if `string` contains Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+ */
+ function hasUnicode(string) {
+ return reHasUnicode.test(string);
+ }
+
+ /**
+ * Checks if `string` contains a word composed of Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
+ */
+ function hasUnicodeWord(string) {
+ return reHasUnicodeWord.test(string);
+ }
+
+ /**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+ function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the value at `key`, unless `key` is "__proto__".
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function safeGet(object, key) {
+ return key == '__proto__'
+ ? undefined
+ : object[key];
+ }
+
+ /**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /**
+ * Converts `set` to its value-value pairs.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the value-value pairs.
+ */
+ function setToPairs(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = [value, value];
+ });
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * A specialized version of `_.lastIndexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+ }
+
+ /**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+ function stringSize(string) {
+ return hasUnicode(string)
+ ? unicodeSize(string)
+ : asciiSize(string);
+ }
+
+ /**
+ * Converts `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function stringToArray(string) {
+ return hasUnicode(string)
+ ? unicodeToArray(string)
+ : asciiToArray(string);
+ }
+
+ /**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+ var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
+
+ /**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ function unicodeSize(string) {
+ var result = reUnicode.lastIndex = 0;
+ while (reUnicode.test(string)) {
+ ++result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts a Unicode `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function unicodeToArray(string) {
+ return string.match(reUnicode) || [];
+ }
+
+ /**
+ * Splits a Unicode `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function unicodeWords(string) {
+ return string.match(reUnicodeWord) || [];
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Create a new pristine `lodash` function using the `context` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Util
+ * @param {Object} [context=root] The context object.
+ * @returns {Function} Returns a new `lodash` function.
+ * @example
+ *
+ * _.mixin({ 'foo': _.constant('foo') });
+ *
+ * var lodash = _.runInContext();
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
+ *
+ * _.isFunction(_.foo);
+ * // => true
+ * _.isFunction(_.bar);
+ * // => false
+ *
+ * lodash.isFunction(lodash.foo);
+ * // => false
+ * lodash.isFunction(lodash.bar);
+ * // => true
+ *
+ * // Create a suped-up `defer` in Node.js.
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+ */
+ var runInContext = (function runInContext(context) {
+ context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
+
+ /** Built-in constructor references. */
+ var Array = context.Array,
+ Date = context.Date,
+ Error = context.Error,
+ Function = context.Function,
+ Math = context.Math,
+ Object = context.Object,
+ RegExp = context.RegExp,
+ String = context.String,
+ TypeError = context.TypeError;
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = context['__core-js_shared__'];
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? context.Buffer : undefined,
+ Symbol = context.Symbol,
+ Uint8Array = context.Uint8Array,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
+ getPrototype = overArg(Object.getPrototypeOf, Object),
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice,
+ spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
+ symIterator = Symbol ? Symbol.iterator : undefined,
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+ var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+ }());
+
+ /** Mocked built-ins. */
+ var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
+ ctxNow = Date && Date.now !== root.Date.now && Date.now,
+ ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor,
+ nativeGetSymbols = Object.getOwnPropertySymbols,
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+ nativeIsFinite = context.isFinite,
+ nativeJoin = arrayProto.join,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeNow = Date.now,
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random,
+ nativeReverse = arrayProto.reverse;
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(context, 'DataView'),
+ Map = getNative(context, 'Map'),
+ Promise = getNative(context, 'Promise'),
+ Set = getNative(context, 'Set'),
+ WeakMap = getNative(context, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to store function metadata. */
+ var metaMap = WeakMap && new WeakMap;
+
+ /** Used to lookup unminified function names. */
+ var realNames = {};
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+ function baseLodash() {
+ // No operation performed.
+ }
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+ }
+
+ /**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
+ * following template settings to use alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+ lodash.templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': lodash
+ }
+ };
+
+ // Ensure wrappers are instances of `baseLodash`.
+ lodash.prototype = baseLodash.prototype;
+ lodash.prototype.constructor = lodash;
+
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+ function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+ }
+
+ /**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+ function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+ }
+
+ /**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+ function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+ }
+
+ /**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+ function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+ }
+
+ // Ensure `LazyWrapper` is an instance of `baseLodash`.
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+ LazyWrapper.prototype.constructor = LazyWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Hash(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+ function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+ }
+
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+ }
+
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function MapCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+ }
+
+ /**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+ function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+ }
+
+ /**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+ function setCacheHas(value) {
+ return this.__data__.has(value);
+ }
+
+ // Add methods to `SetCache`.
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = new ListCache;
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ return this.__data__.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ return this.__data__.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
+ }
+ data = this.__data__ = new MapCache(pairs);
+ }
+ data.set(key, value);
+ this.size = data.size;
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+ function arrayLikeKeys(value, inherited) {
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+ function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+ }
+
+ /**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+ }
+
+ /**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
+
+ /**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssignIn(object, source) {
+ return object && copyObject(source, keysIn(source), object);
+ }
+
+ /**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Array} Returns the picked elements.
+ */
+ function baseAt(object, paths) {
+ var index = -1,
+ length = paths.length,
+ result = Array(length),
+ skip = object == null;
+
+ while (++index < length) {
+ result[index] = skip ? undefined : get(object, paths[index]);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+ function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+ }
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+
+ return result;
+ }
+
+ if (isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+
+ return result;
+ }
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseConforms(source) {
+ var props = keys(source);
+ return function(object) {
+ return baseConformsTo(object, source, props);
+ };
+ }
+
+ /**
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ */
+ function baseConformsTo(object, source, props) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+ function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee == null ? value : iteratee(value);
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+ function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseForRight = createBaseFor(true);
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+ function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path) {
+ path = castPath(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+
+ /**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+ }
+
+ /**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHas(object, key) {
+ return object != null && hasOwnProperty.call(object, key);
+ }
+
+ /**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+ }
+
+ /**
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+ function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+ }
+
+ /**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+ function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+ function baseInvoke(object, path, args) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ var func = object == null ? object : object[toKey(last(path))];
+ return func == null ? undefined : apply(func, object, args);
+ }
+
+ /**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ function baseIsArguments(value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
+ }
+
+ /**
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ */
+ function baseIsArrayBuffer(value) {
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
+ }
+
+ /**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+ function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+ }
+
+ /**
+ * The base implementation of `_.isMap` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ */
+ function baseIsMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+ }
+
+ /**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+ function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+ }
+
+ /**
+ * The base implementation of `_.isSet` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ */
+ function baseIsSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+ }
+
+ /**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+ function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
+
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+ }
+
+ /**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+ }
+
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ baseFor(source, function(srcValue, key) {
+ if (isObject(srcValue)) {
+ stack || (stack = new Stack);
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ }, keysIn);
+ }
+
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = safeGet(object, key),
+ srcValue = safeGet(source, key),
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
+ newValue = srcValue;
+ if (isArr || isBuff || isTyped) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ newValue = initCloneObject(srcValue);
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+ }
+
+ /**
+ * The base implementation of `_.nth` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+ function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+ }
+
+ /**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+ function baseOrderBy(collection, iteratees, orders) {
+ var index = -1;
+ iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, paths) {
+ return basePickBy(object, paths, function(value, path) {
+ return hasIn(object, path);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+ function basePickBy(object, paths, predicate) {
+ var index = -1,
+ length = paths.length,
+ result = {};
+
+ while (++index < length) {
+ var path = paths[index],
+ value = baseGet(object, path);
+
+ if (predicate(value, path)) {
+ baseSet(result, castPath(path, object), value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+ }
+
+ /**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (array === values) {
+ values = copyArray(values);
+ }
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ } else {
+ baseUnset(array, index);
+ }
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+ function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+ }
+
+ /**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the range of numbers.
+ */
+ function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+ function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+ }
+
+ /**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+ function baseSample(collection) {
+ return arraySample(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+ }
+
+ /**
+ * The base implementation of `setData` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
+
+ /**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+ };
+
+ /**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array == null ? low : array.length;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+ }
+
+ /**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ value = iteratee(value);
+
+ var low = 0,
+ high = array == null ? 0 : array.length,
+ valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+
+ /**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+ function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+ }
+
+ /**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+ function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The property path to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+ function baseUnset(object, path) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ return object == null || delete object[toKey(last(path))];
+ }
+
+ /**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+ }
+
+ /**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+ function baseXor(arrays, iteratee, comparator) {
+ var length = arrays.length;
+ if (length < 2) {
+ return length ? baseUniq(arrays[0]) : [];
+ }
+ var index = -1,
+ result = Array(length);
+
+ while (++index < length) {
+ var array = arrays[index],
+ othIndex = -1;
+
+ while (++othIndex < length) {
+ if (othIndex != index) {
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
+ }
+ }
+ }
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
+ }
+
+ /**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+ function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+ }
+
+ /**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+ function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+ }
+
+ /**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+ function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+ }
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+ }
+
+ /**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ var castRest = baseRest;
+
+ /**
+ * Casts `array` to a slice if it's needed.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {number} start The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the cast slice.
+ */
+ function castSlice(array, start, end) {
+ var length = array.length;
+ end = end === undefined ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
+ }
+
+ /**
+ * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
+ *
+ * @private
+ * @param {number|Object} id The timer id or timeout object of the timer to clear.
+ */
+ var clearTimeout = ctxClearTimeout || function(id) {
+ return root.clearTimeout(id);
+ };
+
+ /**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+ buffer.copy(result);
+ return result;
+ }
+
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
+
+ /**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+ function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+ }
+
+ /**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
+
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+ function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+ }
+
+ /**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+ }
+
+ /**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
+
+ /**
+ * Copies own and inherited symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbolsIn(source, object) {
+ return copyObject(source, getSymbolsIn(source), object);
+ }
+
+ /**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+ function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, getIteratee(iteratee, 2), accumulator);
+ };
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createBind(func, bitmask, thisArg) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new case function.
+ */
+ function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = hasUnicode(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+ }
+
+ /**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+ function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCurry(func, bitmask, arity) {
+ var Ctor = createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getHolder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = getIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+ }
+
+ /**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+ function createFlow(fromRight) {
+ return flatRest(function(funcs) {
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 && isArray(value)) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & WRAP_ARY_FLAG,
+ isBind = bitmask & WRAP_BIND_FLAG,
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+ isFlip = bitmask & WRAP_FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length;
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getHolder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtor(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+ function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+ }
+
+ /**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+ function createMathOperation(operator, defaultValue) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return defaultValue;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new over function.
+ */
+ function createOver(arrayFunc) {
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
+ return baseRest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+ }
+
+ /**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+ function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return hasUnicode(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartial(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+ function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
+ return baseRange(start, end, step, fromRight);
+ };
+ }
+
+ /**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+ function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return setWrapToString(result, func, bitmask);
+ }
+
+ /**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+ function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
+ if (precision) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+ }
+
+ /**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
+
+ /**
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
+ *
+ * @private
+ * @param {Function} keysFunc The function to get the keys of a given object.
+ * @returns {Function} Returns the new pairs function.
+ */
+ function createToPairs(keysFunc) {
+ return function(object) {
+ var tag = getTag(object);
+ if (tag == mapTag) {
+ return mapToArray(object);
+ }
+ if (tag == setTag) {
+ return setToPairs(object);
+ }
+ return baseToPairs(object, keysFunc(object));
+ };
+ }
+
+ /**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags.
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * 512 - `_.flip`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] === undefined
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+ var result = createBind(func, bitmask, thisArg);
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+ result = createCurry(func, bitmask, arity);
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+ result = createPartial(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybrid.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setWrapToString(setter(result, newData), func, bitmask);
+ }
+
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
+ * of source objects to the destination object for all destination properties
+ * that resolve to `undefined`.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsAssignIn(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
+ * objects into destination objects that are passed thru.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
+ stack['delete'](srcValue);
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
+ * objects.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {string} key The key of the property to inspect.
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
+ */
+ function customOmitClone(value) {
+ return isPlainObject(value) ? undefined : value;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= COMPARE_UNORDERED_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = getAllKeys(object),
+ objLength = objProps.length,
+ othProps = getAllKeys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+ }
+
+ /**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+ }
+
+ /**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
+
+ /**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+ function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+ function getHolder(func) {
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
+ return object.placeholder;
+ }
+
+ /**
+ * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
+ * this function returns the custom method, otherwise it returns `baseIteratee`.
+ * If arguments are provided, the chosen function is invoked with them and
+ * its result is returned.
+ *
+ * @private
+ * @param {*} [value] The value to convert to an iteratee.
+ * @param {number} [arity] The arity of the created iteratee.
+ * @returns {Function} Returns the chosen function or its result.
+ */
+ function getIteratee() {
+ var result = lodash.iteratee || iteratee;
+ result = result === iteratee ? baseIteratee : result;
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
+ }
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ /**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
+
+ /**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+ function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+ };
+
+ /**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+ };
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ var getTag = baseGetTag;
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = baseGetTag(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+ function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+ }
+
+ /**
+ * Extracts wrapper details from the `source` body comment.
+ *
+ * @private
+ * @param {string} source The source to inspect.
+ * @returns {Array} Returns the wrapper details.
+ */
+ function getWrapDetails(source) {
+ var match = source.match(reWrapDetails);
+ return match ? match[1].split(reSplitDetails) : [];
+ }
+
+ /**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+ function hasPath(object, path, hasFunc) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+ }
+
+ /**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+ function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
+
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return new Ctor;
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return new Ctor;
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+ }
+
+ /**
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
+ *
+ * @private
+ * @param {string} source The source to modify.
+ * @returns {Array} details The details to insert.
+ * @returns {string} Returns the modified source.
+ */
+ function insertWrapDetails(source, details) {
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+ details = details.join(length > 2 ? ', ' : ' ');
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ var type = typeof value;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+ function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+ }
+
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
+
+ /**
+ * Checks if `func` is capable of being masked.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
+ */
+ var isMaskable = coreJsData ? isFunction : stubFalse;
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+
+ /**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+ }
+
+ /**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+ function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+ }
+
+ /**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+ function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & WRAP_BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & WRAP_ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
+ }
+
+ /**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+ }
+
+ /**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+ function parent(object, path) {
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
+ }
+
+ /**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+ function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+ }
+
+ /**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var setData = shortOut(baseSetData);
+
+ /**
+ * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ var setTimeout = ctxSetTimeout || function(func, wait) {
+ return root.setTimeout(func, wait);
+ };
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = shortOut(baseSetToString);
+
+ /**
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+ * with wrapper details in a comment at the top of the source body.
+ *
+ * @private
+ * @param {Function} wrapper The function to modify.
+ * @param {Function} reference The reference function.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Function} Returns `wrapper`.
+ */
+ function setWrapToString(wrapper, reference, bitmask) {
+ var source = (reference + '');
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+ }
+
+ /**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+ function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+ }
+
+ /**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+ function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+ }
+
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (string.charCodeAt(0) === 46 /* . */) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Updates wrapper `details` based on `bitmask` flags.
+ *
+ * @private
+ * @returns {Array} details The details to modify.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Array} Returns `details`.
+ */
+ function updateWrapDetails(details, bitmask) {
+ arrayEach(wrapFlags, function(pair) {
+ var value = '_.' + pair[0];
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+ details.push(value);
+ }
+ });
+ return details.sort();
+ }
+
+ /**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+ function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array of chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+ function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array == null ? 0 : array.length;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+ }
+
+ /**
+ * Creates an array of `array` values not included in the other given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([2, 1], [2, 3]);
+ * // => [1]
+ */
+ var difference = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var differenceBy = baseRest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+ var differenceWith = baseRest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function drop(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function dropRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true)
+ : [];
+ }
+
+ /**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+ function fill(array, value, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index);
+ }
+
+ /**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+ function findLastIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length - 1;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = fromIndex < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index, true);
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+ function flattenDepth(array, depth) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+ }
+
+ /**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['a', 1], ['b', 2]]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function fromPairs(pairs) {
+ var index = -1,
+ length = pairs == null ? 0 : pairs.length,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseIndexOf(array, value, index);
+ }
+
+ /**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+ function initial(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 0, -1) : [];
+ }
+
+ /**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [2, 3]);
+ * // => [2]
+ */
+ var intersection = baseRest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+ var intersectionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+ var intersectionWith = baseRest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ if (comparator) {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+ function join(array, separator) {
+ return array == null ? '' : nativeJoin.call(array, separator);
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+ function lastIndexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
+ }
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
+ }
+
+ /**
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
+ * element from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+ function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+ }
+
+ /**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pull(array, 'a', 'c');
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ var pull = baseRest(pullAll);
+
+ /**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pullAll(array, ['a', 'c']);
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+ function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, getIteratee(iteratee, 2))
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+ function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+ }
+
+ /**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ * var pulled = _.pullAt(array, [1, 3]);
+ *
+ * console.log(array);
+ * // => ['a', 'c']
+ *
+ * console.log(pulled);
+ * // => ['b', 'd']
+ */
+ var pullAt = flatRest(function(array, indexes) {
+ var length = array == null ? 0 : array.length,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+ });
+
+ /**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+ function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = getIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+ }
+
+ /**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function reverse(array) {
+ return array == null ? array : nativeReverse.call(array);
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+ }
+
+ /**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ */
+ function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 0
+ */
+ function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 1
+ */
+ function sortedIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
+ * // => 4
+ */
+ function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+ }
+
+ /**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 1
+ */
+ function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
+ }
+
+ /**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 3
+ */
+ function sortedLastIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+ function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+ function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, getIteratee(iteratee, 2))
+ : [];
+ }
+
+ /**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+ function tail(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 1, length) : [];
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+ function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+ function takeRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+ function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), false, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+ function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3))
+ : [];
+ }
+
+ /**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2], [1, 2]);
+ * // => [2, 1]
+ */
+ var union = baseRest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. Result values are chosen from the first
+ * array in which the value occurs. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ var unionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. Result values are chosen from
+ * the first array in which the value occurs. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var unionWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+ });
+
+ /**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+ function uniq(array) {
+ return (array && array.length) ? baseUniq(array) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ function uniqBy(array, iteratee) {
+ return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+ function uniqWith(array, comparator) {
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['a', 'b'], [1, 2], [true, false]]
+ */
+ function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+ }
+
+ /**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+ function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+ }
+
+ /**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.pull`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([2, 1, 2, 3], 1, 2);
+ * // => [3]
+ */
+ var without = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+ });
+
+ /**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [2, 3]);
+ * // => [1, 3]
+ */
+ var xor = baseRest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2, 3.4]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var xorBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var xorWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+ });
+
+ /**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ */
+ var zip = baseRest(unzip);
+
+ /**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+ }
+
+ /**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+ function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+ var zipWith = baseRest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ */
+ var wrapperAt = flatRest(function(paths) {
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+ });
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+ function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+ }
+
+ /**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+ function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+ }
+
+ /**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+ function wrapperToIterator() {
+ return this;
+ }
+
+ /**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+ function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+ }
+
+ /**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+ var countBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
+ });
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ */
+ function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ var find = createFind(findIndex);
+
+ /**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+ var findLast = createFind(findLastIndex);
+
+ /**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+ function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+ }
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+ function forEachRight(collection, iteratee) {
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+ var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ baseAssignValue(result, key, [value]);
+ }
+ });
+
+ /**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+ function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+ }
+
+ /**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `path` is a function, it's invoked
+ * for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+ var invokeMap = baseRest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+ });
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+ var keyBy = createAggregator(function(result, value, key) {
+ baseAssignValue(result, key, value);
+ });
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+ }
+
+ /**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+ }
+
+ /**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+ function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+ }
+
+ /**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+ function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, negate(getIteratee(predicate, 3)));
+ }
+
+ /**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+ function sample(collection) {
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
+ }
+
+ /**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+ function sampleSize(collection, n, guard) {
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
+ }
+
+ /**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+ function shuffle(collection) {
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ return isString(collection) ? stringSize(collection) : collection.length;
+ }
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ return baseKeys(collection).length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
+ */
+ var sortBy = baseRest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+ var now = ctxNow || function() {
+ return root.Date.now();
+ };
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+ function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
+ }
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = baseRest(function(func, thisArg, partials) {
+ var bitmask = WRAP_BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bind));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(func, bitmask, thisArg, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+ var bindKey = baseRest(function(object, key, partials) {
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bindKey));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(key, bitmask, object, partials, holders);
+ });
+
+ /**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+ function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+ }
+
+ /**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+ function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+ }
+
+ /**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide `options` to indicate whether `func` should be invoked on the
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent
+ * calls to the debounced function return the result of the last `func`
+ * invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the debounced function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+ function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ timeWaiting = wait - timeSinceLastCall;
+
+ return maxing
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
+ : timeWaiting;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+ }
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+ var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new flipped function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+ function flip(func) {
+ return createWrap(func, WRAP_FLIP_FLAG);
+ }
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
+
+ // Expose `MapCache`.
+ memoize.Cache = MapCache;
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ switch (args.length) {
+ case 0: return !predicate.call(this);
+ case 1: return !predicate.call(this, args[0]);
+ case 2: return !predicate.call(this, args[0], args[1]);
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
+ }
+ return !predicate.apply(this, args);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Creates a function that invokes `func` with its arguments transformed.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
+ * The argument transforms.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, [square, doubled]);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+ var overArgs = castRest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
+
+ var funcsLength = transforms.length;
+ return baseRest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+ });
+
+ /**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+ var partial = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partial));
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+ var partialRight = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partialRight));
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, [2, 0, 1]);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+ var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
+ });
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? start : toInteger(start);
+ return baseRest(func, start);
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+ function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
+ return baseRest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+ }
+
+ /**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide `options` to indicate whether `func`
+ * should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+ function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+ }
+
+ /**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+ function unary(func) {
+ return ary(func, 1);
+ }
+
+ /**
+ * Creates a function that provides `value` to `wrapper` as its first
+ * argument. Any additional arguments provided to the function are appended
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
+ * binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '' + func(text) + '
';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles
'
+ */
+ function wrap(value, wrapper) {
+ return partial(castFunction(wrapper), value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+ function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+ }
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+ function cloneWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+ function cloneDeep(value) {
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+ function cloneDeepWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * Checks if `object` conforms to `source` by invoking the predicate
+ * properties of `source` with the corresponding property values of `object`.
+ *
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
+ * partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
+ * // => true
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
+ * // => false
+ */
+ function conformsTo(object, source) {
+ return source == null || baseConformsTo(object, source, keys(source));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+ var gt = createRelationalOperation(baseGt);
+
+ /**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+ var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+ });
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+ var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+ var isBuffer = nativeIsBuffer || stubFalse;
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
+
+ /**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('');
+ * // => false
+ */
+ function isElement(value) {
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+ }
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
+ }
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+ function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
+ }
+
+ /**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+ function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ var tag = baseGetTag(value);
+ return tag == errorTag || tag == domExcTag ||
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+ }
+
+ /**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+ function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
+
+ /**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values.
+ *
+ * **Note:** This method is equivalent to `_.matches` when `source` is
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.isMatch(object, { 'b': 2 });
+ * // => true
+ *
+ * _.isMatch(object, { 'b': 1 });
+ * // => false
+ */
+ function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+ }
+
+ /**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+ function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is a pristine native function.
+ *
+ * **Note:** This method can't reliably detect native functions in the presence
+ * of the core-js package because core-js circumvents this kind of detection.
+ * Despite multiple requests, the core-js maintainer has made it clear: any
+ * attempt to fix the detection will be obstructed. As a result, we're left
+ * with little choice but to throw an error. Unfortunately, this also affects
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
+ * which rely on core-js.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+ function isNative(value) {
+ if (isMaskable(value)) {
+ throw new Error(CORE_ERROR_TEXT);
+ }
+ return baseIsNative(value);
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+ function isNil(value) {
+ return value == null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
+
+ /**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+ function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+ function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+ function isWeakSet(value) {
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
+ }
+
+ /**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+ var lt = createRelationalOperation(baseLt);
+
+ /**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+ var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+ });
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (symIterator && value[symIterator]) {
+ return iteratorToArray(value[symIterator]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+ }
+
+ /**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+ function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+ }
+
+ /**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3.2);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3.2');
+ * // => 3
+ */
+ function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+ }
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+ }
+
+ /**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+ }
+
+ /**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3.2);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3.2');
+ * // => 3
+ */
+ function toSafeInteger(value) {
+ return value
+ ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
+ : (value === 0 ? value : 0);
+ }
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var assign = createAssigner(function(object, source) {
+ if (isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, keysIn(source), object);
+ });
+
+ /**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
+
+ /**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+ });
+
+ /**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Array} Returns the picked values.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ */
+ var at = flatRest(baseAt);
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : baseAssign(result, properties);
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var defaults = baseRest(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+ });
+
+ /**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
+ * // => { 'a': { 'b': 2, 'c': 3 } }
+ */
+ var defaultsDeep = baseRest(function(args) {
+ args.push(undefined, customDefaultsMerge);
+ return apply(mergeWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+ function findKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
+ }
+
+ /**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+ function findLastKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
+ }
+
+ /**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+ function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+ function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forOwn(object, iteratee) {
+ return object && baseForOwn(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+ function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+ function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+ }
+
+ /**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+ function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+ }
+
+ /**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+ }
+
+ /**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+ function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+ }
+
+ /**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+ var invert = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ result[value] = key;
+ }, constant(identity));
+
+ /**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+ var invertBy = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }, getIteratee);
+
+ /**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+ var invoke = baseRest(baseInvoke);
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+ }
+
+ /**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+ function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
+ }
+
+ /**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+ function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
+ }
+
+ /**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
+
+ /**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with six arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = { 'a': [1], 'b': [2] };
+ * var other = { 'a': [3], 'b': [4] };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'a': [1, 3], 'b': [2, 4] }
+ */
+ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+ });
+
+ /**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable property paths of `object` that are not omitted.
+ *
+ * **Note:** This method is considerably slower than `_.pick`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+ var omit = flatRest(function(object, paths) {
+ var result = {};
+ if (object == null) {
+ return result;
+ }
+ var isDeep = false;
+ paths = arrayMap(paths, function(path) {
+ path = castPath(path, object);
+ isDeep || (isDeep = path.length > 1);
+ return path;
+ });
+ copyObject(object, getAllKeysIn(object), result);
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
+ }
+ var length = paths.length;
+ while (length--) {
+ baseUnset(result, paths[length]);
+ }
+ return result;
+ });
+
+ /**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+ function omitBy(object, predicate) {
+ return pickBy(object, negate(getIteratee(predicate)));
+ }
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+ });
+
+ /**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ function pickBy(object, predicate) {
+ if (object == null) {
+ return {};
+ }
+ var props = arrayMap(getAllKeysIn(object), function(prop) {
+ return [prop];
+ });
+ predicate = getIteratee(predicate);
+ return basePickBy(object, props, function(value, path) {
+ return predicate(value, path[0]);
+ });
+ }
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ length = 1;
+ object = undefined;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+ }
+
+ /**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+ }
+
+ /**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+ }
+
+ /**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
+ * entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+ var toPairs = createToPairs(keys);
+
+ /**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
+ * or set, its entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
+ */
+ var toPairsIn = createToPairs(keysIn);
+
+ /**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. If `accumulator` is not
+ * provided, a new object with the same `[[Prototype]]` will be used. The
+ * iteratee is invoked with four arguments: (accumulator, value, key, object).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+ function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+
+ iteratee = getIteratee(iteratee, 4);
+ if (accumulator == null) {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
+ accumulator = {};
+ }
+ }
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+ function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+ }
+
+ /**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+ function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+ }
+
+ /**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+ function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+ function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+ }
+
+ /**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+ function inRange(number, start, end) {
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+ }
+
+ /**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+ function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toFinite(lower);
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toFinite(upper);
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+ var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+ });
+
+ /**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+ function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+ }
+
+ /**
+ * Deburrs `string` by converting
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+ * letters to basic Latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+ function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+ }
+
+ /**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search up to.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+ function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
+ }
+
+ /**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+ function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+ }
+
+ /**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+ var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+ var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+ var lowerFirst = createCaseFirst('toLowerCase');
+
+ /**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+ function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+ }
+
+ /**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+ function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+ }
+
+ /**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+ function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+ }
+
+ /**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+ function parseInt(string, radix, guard) {
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
+ }
+
+ /**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+ function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+ }
+
+ /**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+ function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
+ }
+
+ /**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+ var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+ function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (!separator && hasUnicode(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return string.split(separator, limit);
+ }
+
+ /**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+ var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+ });
+
+ /**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+ function startsWith(string, target, position) {
+ string = toString(string);
+ position = position == null
+ ? 0
+ : baseClamp(toInteger(position), 0, string.length);
+
+ target = baseToString(target);
+ return string.slice(position, position + target.length) == target;
+ }
+
+ /**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='lodash.templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<%- value %>');
+ * compiled({ 'value': '