-
Notifications
You must be signed in to change notification settings - Fork 795
/
Copy pathFSharpSource.Settings.targets
252 lines (205 loc) · 14.9 KB
/
FSharpSource.Settings.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- If Configuration is empty that means we are not being built in VS and so folks need to explicitly pass the different
values for $(ConfigurationGroup), $(TargetGroup), or $(OSGroup) or accept the defaults for them.
-->
<PropertyGroup Condition="'$(Configuration)'==''">
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
<Configuration>$(ConfigurationGroup)</Configuration>
<Configuration Condition="'$(TargetGroup)'!=''">$(TargetGroup)_$(Configuration)</Configuration>
<Configuration Condition="'$(OSGroup)'!='' and '$(OSGroup)'!='AnyOS'">$(OSGroup)_$(Configuration)</Configuration>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'!=''">
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.ToLower().EndsWith('debug'))">Debug</ConfigurationGroup>
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.ToLower().EndsWith('release'))">Release</ConfigurationGroup>
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
</PropertyGroup>
<!-- Version number computation -->
<PropertyGroup>
<FSCoreVersion>4.4.3.0</FSCoreVersion>
<FSProductVersion>10.1.1.0</FSProductVersion>
<FSPackageVersion>10.1.4</FSPackageVersion>
<VSAssemblyVersion>15.6.0.0</VSAssemblyVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Put build number 0 and today's date if this was a local build -->
<BUILD_BUILDNUMBER Condition="'$(BUILD_BUILDNUMBER)' == ''">$([System.DateTime]::Now.ToString(yyyyMMdd.0))</BUILD_BUILDNUMBER>
<!--
Given $(BUILD_BUILDNUMBER) = '20161225.1'
Then $(_Build_Year) = 2016
Then $(_Build_Month) = 12
Then $(_Build_Day) = 25
Then $(_Build_Number) = 1
Then $(Build_FileVersion) = 2016.12.25.1
-->
<_Build_Year>$(BUILD_BUILDNUMBER.Substring(0, 4))</_Build_Year>
<_Build_Month>$(BUILD_BUILDNUMBER.Substring(4, 2))</_Build_Month>
<_Build_Day>$(BUILD_BUILDNUMBER.Substring(6, 2))</_Build_Day>
<_Build_Number>$(BUILD_BUILDNUMBER.Substring(9))</_Build_Number>
<Build_FileVersion>$(_Build_Year).$(_Build_Month).$(_Build_Day).$(_Build_Number)</Build_FileVersion>
<MicroBuildAssemblyVersion Condition="'$(MicroBuildAssemblyVersion)' == ''">$(FSCoreVersion)</MicroBuildAssemblyVersion>
<!-- certain delivered F# VS assemblies use a specific MicroBuildAssemblyVersion, otherwise use FSCoreVersion -->
<MicroBuildAssemblyVersion Condition="'$(UseFSharpProductVersion)' == 'true'">$(FSProductVersion)</MicroBuildAssemblyVersion>
<!-- certain delivered F# VS assemblies use a specific MicroBuildAssemblyVersion, otherwise use FSCoreVersion -->
<MicroBuildAssemblyVersion Condition="'$(UseVsMicroBuildAssemblyVersion)' == 'true'">$(VSAssemblyVersion)</MicroBuildAssemblyVersion>
<!--
Given $(BUILD_BUILDNUMBER) = '20161225.1'
Given $(MicroBuildAssemblyVersion) = '15.4.1.0'
Then $(BuildTimeStamp_Date) = 161225
Then $(BuildTimeStamp_Number) = 01
Then $(BuildTimeStamp) = 16122501
Then $(MicroBuildAssemblyVersion_WithoutRevision) = 15.4.1
Then $(VsixPackageVersion) = 15.4.1.16122501
Then $(NuGetPackageVersionSuffix) = 161225-01
-->
<BuildTimeStamp_Date>$(BUILD_BUILDNUMBER.Split('.')[0].Substring(2))</BuildTimeStamp_Date>
<BuildTimeStamp_Number>$(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0'))</BuildTimeStamp_Number>
<BuildTimeStamp>$(BuildTimeStamp_Date)$(BuildTimeStamp_Number)</BuildTimeStamp>
<MicroBuildAssemblyVersion_WithoutRevision>$(MicroBuildAssemblyVersion.Substring(0, $(MicroBuildAssemblyVersion.LastIndexOf('.'))))</MicroBuildAssemblyVersion_WithoutRevision>
<VsixPackageVersion>$(MicroBuildAssemblyVersion_WithoutRevision).$(BuildTimeStamp)</VsixPackageVersion>
<NuGetPackageVersionSuffix>$(BuildTimeStamp_Date)-$(BuildTimeStamp_Number)</NuGetPackageVersionSuffix>
</PropertyGroup>
<PropertyGroup>
<!-- Settings used all the time -->
<Tailcalls>true</Tailcalls>
<TargetDotnetProfile Condition="'$(TargetDotnetProfile)'==''">net40</TargetDotnetProfile>
<!-- Currently always use .NET Framwork proto compiler -->
<ProtoFlavour Condition="'$(ProtoFlavour)' == ''">net40</ProtoFlavour>
<ProjectLanguage Condition="'$(ProjectLanguage)' == ''">FSharp</ProjectLanguage>
<DebugSymbols>true</DebugSymbols>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<BuildToolsTargets45>true</BuildToolsTargets45>
<WarningsAsErrors />
<RoslynVSPackagesVersion>15.0.26201</RoslynVSPackagesVersion>
<SystemCollectionsImmutableVersion>1.3.1</SystemCollectionsImmutableVersion>
<VSSDK_BUILDTOOLS_VERSION>Microsoft.VSSDK.BuildTools.15.1.192</VSSDK_BUILDTOOLS_VERSION>
<MicrosoftVisualStudioThreadingVersion>15.3.23</MicrosoftVisualStudioThreadingVersion>
<MicrosoftVisualStudioValidationVersion>15.3.15</MicrosoftVisualStudioValidationVersion>
<MicrosoftDiaSymReaderPackageVersion>1.1.0</MicrosoftDiaSymReaderPackageVersion>
<MicrosoftDiaSymReaderPortablePdbPackageVersion>1.2.0</MicrosoftDiaSymReaderPortablePdbPackageVersion>
<!-- Always qualify the IntermediateOutputPath by the TargetDotnetProfile if any exists -->
<IntermediateOutputPath>obj\$(Configuration)\$(TargetDotnetProfile)\</IntermediateOutputPath>
<IntermediateOutputPath Condition="'$(PortableProfileBeingReferenced)' != ''">obj\$(Configuration)\$(TargetDotnetProfile)\$(PortableProfileBeingReferenced)\</IntermediateOutputPath>
<!-- Frozen FSharp.Core package being built with this build -->
<FSharpCore41TargetPackageVersion>4.1.19</FSharpCore41TargetPackageVersion>
<FSharpCore41TargetMajorVersion>4.1</FSharpCore41TargetMajorVersion>
<FSharpCoreLatestTargetPackageVersion>4.3.5</FSharpCoreLatestTargetPackageVersion>
<FSharpCoreLatestTargetMajorVersion>4.3</FSharpCoreLatestTargetMajorVersion>
<!-- Frozen FSharp.Core package -->
<FSharpCoreFrozenPortablePackageVersion>10.1.0</FSharpCoreFrozenPortablePackageVersion>
<FSharpCoreFrozenPortableTargetPackageVersion>10.2.0</FSharpCoreFrozenPortableTargetPackageVersion>
<FSharpCoreFrozenPortableTargetMajorVersion>10.1</FSharpCoreFrozenPortableTargetMajorVersion>
<!-- Nunit -->
<NUnitVersion>3.5.0</NUnitVersion>
<NUnitFullVersion>3.5.0.0</NUnitFullVersion>
<NUnitLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\net45</NUnitLibDir>
<NUnitToolsLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.ConsoleRunner\$(NUnitVersion)\tools\</NUnitToolsLibDir>
<MonoPackaging Condition="'$(TargetDotnetProfile)' != 'coreclr' AND '$(OS)' == 'Unix'">true</MonoPackaging>
<DependencyUptakePackageVersionPropsFile>$(MSBuildThisFileDirectory)..\Tools\dependencyUptake\PackageVersions.props</DependencyUptakePackageVersionPropsFile>
<!-- Localization -->
<DisableLocalization Condition="'$(MonoPackaging)' == 'true'">true</DisableLocalization>
<UpdateXlfOnBuild Condition="'$(CI)' != '1'">true</UpdateXlfOnBuild>
<XliffTasksVersion>0.2.0-beta-000081</XliffTasksVersion>
</PropertyGroup>
<Import Project="$(DependencyUptakePackageVersionPropsFile)" Condition="Exists('$(DependencyUptakePackageVersionPropsFile)')" />
<!-- Default setting. Some get modified later in FSharpSource.targets -->
<PropertyGroup>
<SkipSigning>false</SkipSigning>
<UseOpenSourceSign>true</UseOpenSourceSign>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
<StrongNames>true</StrongNames>
<DelaySign>true</DelaySign>
</PropertyGroup>
<!-- On windows, VS packaging -->
<PropertyGroup Condition="'$(MonoPackaging)' != 'true' AND '$(OS)' != 'Unix'">
<UseMicroBuild>true</UseMicroBuild>
<UseSourceLink Condition = " '$(UseSourceLink)' == '' AND '$(Configuration)'=='Release' ">false</UseSourceLink>
<UseGatherBinaries>true</UseGatherBinaries>
<VsSDKInstall Condition=" '$(VsSDKInstall)' == '' ">$(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk</VsSDKInstall>
<VsSDKToolPath Condition=" '$(VsSDKToolPath)' == '' ">$(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\bin</VsSDKToolPath>
<VsSDKTargets Condition=" '$(VsSDKTargets)' == '' ">$(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\Microsoft.VsSDK.targets</VsSDKTargets>
<VsSDKIncludes Condition=" '$(VsSDKIncludes)' == '' ">$(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\inc</VsSDKIncludes>
<VsixSchemaPath Condition=" '$(VsixSchemaPath)' == '' ">$(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\schemas\VSIXManifestSchema.xsd</VsixSchemaPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(ProjectLanguage)' == 'FSharp' ">
<!-- Things we do only for F# projects -->
<OtherFlags>$(OtherFlags) --times</OtherFlags>
<NoWarn>$(NoWarn);69;65;54;61;75</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<!-- Settings for Debug mode -->
<DebugType>full</DebugType>
<DebugType Condition="'$(OS)' == 'Unix'">portable</DebugType> <!-- no longer use MDB on Mono -->
<Optimize Condition=" '$(Optimize)' == '' ">false</Optimize>
<ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
<OtherFlags>$(OtherFlags) --no-jit-optimize</OtherFlags>
<EmbedAllSource Condition=" '$(DebugType)' == 'portable' or '$(DebugType)' == 'embedded' ">true</EmbedAllSource>
<DefineConstants Condition=" '$(ProjectLanguage)' != 'VisualBasic' ">DEBUG;TRACE;CODE_ANALYSIS;$(DefineConstants)</DefineConstants>
<DefineConstants Condition=" '$(ProjectLanguage)' == 'VisualBasic' ">DEBUG=True,TRACE=True,CODE_ANALYSIS=True,$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<!-- Flags used for Release mode. -->
<DebugType>pdbonly</DebugType>
<DebugType Condition="'$(OS)' == 'Unix'">portable</DebugType> <!-- no longer use MDB on Mono -->
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
<EmbedAllSource>false</EmbedAllSource>
<ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
<DefineConstants Condition=" '$(ProjectLanguage)' != 'VisualBasic' ">TRACE;$(DefineConstants)</DefineConstants>
<DefineConstants Condition=" '$(ProjectLanguage)' == 'VisualBasic' ">TRACE=True,$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Proto'">
<!-- Flags used when running the Proto compiler. -->
<DebugType Condition=" '$(DebugType)' == '' ">full</DebugType>
<DebugType Condition="'$(OS)' == 'Unix'">portable</DebugType> <!-- no longer use MDB on Mono -->
<Optimize>true</Optimize>
<DefineConstants>DEBUG;NO_STRONG_NAMES;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<!-- Standard defaults for output path and warning level -->
<OutputPath Condition="'$(OutputPath)' == ''">bin\$(Configuration)</OutputPath>
<WarningLevel Condition=" '$(WarningLevel)' == '' ">3</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="'$(VisualStudioVersion)'=='12.0' AND '$(ProjectLanguage)' == 'VisualBasic'">$(DefineConstants),VS_VERSION_DEV12=True</DefineConstants>
<DefineConstants Condition="'$(VisualStudioVersion)'=='12.0' AND '$(ProjectLanguage)' != 'VisualBasic'">$(DefineConstants);VS_VERSION_DEV12</DefineConstants>
<DefineConstants Condition="'$(VisualStudioVersion)'=='14.0' AND '$(ProjectLanguage)' == 'VisualBasic'">$(DefineConstants),VS_VERSION_DEV14=True</DefineConstants>
<DefineConstants Condition="'$(VisualStudioVersion)'=='14.0' AND '$(ProjectLanguage)' != 'VisualBasic'">$(DefineConstants);VS_VERSION_DEV14</DefineConstants>
<DefineConstants Condition="'$(VisualStudioVersion)'=='15.0' AND '$(ProjectLanguage)' == 'VisualBasic'">$(DefineConstants),VS_VERSION_DEV15=True</DefineConstants>
<DefineConstants Condition="'$(VisualStudioVersion)'=='15.0' AND '$(ProjectLanguage)' != 'VisualBasic'">$(DefineConstants);VS_VERSION_DEV15</DefineConstants>
<!-- VisualStudioVersion is not defined when using xbuild on Mono. Assume 14.0, the last shipped in-the-box with Mono -->
<DefineConstants Condition="'$(VisualStudioVersion)'=='' AND '$(ProjectLanguage)' == 'VisualBasic'">$(DefineConstants),VS_VERSION_DEV14=True</DefineConstants>
<DefineConstants Condition="'$(VisualStudioVersion)'=='' AND '$(ProjectLanguage)' != 'VisualBasic'">$(DefineConstants);VS_VERSION_DEV14</DefineConstants>
</PropertyGroup>
<!-- Nuget Package properties -->
<PropertyGroup>
<BuildRevision>$([System.DateTime]::Now.ToString(`yyMMdd`))</BuildRevision>
<NuGetReleaseVersion>1.0.0</NuGetReleaseVersion>
<NuGetPreReleaseVersion>$(NuGetReleaseVersion)-rc</NuGetPreReleaseVersion>
<NuGetPerBuildPreReleaseVersion Condition="'$(BuildRevision)' != ''">$(NuGetPreReleaseVersion)-$(BuildRevision.Trim())</NuGetPerBuildPreReleaseVersion>
<NUGET_PACKAGES Condition=" '$(NUGET_PACKAGES)' == '' ">$(MSBuildThisFileDirectory)..\packages</NUGET_PACKAGES>
<RestorePackagesPath>$(NUGET_PACKAGES)</RestorePackagesPath>
</PropertyGroup>
<PropertyGroup>
<!-- Compiler tool locations. -->
<FsLexToolPath>$(FSharpSourcesRoot)\..\packages\FsLexYacc.7.0.6\build</FsLexToolPath>
<FsYaccToolPath>$(FSharpSourcesRoot)\..\packages\FsLexYacc.7.0.6\build</FsYaccToolPath>
<FsiToolExe>fsi.exe</FsiToolExe>
<FsLexToolExe>fslex.exe</FsLexToolExe>
<FsYaccToolExe>fsyacc.exe</FsYaccToolExe>
<!-- FSharp.Compiler.Tools is currently only used to get a working FSI.EXE to execute some scripts during the build -->
<!-- The LKG FSI.EXE requires MSBuild 15 to be installed, which is painful -->
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FsiToolPath>
<!-- The version of MSBuild assumed byt the F# compiler in the Mono packaging of F# -->
<MonoPackagingMSBuildVersionFull>14.0.0.0</MonoPackagingMSBuildVersionFull>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\packages\XliffTasks.$(XliffTasksVersion)\build\XliffTasks.props" Condition="'$(DisableLocalization)' != 'true'" />
<PropertyGroup>
<!-- in addition to the standard xlf languages, also provide a baseline en->en file -->
<XlfLanguages>en;$(XlfLanguages)</XlfLanguages>
</PropertyGroup>
<Import Project="$(RestorePackagesPath)\XliffTasks.$(XliffTasksVersion)\build\XliffTasks.targets" Condition="'$(DisableLocalization)' != 'true'" />
<Import Project="../Tools/Build.Common.props" Condition="'$(TargetDotnetProfile)'=='coreclr'"/>
<Import Project="$(BuildVersionFilePath)" Condition="Exists('$(BuildVersionFilePath)')" />
</Project>