Skip to content

Commit

Permalink
Implements extended if grammar
Browse files Browse the repository at this point in the history
closes #55

commit 677a7e799fd5350fd166411004a734f56e9c4e4b
Author: latkin <[email protected]>
Date:   Tue Jan 20 11:34:49 2015 -0800

    Update DEVGUIDE and TESTGUIDE to include compiler unit test suite

commit 90f33737381c0932a478746fc566532da862f3c3
Author: latkin <[email protected]>
Date:   Tue Jan 20 11:20:56 2015 -0800

    Simplifying ExtendedIfGrammar tests

commit 78b8ff4e325dc37a6d4ca0777b05a2abe85f961c
Author: latkin <[email protected]>
Date:   Tue Jan 20 11:20:10 2015 -0800

    Adding compilerunit to RunTests.cmd usage

commit ba861296fe847faa217ab76ec1cb76aef7bc4d02
Merge: 28da5c0 42e0766
Author: latkin <[email protected]>
Date:   Tue Jan 20 11:05:01 2015 -0800

    Merge branch 'pr/extended_if_grammar' of https://github.com/mrange/visualfsharp into mrange-pr/extended_if_grammar

    Conflicts:
    	tests/fsharpqa/Source/Conformance/LexicalAnalysis/ConditionalCompilation/ExtendedIfGrammar.fs

commit 28da5c0800a28cc2044a8d3bb4a22751803433aa
Author: latkin <[email protected]>
Date:   Mon Jan 19 18:38:11 2015 -0800

    Removing generated .fs/.fsi files from repo

commit 47b61d5460f4c84c1b985d50ce96d944c8791efa
Author: latkin <[email protected]>
Date:   Mon Jan 19 18:36:15 2015 -0800

    Use dedicated fsharp-compiler-unittests-build.proj so portable/net20 build of library unit tests is not broken

commit 95e1af8c8bac8b4bc6312a171e675392bff67626
Merge: c5e6699 5f8880c
Author: latkin <[email protected]>
Date:   Mon Jan 19 18:14:12 2015 -0800

    Merge branch 'pr/extended_if_grammar' of https://github.com/mrange/visualfsharp into mrange-pr/extended_if_grammar

commit 5f8880c
Author: mrange <[email protected]>
Date:   Sun Jan 18 14:50:47 2015 +0100

    Implements extended if grammar

    Origin: https://fslang.uservoice.com/forums/245727-f-language/suggestions/6079342-allow-extended-if-grammar

    This commit adds the possibility to write condtional compilation expressions like this:
     #if SILVERLIGHT || NETFX
     #endif

    or a bit more advanced:
     #if (SILVERLIGHT || NETFX) && COMPILED || !DEBUG
     #endif

    This commit doesn't add #elif which is an orthogonal problem.
  • Loading branch information
mrange authored and latkin committed Jan 20, 2015
1 parent c5e6699 commit 438eae2
Show file tree
Hide file tree
Showing 24 changed files with 834 additions and 41 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ src/fsharp/FSharp.Compiler/ilpars.fsi
src/fsharp/FSharp.Compiler/lex.fs
src/fsharp/FSharp.Compiler/pars.fs
src/fsharp/FSharp.Compiler/pars.fsi
src/fsharp/FSharp.Compiler/pplex.fs
src/fsharp/FSharp.Compiler/pppars.fs
src/fsharp/FSharp.Compiler/pppars.fsi
src/fsharp/FSharp.Compiler-proto/illex.fs
src/fsharp/FSharp.Compiler-proto/ilpars.fs
src/fsharp/FSharp.Compiler-proto/ilpars.fsi
src/fsharp/FSharp.Compiler-proto/lex.fs
src/fsharp/FSharp.Compiler-proto/pars.fs
src/fsharp/FSharp.Compiler-proto/pars.fsi
src/fsharp/FSharp.Compiler-proto/pplex.fs
src/fsharp/FSharp.Compiler-proto/pppars.fs
src/fsharp/FSharp.Compiler-proto/pppars.fsi
*~
tests/projects/Sample_VS2012_FSharp_ConsoleApp_net45_with_resource/Sample_VS2012_FSharp_ConsoleApp_net45/Sample_VS2012_FSharp_ConsoleApp_net45.sln
tests/projects/Sample_VS2012_FSharp_ConsoleApp_net45_with_resource/Sample_VS2012_FSharp_ConsoleApp_net45/Sample_VS2012_FSharp_ConsoleApp_net45.userprefs
Expand All @@ -68,6 +74,9 @@ src/fsharp/FSharp.LanguageService.Compiler/illex.*
src/fsharp/FSharp.LanguageService.Compiler/ilpars.*
src/fsharp/FSharp.LanguageService.Compiler/lex.*
src/fsharp/FSharp.LanguageService.Compiler/pars.*
src/fsharp/FSharp.LanguageService.Compiler/pplex.fs
src/fsharp/FSharp.LanguageService.Compiler/pppars.fs
src/fsharp/FSharp.LanguageService.Compiler/pppars.fsi
tests/fsharp/typecheck/sigs/*.dll
tests/fsharp/typecheck/sigs/*.exe
vsintegration/src/unittests/Unittests.fsi
Expand Down
2 changes: 2 additions & 0 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Prior to a **Debug** test run, you need to complete **all** of these steps:
msbuild src/fsharp-library-build.proj
msbuild src/fsharp-compiler-build.proj
msbuild src/fsharp-typeproviders-build.proj
msbuild src/fsharp-compiler-unittests-build.proj
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7
Expand Down Expand Up @@ -72,6 +73,7 @@ Prior to a **Release** test run, you need to do **all** of these:
msbuild src/fsharp-library-build.proj /p:Configuration=Release
msbuild src/fsharp-compiler-build.proj /p:Configuration=Release
msbuild src/fsharp-typeproviders-build.proj /p:Configuration=Release
msbuild src/fsharp-compiler-unittests-build.proj /p:Configuration=Release
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
Expand Down
16 changes: 11 additions & 5 deletions TESTGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ The test cases for this suite reside under `tests\fsharp`. This suite dates back
The test cases for this suite reside under `tests\fsharpqa\source`.
This suite was first created when F# 2.0 was being added to Visual Studio 2010. Tests for this suite are driven by the "RunAll" framework, implemented in Perl. This suite is rather large and has broad and deep coverage of a variety of compiler, runtime, and syntax scenarios.

### Compiler and Library Core Unit Test Suite
The test cases for this suite reside next to the F# core library code, at `src\fsharp\FSharp.Core.Unittests`. This suite is a set of standard NUnit test cases, implemented in F#. This suite focuses on validation of the core F# types and the public surface area of `FSharp.Core.dll`.
### Compiler and Library Core Unit Test Suites
The test cases for these suites reside next to the F# core library code, at `src\fsharp\FSharp.Core.Unittests` and `src\fsharp\FSharp.Compiler.Unittests`. These suites are standard NUnit test cases, implemented in F#. The FSharp.Core.Unittests suite focuses on validation of the core F# types and the public surface area of `FSharp.Core.dll`, and the FSharp.Compiler.Unittests suite focuses on validation of compiler internals.

### Visual F# Tools IDE Unit Test Suite
The test cases for this suite reside next to the Visual F# Tools code, at `vsintegration\src\unittests`. This suite is a set of standard NUnit test cases, implemented in F#. This suite exercises a wide range of behaviors in the F# Visual Studio project system and language service.
Expand All @@ -39,6 +39,7 @@ The script `tests\RunTests.cmd` has been provided to make execution of the above
```
RunTests.cmd <debug|release> fsharp [tags to run] [tags not to run]
RunTests.cmd <debug|release> fsharpqa [tags to run] [tags not to run]
RunTests.cmd <debug|release> compilerunit
RunTests.cmd <debug|release> coreunit
RunTests.cmd <debug|release> coreunitportable47
RunTests.cmd <debug|release> coreunitportable7
Expand All @@ -49,7 +50,7 @@ RunTests.cmd <debug|release> ideunit

`RunTests.cmd` sets a handful of environment variables which allow for the tests to work, then puts together and executes the appropriate command line to start the specified test suite.

All test execution logs and result files will be dropped into the `tests\TestResults` folder, and have file names matching `FSharp_*.*`, `FSharpQA_*.*`, `CoreUnit_*.*`, `IDEUnit_*.*`, e.g. `FSharpQA_Results.log` or `FSharp_Failures.log`.
All test execution logs and result files will be dropped into the `tests\TestResults` folder, and have file names matching `FSharp_*.*`, `FSharpQA_*.*`, `CompilerUnit_*.*`, `CoreUnit_*.*`, `IDEUnit_*.*`, e.g. `FSharpQA_Results.log` or `FSharp_Failures.log`.

For the FSharp and FSharpQA suites, the list of test areas and their associated "tags" is stored at

Expand Down Expand Up @@ -94,9 +95,14 @@ Test area directories in this suite will contain a number of source code files a
Test cases will run an optional "pre command," compile some set of source files using some set of flags, optionally run the resulting binary, then optionally run a final "post command."
If all of these steps complete without issue, the test is considered to have passed.

### Core Unit Test Suite
### FSharp.Compiler and FSharp.Core Unit Test Suites

To build the unit test binary, call `msbuild fsharp-library-unittests-build.proj` from the `src` directory. Tests are contained in the binary `FSharp.Core.Unittests.dll`.
To build these unit test binaries, from the `src` directory call

- `msbuild fsharp-compiler-unittests-build.proj`
- Output binary is `FSharp.Compiler.Unittests.dll`
- `msbuild fsharp-library-unittests-build.proj`
- Output binary is `FSharp.Core.Unittests.dll`

You can execute and re-run these tests using any standard NUnit approach - via graphical `nunit.exe` or on the command line via `nunit-console.exe`.

Expand Down
3 changes: 3 additions & 0 deletions src/assemblyinfo/assemblyinfo.FSharp.Compiler.dll.fs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ open System.Reflection

// Note: internals visible to unit test DLLs in Retail (and all) builds.
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Test")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Unittests")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Salsa")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests")>]
Expand All @@ -45,6 +46,7 @@ open System.Reflection
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
#endif

#if STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY
Expand All @@ -62,6 +64,7 @@ open System.Reflection
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
#endif


Expand Down
18 changes: 18 additions & 0 deletions src/fsharp-compiler-unittests-build.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- 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. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0">

<PropertyGroup>
<TargetFramework Condition="'$(TargetFramework)'==''">net40</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectFiles Include="fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj"/>
</ItemGroup>

<Import Project="root.traversal.targets"/>

<!-- Insert any customizations for targets here -->

</Project>

6 changes: 6 additions & 0 deletions src/fsharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data.TypeProviders",
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiAnyCPU", "fsharp\fsiAnyCpu\FsiAnyCPU.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Unittests", "fsharp\FSharp.Compiler.Unittests\FSharp.Compiler.Unittests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -75,6 +77,10 @@ Global
{CB7D20C4-6506-406D-9144-5342C3595F03}.Release|Any CPU.Build.0 = Release|Any CPU
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|Any CPU.ActiveCfg = Debug|x86
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.ActiveCfg = Release|x86
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 5 additions & 1 deletion src/fsharp/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ lexHashEndingNoMatchingIf,"#endif has no matching #if"
1169,lexHashIfMustHaveIdent,"#if directive should be immediately followed by an identifier"
1170,lexWrongNestedHashEndif,"Syntax error. Wrong nested #endif, unexpected tokens before it."
lexHashBangMustBeFirstInFile,"#! may only appear as the first line at the start of a file."
1171,lexExpectedSingleLineComment,"Expected single line comment or end of line"
1171,pplexExpectedSingleLineComment,"Expected single line comment or end of line"
1172,memberOperatorDefinitionWithNoArguments,"Infix operator member '%s' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ..."
1173,memberOperatorDefinitionWithNonPairArgument,"Infix operator member '%s' has %d initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ..."
1174,memberOperatorDefinitionWithCurriedArguments,"Infix operator member '%s' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ..."
Expand Down Expand Up @@ -1336,3 +1336,7 @@ descriptionUnavailable,"(description unavailable...)"
3180,abImplicitHeapAllocation,"The mutable local '%s' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed."
estApplyStaticArgumentsForMethodNotImplemented,"A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid"
3181,etErrorApplyingStaticArgumentsToMethod,"An error occured applying the static arguments to a provided method"
3182,pplexUnexpectedChar,"Unexpected character '%s' in preprocessor expression"
3183,ppparsUnexpectedToken,"Unexpected token '%s' in preprocessor expression"
3184,ppparsIncompleteExpression,"Incomplete preprocessor expression"
3185,ppparsMissingToken,"Missing token '%s' in preprocessor expression"
12 changes: 12 additions & 0 deletions src/fsharp/FSharp.Compiler-proto/FSharp.Compiler-proto.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
<Link>FSComp.txt</Link>
</FsSrGen>
<EmbeddedResource Include="..\FSStrings.resx" />
<FsLex Include="..\pplex.fsl">
<OtherFlags>--lexlib Internal.Utilities.Text.Lexing</OtherFlags>
<Link>pplex.fsl</Link>
</FsLex>
<FsYacc Include="..\pppars.fsy">
<Module>Microsoft.FSharp.Compiler.PPParser</Module>
<Open>Microsoft.FSharp.Compiler</Open>
<OtherFlags>--internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing</OtherFlags>
<Link>pppars.fsy</Link>
</FsYacc>
<FsLex Include="..\lex.fsl">
<OtherFlags>--lexlib Internal.Utilities.Text.Lexing</OtherFlags>
<Link>lex.fsl</Link>
Expand Down Expand Up @@ -250,13 +260,15 @@
<Compile Include="..\ast.fs">
<Link>ast.fs</Link>
</Compile>
<Compile Include="pppars.fs" />
<Compile Include="pars.fs" />
<Compile Include="..\lexhelp.fsi">
<Link>lexhelp.fsi</Link>
</Compile>
<Compile Include="..\lexhelp.fs">
<Link>lexhelp.fs</Link>
</Compile>
<Compile Include="pplex.fs" />
<Compile Include="lex.fs" />
<Compile Include="..\sreflect.fsi">
<Link>sreflect.fsi</Link>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FSharpSourcesRoot>..\..</FSharpSourcesRoot>
<ProjectGuid>{a8d9641a-9170-4cf4-8fe0-6db8c134e1b5}</ProjectGuid>
</PropertyGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<AllowCrossTargeting>true</AllowCrossTargeting>
<ReferenceVsAssemblies>true</ReferenceVsAssemblies>
<OutputType>Library</OutputType>
<AssemblyName>FSharp.Compiler.Unittests</AssemblyName>
<TargetFrameworkVersion Condition=" '$(TargetFramework)' == 'net20' ">v3.5</TargetFrameworkVersion>
<Name>SystematicUnitTests</Name>
<!-- Prevent compiler from inlining calls to FSharp.Core to improve code coverage accuracy -->
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<TargetProfile Condition=" '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259' ">netcore</TargetProfile>
<!-- workaround for msbuild narrowing the assembly search paths when building portable libs -->
<AssemblySearchPaths Condition="$(TargetFramework.Contains('portable'))">
{CandidateAssemblyFiles};
{TargetFrameworkDirectory};
{Registry:Software\Microsoft\.NETFramework,v4.5,AssemblyFoldersEx};
</AssemblySearchPaths>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition=" '$(TargetFramework)' == 'sl5' ">$(DefineConstants);SILVERLIGHT</DefineConstants>
<DefineConstants>$(DefineConstants);EXTENSIONTYPING</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>3</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>3</WarningLevel>
</PropertyGroup>
<ItemGroup>
<!-- need full name and SpecificVersion = true in order to convince msbuild to allow this reference when targeting portable47 -->
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" Condition="'$(TargetFramework)' != 'sl5' AND '$(TargetFramework)' != 'sl3-wp'">
<SpecificVersion>true</SpecificVersion>
</Reference>
<Reference Include="NUnitFramework" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl3-wp'" />
</ItemGroup>
<ItemGroup Condition="!$(TargetFramework.Contains('portable'))">
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Numerics" Condition="'$(TargetFramework)' == 'net40'" />
<Reference Include="System.Core" />
<Reference Include="System.Net" Condition="'$(TargetFramework)' == 'sl5' " />
<Reference Include="System.Observable" Condition="'$(TargetFramework)' == 'sl3-wp' " />
</ItemGroup>
<ItemGroup>
<Compile Include="NUnitFrameworkShims.fs" Condition="'$(TargetFramework)' == 'sl3-wp'" />
<Compile Include="HashIfExpression.fs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler\FSharp.Compiler.fsproj">
<Name>FSharp.Compiler</Name>
<Project>{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}</Project>
</ProjectReference>
<ProjectReference Include="..\FSharp.Core\FSharp.Core.fsproj">
<Name>FSharp.Core</Name>
<Project>{ded3bbd7-53f4-428a-8c9f-27968e768605}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
</Project>
Loading

0 comments on commit 438eae2

Please sign in to comment.