共用方式為


ProjectRootElement.DirectoryPath Property

Definition

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.

public:
 property System::String ^ DirectoryPath { System::String ^ get(); };
public string DirectoryPath { get; }
[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public string DirectoryPath { get; }
member this.DirectoryPath : string
[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.DirectoryPath : string
Public ReadOnly Property DirectoryPath As String

Property Value

The directory path, which is never null. If the project is not loaded from disk, returns the current directory at the time the project was loaded.

Attributes

Remarks

This method is required for evaluating relative paths.

Applies to