-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.props
27 lines (22 loc) · 1.04 KB
/
Directory.Build.props
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
27
<Project>
<PropertyGroup>
<UseArtifactsOutput>true</UseArtifactsOutput>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.fsproj'">
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.fsproj'">
<PackageReference Include="FSharp.Core" IsImplicitilyDefined="true" />
</ItemGroup>
<!--
Set `Version` property from `/release-version.txt`.
Do it only for build, but not for restore, to ensure that lock files have the default 1.0.0 version for project dependencies.
I am not sure how it works, but see: https://stackoverflow.com/a/58987087/10033660
-->
<Target Name="SetVersionForBuild" BeforeTargets="BeforeResolveReferences">
<ReadLinesFromFile File="$(MSBuildThisFileDirectory)release-version.txt">
<Output TaskParameter="Lines" PropertyName="Version" />
</ReadLinesFromFile>
</Target>
</Project>