|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <!-- Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.--> |
3 | 3 | <ProjectToolsVersion="4.0"DefaultTargets="Build"xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
4 | | - <PropertyGroup> |
5 | | -<!-- Tail calls on, even in debug--> |
6 | | - <Tailcalls>true</Tailcalls> |
7 | | - <TargetFrameworkCondition="'$(TargetFramework)'==''">net40</TargetFramework> |
8 | | -<!-- For .NET 2.0 use a 2.0 proto compiler, otherwise use a 4.0 proto compiler--> |
9 | | - <protoCLIDirCondition="'$(protoCLIDir)' == ''">net40</protoCLIDir> |
10 | | - <LkgVersion>4.0.30319.1</LkgVersion> |
11 | | - <FsLexUnicode>true</FsLexUnicode> |
12 | | - <ProjectLanguage>FSharp</ProjectLanguage> |
13 | | - <OtherFlags>$(OtherFlags) --times</OtherFlags> |
14 | | - <NoWarn>$(NoWarn);69;65;54;61;75</NoWarn> |
15 | | - <DebugSymbols>true</DebugSymbols> |
16 | | - </PropertyGroup> |
17 | | - |
18 | | -<!-- However FSharp.Core must always use the same version and name as VS, except the revision# is 9055 with delay signing, see below--> |
19 | | - <PropertyGroupCondition="'$(AssemblyName)' != 'FSharp.Core' AND '$(AssemblyName)' != 'FSharp.LanguageService.Compiler'"> |
20 | | - <OtherFlags>$(OtherFlags) --version:4.3.1.9055</OtherFlags> |
21 | | - </PropertyGroup> |
22 | | - |
23 | | - <PropertyGroupCondition="'$(AssemblyName)' == 'FSharp.Core'"> |
24 | | - <OtherFlags>$(OtherFlags) --version:4.3.1.9055</OtherFlags> |
25 | | - <OtherFlagsCondition="'$(TargetFramework)' == 'net20'">$(OtherFlags) --version:2.3.1.9055</OtherFlags> |
26 | | - <OtherFlagsCondition="'$(TargetFramework)' == 'portable47'">$(OtherFlags) --version:2.3.5.9055</OtherFlags> |
27 | | - <OtherFlagsCondition="'$(TargetFramework)' == 'portable7'">$(OtherFlags) --version:3.3.1.9055</OtherFlags> |
28 | | - </PropertyGroup> |
29 | | - |
30 | | -<!-- We sign with the Microsoft key and use delay-signing--> |
31 | | - <PropertyGroupCondition="'$(AssemblyName)' == 'FSharp.Core' AND ('$(Configuration)'=='Debug' OR '$(Configuration)'=='Release') AND ('$(TargetFramework)' == 'net20' OR '$(TargetFramework)' == 'net40' OR '$(TargetFramework)' == 'portable47' OR '$(TargetFramework)' == 'portable7')"> |
32 | | - <DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants> |
33 | | - <OtherFlags>$(OtherFlags) --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags> |
34 | | - <StrongNames>true</StrongNames> |
35 | | - </PropertyGroup> |
36 | | - |
37 | | - <PropertyGroupCondition="'$(AssemblyName)' != 'FSharp.Core' AND ('$(Configuration)'=='Debug' OR '$(Configuration)'=='Release') AND ('$(AssemblyName)'!='FSharp.Core')"> |
38 | | - <DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants> |
39 | | - <OtherFlags>$(OtherFlags) --keyfile:"$(FSharpSourcesRoot)\fsharp\test.snk"</OtherFlags> |
40 | | - <StrongNames>true</StrongNames> |
41 | | - </PropertyGroup> |
| 4 | + <Choose> |
| 5 | + <WhenCondition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release' or '$(Configuration)' == 'VSDebug' or '$(Configuration)' == 'VSRelease'"> |
| 6 | + <Choose> |
| 7 | + <WhenCondition="'$(ProjectLanguage)' == 'FSharp'"> |
| 8 | + <Choose> |
| 9 | + <WhenCondition="'$(AssemblyName)' == 'FSharp.Core'"> |
| 10 | + <PropertyGroup> |
| 11 | + <OtherFlagsCondition="'$(TargetFramework)' != 'net20' AND '$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'portable7'">$(OtherFlags) --version:4.3.1.9055</OtherFlags> |
| 12 | + <OtherFlagsCondition="'$(TargetFramework)' == 'net20'">$(OtherFlags) --version:2.3.1.9055</OtherFlags> |
| 13 | + <OtherFlagsCondition="'$(TargetFramework)' == 'portable47'">$(OtherFlags) --version:2.3.5.9055</OtherFlags> |
| 14 | + <OtherFlagsCondition="'$(TargetFramework)' == 'portable7'">$(OtherFlags) --version:3.3.1.9055</OtherFlags> |
| 15 | + <OtherFlags>$(OtherFlags) --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags> |
| 16 | + <DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants> |
| 17 | + <StrongNames>true</StrongNames> |
| 18 | + </PropertyGroup> |
| 19 | + </When> |
| 20 | + <WhenCondition="'$(AssemblyName)' == 'FSharp.LanguageService' or '$(AssemblyName)' == 'FSharp.LanguageService.Compiler' or '$(AssemblyName)' == 'FSharp.LanguageService.Base' or '$(AssemblyName)' == 'FSharp.Editor' or '$(AssemblyName)' == 'FSharp.VS.FSI' or '$(AssemblyName)' == 'FSharp.ProjectSystem.FSharp'"> |
| 21 | + <PropertyGroup> |
| 22 | + <OtherFlags>$(OtherFlags) --version:12.0.0.9055 --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags> |
| 23 | + <DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants> |
| 24 | + <StrongNames>true</StrongNames> |
| 25 | + </PropertyGroup> |
| 26 | + </When> |
| 27 | + <Otherwise> |
| 28 | + <PropertyGroupCondition="'$(SIGN_WITH_MSFT_KEY)' == 'true'"> |
| 29 | + <OtherFlags>$(OtherFlags) --version:4.3.1.9055 --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags> |
| 30 | + <DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants> |
| 31 | + <StrongNames>true</StrongNames> |
| 32 | + </PropertyGroup> |
| 33 | + <PropertyGroupCondition="'$(SIGN_WITH_MSFT_KEY)' != 'true'"> |
| 34 | + <OtherFlags>$(OtherFlags) --version:4.3.1.9055 --keyfile:"$(FSharpSourcesRoot)\fsharp\test.snk"</OtherFlags> |
| 35 | + <DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants> |
| 36 | + <StrongNames>true</StrongNames> |
| 37 | + </PropertyGroup> |
| 38 | + </Otherwise> |
| 39 | + </Choose> |
| 40 | + </When> |
| 41 | + <Otherwise> |
| 42 | + <PropertyGroup> |
| 43 | + <SignAssembly>true</SignAssembly> |
| 44 | + <AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile> |
| 45 | + <DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants> |
| 46 | + <StrongNames>true</StrongNames> |
| 47 | + <DelaySign>true</DelaySign> |
| 48 | + </PropertyGroup> |
| 49 | + </Otherwise> |
| 50 | + </Choose> |
| 51 | + </When> |
| 52 | + <Otherwise> |
| 53 | + <PropertyGroupCondition="'$(StrongNames)' != 'true'"> |
| 54 | +<!-- For the proto build, portable and Silverlight framework implementations, we don't use strong names.--> |
| 55 | +<!-- For Silverlight, there is no way to disable strong name verification, so using the Microsoft name is not possible--> |
| 56 | + <OtherFlags>$(OtherFlags) --version:4.3.1.9055</OtherFlags> |
| 57 | + <DefineConstants>NO_STRONG_NAMES;$(DefineConstants)</DefineConstants> |
| 58 | + </PropertyGroup> |
| 59 | + </Otherwise> |
| 60 | + </Choose> |
42 | 61 |
|
43 | 62 | <!-- For the proto build, portable and Silverlight framework implementations, we don't use strong names.--> |
44 | 63 | <!-- For Silverlight, there is no way to disable strong name verification, so using the Microsoft name is not possible--> |
|
573 | 592 | <OtherFlags>$(OtherFlags) --simpleresolution -r:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\mscorlib.dll" -r:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.dll"</OtherFlags> |
574 | 593 | </PropertyGroup> |
575 | 594 |
|
576 | | - |
577 | | - |
578 | 595 | <!-- Build with LKG compiler (location is determined by Microsoft.FSharp.targets). The output compiler has suffix "-proto"--> |
579 | | - <PropertyGroupCondition=" '$(BuildWith)' == 'LKG' And '$(ProjectLanguage)' == 'FSharp'"> |
| 596 | + <PropertyGroupCondition=" '$(BuildWith)' == 'LKG' And '$(ProjectLanguage)' == 'FSharp' AND '$(STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY)' == 'true'"> |
| 597 | + <FsBuildSuffix>-proto</FsBuildSuffix> |
| 598 | + <OutputPath>$(FSharpSourcesRoot)\..\vs\$(protoCLIDir)\bin</OutputPath> |
| 599 | + </PropertyGroup> |
| 600 | + <PropertyGroupCondition=" '$(BuildWith)' == 'LKG' And '$(ProjectLanguage)' == 'FSharp' AND '$(STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY)' != 'true'"> |
580 | 601 | <FsBuildSuffix>-proto</FsBuildSuffix> |
581 | 602 | <OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(protoCLIDir)\bin</OutputPath> |
582 | 603 | </PropertyGroup> |
|
637 | 658 | </PropertyGroup> |
638 | 659 | </Otherwise> |
639 | 660 | </Choose> |
640 | | - <ImportProject="$(FSharpTargetsPath)"/> |
| 661 | + <ImportCondition="'$(ProjectLanguage)' == 'FSharp'"Project="$(FSharpTargetsPath)"/> |
641 | 662 |
|
642 | 663 | <!-- Reference an existing FSI.EXE for use from within MSBuild--> |
643 | 664 | <PropertyGroup> |
|
660 | 681 | <TargetName="ValidateConfiguration"> |
661 | 682 | <Error |
662 | 683 | Text="Configuration '$(Configuration)' is not one of the supported configurations: Debug, Release, Proto" |
663 | | -Condition="'$(Configuration)'!='Release' and '$(Configuration)'!='Debug' and '$(Configuration)'!='Proto'"/> |
| 684 | +Condition="'$(Configuration)'!='Release' and '$(Configuration)'!='Debug' and '$(Configuration)'!='VSRelease' and '$(Configuration)'!='VSDebug' and '$(Configuration)'!='Proto'"/> |
664 | 685 | <Error |
665 | 686 | Text="TargetFramework '$(TargetFramework)' is not one of the supported configurations: 'empty', net20, net40, sl3-wp, sl5, sl5-compiler, portable47, portable7, netcore78, netcore259" |
666 | 687 | Condition="! ('$(TargetFramework)' == 'net40' or |
|