-
Notifications
You must be signed in to change notification settings - Fork 48
/
after.InstrumentationEngine.sln.targets
26 lines (25 loc) · 1.25 KB
/
after.InstrumentationEngine.sln.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Msbuild supports solution build hooks with
$(MSBuildProjectDirectory)\before.{SolutionFile}.sln.targets
and
$(MSBuildProjectDirectory)\after.{SolutionFile}.sln.targets.
-->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), EnlistmentRoot.marker))\build\Common.props" />
<Target Name="GenerateVersionFile" AfterTargets="Build">
<PropertyGroup>
<VersionFile Condition="'$(VersionFile)'==''">version.txt</VersionFile>
<VersionFilePath>$(BinConfiguration)\$(VersionFile)</VersionFilePath>
</PropertyGroup>
<!-- Write new version to intermediate file if the version is different. -->
<MakeDir Directories="$(BinConfiguration)" />
<WriteLinesToFile File="$(VersionFilePath)"
Lines="$(ReleaseVersion)"
Overwrite="true"
WriteOnlyWhenDifferent="true"/>
<Message Importance="high" Text="Writing '$(VersionFilePath)' with version '$(ReleaseVersion)'" />
</Target>
</Project>