Microsoft.CodeAnalysis.Workspaces.MSBuild
An API for loading msbuild project files.
Create a new instance of an .
The workspace whose services this should use.
An optional dictionary of additional MSBuild properties and values to use when loading projects.
These are the same properties that are passed to msbuild via the /property:<n>=<v> command line argument.
The MSBuild properties used when interpreting project files.
These are the same properties that are passed to msbuild via the /property:<n>=<v> command line argument.
Determines if metadata from existing output assemblies is loaded instead of opening referenced projects.
If the referenced project is already opened, the metadata will not be loaded.
If the metadata assembly cannot be found the referenced project will be opened instead.
Determines if unrecognized projects are skipped when solutions or projects are opened.
A project is unrecognized if it either has
a) an invalid file path,
b) a non-existent project file,
c) has an unrecognized file extension or
d) a file extension associated with an unsupported language.
If unrecognized projects cannot be skipped a corresponding exception is thrown.
Associates a project file extension with a language name.
The project file extension to associate with .
The language to associate with . This value
should typically be taken from .
Loads the for the specified solution file, including all projects referenced by the solution file and
all the projects referenced by the project files.
The path to the solution file to be loaded. This may be an absolute path or a path relative to the
current working directory.
An optional that will receive updates as the solution is loaded.
An optional to allow cancellation of this operation.
Loads the from the specified project file and all referenced projects.
The first in the result corresponds to the specified project file.
The path to the project file to be loaded. This may be an absolute path or a path relative to the
current working directory.
An optional that will be used to resolve project references to existing projects.
This is useful when populating a custom .
An optional that will receive updates as the project is loaded.
An optional to allow cancellation of this operation.
An ordered list of paths to project files that should be loaded. In the case of a solution,
this is the list of project file paths in the solution.
Global MSBuild properties to set when loading projects.
Map of s, project paths, and output file paths.
Progress reporter.
Provides options for how failures should be reported when loading requested project files.
Provides options for how failures should be reported when loading any discovered project files.
When true, metadata is preferred for any project reference unless the referenced project is already loaded
because it was requested.
This type helps produces lists of metadata and project references. Initially, it contains a list of metadata references.
As project references are added, the metadata references that match those project references are removed.
The full list of s.
A map of every metadata reference file paths to a set of indices whether than file path
exists in the list. It is expected that there may be multiple metadata references for the
same file path in the case where multiple extern aliases are provided.
A set of indeces into that are to be removed.
Returns true if a metadata reference with the given file path is contained within this list.
Removes the metadata reference with the given file path from this list.
A workspace that can be populated by opening MSBuild solution and project files.
Create a new instance of a workspace that can be populated by opening solution and project files.
Create a new instance of a workspace that can be populated by opening solution and project files.
An optional set of MSBuild properties used when interpreting project files.
These are the same properties that are passed to msbuild via the /property:<n>=<v> command line argument.
Create a new instance of a workspace that can be populated by opening solution and project files.
The used to configure this workspace.
Create a new instance of a workspace that can be populated by opening solution and project files.
The MSBuild properties used when interpreting project files.
These are the same properties that are passed to msbuild via the /property:<n>=<v> command line argument.
The used to configure this workspace.
The MSBuild properties used when interpreting project files.
These are the same properties that are passed to msbuild via the /property:<n>=<v> command line argument.
Diagnostics logged while opening solutions, projects and documents.
Determines if metadata from existing output assemblies is loaded instead of opening referenced projects.
If the referenced project is already opened, the metadata will not be loaded.
If the metadata assembly cannot be found the referenced project will be opened instead.
Determines if unrecognized projects are skipped when solutions or projects are opened.
An project is unrecognized if it either has
a) an invalid file path,
b) a non-existent project file,
c) has an unrecognized file extension or
d) a file extension associated with an unsupported language.
If unrecognized projects cannot be skipped a corresponding exception is thrown.
Associates a project file extension with a language name.
Close the open solution, and reset the workspace to a new empty solution.
Open a solution file and all referenced projects.
The path to the solution file to be opened. This may be an absolute path or a path relative to the
current working directory.
An optional that will receive updates as the solution is opened.
An optional to allow cancellation of this operation.
Open a project file and all referenced projects.
The path to the project file to be opened. This may be an absolute path or a path relative to the
current working directory.
An optional that will receive updates as the project is opened.
An optional to allow cancellation of this operation.
Handles conversions from MSBuild values.
Represents a source file that is part of a project file.
The absolute path to the document file on disk.
A fictional path to the document, relative to the project.
The document may not actually exist at this location, and is used
to represent linked documents. This includes the file name.
True if the document has a logical path that differs from its
absolute file path.
True if the file was generated during build.
The of this document.
Create a from a ProjectReference node in the MSBuild file.
Represents a project file loaded from disk.
The path to the project file.
The error message produced when a failure occurred attempting to access the project file.
If a failure occurred the project file info will be inaccessible.
Gets project file information asynchronously. Note that this can produce multiple
instances of if the project is multi-targeted: one for
each target framework.
Gets the corresponding extension for a source file of a given kind.
Add a source document to a project file.
Remove a source document from a project file.
Add a metadata reference to a project file.
Remove a metadata reference from a project file.
Add a reference to another project to a project file.
Remove a reference to another project from a project file.
Add an analyzer reference to the project file.
Remove an analyzer reference from the project file.
Save the current state of the project file to disk.
Resolves the given path that is possibly relative to the project directory.
The resulting path is absolute but might not be normalized.
Provides information about a project that has been loaded from disk and
built with MSBuild. If the project is multi-targeting, this represents
the information from a single target framework.
The language of this project.
The path to the project file for this project.
The path to the output file this project generates.
The path to the reference assembly output file this project generates.
The default namespace of the project ("" if not defined, which means global namespace),
or null if it is unknown or not applicable.
Right now VB doesn't have the concept of "default namespace". But we conjure one in workspace
by assigning the value of the project's root namespace to it. So various feature can choose to
use it for their own purpose.
In the future, we might consider officially exposing "default namespace" for VB project
(e.g. through a "defaultnamespace" msbuild property)
The target framework of this project.
This takes the form of the 'short name' form used by NuGet (e.g. net46, netcoreapp2.0, etc.)
The command line args used to compile the project.
The source documents.
The additional documents.
The analyzer config documents.
References to other projects.
The error message produced when a failure occurred attempting to get the info.
If a failure occurred some or all of the information may be inaccurate or incomplete.
Associates a project file extension with a language name.
Represents a reference to another project file.
The path on disk to the other project file.
This path may be relative to the referencing project's file or an absolute path.
The aliases assigned to this reference, if any.
Various operations that occur during a project load.
Represents the MSBuild evaluation of a project. This occurs before
to evalute the project file before any tasks are executed.
Represents the MSBuild design-time build of a project. This build does not produce any
any compiled binaries, but computes the information need to compile the project, such
as compiler flags, source files and references.
Represents a resolution step that occurs after the MSBuild design-time build. This step
performs final logic to resolve metadata and project references and produces the information
needed to populate a .
Provides details as a project is loaded.
The project for which progress is being reported.
The operation that has just completed.
The target framework of the project being built or resolved. This property is only valid for SDK-style projects
during the operation.
The amount of time elapsed for this operation.
A map of projects that can be optionally used with when loading a
project into a custom . To use, pass to .
A map of project path to s. Note that there can be multiple s per project path
if the project is multi-targeted -- one for each target framework.
A map of project path to s. Note that there can be multiple s per project path
if the project is multi-targeted -- one for each target framework.
A map of to the output file of the project (if any).
A map of to the output ref file of the project (if any).
Create an empty .
Create a populated with the given .
The to populate the new with.
Add a to this .
The to add to this .
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to Duplicate project discovered and skipped: {0}.
Looks up a localized string similar to Found project reference without a matching metadata reference: {0}.
Looks up a localized string similar to Found project with the same file path and output path as another project: {0}.
Looks up a localized string similar to Msbuild failed when processing the file '{0}'.
Looks up a localized string similar to Msbuild failed when processing the file '{0}' with message: {1}.
Looks up a localized string similar to Project does not contain '{0}' target..
Looks up a localized string similar to Unresolved metadata reference removed from project: {0}.