Freigeben über


Project.MarkDirty Method

Marks this project as modified.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:  Microsoft.Build.Evaluation
Assembly:  Microsoft.Build (in Microsoft.Build.dll)

Syntax

'Declaration
Public Sub MarkDirty
public void MarkDirty()
public:
void MarkDirty()
member MarkDirty : unit -> unit
public function MarkDirty()

Remarks

It is seldom necessary to call this method explicitly, because all edits affecting a project automatically mark it as modified.

Sometimes, however, this method must be called. For example, a project may have an Import element whose condition depends on a file that exists on a disk. If that file does not exist at evaluation time, and it is created after evaluation, then the project must be explicitly marked as modified.

The ReevaluateIfNecessary method uses this property to determine if an evaluation is necessary.

.NET Framework Security

See Also

Reference

Project Class

Microsoft.Build.Evaluation Namespace