Exposes the properties of the current C# project, such as Path, AssemblyReferences, PreprocessorSymbols, Configuration or TargetFramework. To access a custom MSBuild property, use TryGetProperty(string, out string?). You can extend this interface with your own framework-specific by using the Extension<T>() method.
Namespace: Metalama.Framework.Project
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface IProject
Properties
Name | Description |
---|---|
AssemblyName | Gets the name of the assembly produced by the project. |
AssemblyReferences | Gets the list of assembly references of the current project. |
Configuration | Gets the name of the build configuration, for instance |
Name | Gets the project name, i.e. the Path without the directory and without the extension. |
Path | Gets the path to the |
PreprocessorSymbols | Gets the list of defined preprocessor symbols like |
ServiceProvider | Gets an IServiceProvider<TBase> that gives access to the compiler services exposed using the |
TargetFramework | Gets the identifier of the target framework, for instance |
Methods
Name | Description |
---|---|
Extension<T>() | Gets a project extension object or creates a new instance if none has been created before. The type must derive from ProjectExtension and have a default constructor. New instances will be initialized using Initialize(IProject, bool). |
TryGetProperty(string, out string?) | Gets the set of properties passed from MSBuild. To expose an MSBuild property to this collection,
define the |