ProjectRootElement.Version Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Version number of this object. A host can compare this to a stored version number to determine whether a project's XML has changed, even if it has also been saved since.
The actual value is meaningless: an edit may increment it more than once, so it should only be compared to a stored value.
public:
property int Version { int get(); };
public int Version { get; }
public int Version { [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
member this.Version : int
[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.Version : int
Public ReadOnly Property Version As Integer
Property Value
The version number of this object.
- Attributes
Remarks
Used by the Project class to figure whether changes have occurred that it might want to pick up by reevaluation.
Used by the ProjectRootElement class to determine whether it needs to save.
This number is unique to the appdomain. That means that it is possible to know when a ProjectRootElement has been unloaded (perhaps after modification) and reloaded -- the version won't reset to '0'.
We're assuming we don't have over 2 billion edits.