Cake.Incubator Contains extensions for guard clauses Throws a if the value is null, otherwise returns the value The type to return The object to check The name of the variable value is null. The non-null value replace the following if (myArg == null) { throw new ArgumentNullException(nameof(myArg)); } var arg1 = myArg; with var arg1 = myArg.ThrowIfNull(nameof(myArg)); Throws a with a specific message if the value is null, otherwise returns the value The type to return The object to check The name of the variable The exception message value is null. The non-null value replace the following if (myArg == null) { throw new ArgumentNullException(nameof(myArg), "Oops"); } var arg1 = myArg; with var arg1 = myArg.ThrowIfNull(nameof(myArg), "Oops"); Throws a if a string is null or white space, otherwise returns the value The object to check The name of the variable value is null. The non-null value replace the following string myArg = ""; if (string.IsNullOrWhiteSpace(myArg)) { throw new ArgumentNullException(nameof(myArg)); } var arg1 = myArg; with string myArg = ""; var arg1 = myArg.ThrowIfNullOrWhiteSpace(nameof(myArg)); Throws a if a string is null or empty, otherwise returns the value The object to check The name of the variable value is null. The non-null value replace the following string myArg = ""; if (string.IsNullOrEmpty(myArg)) { throw new ArgumentNullException(nameof(myArg)); } var arg1 = myArg; with string myArg = ""; var arg1 = myArg.ThrowIfNullOrEmpty(nameof(myArg)); Several extension methods when using DotNetBuildSettings. Adds multiple .NET build targets to the configuration. The settings. The .NET build targets. The same instance so that multiple calls can be chained. Add many targets to the build settings var settings = new DotNetCoreMSBuildSettings().WithTargets(new[] { "Clean", "Build", "Publish" }); Several extension methods when using DotNetCoreTest. Runs DotNetCoreTest using the given The Cake Context DotNetCore Test Project File Path XUnit2 DotNetCore Test Settings Configurer Appends to an instance The Cake Context DotNetCore Test Settings DotNetCore Test Project Path XUnit2 DotNetCore Test Settings Configurer Several extension methods when using IEnumerable. Performs an action on a collection of items The item type the collection the action to perform Replace the following foreach(var item in items) { Debug.WriteLine(item); } with items.Each(item => Debug,WriteLine(item)); Checks whether specified IEnumerable is null or contains no elements the item type the collection true if element null or empty, else false Replace collection == null || !collection.Any() with collection.IsNullOrEmpty() Checks whether specified IList is null or contains no elements the item type the collection true if element null or empty, else false Replace collection == null || collection.Count == 0 with collection.IsNullOrEmpty() Checks whether specified array is null or contains no elements the item type the array true if element null or empty, else false Replace collection == null || collection.Length == 0 with collection.IsNullOrEmpty() Select a distinct instance of an object from a collection of objects. The type of the object to select. The type of the key to search for. The collection of objects to select from. The key that is being searched for. Checks if the source is contained in a list The source and list type The source item The list of items to check True if found, false if not Extension methods when using Files. Filters FilePathCollection by filenames, in the order specified the collection to filter the file names to filter by the filtered list Loads an xml file the xml file path An XDocument Load an xml document XDocument doc = GetFile("./proj.csproj").LoadXml(); Contains extension methods for working with 's Checks if the FilePath is a solution file the path to check true if sln file Check if the file is a solution new FilePath("test.sln").IsSolution(); // true Checks if the FilePath is a vbproj/csproj/fsproj file the path to check true if a visual studio project file was recognised Check if the file is a project new FilePath("test.csproj").IsProject(); // true; new FilePath("test.fsproj").IsProject(); // true; new FilePath("test.vbproj").IsProject(); // true; Checks if the path has a specific filename and extension the path to check the file name and extension true if filename and extension matches Check by the filename (includes extension) new FilePath("/folder/testing.cs").HasFileName("testing.cs"); // true Checks if the path has a specific file extension (case-insensitive) the path to check the file extension name true if file extension matches Check the file extension with or without the period ignoring case new FilePath("/folder/testing.cs").HasExtension(".cs"); // true new FilePath("/folder/testing.odd").HasExtension("ODD"); // true Contains extension methods for working with cakes Loads a visual studio project file the filesystem the path of the project file the project file Throws if the file does not exist or is not a recognised visual studio project file Contains functionality related to file system globbing. Returns files in the same directory that have the same file name but different extensions the cake context the files to return matches for a list of matching files Locates files with the same name in the same directory, but different extensions. The .pdb to your .dll as it were. If found, returns the original file as well. // /output/file.dll // /output/file.xml // /output/file.pdb // /output/another.dll FilePathCollection matchingFiles = GetMatchingFiles(new FilePath("/output/file.dll")); matchingFiles.First(); // /output/file.xml matchingFiles.Skip(1).First(); // /output/file.pdb matchingFiles.Last(); // /output/file.dll Gets FilePaths using glob patterns the cake context the glob patterns the files matching the glob patterns Pass multiple glob patterns // /output/file.dll // /output/file.xml // /output/file.pdb // /output/another.dll IEnumerable<FilePath> matchingFiles = GetFiles("*.pdb", "*.xml")); matchingFiles[0]; // /output/file.xml matchingFiles[1]; // /output/file.pdb Several extension methods when using Logging. Get a basic string representation of specified object. Type of object Object to generate string representation of String representation of object in format in format `Prop: PropValue\r\nArrayProp: ArrayVal1, ArrayVal2` Generates a string representation of objects public properties and values. var person = new Person { Name = "Bob", Age = 24, Food = new[] { "Lasagne", "Pizza"} }; var data = person.Dump(); // output: "Name: Bob\r\nAge: 24\r\nFood: Lasagne, Pizza"; Useful in for logging objects, e.g. var gitVersionResults = GitVersion(new GitVersionSettings()); Information("GitResults -> {0}", gitVersionResults.Dump()); // output: GitResults -> Major: 0 Minor: 1 Patch: 0 PreReleaseTag: dev-19.1 PreReleaseTagWithDash: -dev-19.1 PreReleaseLabel: dev-19 PreReleaseNumber: 1 BuildMetaData: 26 ..snip.. This project contains various useful extension methods and aliases for Cake that over time may become part of the core project Several extension methods when using ProjectPath. Combines a base project path with the name of the project file. The base path to the location of the Project File. The path to the actual Project file. A project build target The build target name Targets that will run before this one Targets that will run after this one Targets that will run before this one Any executable targets The build target executables A executable build target The executable command Represents a MSBuild project file. Gets or sets the project file path. The project file path. Gets or sets the relative path to the project file. The relative path to the project file. Gets or sets a value indicating whether this is compiled. true if compiled; otherwise, false. Represents the content in an MSBuild project file. The path for the parsed project file Gets the build configuration. The build configuration. Gets the target platform. The platform. Gets the unique project identifier. The unique project identifier. Gets the project type identifiers. The project type identifiers. Gets the compiler output type, i.e. Exe/Library. The output type. Gets the first compiler artifact output path. Use OutputPaths for multi-targeting libraries The output path. Gets the compiler artifact output paths. The output paths. Gets the default root namespace. The root namespace. Gets the build target assembly name. The assembly name. Gets the first compiler target framework version. The target framework version. If this is a multi-target project, use Gets the first compiler target framework versions. An array of target framework versions. Gets the compiler target framework profile. The target framework profile. Gets the project content files. The files. Gets the references. The references. Gets the references to other projects. The references. True if the project is a net core compatible project True if the project is a net framework compatible project True if the project is a net standard compatible project Contains properties specific to net core projects. See The project package references. A collection of Whether the project parsed is in the newer VS2017 onwards format or the legacy pre 2017 format The project file xml source A dotnet cli tool referenceS The dotnet cli tool name The tool version Describes a netcore project True if the assembly allows unsafe blocks The application icon The assembly title, defaults to the assemblyname The signing key file path The Assembly Version dotnet pack: A list of packages authors, matching the profile names on nuget.org. These are displayed in the NuGet Gallery on nuget.org and are used to cross-reference packages by the same authors. dotnet pack: Specifies the folder where to place the output assemblies. The output assemblies (and other output files) are copied into their respective framework folders. dotnet pack: This property specifies the default location of where all the content files should go if PackagePath is not specified for them. The default value is "content;contentFiles". Copyright details for the package. The assembly or package company True if compilation will output debug symbols The debug type (portable, embedded, full) Build pre-processor directives When delay signed, the project will not run or be debuggable dotnet pack: A long description of the package for UI display. The documentation file path The dotnet CLI tool references, a collection of The File Version True if assembly will generate xml documentation True if the package will be generated when building Generate serialization assemblies (Off, On, Auto) dotnet pack: This Boolean value indicates whether the package should create an additional symbols package when the project is packed. This package will have a .symbols.nupkg extension and will copy the PDB files along with the DLL and other output files. dotnet pack: This Boolean value indicates whether the pack process should create a source package. The source package contains the library's source code as well as PDB files. Source files are put under the src/ProjectName directory in the resulting package file. dotnet pack: This Boolean values specifies whether the build output assemblies should be packed into the .nupkg file or not. dotnet pack: This Boolean value specifies whether any items that have a type of Content will be included in the resulting package automatically. The default is true. dotnet pack: A Boolean value that specifies whether the project can be packed. The default value is true. dotnet pack: Specifies whether all output files are copied to the tools folder instead of the lib folder. Note that this is different from a DotNetCliTool which is specified by setting the PackageType in the .csproj file. True if this is a web project Assembly language version (ISO-1, ISO-2, [C#]2-7) dotnet pack: Specifies the minimum version of the NuGet client that can install this package, enforced by nuget.exe and the Visual Studio Package Manager. The netstandard package target version if specified The assembly neutral language dotnet pack: Specifies that pack should not run package analysis after building the package. The pragma warnings to ignore during compilation dotnet pack: Base path for the .nuspec file. dotnet pack: Relative or absolute path to the .nuspec file being used for packing dotnet pack: list of key=value pairs. The optimize code flag dotnet pack: A URL for a 64x64 image with transparent background to use as the icon for the package in UI display. dotnet pack: The package id dotnet pack: An URL to the license that is applicable to the package. dotnet pack: Determines the output path in which the packed package will be dropped. Default is the OutputPath dotnet pack: A URL for the package's home page, often shown in UI displays as well as nuget.org. The project package references. A collection of dotnet pack: A Boolean value that specifies whether the client must prompt the consumer to accept the package license before installing the package. The default is false. dotnet pack: Release notes for the package. dotnet pack: A list of tags that designates the package. The fallback targets to use when importing packages Required to be true for the compilation of razor views The product name The references to other projects. A collection of Undocumented flag relating to assembly signing dotnet pack: Specifies the type of the repository. Default is "git" dotnet pack: Specifies the URL for the repository where the source code for the package resides and/or from which it's being built. The runtime framework version The runtime identifiers Optional runtime options to override the default settings The net core sdk True if the assembly is signed during compilation The projects build targets. A collection of dotnet pack: A human-friendly title of the package, typically used in UI displays as on nuget.org and the Package Manager in Visual Studio. If not specified, the package ID is used instead. The projects target frameworks The warnings to specifically treat as errors True if wanrings will be treated as errors during compilation The project version Compiler warning level True if it should pack it as global tool Represents the project properties for a .Net Framework project file A project package reference The package name The package version returns any package specific target framework These assets will be consumed but won't flow to the parent project For example, build-time only dependencies These assets will be consumed These assets will not be consumed Extension methods for parsing msbuild projects (csproj, vbproj, fsproj) Checks if the project is a library the parsed project true if the project is a library Check if a parsed project is a library or exe CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsLibrary()) { ... } Checks if the project is for a global tool the parsed project true if the project is a global tool Check if a parsed project is a global tool CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsGlobalTool()) { ... } Checks if the project is a `dotnet test` compatible project the parsed project true if the project is a dotnet test compatible project Check if a parsed project is a dotnet test compatible project CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsDotNetCliTestProject()) { ... } Checks if the project is a pre `dotnet test` compatible project the parsed project true if the project is a pre `dotnet test` compatible project Check if a parsed project is a pre `dotnet test` compatible project CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsFrameworkTestProject()) { ... } Checks if the project is a test compatible project the parsed project true if the project is a test compatible project Check if a parsed project is a test compatible project CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsTestProject()) { ... } Checks if the project is an xunit test compatible project the parsed project true if the project is an xunit test compatible project Check if a parsed project is an xunit test compatible project CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsXUnitTestProject()) { ... } Checks if the project is an fsunit test compatible project the parsed project true if the project is an fsunit test compatible project Check if a parsed project is an fsunit test compatible project CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsFsUnitTestProject()) { ... } Checks if the project is an NUnit test compatible project the parsed project true if the project is an NUnit test compatible project Check if a parsed project is an NUnit test compatible project CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsNUnitTestProject()) { ... } Checks if the project is an Expecto test compatible project the parsed project true if the project is an Expecto test compatible project Check if a parsed project is an Expecto test compatible project CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsExpectoTestProject()) { ... } Checks if the project is an fixie test compatible project the parsed project true if the project is a fixie test compatible project Check if a parsed project is an fixie test compatible project CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsFixieTestProject()) { ... } Checks if the project is an MSTest compatible project the parsed project true if the project is an MSTest compatible project Check if a parsed project is an MSTest compatible project CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsMSTestProject()) { ... } Checks if the project is a web application. the parsed project true if the project is a web application Check if a parsed project is a web application CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); if (project.IsWebApplication()) { ... } Returns the parsed projects output assembly extension the parsed project the output assembly's file extension Gets the output assembly extension CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); project.GetExtension(); // ".dll" or ".exe" Gets a parsed projects output assembly path the parsed project the output assembly path Returns the absolute project assembly file path, respects build config and platform settings CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); project.GetAssemblyFilePath(); // returns '/root/project/bin/release/test.dll' NOTE: This does not currently support how runtime identifiers affect outputs Gets a parsed projects output assembly paths for mulit-targeting projects the parsed project the output assembly paths Returns the absolute project assembly file paths, respects explicit project overrides, build config, platform settings and target frameworks CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); project.GetAssemblyFilePaths(); // returns [] { '/root/project/bin/release/net45/test.dll', '/root/project/bin/release/netstandard1.6' NOTE: This does not currently support how runtime identifiers affect outputs Checks the parsed projects type the parsed project the to check true if the project type matches Project Types are not supported in NetCore, this extension is for the Net Framework only Checks the project type CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), "Release"); project.IsType(ProjectType.CSharp); // true Checks for a project package reference by name and optional TargetFramework the parsed project the package name the target framework, if not specified, checks all TargetFrameworks for the package True if package exists in project, otherwise false Checks if the project has an NUnit package CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86"); bool ref = project.HasReference("NUnit"); // true bool ref = project.HasReference("NUnit", "net45"); // false Checks for a project assembly reference by name or alias the parsed project the assembly name True if reference exists in project, otherwise false Checks for a System.Configuration assembly reference CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86"); bool hasConfig = project.HasReference("System.Configuration"); Gets a project package reference the parsed project the package name the specific targetframework, if not specified, returns the package for any TargetFramework The package reference if found Get the NUnit package reference CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86"); PackageReference ref = project.GetReference("NUnit"); string nUnitVersion = ref.Version; PackageReference ref = project.GetReference("NUnit", "netstandard2.0"); string nUnitVersion = ref.Version; Checks for a DotNet Cli Tool Reference by name the parsed project the cli tool reference name True if reference exists in project, otherwise false Checks for a dotnet-xunit cli tool reference CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86"); bool hasConfig = project.HasDotNetCliToolReference("dotnet-xunit"); Gets a project DotNetCliToolReference the parsed project the package name The dotnet cli tool reference if found Get the XUnit Cli tool reference CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86"); DotNetCliToolReference ref = project.GetDotNetCliToolReference("dotnet-xunit"); string xUnitVersion = ref.Version; Gets a project assembly reference by name or alias the parsed project the assembly name the project assembly reference if found Get the System.Configuration assembly reference CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86"); ProjectAssemblyReference ref = project.GetReference("System.Configuration"); string HintPath = ref.HintPath; Gets any project property by name. Useful for getting non-standard properties in the CustomProjectParserResult type the parsed project the project propertyName the project property value if found Gets a project property by name, will return any config/platform specific values if they exist CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86"); string propValue = project.GetProjectProperty("DocumentationFile"); Parses a csproj file into a strongly typed object using the specified build configuration and default platform (AnyCpu) the cake context the project filepath the build configuration The parsed project Defaults to 'AnyCPU' platform, use overload to override this default Returns the project information specific to a build configuration CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), configuration: "Release"); Parses a csproj file into a strongly typed object using the specified build configuration and target platform the cake context the project filepath the build configuration the build platform The parsed project Returns the project information specific to a build configuration CustomParseProjectResult project = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86"); Gets the output assembly paths for solution or project files, for a specific build configuration the cake context the solution or project file the build configuration the list of output assembly paths Throws if the file is not a recognizable solution or project file The project or solution's and the build configuration will return the output file/s (dll or exe) for the project and return as an The alias expects a valid `.sln` or a `csproj` file. For a solution // Solution output dll/exe's FilePath[] for 'Release' configuration for platform 'AnyCPU' IEnumerable<FilePath> filePaths = GetOutputAssemblies(new FilePath("test.sln"), "Release"); For a project // Project output dll/exe as FilePath[] for 'Custom' configuration for platform 'AnyCPU' IEnumerable<FilePath> filePaths = GetOutputAssemblies(new FilePath("test.csproj"), "Custom"); Gets the output assembly paths for solution or project files, for a specific build configuration the cake context the solution or project file the build configuration the platform the list of output assembly paths Throws if the file is not a recognizable solution or project file The project or solution's and the build configuration will return the output file/s (dll or exe) for the project and return as an The alias expects a valid `.sln` or a `csproj` file. For a solution // Solution output dll/exe's FilePath[] for 'Release' configuration for 'x86' platform IEnumerable<FilePath> filePaths = GetOutputAssemblies(new FilePath("test.sln"), "Release", "x86"); For a project // Project output dll/exe as FilePath[] for 'Custom' configuration for 'x64' platform IEnumerable<FilePath> filePaths = GetOutputAssemblies(new FilePath("test.csproj"), "Custom", "x64"); Gets the output assembly paths for a solution file, for a specific build configuration the cake context the solution file the build configuration the list of output assembly paths Throws if the file is not a recognizable solution file The Solution's and the build configuration will return the output files (dll or exe) for the projects and return as an The alias expects a valid `.sln` file. // Solution project's output dll/exe's for the 'Release' configuration and 'AnyCPU' platform IEnumerable<FilePath> filePaths = GetOutputAssemblies(new FilePath("test.sln"), "Release"); Gets the output assembly paths for a solution file, for a specific build configuration the cake context the solution file the build configuration the platform the list of output assembly paths Throws if the file is not a recognizable solution file The Solution's and the build configuration will return the output files (dll or exe) for the projects and return as an The alias expects a valid `.sln` file. // Solution project's output dll/exe's for the 'Release' configuration and 'x64' platform IEnumerable<FilePath> filePaths = GetOutputAssemblies(new FilePath("test.sln"), "Release", "x64"); Gets the output assembly path for a project file, for a specific build configuration the cake context the project file the build configuration the output assembly path Throws if the file is not a recognizable project file The project's and the build configuration will return the output file (dll or exe) for the project and return as a The alias expects a valid project file. // Project output dll/exe as FilePath[] for 'Custom' configuration IEnumerable<FilePath> filePaths = GetOutputAssemblies(new FilePath("test.csproj"), "Custom"); Gets the output assembly path for a project file, for a specific build configuration the cake context the project file the build configuration the output assembly path Throws if the file is not a recognizable project file The project's and the build configuration will return the output file (dll or exe) for the project and return as a The alias expects a valid project file. // Project output dll/exe as FilePath[] for 'Custom' configuration for AnyCPU platform IEnumerable<FilePath> filePaths = GetOutputAssemblies(new FilePath("test.csproj"), "Custom"); Gets the output assembly path for a project file, for a specific build configuration the cake context the project file the build configuration the platform the output assembly path Throws if the file is not a recognizable project file The project's and the build configuration will return the output file (dll or exe) for the project and return as a The alias expects a valid project file. // Project output dll/exe as FilePath[] for 'Debug' configuration and AnyCPU platform IEnumerable<FilePath> filePaths = GetOutputAssemblies(new FilePath("test.csproj"), "Custom", "AnyCPU"); Parses a csproj file into a strongly typed object The parsed project the project file the build configuration the build configuration platform, defaults to AnyCPU if not specified The parsed project Returns the project information specific to a build configuration CustomParseProjectResult project = new File("./test.csproj").ParseProject(configuration: "Release", platform: "x86"); Class which describes the Path to a Visual Studio Project. Initializes a new instance of the class. The path to the project file. Gets or sets the path to the Project file. Gets a value indicating whether the Project Path is to an actual file. Visual Studio project types Class to contain a list of the Project Type ID's that exist within the Visual Studio eco-system. MSBuild Project Xml Element XNames original source: https://github.com/cake-build/cake/blob/main/src/Cake.Common/Solution/Project/ProjectXElement.cs Optional runtime options to override the default settings The runtime option for server GC The runtime option for retaining vm GC The runtime option for min thread pool threads The runtime option for max thread pool threads The runtime option for concurrent GC Several extension methods when using SolutionParser. Checks if a SolutionProject is of type SolutionFolder the solutionproject true if the project is a solution folder Identifies a SolutionProject as a solution folder type // test.sln { proj1.csproj, solutionFolder } var projects = ParseSolution(new FilePath("test.sln")).Projects; projects[0].IsSolutionFolder(); // false projects[1].IsSolutionFolder(); // true Checks the SolutionProject type The solutionproject The type to check true if the project type matches Gets the SolutionProjects, excluding any SolutionFolders The SolutionProject collection The SolutionProjects Gets an absolute assembly path for a project SolutionProjectResult result = ParseSolution(new FilePath("test.sln")); result.GetProjects(); Gets the output assembly path for a SolutionProject The solutionproject The parsed project The SolutionProject output assembly path Gets an absolute assembly path for a project var projects = ParseSolution(new FilePath("test.sln")).GetProjects(); project[0].GetAssemblyFilePath(); Several extension methods when using String. Case-insensitive String.Equals the source string the string to compare true if strings are the same Case-insensitive String.StartsWith the source string the string to compare true if string starts with the value to check Case-insensitive String.EndsWith the source string the string to compare true if string ends with the value to check Several extension methods when using XDocument. Gets the first output path value for a specific config from an xml document The xml document the configuration the root directory for any relative assembly paths the platform the target frameworks expected (affects output paths) the output path Checks if an xml document for the dot net sdk attribute The xml document True if attribute was found gets the first matching element value, if a config is passed, it will only match an element with the specified config and platform condition. the platform defaults to AnyCPU the document the element name to match the configuration to match the platform to match, default is AnyCPU the matching element value if found gets the first matching element value, if a config is passed, it will only match an element with the specified config and platform condition. the platform defaults to AnyCPU the parent element the element name to match the configuration to match the platform to match, default is AnyCPU the matching element value if found checks the element for a config condition attribute. If not found, also check the parent the element the optional config value to match the optional platform value to match true if a matching condition is found Gets the first (in document order) attribute with the specified . The element. The to match. If set to true case will be ignored whilst searching for the . A that matches the specified , or null.