|
8 | 8 | <FSCoreVersionCondition="'$(TargetFramework)' == 'portable47'">3.47.41.0</FSCoreVersion> |
9 | 9 | <FSCoreVersionCondition="'$(TargetFramework)' == 'portable78'">3.78.41.0</FSCoreVersion> |
10 | 10 | <FSCoreVersionCondition="'$(TargetFramework)' == 'portable259'">3.259.41.0</FSCoreVersion> |
| 11 | + |
11 | 12 | </PropertyGroup> |
12 | 13 | <Choose> |
13 | 14 | <WhenCondition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release'"> |
|
18 | 19 | <Choose> |
19 | 20 | <WhenCondition="'$(ProjectLanguage)' == 'FSharp'"> |
20 | 21 | <Choose> |
| 22 | +<!-- In the open source "Mono" build we always sign the binaries with the public test.snk, apart from FSharp.Core--> |
| 23 | +<WhenCondition="('$(MonoPackaging)' == 'true') AND ('$(AssemblyName)'!='FSharp.Core') AND ('$(AssemblyName)'!='FSharp.Core.Unittests')" > |
| 24 | + <PropertyGroup> |
| 25 | + <OtherFlags>$(OtherFlags) --keyfile:"$(FSharpSourcesRoot)\fsharp\test.snk"</OtherFlags> |
| 26 | + <DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants> |
| 27 | + <StrongNames>true</StrongNames> |
| 28 | + <MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion> |
| 29 | + <MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage> |
| 30 | + </PropertyGroup> |
| 31 | + </When> |
21 | 32 | <WhenCondition="'$(AssemblyName)' == 'FSharp.Core' or '$(AssemblyName)' == 'FSharp.Build' or '$(AssemblyName)' == 'FSharp.Compiler' or '$(AssemblyName)' == 'FSharp.Compiler.Interactive.Settings' or '$(AssemblyName)' == 'FSharp.Compiler.Server.Shared' or '$(AssemblyName)' == 'fsc' or '$(AssemblyName)' == 'fsi' or '$(AssemblyName)' == 'fsiAnyCpu' or '$(AssemblyName)' == 'FSharp.Compiler.Unittests' or '$(AssemblyName)' == 'HostedCompilerServer'" > |
22 | 33 | <PropertyGroupCondition="'$(AssemblyName)' == 'FSharp.Core' and ('$(TargetFramework)' == 'portable47' or '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259' or '$(TargetFramework)' == 'coreclr')"> |
23 | 34 | <IsPortableProfile>true</IsPortableProfile> |
|
88 | 99 | </Otherwise> |
89 | 100 | </Choose> |
90 | 101 |
|
| 102 | + <PropertyGroupCondition="'$(UseMicroBuild)' != 'true'"> |
| 103 | + <OtherFlags >$(OtherFlags) --version:"$(MicroBuildAssemblyVersion)"</OtherFlags> |
| 104 | + </PropertyGroup> |
| 105 | + |
91 | 106 | <PropertyGroupCondition="'$(StrongNames)' != 'true'"> |
92 | 107 | <DefineConstants>NO_STRONG_NAMES;$(DefineConstants)</DefineConstants> |
93 | 108 | </PropertyGroup> |
94 | 109 |
|
| 110 | + |
| 111 | + <PropertyGroupCondition="'$(MonoPackaging)' != 'true'"> |
| 112 | + <DefineConstants>MSBUILD_AT_LEAST_14;$(DefineConstants)</DefineConstants> |
| 113 | + </PropertyGroup> |
| 114 | + |
95 | 115 | <PropertyGroup> |
96 | 116 | <!-- Disable uwa toolchain nuget package resolve logic.--> |
97 | 117 | <NuGetTargetsCondition="'$(NuGetTargets)' == ''">false</NuGetTargets> |
|
108 | 128 | </PropertyGroup> |
109 | 129 |
|
110 | 130 | <PropertyGroupCondition="'$(TargetFramework)'=='net40'"> |
| 131 | + <DefineConstantsCondition="'$(MonoPackaging)' == 'true'">$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants> |
111 | 132 | <DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants> |
112 | 133 | <DefineConstants>$(DefineConstants);BE_SECURITY_TRANSPARENT</DefineConstants> |
113 | 134 | <DefineConstants>$(DefineConstants);FX_LCIDFROMCODEPAGE</DefineConstants> |
|
263 | 284 | <DefineConstants>$(DefineConstants);FX_NO_REGISTERED_WAIT_HANDLES</DefineConstants> |
264 | 285 | <DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants> |
265 | 286 | <DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONSOLE</DefineConstants> |
| 287 | + <DefineConstants>$(DefineConstants);FX_NO_SYSTEM_BINDINGFLAGS</DefineConstants> |
266 | 288 | <DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants> |
267 | 289 | <DefineConstants>$(DefineConstants);FX_NO_TYPECODE</DefineConstants> |
268 | 290 | <DefineConstants>$(DefineConstants);FX_NO_WEB_CLIENT</DefineConstants> |
|
297 | 319 | <DefineConstants>$(DefineConstants);FX_NO_REGISTERED_WAIT_HANDLES</DefineConstants> |
298 | 320 | <DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants> |
299 | 321 | <DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONSOLE</DefineConstants> |
| 322 | + <DefineConstants>$(DefineConstants);FX_NO_SYSTEM_BINDINGFLAGS</DefineConstants> |
300 | 323 | <DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants> |
301 | 324 | <DefineConstants>$(DefineConstants);FX_NO_TPL_PARALLEL</DefineConstants> |
302 | 325 | <DefineConstants>$(DefineConstants);FX_NO_TYPECODE</DefineConstants> |
|
333 | 356 | <DefineConstants>$(DefineConstants);FX_NO_REGISTERED_WAIT_HANDLES</DefineConstants> |
334 | 357 | <DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants> |
335 | 358 | <DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONSOLE</DefineConstants> |
| 359 | + <DefineConstants>$(DefineConstants);FX_NO_SYSTEM_BINDINGFLAGS</DefineConstants> |
336 | 360 | <DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants> |
337 | 361 | <DefineConstants>$(DefineConstants);FX_NO_TPL_PARALLEL</DefineConstants> |
338 | 362 | <DefineConstants>$(DefineConstants);FX_NO_TYPECODE</DefineConstants> |
|
348 | 372 | <PropertyGroup > |
349 | 373 | <OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin</OutputPath> |
350 | 374 | <!-- When using coreclr to bootstrap to proto. We acquire the FSharp.Core LKG, targets LKG, the FSharp.Build LKG from the .NET Framework compiler tools LKG package.--> |
351 | | - <FSharpCoreLkgPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.19\tools</FSharpCoreLkgPath> |
| 375 | + <FSharpCoreLkgPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.21\tools</FSharpCoreLkgPath> |
352 | 376 | <FSharpNetCoreLkgPath>$(FSharpSourcesRoot)\..\Tools\lkg</FSharpNetCoreLkgPath> |
353 | | - <FSharpTargetsPath>..\packages\FSharp.Compiler.Tools.4.0.1.19\tools\Microsoft.FSharp.Targets</FSharpTargetsPath> |
| 377 | + <FSharpTargetsPath>..\packages\FSharp.Compiler.Tools.4.0.1.21\tools\Microsoft.FSharp.Targets</FSharpTargetsPath> |
354 | 378 | <!-- When using coreclr to bootstrap, the compiler binary comes from the coreclr LKG, invoked using corehost.exe--> |
355 | 379 | <FscToolPath>$(FSharpSourcesRoot)\..\Tools\dotnetcli</FscToolPath> |
356 | 380 | <FscToolExeCondition="'$(OS)' != 'Unix'">dotnet.exe</FscToolExe> |
|
362 | 386 | <!-- Use .NET Framework to bootstrap to proto--> |
363 | 387 | <PropertyGroup > |
364 | 388 | <OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin</OutputPath> |
365 | | - <FSharpCoreLkgPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.19\tools</FSharpCoreLkgPath> |
366 | | - <FSharpTargetsPath>..\packages\FSharp.Compiler.Tools.4.0.1.19\tools\Microsoft.FSharp.Targets</FSharpTargetsPath> |
| 389 | + <FSharpCoreLkgPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.21\tools</FSharpCoreLkgPath> |
| 390 | + <FSharpTargetsPath>..\packages\FSharp.Compiler.Tools.4.0.1.21\tools\Microsoft.FSharp.Targets</FSharpTargetsPath> |
367 | 391 | </PropertyGroup> |
368 | 392 | </When> |
369 | 393 | <WhenCondition="'$(BuildWith)' == '' AND ('$(TargetFramework)'=='portable47' OR '$(TargetFramework)'=='portable7' OR '$(TargetFramework)'=='portable78' OR '$(TargetFramework)'=='portable259' OR '$(TargetFramework)'=='coreclr')"> |
|
393 | 417 | <MessageText="FSharpTargetsPath = $(FSharpTargetsPath)" /> |
394 | 418 | <MessageText="FSharpSourcesRoot = $(FSharpSourcesRoot)" /> |
395 | 419 | <MessageText="FscToolPath = $(FscToolPath)" /> |
396 | | - <MessageText="FsSrGenToolPath = $(FsSrGenToolPath)" /> |
397 | 420 | <MessageText="FsiToolPath = $(FsiToolPath)" /> |
398 | 421 | <MessageText="FsLexToolPath = $(FsLexToolPath)" /> |
399 | 422 | <MessageText="FsYaccToolPath = $(FsYaccToolPath)" /> |
|
402 | 425 | <ErrorText="Expect $(FSharpSourcesRoot)\..\Tools\lkg\fsc.exe to exist when BUILD_PROTO_WITH_CORECLR_LKG==1"Condition="'$(BUILD_PROTO_WITH_CORECLR_LKG)' == 1 AND !Exists('$(FSharpSourcesRoot)\..\Tools\lkg\fsc.exe')" /> |
403 | 426 | <ErrorText="Expect $(FscToolPath)\$(FscToolExe) to exist"Condition="!Exists('$(FscToolPath)\$(FscToolExe)')" /> |
404 | 427 | <ErrorText="Expect $(DotnetFscCompilerPath) to exist if non-empty"Condition="'$(DotnetFscCompilerPath)' != '' AND !Exists('$(DotnetFscCompilerPath)')" /> |
405 | | - <ErrorText="Expect $(FsSrGenToolPath)\fssrgen.exe to exist"Condition="!Exists('$(FsSrGenToolPath)\fssrgen.exe')" /> |
406 | 428 | <ErrorText="Expect $(FsiToolPath)\$(FsiToolExe) to exist"Condition="!Exists('$(FsiToolPath)\$(FsiToolExe)')" /> |
407 | 429 | <ErrorText="Expect $(FsLexToolPath)\$(FsLexToolExe) to exist"Condition="!Exists('$(FsLexToolPath)\$(FsLexToolExe)')" /> |
408 | 430 | <ErrorText="Expect $(FsYaccToolPath)\$(FsYaccToolExe) to exist"Condition="!Exists('$(FsYaccToolPath)\$(FsYaccToolExe)')" /> |
|
451 | 473 | Name="CopyAndSubstituteTextFiles" |
452 | 474 | Inputs="@(CopyAndSubstituteText)" |
453 | 475 | Outputs="@(CopyAndSubstituteText->'$(OutDir)%(TargetFilename)')" > |
454 | | - <ExecCommand=""$(FsiToolPath)\$(FsiToolExe)" --exec"$(MSBuildThisFileDirectory)scripts/subst.fsx" --in:"%(CopyAndSubstituteText.FullPath)" --out:"$(OutDir)%(CopyAndSubstituteText.TargetFilename)" --pattern1:"%(CopyAndSubstituteText.Pattern1)" --replacement1:"%(CopyAndSubstituteText.Replacement1)" --pattern2:"%(CopyAndSubstituteText.Pattern2)" --replacement2:"%(CopyAndSubstituteText.Replacement2)"" /> |
| 476 | + <ExecCommand=""$([System.IO.Path]::GetFullPath('$(FsiToolPath)\$(FsiToolExe)'))" --exec"$(MSBuildThisFileDirectory)scripts/subst.fsx" --in:"%(CopyAndSubstituteText.FullPath)" --out:"$(OutDir)%(CopyAndSubstituteText.TargetFilename)" --pattern1:"%(CopyAndSubstituteText.Pattern1)" --replacement1:"%(CopyAndSubstituteText.Replacement1)" --pattern2:"%(CopyAndSubstituteText.Pattern2)" --replacement2:"%(CopyAndSubstituteText.Replacement2)""Condition="'$(OS)' != 'Unix'" /> |
| 477 | + <ExecCommand="mono $([System.IO.Path]::GetFullPath('$(FsiToolPath)\$(FsiToolExe)')) --exec"$(MSBuildThisFileDirectory)scripts/subst.fsx" --in:"%(CopyAndSubstituteText.FullPath)" --out:"$(OutDir)%(CopyAndSubstituteText.TargetFilename)" --pattern1:"%(CopyAndSubstituteText.Pattern1)" --replacement1:"%(CopyAndSubstituteText.Replacement1)" --pattern2:"%(CopyAndSubstituteText.Pattern2)" --replacement2:"%(CopyAndSubstituteText.Replacement2)""Condition="'$(OS)' == 'Unix'" /> |
455 | 478 | <!-- Make sure it will get cleaned--> |
456 | 479 | <CreateItemInclude="$(OutDir)%(CopyAndSubstituteText.TargetFilename)"> |
457 | 480 | <OutputTaskParameter="Include"ItemName="FileWrites"/> |
|