Skip to content

Commit

Permalink
Improve GenerateUniqueIdentifierCs
Browse files Browse the repository at this point in the history
  • Loading branch information
bording committed Aug 25, 2018
1 parent f8e2d42 commit 6969225
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Targets/CodeGenerator.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
</Target>


<Target Name="GenerateUniqueIdentifierCs" Inputs="$(MSBuildThisFileFullPath);$(MSBuildAllProjects);@(Compile)" Outputs="$(UniqueIdentifierPath)" BeforeTargets="CoreCompile" DependsOnTargets="DefineProperties">
<Target Name="GenerateUniqueIdentifierCs" Inputs="$(VersionSourceFile)" Outputs="$(UniqueIdentifierPath)" BeforeTargets="CoreCompile" AfterTargets="GenerateAssemblyVersionInfo" DependsOnTargets="DefineProperties">

<PropertyGroup>
<UniqueIdentifier>$([System.Guid]::NewGuid())</UniqueIdentifier>
<UniqueIdentifier Condition="'$(GitCommitId)' != ''">$(GitCommitId)</UniqueIdentifier>
<UniqueIdSourceLines>
namespace LibGit2Sharp.Core
{
internal static class UniqueId
{
public const string UniqueIdentifier = "$([System.Guid]::NewGuid())"%3b
public const string UniqueIdentifier = "$(UniqueIdentifier)"%3b
}
}
</UniqueIdSourceLines>
Expand Down

0 comments on commit 6969225

Please sign in to comment.