Guid Class | MSBuild Extension Pack Help 4.0.12.0 |
Valid TaskActions are:
Create (Output: GuidString, FormattedGuidString)
CreateCrypto (Output: GuidString, FormattedGuidString)
Remote Execution Support: NA
Inheritance Hierarchy
MSBuild.ExtensionPackBaseTask
MSBuild.ExtensionPack.FrameworkGuid
Namespace: MSBuild.ExtensionPack.Framework
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0
The Guid type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Guid |
Properties
Name | Description | |
---|---|---|
FormattedGuidString |
32 digits separated by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
| |
GuidString |
32 digits: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
Examples
<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath> <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath> </PropertyGroup> <Import Project="$(TPath)"/> <Target Name="Default"> <!-- Create a new Guid and get the formatted and unformatted values --> <MSBuild.ExtensionPack.Framework.Guid TaskAction="Create"> <Output TaskParameter="FormattedGuidString" PropertyName="FormattedGuidString1" /> <Output TaskParameter="GuidString" PropertyName="GuidStringItem" /> </MSBuild.ExtensionPack.Framework.Guid> <Message Text="GuidStringItem: $(GuidStringItem)"/> <Message Text="FormattedGuidString: $(FormattedGuidString1)"/> <!-- Create a new cryptographically strong Guid and get the formatted and unformatted values --> <MSBuild.ExtensionPack.Framework.Guid TaskAction="CreateCrypto"> <Output TaskParameter="FormattedGuidString" PropertyName="FormattedGuidString1" /> <Output TaskParameter="GuidString" PropertyName="GuidStringItem" /> </MSBuild.ExtensionPack.Framework.Guid> <Message Text="GuidStringItem Crypto: $(GuidStringItem)"/> <Message Text="FormattedGuidString Crypto: $(FormattedGuidString1)"/> </Target> </Project>
See Also