summaryrefslogtreecommitdiff
path: root/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/versioning.targets
diff options
context:
space:
mode:
Diffstat (limited to '.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/versioning.targets')
-rwxr-xr-x.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/versioning.targets398
1 files changed, 398 insertions, 0 deletions
diff --git a/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/versioning.targets b/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/versioning.targets
new file mode 100755
index 0000000000..bdd2c41820
--- /dev/null
+++ b/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/versioning.targets
@@ -0,0 +1,398 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <UsingTask TaskName="GenerateCurrentVersion" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
+
+ <!-- Setup the default file version information -->
+ <PropertyGroup>
+ <MajorVersion Condition="'$(MajorVersion)' == ''">1</MajorVersion>
+ <MinorVersion Condition="'$(MinorVersion)' == ''">0</MinorVersion>
+
+ <!-- These should be set by importing the targets below but initializing to 0 for consistency -->
+ <BuildNumberMajor Condition="'$(BuildNumberMajor)' == ''">0</BuildNumberMajor>
+ <BuildNumberMinor Condition="'$(BuildNumberMinor)' == ''">0</BuildNumberMinor>
+ </PropertyGroup>
+
+ <!-- Import a build target that includes the build numbers -->
+ <Import Project="$(BuildNumberTarget)" Condition="Exists('$(BuildNumberTarget)')" />
+
+ <!-- #################################### -->
+ <!-- Generate Assembly Info -->
+ <!-- #################################### -->
+ <PropertyGroup>
+ <AssemblyVersion Condition="'$(AssemblyVersion)'==''">1.0.0.0</AssemblyVersion>
+ <CLSCompliant Condition="'$(CLSCompliant)'==''">false</CLSCompliant>
+ <AssemblyFileVersion Condition="'$(AssemblyFileVersion)'==''">$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)</AssemblyFileVersion>
+ </PropertyGroup>
+
+ <Import Project="$(MSBuildThisFileDirectory)versioning.props" Condition="'$(BuildToolsVersioningPropsHasBeenImported)' != 'true'" />
+
+ <PropertyGroup>
+ <GenerateAssemblyInfo Condition="'$(GenerateAssemblyInfo)'==''">true</GenerateAssemblyInfo>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(GenerateAssemblyInfo)'=='true'">
+ <AssemblyInfoFile Condition="'$(MSBuildProjectExtension)' == '.csproj'">$(IntermediateOutputPath)_AssemblyInfo.cs</AssemblyInfoFile>
+ <AssemblyInfoFile Condition="'$(MSBuildProjectExtension)' == '.vbproj'">$(IntermediateOutputPath)_AssemblyInfo.vb</AssemblyInfoFile>
+ <AssemblyInfoPartialFile Condition="'$(MSBuildProjectExtension)' == '.csproj'">$(MSBuildThisFileDirectory)AssemblyInfoPartial.cs</AssemblyInfoPartialFile>
+ <AssemblyInfoPartialFile Condition="'$(MSBuildProjectExtension)' == '.vbproj'">$(MSBuildThisFileDirectory)AssemblyInfoPartial.vb</AssemblyInfoPartialFile>
+ <AssemblyInfoPartialFileLink Condition="'$(MSBuildProjectExtension)' == '.csproj'">Properties/_AssemblyInfo.cs</AssemblyInfoPartialFileLink>
+ <AssemblyInfoPartialFileLink Condition="'$(MSBuildProjectExtension)' == '.vbproj'">My Project/_AssemblyInfo.vb</AssemblyInfoPartialFileLink>
+ <CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateAssemblyInfo</CoreCompileDependsOn>
+ </PropertyGroup>
+
+ <Target Name="DecideIfWeNeedToIncludeDllSafeSearchPathAttribute"
+ Condition="'$(IsDotNetFrameworkProductAssembly)' == 'true' AND '$(IsTestProject)' != 'true'">
+
+ <!-- We want to apply the IncludeDllSafeSearchPathAttribute on all DotNet assemblies (non test) that have a reference to System.Runtime.InteropServices -->
+ <PropertyGroup Condition="'$(IncludeDllSafeSearchPathAttribute)'==''">
+ <IncludeDllSafeSearchPathAttribute>false</IncludeDllSafeSearchPathAttribute> <!-- We don't need to include it by default. -->
+ <IncludeDllSafeSearchPathAttribute Condition="'%(ProjectReference.Filename)'=='System.Runtime.InteropServices'">true</IncludeDllSafeSearchPathAttribute>
+ <IncludeDllSafeSearchPathAttribute Condition="'%(Reference.Identity)'=='System.Runtime.InteropServices'">true</IncludeDllSafeSearchPathAttribute>
+ </PropertyGroup>
+ </Target>
+
+ <PropertyGroup>
+ <_GenerateAssemblyInfoTargetsFilePath Condition="'$(UsingMicrosoftNETSdk)' == 'true'">GenerateAssemblyInfo.Sdk.targets</_GenerateAssemblyInfoTargetsFilePath>
+ <_GenerateAssemblyInfoTargetsFilePath Condition="'$(UsingMicrosoftNETSdk)' != 'true'">GenerateAssemblyInfo.NonSdk.targets</_GenerateAssemblyInfoTargetsFilePath>
+ </PropertyGroup>
+
+ <Import Project="$(_GenerateAssemblyInfoTargetsFilePath)" />
+
+ <ItemGroup Condition="'$(GenerateAssemblyInfo)'=='true' AND '$(StringResourcesPath)' != '' AND '$(ExcludeAssemblyInfoPartialFile)' != 'true'">
+ <Compile Include="$(AssemblyInfoPartialFile)">
+ <Visible>true</Visible>
+ <Link>$(AssemblyInfoPartialFileLink)</Link>
+ </Compile>
+ </ItemGroup>
+
+ <PropertyGroup>
+ <GenerateNativeVersionInfo Condition="'$(GenerateNativeVersionInfo)'==''">false</GenerateNativeVersionInfo>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(GenerateNativeVersionInfo)'=='true'">
+ <NativeVersionFileDir>$(RootIntermediateOutputPath)</NativeVersionFileDir>
+ <NativeVersionHeaderFile>$(NativeVersionFileDir)_version.h</NativeVersionHeaderFile>
+ <GenerateVersionHeader>true</GenerateVersionHeader>
+ </PropertyGroup>
+
+ <Target Name="GenerateVersionHeader"
+ Inputs="$(MSBuildProjectFile)"
+ Outputs="$(NativeVersionHeaderFile)"
+ DependsOnTargets="CreateVersionFileDuringBuild"
+ Condition="'$(NativeVersionHeaderFile)'!='' and '$(GenerateVersionHeader)'=='true' and !Exists($(NativeVersionHeaderFile))">
+
+ <ItemGroup>
+ <!-- Defining versioning variables -->
+ <NativeVersionLines Include="#ifndef VER_COMPANYNAME_STR" />
+ <NativeVersionLines Include="#define VER_COMPANYNAME_STR &quot;Microsoft Corporation&quot;" />
+ <NativeVersionLines Include="#endif" />
+ <NativeVersionLines Include="#ifndef VER_FILEDESCRIPTION_STR" />
+ <NativeVersionLines Include="#define VER_FILEDESCRIPTION_STR &quot;$(AssemblyName)&quot;" />
+ <NativeVersionLines Include="#endif" />
+ <NativeVersionLines Include="#ifndef VER_INTERNALNAME_STR" />
+ <NativeVersionLines Include="#define VER_INTERNALNAME_STR VER_FILEDESCRIPTION_STR" />
+ <NativeVersionLines Include="#endif" />
+ <NativeVersionLines Include="#ifndef VER_ORIGINALFILENAME_STR" />
+ <NativeVersionLines Include="#define VER_ORIGINALFILENAME_STR VER_FILEDESCRIPTION_STR" />
+ <NativeVersionLines Include="#endif" />
+ <NativeVersionLines Include="#ifndef VER_PRODUCTNAME_STR" />
+ <NativeVersionLines Include="#define VER_PRODUCTNAME_STR &quot;Microsoft\xae .NET Framework&quot;" />
+ <NativeVersionLines Include="#endif" />
+ <NativeVersionLines Include="#undef VER_PRODUCTVERSION" />
+ <NativeVersionLines Include="#define VER_PRODUCTVERSION $(MajorVersion),$(MinorVersion),$(BuildNumberMajor),$(BuildNumberMinor)" />
+ <NativeVersionLines Include="#undef VER_PRODUCTVERSION_STR" />
+ <NativeVersionLines Include="#define VER_PRODUCTVERSION_STR &quot;$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)$(BuiltByString)&quot;" />
+ <NativeVersionLines Include="#undef VER_FILEVERSION" />
+ <NativeVersionLines Include="#define VER_FILEVERSION $(MajorVersion),$(MinorVersion),$(BuildNumberMajor),$(BuildNumberMinor)" />
+ <NativeVersionLines Include="#undef VER_FILEVERSION_STR" />
+ <NativeVersionLines Include="#define VER_FILEVERSION_STR &quot;$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)$(BuiltByString)&quot;" />
+ <NativeVersionLines Include="#ifndef VER_LEGALCOPYRIGHT_STR" />
+ <NativeVersionLines Include="#define VER_LEGALCOPYRIGHT_STR &quot;\xa9 Microsoft Corporation. All rights reserved.&quot;" />
+ <NativeVersionLines Include="#endif" />
+ <NativeVersionLines Include="#ifndef VER_DEBUG" />
+ <NativeVersionLines Condition="'$(Configuration)'=='Debug'" Include="#define VER_DEBUG VS_FF_DEBUG" />
+ <NativeVersionLines Condition="'$(Configuration)'!='Debug'" Include="#define VER_DEBUG 0" />
+ <NativeVersionLines Include="#endif" />
+ </ItemGroup>
+
+ <MakeDir Directories="$(NativeVersionFileDir)" />
+
+ <WriteLinesToFile
+ File="$(NativeVersionHeaderFile)"
+ Lines="@(NativeVersionLines)"
+ Overwrite="true" />
+
+ <ItemGroup>
+ <FileWrites Include="$(NativeVersionHeaderFile)" />
+ </ItemGroup>
+ </Target>
+
+ <PropertyGroup Condition="'$(GenerateVersionSourceFile)'=='true'">
+ <NativeVersionSourceDir>$(RootIntermediateOutputPath)</NativeVersionSourceDir>
+ <NativeVersionSourceFile>$(NativeVersionSourceDir)version.c</NativeVersionSourceFile>
+ </PropertyGroup>
+
+ <!-- Non Windows versioning requires to generate a source file and include it on the compilation. -->
+ <Target Name="GenerateVersionSourceFile"
+ Inputs="$(MSBuildProjectFile)"
+ Outputs="$(NativeVersionSourceFile)"
+ DependsOnTargets="CreateVersionFileDuringBuild"
+ Condition="'$(NativeVersionSourceFile)'!='' and '$(GenerateVersionSourceFile)'=='true'">
+
+ <ItemGroup>
+ <SourceFileLines />
+ <SourceFileLines Include="static char sccsid%5B%5D %5F%5Fattribute%5F%5F%28%28used%29%29 %3D %22%40%28%23%29Version $(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)$(BuiltByString)%22%3B" />
+ <!-- Since this is a source file, compiler will complain if there is no new line at end of file, so adding one bellow. -->
+ <SourceFileLines Include=" " />
+ </ItemGroup>
+
+ <MakeDir Directories="$(NativeVersionSourceDir)" />
+
+ <WriteLinesToFile
+ File="$(NativeVersionSourceFile)"
+ Lines="@(SourceFileLines)"
+ Overwrite="true" />
+
+ <ItemGroup>
+ <FileWrites Include="$(NativeVersionSourceFile)" />
+ </ItemGroup>
+ </Target>
+
+ <PropertyGroup>
+ <GetNuGetPackageVersionsDependsOn>$(GetNuGetPackageVersionsDependsOn);CreateVersionInfoFile</GetNuGetPackageVersionsDependsOn>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <SyncInfoDirectory Condition="'$(SyncInfoDirectory)' == ''">$(RootIntermediateOutputPath)</SyncInfoDirectory>
+ <SyncInfoFile Condition="'$(SyncInfoFile)' == ''">$(SyncInfoDirectory)version.txt</SyncInfoFile>
+ </PropertyGroup>
+
+ <Target Name="CreateVersionInfoFile"
+ DependsOnTargets="CreateVersionFileDuringBuild"
+ BeforeTargets="BuildAllProjects"
+ Inputs="$(LatestCommit)"
+ Outputs="$(SyncInfoFile)">
+ <MakeDir Directories="$(SyncInfoDirectory)" />
+ <WriteLinesToFile
+ Condition="'$(LatestCommit)' != ''"
+ File="$(SyncInfoFile)"
+ Lines="$(LatestCommit)"
+ Overwrite="true" />
+ </Target>
+
+ <!--
+ Target: CreateOrUpdateCurrentVersionFile
+
+ Generates the version data and saves it to $(BuildVersionFile) if it hasn't been imported
+
+ Outputs:
+ $(LatestCommit)
+ $(BuiltByString)
+ $(BuildNumberMajor)
+ $(BuildNumberMinor)
+ $(AssemblyFileVersion)
+ -->
+ <Target Name="CreateOrUpdateCurrentVersionFile"
+ BeforeTargets="ResolveProjectReferences"
+ Condition="'$(SkipVersionGeneration)' != 'true' AND '$(VersionPropsImported)' != 'true'">
+
+ <!-- ############################### -->
+ <Exec Command="git describe --all HEAD 2>&amp;1" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true" Condition="'$(RawGitBranchName)' == ''">
+ <Output TaskParameter="ConsoleOutput" PropertyName="RawGitBranchName" />
+ </Exec>
+
+ <!-- ############################### -->
+ <PropertyGroup Condition="'$(LatestCommit)' != ''">
+ <LatestCommitExitCode>0</LatestCommitExitCode>
+ </PropertyGroup>
+
+ <!-- Get the latest commit hash -->
+ <Exec Command="git rev-parse HEAD 2>&amp;1" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true" Condition="'$(LatestCommit)' == ''">
+ <Output TaskParameter="ConsoleOutput" PropertyName="LatestCommit" />
+ <Output TaskParameter="ExitCode" PropertyName="LatestCommitExitCode" />
+ </Exec>
+
+ <!-- We shouldn't fail the build if we can't retreive the commit hash, so in this case just set it to N/A -->
+ <PropertyGroup Condition="'$(LatestCommitExitCode)'!='0'">
+ <LatestCommit>N/A</LatestCommit>
+ </PropertyGroup>
+
+ <!-- If things match expected patterns, create $(GitBranchName) from $(RawGitBranchName) -->
+ <Message Text="GIT Branch Name as seen by git describe: '$(RawGitBranchName)'" />
+ <PropertyGroup Condition="$(RawGitBranchName.StartsWith('heads/'))">
+ <GitBranchName>$(RawGitBranchName.SubString(6))</GitBranchName>
+ </PropertyGroup>
+ <PropertyGroup Condition="$(RawGitBranchName.StartsWith('remotes/origin/'))">
+ <GitBranchName>$(RawGitBranchName.SubString(15))</GitBranchName>
+ </PropertyGroup>
+ <Message Text="GIT Branch Name: '$(GitBranchName)'" />
+
+ <!-- The GitHubOwnerName is the name of the entity that 'owns' a particular github repository (e.g the 'dotnet in https://github/dotnet/coreclr) -->
+ <!-- we assume by default that these build tools are used by the 'dotnet' group. This can be overridden. -->
+ <PropertyGroup Condition="'$(GitHubOwnerName)' == ''">
+ <GitHubOwnerName>dotnet</GitHubOwnerName>
+ </PropertyGroup>
+
+ <!-- The GitHubRepositoryUrl is formed out of the simple GitHubRepositoryName (e.g. coreclr or corefx) -->
+ <PropertyGroup Condition="'$(GitHubOwnerName)' != '' AND '$(GitHubRepositoryName)' != '' AND '$(GitHubRepositoryUrl)' == ''">
+ <GitHubRepositoryUrl>https://github.com/$(GitHubOwnerName)/$(GitHubRepositoryName)</GitHubRepositoryUrl>
+ </PropertyGroup>
+
+ <!-- ******* SourceLink Support, activated by setting $(UseSourceLink) ********* -->
+
+ <!-- Generate the SourceLink file that will be passed to the C# compiler (using ProjectDir and GitHubRepositoryUrl as data) -->
+ <MakeDir Directories="$(RootIntermediateOutputPath)" />
+ <WriteLinesToFile
+ Condition="'$(UseSourceLink)' == 'true' AND '$(GitHubRepositoryUrl)' != '' AND '$(LatestCommit)' != 'N/A' AND !Exists('$(SourceLinkFilePath)')"
+ ContinueOnError="WarnAndContinue"
+ File="$(SourceLinkFilePath)"
+ Overwrite="true"
+ Lines='{"documents": { "$(ProjectDir.Replace("\", "\\"))*" : "$(GitHubRepositoryUrl.Replace("github.com", "raw.githubusercontent.com"))/$(LatestCommit)/*" }}' />
+
+ <PropertyGroup>
+ <LatestCommitExitCode/>
+ </PropertyGroup>
+
+ <!-- ############################### -->
+ <!-- Get the latest commit date -->
+ <ItemGroup>
+ <VersionTargetsFile Include="$(MSBuildThisFileFullPath)" />
+ </ItemGroup>
+ <!-- Windows Exec command requires DOS escaping for the percent sign since it secretly runs the process in a shell instead of calling createprocess. -->
+ <PropertyGroup>
+ <LatestDateCommand Condition="'$(RunningOnUnix)'!='true'">git show -s --format=^%25%25cd --date=short HEAD</LatestDateCommand>
+ <LatestDateCommand Condition="'$(RunningOnUnix)'=='true'">git show -s --format=%25cd --date=short HEAD</LatestDateCommand>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(VersionSeedDate)' != ''">
+ <LatestDateCommandExitCode>0</LatestDateCommandExitCode>
+ </PropertyGroup>
+
+ <Exec Command="$(LatestDateCommand)" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true" Condition="'$(VersionSeedDate)' == ''">
+ <Output TaskParameter="ConsoleOutput" PropertyName="VersionSeedDate" />
+ <Output TaskParameter="ExitCode" PropertyName="LatestDateCommandExitCode" />
+ </Exec>
+ <PropertyGroup Condition="'$(LatestDateCommandExitCode)'!='0'">
+ <VersionSeedDate>%(VersionTargetsFile.ModifiedTime)</VersionSeedDate>
+ <VersionSeedSourceComment>VersionSeedDate was produced by getting the timestamp of versioning.targets.</VersionSeedSourceComment>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(LatestDateCommandExitCode)'=='0'">
+ <VersionSeedSourceComment>VersionSeedDate was produced by taking the timestamp of the last git commit.</VersionSeedSourceComment>
+ </PropertyGroup>
+ <ItemGroup>
+ <VersionTargetsFile Remove="@(VersionTargetsFile)" />
+ </ItemGroup>
+ <PropertyGroup>
+ <LatestDateCommand/>
+ <LatestDateCommandExitCode/>
+ </PropertyGroup>
+
+ <!-- ############################### -->
+ <!-- Get Username -->
+ <PropertyGroup>
+ <VersionUserName Condition="'$(VersionUserName)' == ''">$(USERNAME)</VersionUserName>
+ </PropertyGroup>
+
+ <Exec Command="whoami" Condition="'$(VersionUserName)' == ''" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true">
+ <Output TaskParameter="ConsoleOutput" PropertyName="VersionUserName" />
+ </Exec>
+
+ <!-- ############################### -->
+ <!-- Get Hostname -->
+ <PropertyGroup>
+ <VersionHostName Condition="'$(VersionHostName)' == ''">$(COMPUTERNAME)</VersionHostName>
+ </PropertyGroup>
+
+ <Exec Command="hostname" Condition="'$(RunningOnUnix)'=='true' AND '$(VersionHostName)'==''" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true">
+ <Output TaskParameter="ConsoleOutput" PropertyName="VersionHostName" />
+ </Exec>
+
+ <!-- Set BuiltByString (which is added to the end of the informational version) -->
+ <!-- This string has additional information as well (like the GIT commit URL) -->
+ <!-- and has the general form @Name1: Value1 @Name2: Value2 ... which makes it easy to parse -->
+ <PropertyGroup Condition="'$(BuiltByString)' == ''">
+ <!-- Set the @BuiltBy key-value pair -->
+ <BuiltByString Condition="'$(VersionUserName)' != '' AND '$(VersionHostName)' != ''">$(BuiltByString) %40BuiltBy: $(VersionUserName)-$(VersionHostName)</BuiltByString>
+ <!-- Set the @Branch key-value pair -->
+ <BuiltByString Condition="'$(GitBranchName)' != ''">$(BuiltByString) %40Branch: $(GitBranchName)</BuiltByString>
+ <!-- Set the @SrcCode key-value pair -->
+ <BuiltByString Condition="'$(GitHubRepositoryUrl)' != '' AND '$(LatestCommit)' != 'N/A'">$(BuiltByString) %40SrcCode: $(GitHubRepositoryUrl)/tree/$(LatestCommit)</BuiltByString>
+ <!-- If that does not work, try setting the @Commit key-value pair -->
+ <BuiltByString Condition="'$(GitHubRepositoryUrl)' == '' AND '$(LatestCommit)' != 'N/A'">$(BuiltByString) %40Commit: $(LatestCommit)</BuiltByString>
+ <VersionUserName/>
+ <VersionHostName/>
+ </PropertyGroup>
+
+ <!-- Setting default parameters in case that they are not set before. -->
+ <PropertyGroup>
+ <!-- Padding should be equal or greater to 5. Using 5 to align with internal build system. -->
+ <VersionPadding Condition="'$(VersionPadding)'==''">5</VersionPadding>
+ <!-- Using the following default comparison date will produce versions that align with our internal build system. -->
+ <VersionComparisonDate Condition="'$(VersionComparisonDate)'==''">1996-04-01</VersionComparisonDate>
+ </PropertyGroup>
+
+ <GenerateCurrentVersion SeedDate="$(VersionSeedDate)" OfficialBuildId="$(OfficialBuildId)" ComparisonDate="$(VersionComparisonDate)" Padding="$(VersionPadding)">
+ <Output PropertyName="BuildNumberMajor" TaskParameter="GeneratedVersion" />
+ <Output PropertyName="BuildNumberMinor" TaskParameter="GeneratedRevision" />
+ </GenerateCurrentVersion>
+ <PropertyGroup>
+ <VersionPadding/>
+ <VersionComparisonDate/>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <VersionFileContent>
+ <![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<!-- This is a generated file. $(VersionSourceComment) Seed Date is $(VersionSeedDate). -->
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VersionPropsImported>true</VersionPropsImported>
+ <BuildNumberMajor Condition="'%24(BuildNumberMajor)' == ''">$(BuildNumberMajor)</BuildNumberMajor>
+ <BuildNumberMinor Condition="'%24(BuildNumberMinor)' == ''">$(BuildNumberMinor)</BuildNumberMinor>
+ <LatestCommit Condition="'%24(LatestCommit)' == ''">$(LatestCommit)</LatestCommit>
+ <BuiltByString Condition="'%24(BuiltByString)' == ''">$(BuiltByString)</BuiltByString>
+ </PropertyGroup>
+</Project>
+]]>
+ </VersionFileContent>
+ </PropertyGroup>
+
+ <!-- Since by default the file will get dropped at the obj dir, make sure that the dir is created already or else WriteLinesToFile will error. -->
+ <MakeDir Directories="$(BuildVersionFilePath)" />
+
+ <WriteLinesToFile
+ ContinueOnError="WarnAndContinue"
+ Condition="!Exists('$(BuildVersionFile)')"
+ File="$(BuildVersionFile)"
+ Lines="$(VersionFileContent)"
+ Overwrite="true" />
+
+ <!-- Delete old BuildVersion.props files -->
+ <ItemGroup>
+ <OldBuildVersionFiles Include="$(BuildVersionFilePath)BuildVersions-*.props" Exclude="$(BuildVersionFile)" />
+ </ItemGroup>
+ <Delete Files="@(OldBuildVersionFiles)" TreatErrorsAsWarnings="true"/>
+ <ItemGroup>
+ <OldBuildVersionFiles Remove="@(OldBuildVersionFiles)"/>
+ </ItemGroup>
+
+ <PropertyGroup>
+ <!-- Redefine AssemblyFileVersion because we just computed it. -->
+ <AssemblyFileVersion>$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)</AssemblyFileVersion>
+ </PropertyGroup>
+ </Target>
+
+ <!-- This target will only be executed if BuildVersion.props doesn't exist yet -->
+ <Target Name="CreateVersionFileDuringBuild" Condition="'$(SkipVersionGeneration)'!='true' AND '$(ShouldCreateVersionFileDuringBuild)'=='true'" DependsOnTargets="CreateOrUpdateCurrentVersionFile">
+ <PropertyGroup Condition="'$(SkipVersionGeneration)'!='true'">
+ <VersionSuffix Condition="'$(PreReleaseLabel)' != ''">-$(PreReleaseLabel)</VersionSuffix>
+ <VersionSuffix Condition="'$(IncludeBuildNumberInPackageVersion)' == 'true'">$(VersionSuffix)-$(BuildNumberMajor)-$(BuildNumberMinor)</VersionSuffix>
+ </PropertyGroup>
+ </Target>
+
+ <Target Name="NativeResourceCompile" DependsOnTargets="$(BeforeResourceCompileTargets)" Inputs="$(MsBuildThisFileDirectory)NativeVersion.rc" Outputs="$(Win32Resource)">
+ <Error Condition="!Exists('$(RCPATH)')" Text="NativeResourceCompile failed because RCPath is set to an non-existing rc.exe path." />
+
+ <Exec Command='"$(RCPath)" /i $(RootIntermediateOutputPath) /i $(IntermediateOutputPath) /i $(WindowsSDKPath)\inc /i $(VCSDKPath)\Include /D _UNICODE /D UNICODE /l"0x0409" /r /fo "$(Win32Resource)" "$(MsBuildThisFileDirectory)NativeVersion.rc"' />
+ </Target>
+</Project>