Click or drag to resize

Project Class



Represents a project that is part of a Solution.
Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysisProject

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis.Workspaces (in Microsoft.CodeAnalysis.Workspaces.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public class Project

The Project type exposes the following members.

Properties
  NameDescription
Public propertyAdditionalDocumentIds
All the additional document IDs associated with this project.
Public propertyAdditionalDocuments
All the additional documents associated with this project.
Public propertyAllProjectReferences
The list of all other projects that this project references, including projects that are not part of the solution.
Public propertyAnalyzerOptions
The options used by analyzers for this project.
Public propertyAnalyzerReferences
The list of all the diagnostic analyzer references for this project.
Public propertyAssemblyName
The name of the assembly this project represents.
Public propertyCompilationOptions
The options used when building the compilation for this project.
Public propertyDocumentIds
All the document IDs associated with this project.
Public propertyDocuments
All the documents associated with this project.
Public propertyFilePath
The path to the project file or null if there is no project file.
Public propertyHasDocuments
True if the project has any documents.
Public propertyId
The ID of the project. Multiple Project instances may share the same ID. However, only one project may have this ID in any given solution.
Public propertyIsSubmission
Returns true if this is a submission project.
Public propertyLanguage
The language associated with the project.
Public propertyLanguageServices
The language services from the host environment associated with this project's language.
Public propertyMetadataReferences
The list of all other metadata sources (assemblies) that this project references.
Public propertyName
The name of the project. This may be different than the assembly name.
Public propertyOutputFilePath
The path to the output file, or null if it is not known.
Public propertyParseOptions
The options used when parsing documents for this project.
Public propertyProjectReferences
The list of all other projects within the same solution that this project references.
Public propertySolution
The solution this project is part of.
Public propertySupportsCompilation
true
if this Project supports providing data through the GetCompilationAsync(CancellationToken) method. If
false
then this method will return
null
instead.
Public propertyVersion
The project version. This equates to the version of the project file.
Top
Methods
  NameDescription
Public methodAddAdditionalDocument(String, SourceText, IEnumerableT, Void)
Public methodAddAdditionalDocument(String, String, IEnumerableT, Void)
Public methodAddAnalyzerReference
Creates a new instance of this project updated to include the specified analyzer reference in addition to already existing ones.
Public methodAddAnalyzerReferences
Public methodAddDocument(String, SyntaxNode, IEnumerableT, Void)
Public methodAddDocument(String, SourceText, IEnumerableT, Void)
Public methodAddDocument(String, String, IEnumerableT, Void)
Public methodAddMetadataReference
Creates a new instance of this project updated to include the specified metadata reference in addition to already existing ones.
Public methodAddMetadataReferences
Public methodAddProjectReference
Creates a new instance of this project updated to include the specified project reference in addition to already existing ones.
Public methodAddProjectReferences
Public methodContainsAdditionalDocument
True if the project contains an additional document with the specified ID.
Public methodContainsDocument
True if the project contains a document with the specified ID.
Public methodGetAdditionalDocument
Get the additional document in this project with the specified document Id.
Public methodGetChanges
Gets an object that lists the added, changed and removed documents between this project and the specified project.
Public methodGetCompilationAsync
Public methodGetDependentSemanticVersionAsync
Public methodGetDependentVersionAsync
Public methodGetDocument(DocumentId)
Get the document in this project with the specified document Id.
Public methodGetDocument(SyntaxTree)
Get the document in this project with the specified syntax tree.
Public methodGetDocumentId
Get the documentId in this project with the specified syntax tree.
Public methodGetLatestDocumentVersionAsync
Public methodGetSemanticVersionAsync
Public methodRemoveAdditionalDocument
Creates a new instance of this project updated to no longer include the specified additional document.
Public methodRemoveAnalyzerReference
Creates a new instance of this project updated to no longer include the specified analyzer reference.
Public methodRemoveDocument
Creates a new instance of this project updated to no longer include the specified document.
Public methodRemoveMetadataReference
Creates a new instance of this project updated to no longer include the specified metadata reference.
Public methodRemoveProjectReference
Creates a new instance of this project updated to no longer include the specified project reference.
Public methodTryGetCompilation
Tries to get the cached Compilation for this project if it has already been created and is still cached. In almost all cases you should call GetCompilationAsync(CancellationToken) which will either return the cached Compilation or create a new one otherwise.
Public methodWithAnalyzerReferences
Public methodWithAssemblyName
Creates a new instance of this project updated to have the new assembly name.
Public methodWithCompilationOptions
Creates a new instance of this project updated to have the specified compilation options.
Public methodWithMetadataReferences
Public methodWithParseOptions
Creates a new instance of this project updated to have the specified parse options.
Public methodWithProjectReferences
Top
See Also