Squashed commit of the following:
commit 2a991b6c8e30c712640e2869972f02c6313cc7e3 Author: Don Syme <dsyme@users.noreply.github.com> Date: Mon Oct 17 20:40:15 2016 +0100 Fix microbuild (#1629) commit 169d366713a31c0945328897db5fe58480bf1a43 Author: Kevin Ransom (msft) <codecutter.fsharp@hotmail.com> Date: Sun Oct 16 15:04:50 2016 -0700 Add missed file. (#1625) * Ensure that portable libraries have correct hintpath for preview 5 * Replaced missed file commit d64ff35398a62c91103e9aa1373c2786bc0e83d6 Author: Don Syme <dsyme@users.noreply.github.com> Date: Sun Oct 16 22:37:08 2016 +0100 cleanup build and test scripts (#1615) * cleanup build and test scripts commit 39480c4c402eb6e37b2ccfa9961189d29b352289 Author: Kevin Ransom (msft) <codecutter.fsharp@hotmail.com> Date: Sun Oct 16 10:19:03 2016 -0700 Ensure that portable libraries have correct hintpath for preview 5 (#1624) commit 2fe5a3be8227a379a33845c04762f51d3dd24fcf Author: Kevin Ransom (msft) <codecutter@hotmail.com> Date: Sat Oct 15 14:03:48 2016 -0700 Add support for generating sourcelink record in portable pdbs. Fixes #1585 commit e0318a8f65a596ddf234171c70bc3c535fd5f27f Author: Kevin Ransom (msft) <codecutter.fsharp@hotmail.com> Date: Sat Oct 15 13:32:44 2016 -0700 FSharp ms build task to support new xommand line options (#1616) commit 749ba2dfbbb457e1d746ce7659965d0ce0b34eac Author: Omar Tawfik <OmarTawfik@users.noreply.github.com> Date: Sat Oct 15 13:27:14 2016 -0700 Don't match braces at the end of the caret (#1619) commit 00bab9974f21e71db02e47a000cc6b101bf139a2 Author: Kevin Ransom (msft) <codecutter.fsharp@hotmail.com> Date: Sat Oct 15 13:25:15 2016 -0700 (Nugetize F# templates. Ensure value tuple installed on create template. (#1620) commit 2a9b5ef8189500e0af7bf2364d1f89e9b3dd5d1f Author: Omar Tawfik <OmarTawfik@users.noreply.github.com> Date: Fri Oct 14 22:45:35 2016 -0700 Add fsx files to workspaces (#1612) * Add fsx files to workspaces * Stop passing project output paths to CPS * Read script file contents from memory (on workspace initialization) commit 8b434e0fedc4f5c51ace6d4c3191d04f01667546 Author: Kevin Ransom (msft) <codecutter.fsharp@hotmail.com> Date: Fri Oct 14 10:32:59 2016 -0700 Don't try to deploy vsix during OSS build. Specify prereq in vsixmanifest (#1613) commit 79430d298d916dbfb2628b5c60b9254f3316cc0c Author: Don Syme <dsyme@users.noreply.github.com> Date: Fri Oct 14 15:58:08 2016 +0100 simplify use of if-defs (#1614) commit b708921ebe0974a31b081f4bae58b4034f9beba9 Author: Don Syme <dsyme@users.noreply.github.com> Date: Fri Oct 14 10:25:28 2016 +0100 Always use FSharp.Core not fsharp.core (#1610)
This commit is contained in:
Родитель
2002675f8a
Коммит
ea2f73756f
|
@ -49,13 +49,13 @@
|
|||
/tests/*FSharp_Failures.lst
|
||||
/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.dll
|
||||
/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.pdb
|
||||
/tests/XFSharpQA_Failures.log.*
|
||||
/tests/Xnet40-fsharpqa-suite-failures.log.*
|
||||
/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/FSharp.ProjectSystem.FSharp.fsi
|
||||
/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/ctofiles/
|
||||
/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Utils.dll
|
||||
/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExprLibrary.dll
|
||||
/tests/fsharpqa/Source/*FSharpQA_Failures.env
|
||||
/tests/fsharpqa/Source/*FSharpQA_Failures.lst
|
||||
/tests/fsharpqa/Source/*net40-fsharpqa-suite-failures.env
|
||||
/tests/fsharpqa/Source/*net40-fsharpqa-suite-failures.lst
|
||||
/tests/**/FSharp.Core.dll
|
||||
lib/debug
|
||||
lib/release
|
||||
|
@ -102,3 +102,5 @@ tests/fsharp/core/array/dont.run.peverify
|
|||
tests/fsharp/core/innerpoly/dont.run.peverify
|
||||
tests/fsharp/typecheck/sigs/neg94-pre.dll
|
||||
times
|
||||
/tests/fsharpqa/testenv/bin/System.ValueTuple.dll
|
||||
source_link.json
|
||||
|
|
118
DEVGUIDE.md
118
DEVGUIDE.md
|
@ -21,27 +21,32 @@ The primary technical documents for the F# compiler code are
|
|||
|
||||
## Quick Start: Build, Test, Develop
|
||||
|
||||
You can build the compiler+tools and run the subset the tests used for continuous integration as follows:
|
||||
You can build the F# compiler for .NET Framework as follows:
|
||||
|
||||
build.cmd
|
||||
|
||||
This is the same as
|
||||
|
||||
build.cmd net40
|
||||
|
||||
There are various qualifiers:
|
||||
|
||||
build.cmd release -- build release (the default)
|
||||
build.cmd debug -- build debug instead of release
|
||||
|
||||
build.cmd net40 -- build .NET Framework compiler
|
||||
build.cmd coreclr -- build .NET Core compiler
|
||||
build.cmd vs -- build the Visual F# IDE Tools
|
||||
build.cmd pcls -- build the PCL FSharp.Core libraries
|
||||
build.cmd all -- build all
|
||||
|
||||
build.cmd proto -- force the rebuild of the Proto bootstrap compiler in addition to other things
|
||||
build.cmd protofx -- build using a .NET Framework proto (no .NET Core is used)
|
||||
|
||||
build.cmd net40 -- build/tests for .NET Framework version of the compiler (not the Visual F# IDE Tools or .NET Core)
|
||||
build.cmd coreclr -- build/tests only the coreclr version compiler (not the Visual F# IDE Tools or .NET Framework)
|
||||
build.cmd vs -- build/tests the Visual F# IDE Tools
|
||||
build.cmd pcls -- build/tests the PCL FSharp.Core libraries
|
||||
|
||||
build.cmd build -- build, do not test
|
||||
build.cmd ci -- build, run the same tests as CI
|
||||
build.cmd all -- build, run all tests
|
||||
build.cmd notests -- turn off testing (used in conjunction with other options)
|
||||
build.cmd test -- build default targets, run suitable tests
|
||||
build.cmd net40 test -- build net40, run suitable tests
|
||||
build.cmd coreclr test -- build coreclr, run suitable tests
|
||||
build.cmd vs test -- build Visual F# IDE Tools, run all tests
|
||||
build.cmd all test -- build all, run all tests
|
||||
|
||||
build.cmd test-smoke -- build, run smoke tests
|
||||
build.cmd test-coreunit -- build, run FSharp.Core tests
|
||||
|
@ -49,16 +54,11 @@ There are various qualifiers:
|
|||
build.cmd test-pcls -- build, run PCL tests
|
||||
build.cmd test-fsharp -- build, run tests\fsharp suite
|
||||
build.cmd test-fsharpqa -- build, run tests\fsharpqa suite
|
||||
build.cmd test-vs -- build, run Visual F# IDE Tools unit tests
|
||||
|
||||
**Notes**
|
||||
To build and test Visual F# IDE Tools, you must use [Visual Studio "vNext" (aka "Dev15")](https://www.visualstudio.com/en-us/downloads/visual-studio-next-downloads-vs.aspx). This is the one after Visual Studio 2015 (aka "Dev 14"). You must also install Visual Studio SDK (also called _Visual Studio Extensibility SDK_ on the Visual Studio installer) before building Visual F# IDE Tools.
|
||||
Please ensure that the Visual Studio SDK version is matched with your current Visual Studio to ensure successful builds. For example: Visual Studio 2015 Update 1 requires Visual Studio 2015 SDK Update 1. Any installation of Visual Studio 2015 and later provides Visual Studio SDK as part of the installation of Visual Studio 2015 as feature installation.
|
||||
|
||||
Combinations are also allowed:
|
||||
|
||||
build.cmd debug,compiler,notests -- build the debug compiler and run smoke tests
|
||||
|
||||
After you build the first time you can open and use this solution:
|
||||
|
||||
.\VisualFSharp.sln
|
||||
|
@ -71,86 +71,7 @@ Building ``VisualFSharp.sln`` builds _nearly_ everything. However building porta
|
|||
FSharp.Core.dll is not included. If you are just developing the core compiler, library
|
||||
and Visual F# Tools then building the solution will be enough.
|
||||
|
||||
## Step by Step:
|
||||
|
||||
### 1. Building a Proto Compiler
|
||||
|
||||
The compiler is compiled as a set of .NET 4.0 components using a bootstrap process.
|
||||
This uses a Last Known Good (LKG) compiler checked into this repository to build.
|
||||
|
||||
msbuild src\fsharp-proto-build.proj
|
||||
|
||||
### 2. Building an F# (Debug) library and compiler
|
||||
|
||||
This uses the proto compiler to build `FSharp.Core.dll`, `FSharp.Compiler.dll`, `fsc.exe`, and `fsi.exe`.
|
||||
|
||||
msbuild src/fsharp-library-build.proj
|
||||
msbuild src/fsharp-compiler-build.proj
|
||||
|
||||
You can now use the updated F# compiler in `debug\net40\bin\fsc.exe` and F# Interactive in `debug\net40\bin\fsi.exe` to develop and test basic language and tool features.
|
||||
|
||||
**Note:** The updated library is not used until you run `update.cmd`, see below. The updated compiler is not run 'pre-compiled' until you run `update.cmd -ngen`, see below.
|
||||
|
||||
### 3. Full Steps Before Running Tests
|
||||
|
||||
See [TESTGUIDE.md](TESTGUIDE.md) for full details on how to run tests.
|
||||
|
||||
Prior to a full **Debug** test run, you need to complete **all** of the steps in build.cmd
|
||||
|
||||
build.cmd debug,build
|
||||
|
||||
Likewise prior to a **Release** test run:
|
||||
|
||||
build.cmd release,build
|
||||
|
||||
For **Debug** this corresponds to these steps, which you can run individually for more incremental builds:
|
||||
|
||||
msbuild src/fsharp-library-build.proj
|
||||
msbuild src/fsharp-compiler-build.proj
|
||||
msbuild src/fsharp-compiler-unittests-build.proj
|
||||
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47
|
||||
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7
|
||||
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable78
|
||||
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable259
|
||||
msbuild src/fsharp-library-unittests-build.proj
|
||||
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47
|
||||
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7
|
||||
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78
|
||||
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259
|
||||
msbuild vsintegration/fsharp-vsintegration-src-build.proj
|
||||
msbuild vsintegration/fsharp-vsintegration-project-templates-build.proj
|
||||
msbuild vsintegration/fsharp-vsintegration-item-templates-build.proj
|
||||
msbuild vsintegration/fsharp-vsintegration-deployment-build.proj
|
||||
msbuild vsintegration/fsharp-vsintegration-unittests-build.proj
|
||||
msbuild tests/fsharp/FSharp.Tests.fsproj
|
||||
src\update.cmd debug -ngen
|
||||
tests\BuildTestTools.cmd debug
|
||||
|
||||
|
||||
For **Release** this corresponds to these steps, which you can run individually for more incremental builds:
|
||||
|
||||
msbuild src/fsharp-library-build.proj /p:Configuration=Release
|
||||
msbuild src/fsharp-compiler-build.proj /p:Configuration=Release
|
||||
msbuild src/fsharp-compiler-unittests-build.proj /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
|
||||
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
|
||||
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
|
||||
msbuild src/fsharp-library-unittests-build.proj /p:Configuration=Release
|
||||
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
|
||||
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
|
||||
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
|
||||
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
|
||||
msbuild vsintegration/fsharp-vsintegration-src-build.proj /p:Configuration=Release
|
||||
msbuild vsintegration/fsharp-vsintegration-project-templates-build.proj /p:Configuration=Release
|
||||
msbuild vsintegration/fsharp-vsintegration-item-templates-build.proj /p:Configuration=Release
|
||||
msbuild vsintegration/fsharp-vsintegration-deployment-build.proj /p:Configuration=Release
|
||||
msbuild vsintegration/fsharp-vsintegration-unittests-build.proj /p:Configuration=Release
|
||||
msbuild tests/fsharp/FSharp.Tests.fsproj /p:Configuration=Release
|
||||
src\update.cmd release -ngen
|
||||
tests\BuildTestTools.cmd release
|
||||
|
||||
### 4. [Optional] Install the Visual F# IDE Tools
|
||||
### [Optional] Install the Visual F# IDE Tools
|
||||
|
||||
At time of writing, the Visual F# IDE Tools can only be installed into Visual Studio "Next" (aka "Dev15") releases.
|
||||
The new builds of the Visual F# IDE Tools can no longer be installed into Visual Studio 2015.
|
||||
|
@ -184,7 +105,7 @@ For **Release**:
|
|||
|
||||
1. Run ``vsintegration\update-vsintegration.cmd release`` (clobbers the installed F# SDK)
|
||||
|
||||
### Notes on the build
|
||||
### Notes on the .NET Framework build
|
||||
|
||||
1. The `update.cmd` script adds required strong name validation skips, and NGens the compiler and libraries. This requires admin privileges.
|
||||
1. The compiler binaries produced are "private" and strong-named signed with a test key.
|
||||
|
@ -195,6 +116,9 @@ For **Release**:
|
|||
- We use the proto compiler to compile the source for `FSharp.Core.dll` in this distribution.
|
||||
- We use the proto compiler to compile the source for `FSharp.Compiler.dll`, `fsc.exe`, `fsi.exe`, and other binaries found in this distribution.
|
||||
|
||||
|
||||
|
||||
|
||||
## Resources
|
||||
|
||||
The primary technical guide to the core compiler code is [The F# Compiler Technical Guide](http://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html). Please read and contribute to that guide.
|
||||
|
|
63
TESTGUIDE.md
63
TESTGUIDE.md
|
@ -1,5 +1,15 @@
|
|||
# F# Compiler, Core Library and Visual F# Tools Tests
|
||||
|
||||
## Quick start: Running Tests
|
||||
|
||||
To run tests, use variations such as the following, depending on which test suite and build configuration you want:
|
||||
|
||||
build.cmd test
|
||||
build.cmd net40 test
|
||||
build.cmd coreclr test
|
||||
build.cmd vs test
|
||||
build.cmd all test
|
||||
|
||||
## Prerequisites
|
||||
|
||||
In order to run the FSharpQA suite, you will need to install [Perl](http://www.perl.org/get.html) (ActiveState Perl 5.16.3 is known to work fine).
|
||||
|
@ -7,28 +17,6 @@ Perl must be included in the `%PATH%` for the below steps to work. It is also re
|
|||
|
||||
The Perl requirement is gradually being removed.
|
||||
|
||||
## Quick start: Running Tests
|
||||
|
||||
To run tests, use variations such as the following, depending on which test suite and build configuration you want:
|
||||
|
||||
build.cmd compiler,smoke
|
||||
build.cmd compiler
|
||||
build.cmd ci
|
||||
build.cmd all
|
||||
build.cmd debug,compiler
|
||||
build.cmd debug,ci
|
||||
build.cmd debug,all
|
||||
|
||||
Default is `ci`
|
||||
|
||||
* ``ci`` = the build and tests done by continuous integration
|
||||
* ``compiler`` = build the compiler
|
||||
* ``compiler,smoke`` = build the compiler and run some smoke tests
|
||||
* ``debug`` = use Debug configuration instead of Release
|
||||
* ``pcls`` = build and test the Portable PCL libraries for FSharp.Core
|
||||
* ``build_only`` = build, don't test
|
||||
* ``all`` = build and test everything
|
||||
|
||||
## Test Suites
|
||||
|
||||
The F# tests are split as follows:
|
||||
|
@ -68,23 +56,7 @@ extension or the command line via `nunit3-console.exe`.
|
|||
Note that for compatibility reasons, the IDE unit tests should be run in a 32-bit process,
|
||||
using the '--x86' flag to `nunit3-console.exe`
|
||||
|
||||
### RunTests.cmd
|
||||
|
||||
The script `tests\RunTests.cmd` is used to execute the suites. It's used like this:
|
||||
|
||||
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
|
||||
RunTests.cmd <debug|release> coreunitportable78
|
||||
RunTests.cmd <debug|release> coreunitportable259
|
||||
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_*.*`, `CompilerUnit_*.*`, `CoreUnit_*.*`, `IDEUnit_*.*`, e.g. `FSharpQA_Results.log` or `FSharp_Failures.log`.
|
||||
### Test lists
|
||||
|
||||
For the FSharp and FSharpQA suites, the list of test areas and their associated "tags" is stored at
|
||||
|
||||
|
@ -95,12 +67,15 @@ Tags are in the left column, paths to to corresponding test folders are in the r
|
|||
|
||||
If you want to re-run a particular test area, the easiest way to do so is to set a temporary tag for that area in test.lst (e.g. "RERUN"), then call `RunTests.cmd <debug|release> <fsharp|fsharpqa> RERUN`.
|
||||
|
||||
If you want to specify multiple tags to run or not run, pass them comma-delimited and enclosed in double quotes, e.g. `RunTests.cmd debug fsharp "Core01,Core02"`.
|
||||
From a Powershell environment, make sure the double quotes are passed literally, e.g. `.\RunTests.cmd debug fsharp '"Core01,Core02"'`
|
||||
or `.\RunTests.cmd --% debug fsharp "Core01,Core02"`.
|
||||
### Logs and output
|
||||
|
||||
`RunTests.cmd` is mostly just a simple wrapper over `tests\fsharpqa\testenv\bin\RunAll.pl`, which has capabilities not discussed here. More advanced test execution scenarios can be achieved by invoking `RunAll.pl` directly.
|
||||
Run `perl tests\fsharpqa\testenv\bin\RunAll.pl -?` to see a full list of flags and options.
|
||||
All test execution logs and result files will be dropped into the `tests\TestResults` folder, and have file names matching
|
||||
|
||||
net40-fsharp-suite-*.*
|
||||
net40-fsharpqa-suite-*.*
|
||||
net40-compilerunit-suite-*.*
|
||||
net40-coreunit-suite-*.*
|
||||
vs-ideunit-suite-*.*
|
||||
|
||||
### Other Tips
|
||||
|
||||
|
|
|
@ -1,72 +1,107 @@
|
|||
<!-- Copyright (c) Microsoft Corporation. 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">
|
||||
|
||||
<ItemGroup Condition="'$(BUILD_NET40)'=='1' or '$(BUILD_ALL)'=='1'">
|
||||
<ProjectsWithDefaultFramework Include="src/fsharp-library-build.proj" />
|
||||
<ProjectsWithDefaultFramework Include="src/fsharp-compiler-build.proj" />
|
||||
<!-- +++++++++++++++++++++++ Project selection for building +++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<ItemGroup Condition="'$(BUILD_NET40)'=='1'">
|
||||
<ProjectsWithNet40 Include="src/fsharp/FSharp.Core/FSharp.Core.fsproj" />
|
||||
<ProjectsWithNet40 Include="src/fsharp/FSharp.Build/FSharp.Build.fsproj" />
|
||||
<ProjectsWithNet40 Include="src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj" />
|
||||
<ProjectsWithNet40 Include="src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj"/>
|
||||
<ProjectsWithNet40 Include="src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj" />
|
||||
<ProjectsWithNet40 Include="src/fsharp/Fsc/Fsc.fsproj" />
|
||||
<ProjectsWithNet40 Include="src/fsharp/fsi/Fsi.fsproj" />
|
||||
<ProjectsWithNet40 Include="src/fsharp/fsiAnyCpu/FsiAnyCpu.fsproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectsWithDefaultFramework Include="src/fsharp-library-unittests-build.proj" Condition="'$(TEST_NET40_COREUNIT)'=='1' or '$(BUILD_ALL)'=='1'" />
|
||||
<ProjectsWithDefaultFramework Include="src/fsharp-compiler-unittests-build.proj" Condition="'$(TEST_COMPILERUNIT)'=='1' or '$(BUILD_ALL)'=='1'" />
|
||||
<ProjectsWithDefaultFramework Include="tests/fsharp/FSharp.Tests.fsproj" Condition="'$(TEST_FSHARP_SUITE)'=='1' or '$(BUILD_ALL)'=='1'" />
|
||||
<ItemGroup Condition="'$(BUILD_CORECLR)'=='1'">
|
||||
<ProjectsWithCoreClr Include="src/fsharp/FSharp.Core/FSharp.Core.fsproj" />
|
||||
<ProjectsWithCoreClr Include="src/fsharp/FSharp.Core.netcore.nuget/FSharp.Core.netcore.nuget.proj" />
|
||||
<ProjectsWithCoreClr Include="src/fsharp/FSharp.Build/FSharp.Build.fsproj" />
|
||||
<ProjectsWithCoreClr Include="src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj" />
|
||||
<ProjectsWithCoreClr Include="src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj" />
|
||||
<ProjectsWithCoreClr Include="src/fsharp/Fsc/Fsc.fsproj" />
|
||||
<ProjectsWithCoreClr Include="src/fsharp/fsi/Fsi.fsproj" />
|
||||
<ProjectsWithCoreClr Include="src/fsharp/FSharp.Compiler.netcore.nuget/FSharp.Compiler.nuget.proj" />
|
||||
<ProjectsWithCoreClr Include="src/fsharp/FSharp.Compiler.Host.netcore.nuget/FSharp.Compiler.Host.proj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(BUILD_PORTABLE)'=='1'">
|
||||
<ProjectsWithPortableFrameworks Include="src/fsharp-library-build.proj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectsWithPortableFramework Include="src/fsharp-library-build.proj" Condition="'$(BUILD_PORTABLE)'=='1' or '$(BUILD_ALL)'=='1'"/>
|
||||
<ProjectsWithPortableFramework Include="src/fsharp-library-unittests-build.proj" Condition="'$(TEST_PORTABLE_COREUNIT)'=='1' or '$(BUILD_ALL)'=='1'" />
|
||||
<ItemGroup Condition="'$(BUILD_VS)'=='1'">
|
||||
<ProjectsWithNet40 Include="vsintegration/fsharp-vsintegration-src-build.proj" />
|
||||
<ProjectsWithNet40 Include="vsintegration/fsharp-vsintegration-project-templates-build.proj" />
|
||||
<ProjectsWithNet40 Include="vsintegration/fsharp-vsintegration-item-templates-build.proj" />
|
||||
<ProjectsWithNet40 Include="vsintegration/fsharp-vsintegration-vsix-build.proj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(BUILD_VS)'=='1' or '$(BUILD_ALL)'=='1'">
|
||||
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-src-build.proj" />
|
||||
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-project-templates-build.proj" />
|
||||
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-item-templates-build.proj" />
|
||||
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-vsix-build.proj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-unittests-build.proj" Condition="'$(TEST_VS)'=='1' or '$(BUILD_ALL)'=='1'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(BUILD_CORECLR)'=='1' or '$(BUILD_ALL)'=='1'">
|
||||
<ProjectsWithCoreClr Include="src/fsharp-library-build.proj" />
|
||||
<ProjectsWithCoreClr Include="src/fsharp-compiler-build.proj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectsWithCoreClr Include="src/fsharp-library-unittests-build.proj" Condition="'$(TEST_CORECLR)'=='1' or '$(BUILD_ALL)'=='1'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(BUILD_SETUP)'=='1' or '$(BUILD_ALL)'=='1'">
|
||||
<ItemGroup Condition="'$(BUILD_SETUP)'=='1'">
|
||||
<SetupProjects Include="setup/fsharp-setup-build.proj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- +++++++++++++++++++++++ Project selection for testing +++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<ItemGroup Condition="'$(TEST_NET40_COREUNIT_SUITE)'=='1'" >
|
||||
<ProjectsWithNet40 Include="src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TEST_CORECLR_COREUNIT_SUITE)'=='1'">
|
||||
<ProjectsWithCoreClr Include="src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TEST_PORTABLE_COREUNIT_SUITE)'=='1'" >
|
||||
<ProjectsWithPortableFrameworks Include="src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TEST_NET40_COMPILERUNIT_SUITE)'=='1'" >
|
||||
<ProjectsWithNet40 Include="src/fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TEST_NET40_FSHARP_SUITE)'=='1'" >
|
||||
<ProjectsWithNet40 Include="tests/fsharp/FSharp.Tests.fsproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TEST_NET40_FSHARPQA_SUITE)'=='1' OR '$(TEST_NET40_FSHARP_SUITE)'=='1'" >
|
||||
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/ILComparer/ILComparer.fsproj" />
|
||||
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/diff/diff.fsproj" />
|
||||
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/HostedCompilerServer/HostedCompilerServer.fsproj" />
|
||||
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/FSharp.Compiler.Hosted/FSharp.Compiler.Hosted.fsproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TEST_VS_IDEUNIT_SUITE)'=='1'" >
|
||||
<ProjectsWithNet40 Include="vsintegration/fsharp-vsintegration-unittests-build.proj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- +++++++++++++++++++++++ Targets +++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<Target Name="Build">
|
||||
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithNet40)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetFramework=coreclr;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(SetupProjects)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Rebuild">
|
||||
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithNet40)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetFramework=coreclr;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(SetupProjects)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Clean">
|
||||
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithNet40)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithPortableFrameworks)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetFramework=coreclr;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
<MSBuild Projects="@(SetupProjects)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
|
||||
</Target>
|
||||
|
|
624
build.cmd
624
build.cmd
|
@ -2,6 +2,7 @@
|
|||
|
||||
:ARGUMENTS_VALIDATION
|
||||
|
||||
if /I "%1" == "--help" (goto :USAGE)
|
||||
if /I "%1" == "/help" (goto :USAGE)
|
||||
if /I "%1" == "/h" (goto :USAGE)
|
||||
if /I "%1" == "/?" (goto :USAGE)
|
||||
|
@ -13,28 +14,40 @@ echo Build and run a subset of test suites
|
|||
echo.
|
||||
echo Usage:
|
||||
echo.
|
||||
echo build.cmd ^<all^|proto^|protofx^|build^|debug^|release^|diag^|compiler^|coreclr^|pcls^|vs^|ci^|ci_part1^|ci_part2^|microbuild^>
|
||||
echo ^<test-coreunit^|test-corecompile^|test-smoke^|test-coreclr^|test-pcls^|test-fsharp^|test-fsharpqa^|test-vs^|publicsign^>
|
||||
echo build.cmd ^<all^|net40^|coreclr^|pcls^|vs^>
|
||||
echo ^<proto^|protofx^>
|
||||
echo ^<ci^|ci_part1^|ci_part2^|microbuild^>
|
||||
echo ^<debug^|release^>
|
||||
echo ^<diag^|publicsign^>
|
||||
echo ^<test^|test-smoke^|test-net40-coreunit-suite^|test-coreclr-coreunit-suite^|test-compiler-unit-suite^|test-pcl-coreunit-suite^|test-net40-fsharp-suite^|test-net40-fsharpqa-suite^>
|
||||
echo.
|
||||
echo No arguments default to 'build'
|
||||
echo No arguments default to 'default', meaning this (no testing)
|
||||
echo.
|
||||
echo To specify multiple values, separate strings by comma
|
||||
echo build.cmd net40
|
||||
echo.
|
||||
echo.This builds the net40 build of the compiler without running tests
|
||||
echo.Other examples:
|
||||
echo.
|
||||
echo. build net40 notests
|
||||
echo. build net40 (build compiler for .NET Framework)
|
||||
echo. build coreclr (build compiler for .NET Core)
|
||||
echo. build vs (build Visual Studio IDE Tools)
|
||||
echo. build all (build everything)
|
||||
echo. build test (build and test default targets)
|
||||
echo. build net40 test (build and test net40)
|
||||
echo. build coreclr test (build and test net40)
|
||||
echo. build vs test (build and test net40)
|
||||
echo. build all test (build and test net40)
|
||||
echo.
|
||||
echo The example below run pcls, vs and qa:
|
||||
echo.
|
||||
echo build.cmd pcls,vs,debug
|
||||
echo build.cmd pcls vs debug
|
||||
exit /b 1
|
||||
|
||||
:ARGUMENTS_OK
|
||||
|
||||
set BUILD_PROTO_WITH_CORECLR_LKG=1
|
||||
set BUILD_PROTO_WITH_CORECLR_LKG=0
|
||||
|
||||
set BUILD_PROTO=0
|
||||
set BUILD_NET40=1
|
||||
set BUILD_NET40=0
|
||||
set BUILD_CORECLR=0
|
||||
set BUILD_PORTABLE=0
|
||||
set BUILD_VS=0
|
||||
|
@ -43,17 +56,23 @@ set BUILD_CONFIG_LOWERCASE=release
|
|||
set BUILD_DIAG=
|
||||
set BUILD_PUBLICSIGN=0
|
||||
|
||||
set TEST_COMPILERUNIT=0
|
||||
set TEST_NET40_COREUNIT=0
|
||||
set TEST_CORECLR=0
|
||||
set TEST_PORTABLE_COREUNIT=0
|
||||
set TEST_VS=0
|
||||
set TEST_FSHARP_SUITE=0
|
||||
set TEST_FSHARPQA_SUITE=0
|
||||
set TEST_NET40_COMPILERUNIT_SUITE=0
|
||||
set TEST_NET40_COREUNIT_SUITE=0
|
||||
set TEST_NET40_FSHARP_SUITE=0
|
||||
set TEST_NET40_FSHARPQA_SUITE=0
|
||||
set TEST_CORECLR_COREUNIT_SUITE=0
|
||||
set TEST_CORECLR_FSHARP_SUITE=0
|
||||
set TEST_PORTABLE_COREUNIT_SUITE=0
|
||||
set TEST_VS_IDEUNIT_SUITE=0
|
||||
set TEST_TAGS=
|
||||
set SKIP_EXPENSIVE_TESTS=1
|
||||
|
||||
REM ------------------ Parse all arguments -----------------------
|
||||
|
||||
setlocal enableDelayedExpansion
|
||||
|
||||
set _autoselect=1
|
||||
set _autoselect_tests=0
|
||||
set /a counter=0
|
||||
for /l %%x in (1 1 9) do (
|
||||
set /a counter=!counter!+1
|
||||
|
@ -61,6 +80,33 @@ for /l %%x in (1 1 9) do (
|
|||
)
|
||||
for %%i in (%BUILD_FSC_DEFAULT%) do ( call :SET_CONFIG %%i )
|
||||
|
||||
REM apply defaults
|
||||
|
||||
if /i '%_autoselect%' == '1' (
|
||||
set BUILD_NET40=1
|
||||
)
|
||||
|
||||
if /i '%_autoselect_tests%' == '1' (
|
||||
if /i '%BUILD_NET40%' == '1' (
|
||||
set TEST_NET40_COMPILERUNIT_SUITE=1
|
||||
set TEST_NET40_COREUNIT_SUITE=1
|
||||
set TEST_NET40_FSHARP_SUITE=1
|
||||
set TEST_NET40_FSHARPQA_SUITE=1
|
||||
)
|
||||
|
||||
if /i '%BUILD_CORECLR%' == '1' (
|
||||
set TEST_CORECLR_COREUNIT_SUITE=1
|
||||
)
|
||||
|
||||
if /i '%BUILD_PORTABLE%' == '1' (
|
||||
set TEST_PORTABLE_COREUNIT_SUITE=1
|
||||
)
|
||||
|
||||
if /i '%BUILD_VS%' == '1' (
|
||||
set TEST_VS_IDEUNIT_SUITE=1
|
||||
)
|
||||
)
|
||||
|
||||
setlocal disableDelayedExpansion
|
||||
echo.
|
||||
|
||||
|
@ -68,31 +114,41 @@ rem disable setup build by setting FSC_BUILD_SETUP=0
|
|||
if /i '%FSC_BUILD_SETUP%' == '' (set FSC_BUILD_SETUP=1)
|
||||
goto :MAIN
|
||||
|
||||
REM ------------------ Procedure to parse one argument -----------------------
|
||||
|
||||
:SET_CONFIG
|
||||
set ARG=%~1
|
||||
if "%ARG%" == "1" if "%2" == "" (set ARG=build)
|
||||
if "%2" == "" if not "%ARG%" == "build" goto :EOF
|
||||
if "%ARG%" == "1" if "%2" == "" (set ARG=default)
|
||||
if "%2" == "" if not "%ARG%" == "default" goto :EOF
|
||||
|
||||
echo Parse argument %ARG%
|
||||
|
||||
if /i '%ARG%' == 'compiler' (set TEST_COMPILERUNIT=1)
|
||||
|
||||
if /i '%ARG%' == 'net40' (
|
||||
set _autoselect=0
|
||||
set BUILD_NET40=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'coreclr' (
|
||||
set _autoselect=0
|
||||
set BUILD_PROTO_WITH_CORECLR_LKG=1
|
||||
set BUILD_CORECLR=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'pcls' (
|
||||
set _autoselect=0
|
||||
set BUILD_PORTABLE=1
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
set TEST_PORTABLE_COREUNIT_SUITE=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'vs' (
|
||||
set _autoselect=0
|
||||
set BUILD_NET40=1
|
||||
set BUILD_VS=1
|
||||
set TEST_VS=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'diag' (
|
||||
set BUILD_DIAG=/v:detailed
|
||||
if not defined APPVEYOR ( set BUILD_LOG=fsharp_build_log.log )
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'all' (
|
||||
set _autoselect=0
|
||||
set BUILD_PROTO=1
|
||||
set BUILD_NET40=1
|
||||
set BUILD_CORECLR=1
|
||||
|
@ -100,23 +156,10 @@ if /i '%ARG%' == 'all' (
|
|||
set BUILD_VS=1
|
||||
set BUILD_SETUP=%FSC_BUILD_SETUP%
|
||||
|
||||
set TEST_COMPILERUNIT=1
|
||||
set TEST_NET40_COREUNIT=1
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
set TEST_FSHARP_SUITE=1
|
||||
set TEST_FSHARPQA_SUITE=1
|
||||
set TEST_CORECLR=1
|
||||
set TEST_VS=1
|
||||
|
||||
set SKIP_EXPENSIVE_TESTS=0
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'protofx' (
|
||||
set BUILD_PROTO_WITH_CORECLR_LKG=0
|
||||
set BUILD_PROTO=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'microbuild' (
|
||||
set _autoselect=0
|
||||
set BUILD_PROTO=1
|
||||
set BUILD_NET40=1
|
||||
set BUILD_CORECLR=0
|
||||
|
@ -124,146 +167,140 @@ if /i '%ARG%' == 'microbuild' (
|
|||
set BUILD_VS=1
|
||||
set BUILD_SETUP=%FSC_BUILD_SETUP%
|
||||
|
||||
set TEST_COMPILERUNIT=1
|
||||
set TEST_NET40_COREUNIT=1
|
||||
set TEST_CORECLR=0
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
set TEST_VS=1
|
||||
set TEST_FSHARP_SUITE=1
|
||||
set TEST_FSHARPQA_SUITE=1
|
||||
set SKIP_EXPENSIVE_TESTS=1
|
||||
set TEST_NET40_COMPILERUNIT_SUITE=1
|
||||
set TEST_NET40_COREUNIT_SUITE=1
|
||||
set TEST_NET40_FSHARP_SUITE=1
|
||||
set TEST_NET40_FSHARPQA_SUITE=1
|
||||
set TEST_CORECLR_COREUNIT_SUITE=0
|
||||
set TEST_CORECLR_FSHARP_SUITE=0
|
||||
set TEST_PORTABLE_COREUNIT_SUITE=1
|
||||
set TEST_VS_IDEUNIT_SUITE=1
|
||||
)
|
||||
|
||||
|
||||
REM These divide 'ci' into two chunks which can be done in parallel
|
||||
if /i '%ARG%' == 'ci_part1' (
|
||||
set _autoselect=0
|
||||
|
||||
REM what we do
|
||||
set BUILD_PROTO=1
|
||||
set BUILD_NET40=1
|
||||
set BUILD_PORTABLE=1
|
||||
set BUILD_VS=1
|
||||
set BUILD_SETUP=%FSC_BUILD_SETUP%
|
||||
set TEST_NET40_COMPILERUNIT_SUITE=1
|
||||
set TEST_NET40_FSHARPQA_SUITE=1
|
||||
set TEST_VS_IDEUNIT_SUITE=1
|
||||
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'ci_part2' (
|
||||
set _autoselect=0
|
||||
|
||||
REM what we do
|
||||
set BUILD_PROTO_WITH_CORECLR_LKG=1
|
||||
set BUILD_PROTO=1
|
||||
set BUILD_NET40=1
|
||||
set BUILD_CORECLR=1
|
||||
set BUILD_PORTABLE=1
|
||||
|
||||
set TEST_NET40_COREUNIT_SUITE=1
|
||||
set TEST_NET40_FSHARP_SUITE=1
|
||||
set TEST_PORTABLE_COREUNIT_SUITE=1
|
||||
set TEST_CORECLR_COREUNIT_SUITE=1
|
||||
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'proto' (
|
||||
set BUILD_PROTO=1
|
||||
)
|
||||
|
||||
REM Same as 'all' but smoke testing only
|
||||
if /i '%ARG%' == 'ci' (
|
||||
set SKIP_EXPENSIVE_TESTS=1
|
||||
if /i '%ARG%' == 'diag' (
|
||||
set BUILD_DIAG=/v:detailed
|
||||
if not defined APPVEYOR ( set BUILD_LOG=fsharp_build_log.log )
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'debug' (
|
||||
set BUILD_CONFIG=debug
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'release' (
|
||||
set BUILD_CONFIG=release
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test' (
|
||||
set _autoselect_tests=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-all' (
|
||||
set _autoselect=0
|
||||
set BUILD_PROTO=1
|
||||
set BUILD_NET40=1
|
||||
set BUILD_CORECLR=1
|
||||
set BUILD_PORTABLE=1
|
||||
set BUILD_VS=1
|
||||
set BUILD_SETUP=%FSC_BUILD_SETUP%
|
||||
|
||||
set TEST_COMPILERUNIT=1
|
||||
set TEST_NET40_COREUNIT=1
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
set TEST_FSHARP_SUITE=1
|
||||
set TEST_FSHARPQA_SUITE=1
|
||||
set TEST_CORECLR=1
|
||||
set TEST_VS=0
|
||||
set TEST_TAGS=
|
||||
set CONF_FSHARPQA_SUITE=Smoke
|
||||
)
|
||||
set TEST_NET40_COMPILERUNIT_SUITE=1
|
||||
set TEST_NET40_COREUNIT_SUITE=1
|
||||
set TEST_NET40_FSHARP_SUITE=1
|
||||
set TEST_NET40_FSHARPQA_SUITE=1
|
||||
set TEST_PORTABLE_COREUNIT_SUITE=1
|
||||
set TEST_CORECLR_COREUNIT_SUITE=1
|
||||
set TEST_VS_IDEUNIT_SUITE=1
|
||||
|
||||
|
||||
REM These divide 'ci' into two chunks which can be done in parallel
|
||||
if /i '%ARG%' == 'ci_part1' (
|
||||
set BUILD_PROTO=1
|
||||
set SKIP_EXPENSIVE_TESTS=1
|
||||
set BUILD_CORECLR=0
|
||||
set BUILD_PORTABLE=1
|
||||
set BUILD_VS=1
|
||||
set BUILD_SETUP=%FSC_BUILD_SETUP%
|
||||
|
||||
set TEST_COMPILERUNIT=1
|
||||
set TEST_NET40_COREUNIT=0
|
||||
set TEST_PORTABLE_COREUNIT=0
|
||||
set TEST_CORECLR=0
|
||||
set TEST_FSHARPQA_SUITE=1
|
||||
set TEST_FSHARP_SUITE=0
|
||||
set TEST_VS=1
|
||||
set TEST_TAGS=
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'ci_part2' (
|
||||
set BUILD_PROTO=1
|
||||
set SKIP_EXPENSIVE_TESTS=1
|
||||
set BUILD_CORECLR=1
|
||||
set BUILD_PORTABLE=1
|
||||
|
||||
set TEST_COMPILERUNIT=0
|
||||
set TEST_NET40_COREUNIT=1
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
set TEST_CORECLR=1
|
||||
set TEST_FSHARPQA_SUITE=0
|
||||
set TEST_FSHARP_SUITE=1
|
||||
set TEST_VS=0
|
||||
set TEST_TAGS=
|
||||
)
|
||||
|
||||
|
||||
if /i '%ARG%' == 'coreclr' (
|
||||
set BUILD_CORECLR=1
|
||||
set TEST_CORECLR=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'debug' (
|
||||
set BUILD_CONFIG=debug
|
||||
set BUILD_CONFIG_LOWERCASE=debug
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'build' (
|
||||
set BUILD_PORTABLE=1
|
||||
set BUILD_VS=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'notests' (
|
||||
set TEST_COMPILERUNIT=0
|
||||
set TEST_NET40_COREUNIT=0
|
||||
set TEST_CORECLR=0
|
||||
set TEST_PORTABLE_COREUNIT=0
|
||||
set TEST_VS=0
|
||||
set TEST_FSHARP_SUITE=0
|
||||
set TEST_FSHARPQA_SUITE=0
|
||||
set SKIP_EXPENSIVE_TESTS=1
|
||||
set SKIP_EXPENSIVE_TESTS=0
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-smoke' (
|
||||
REM Smoke tests are a very small quick subset of tests
|
||||
|
||||
set SKIP_EXPENSIVE_TESTS=1
|
||||
set TEST_COMPILERUNIT=0
|
||||
set TEST_NET40_COREUNIT=0
|
||||
set TEST_FSHARP_SUITE=1
|
||||
set TEST_FSHARPQA_SUITE=0
|
||||
REM what we do
|
||||
set TEST_NET40_FSHARP_SUITE=1
|
||||
set TEST_TAGS=Smoke
|
||||
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-fsharpqa' (
|
||||
if /i '%ARG%' == 'test-net40-fsharpqa-suite' (
|
||||
set BUILD_NET40=1
|
||||
set TEST_FSHARPQA_SUITE=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-compilerunit' (
|
||||
set BUILD_NET40=1
|
||||
set TEST_COMPILERUNIT=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-coreunit' (
|
||||
set BUILD_NET40=1
|
||||
set TEST_NET40_COREUNIT=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-coreclr' (
|
||||
set BUILD_CORECLR=1
|
||||
set TEST_CORECLR=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-pcls' (
|
||||
set BUILD_PORTABLE=1
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
set TEST_NET40_FSHARPQA_SUITE=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-vs' (
|
||||
set BUILD_VS=1
|
||||
set TEST_VS=1
|
||||
if /i '%ARG%' == 'test-compiler-unit-suite' (
|
||||
set BUILD_NET40=1
|
||||
set TEST_NET40_COMPILERUNIT_SUITE=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-fsharp' (
|
||||
set TEST_FSHARP_SUITE=1
|
||||
if /i '%ARG%' == 'test-net40-coreunit-suite' (
|
||||
set BUILD_NET40=1
|
||||
set TEST_NET40_COREUNIT_SUITE=1
|
||||
)
|
||||
|
||||
|
||||
if /i '%ARG%' == 'test-coreclr-coreunit-suite' (
|
||||
set BUILD_PROTO_WITH_CORECLR_LKG=1
|
||||
set BUILD_CORECLR=1
|
||||
set TEST_CORECLR_COREUNIT_SUITE=1
|
||||
)
|
||||
|
||||
|
||||
if /i '%ARG%' == 'test-pcl-coreunit-suite' (
|
||||
set BUILD_NET40=1
|
||||
set BUILD_PORTABLE=1
|
||||
set TEST_PORTABLE_COREUNIT_SUITE=1
|
||||
)
|
||||
|
||||
|
||||
if /i '%ARG%' == 'test-net40-fsharp-suite' (
|
||||
set BUILD_NET40=1
|
||||
set BUILD_PORTABLE=1
|
||||
set TEST_NET40_FSHARP_SUITE=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'test-coreclr-fsharp-suite' (
|
||||
set BUILD_CORECLR=1
|
||||
set TEST_CORECLR_FSHARP_SUITE=1
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'publicsign' (
|
||||
|
@ -286,26 +323,29 @@ echo BUILD_PORTABLE=%BUILD_PORTABLE%
|
|||
echo BUILD_VS=%BUILD_VS%
|
||||
echo BUILD_SETUP=%BUILD_SETUP%
|
||||
echo BUILD_CONFIG=%BUILD_CONFIG%
|
||||
echo BUILD_CONFIG_LOWERCASE=%BUILD_CONFIG_LOWERCASE%
|
||||
echo BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN%
|
||||
echo.
|
||||
echo TEST_COMPILERUNIT=%TEST_COMPILERUNIT%
|
||||
echo TEST_NET40_COREUNIT=%TEST_NET40_COREUNIT%
|
||||
echo TEST_PORTABLE_COREUNIT=%TEST_PORTABLE_COREUNIT%
|
||||
echo TEST_VS=%TEST_VS%
|
||||
echo TEST_FSHARP_SUITE=%TEST_FSHARP_SUITE%
|
||||
echo TEST_FSHARPQA_SUITE=%TEST_FSHARPQA_SUITE%
|
||||
echo TEST_NET40_COMPILERUNIT_SUITE=%TEST_NET40_COMPILERUNIT_SUITE%
|
||||
echo TEST_NET40_COREUNIT_SUITE=%TEST_NET40_COREUNIT_SUITE%
|
||||
echo TEST_NET40_FSHARP_SUITE=%TEST_NET40_FSHARP_SUITE%
|
||||
echo TEST_NET40_FSHARPQA_SUITE=%TEST_NET40_FSHARPQA_SUITE%
|
||||
echo TEST_CORECLR_COREUNIT_SUITE=%TEST_CORECLR_COREUNIT_SUITE%
|
||||
echo TEST_CORECLR_FSHARP_SUITE=%TEST_CORECLR_FSHARP_SUITE%
|
||||
echo TEST_PORTABLE_COREUNIT_SUITE=%TEST_PORTABLE_COREUNIT_SUITE%
|
||||
echo TEST_VS_IDEUNIT_SUITE=%TEST_VS_IDEUNIT_SUITE%
|
||||
echo TEST_TAGS=%TEST_TAGS%
|
||||
echo SKIP_EXPENSIVE_TESTS=%SKIP_EXPENSIVE_TESTS%
|
||||
echo.
|
||||
|
||||
echo ---------------- Done with arguments, starting preparation -----------------
|
||||
|
||||
if "%RestorePackages%"=="" (
|
||||
set RestorePackages=true
|
||||
)
|
||||
|
||||
@echo on
|
||||
|
||||
call src\update.cmd signonly
|
||||
@call src\update.cmd signonly
|
||||
|
||||
:: Check prerequisites
|
||||
if not '%VisualStudioVersion%' == '' goto vsversionset
|
||||
|
@ -358,15 +398,28 @@ if defined APPVEYOR (
|
|||
set _msbuildexe=%_msbuildexe% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
)
|
||||
)
|
||||
set msbuildflags=/maxcpucount %_nrswitch%
|
||||
set msbuildflags=/maxcpucount %_nrswitch% /nologo
|
||||
set _ngenexe="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ngen.exe"
|
||||
if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :failure
|
||||
|
||||
echo ---------------- Done with prepare, starting package restore ----------------
|
||||
|
||||
if '%RestorePackages%' == 'true' (
|
||||
%_ngenexe% install .\.nuget\NuGet.exe
|
||||
%_ngenexe% install .\.nuget\NuGet.exe /nologo
|
||||
|
||||
.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
|
||||
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
|
||||
|
||||
if '%BUILD_VS%' == '1' (
|
||||
.\.nuget\NuGet.exe restore vsintegration\packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
|
||||
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
|
||||
)
|
||||
|
||||
if '%BUILD_SETUP%' == '1' (
|
||||
.\.nuget\NuGet.exe restore setup\packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
|
||||
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
|
||||
|
@ -376,126 +429,209 @@ if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
|
|||
|
||||
set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
|
||||
|
||||
set _fsiexe="packages\FSharp.Compiler.Tools.4.0.1.10\tools\fsi.exe"
|
||||
if not exist %_fsiexe% echo Error: Could not find %_fsiexe% && goto :failure
|
||||
%_ngenexe% install %_fsiexe% /nologo
|
||||
|
||||
set _nugetexe=".nuget\nuget.exe"
|
||||
set _nugetconfig=".nuget\nuget.config"
|
||||
if not exist %_nugetexe% echo Error: Could not find %_nugetexe% && goto :failure
|
||||
%_ngenexe% install %_nugetexe% /nologo
|
||||
|
||||
echo ---------------- Done with package restore, starting proto ------------------------
|
||||
|
||||
rem Decide if Proto need building
|
||||
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
|
||||
:: Restore the Tools directory
|
||||
call %~dp0init-tools.cmd
|
||||
if NOT EXIST Tools\lkg\fsc.exe (
|
||||
set BUILD_PROTO=1
|
||||
)
|
||||
)
|
||||
|
||||
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '0' (
|
||||
if NOT EXIST Proto\net40\bin\fsc-proto.exe (
|
||||
set BUILD_PROTO=1
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
rem Build Proto
|
||||
if '%BUILD_PROTO%' == '1' (
|
||||
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
|
||||
|
||||
pushd .\lkg & %_dotnetexe% restore &popd
|
||||
@if ERRORLEVEL 1 echo Error: dotnet restore failed && goto :failure
|
||||
|
||||
pushd .\lkg & %_dotnetexe% publish project.json -o %~dp0\Tools\lkg -r win7-x64 &popd
|
||||
@if ERRORLEVEL 1 echo Error: dotnet publish failed && goto :failure
|
||||
)
|
||||
|
||||
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '0' (
|
||||
rmdir /s /q %~dp0\Tools\lkg
|
||||
)
|
||||
|
||||
rem copy targestfile into tools directory ... temporary fix until packaging complete.
|
||||
copy src\fsharp\FSharp.Build\Microsoft.FSharp.targets tools\Microsoft.FSharp.targets
|
||||
copy src\fsharp\FSharp.Build\Microsoft.Portable.FSharp.targets tools\Microsoft.Portable.FSharp.targets
|
||||
|
||||
:: Build Proto
|
||||
if NOT EXIST Proto\net40\bin\fsc-proto.exe (set BUILD_PROTO=1)
|
||||
|
||||
:: Build
|
||||
if '%BUILD_PROTO%' == '1' (
|
||||
%_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
|
||||
echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
|
||||
%_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
|
||||
@if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :failure
|
||||
|
||||
%_ngenexe% install Proto\net40\bin\fsc-proto.exe
|
||||
rem copy targestfile into tools directory ... temporary fix until packaging complete.
|
||||
echo copy src\fsharp\FSharp.Build\Microsoft.FSharp.targets tools\Microsoft.FSharp.targets
|
||||
copy src\fsharp\FSharp.Build\Microsoft.FSharp.targets tools\Microsoft.FSharp.targets
|
||||
|
||||
echo copy src\fsharp\FSharp.Build\Microsoft.Portable.FSharp.targets tools\Microsoft.Portable.FSharp.targets
|
||||
copy src\fsharp\FSharp.Build\Microsoft.Portable.FSharp.targets tools\Microsoft.Portable.FSharp.targets
|
||||
)
|
||||
|
||||
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '0' (
|
||||
|
||||
echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
|
||||
%_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
|
||||
@if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :failure
|
||||
|
||||
echo %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo
|
||||
%_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo
|
||||
@if ERRORLEVEL 1 echo Error: NGen of proto failed && goto :failure
|
||||
|
||||
rmdir /s /q %~dp0\Tools\lkg
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
echo ---------------- Done with proto, starting build ------------------------
|
||||
|
||||
%_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN%
|
||||
@if ERRORLEVEL 1 echo Error: '%_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN%' failed && goto :failure
|
||||
|
||||
@echo on
|
||||
call src\update.cmd %BUILD_CONFIG_LOWERCASE% -ngen
|
||||
|
||||
echo ---------------- Done with build, starting update/prepare ---------------
|
||||
|
||||
if 'BUILD_NET40' == '1' (
|
||||
call src\update.cmd %BUILD_CONFIG% -ngen
|
||||
)
|
||||
|
||||
@echo set NUNITPATH=packages\NUnit.Console.3.0.0\tools\
|
||||
set NUNITPATH=packages\NUnit.Console.3.0.0\tools\
|
||||
if not exist %NUNITPATH% echo Error: Could not find %NUNITPATH% && goto :failure
|
||||
|
||||
@echo xcopy "%NUNITPATH%*.*" "%~dp0tests\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
xcopy "%NUNITPATH%*.*" "%~dp0tests\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
|
||||
@echo xcopy "%~dp0tests\fsharpqa\testenv\src\nunit*.*" "%~dp0tests\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
xcopy "%~dp0tests\fsharpqa\testenv\src\nunit*.*" "%~dp0tests\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
|
||||
if '%BUILD_CORECLR%' == '1' (
|
||||
|
||||
echo Restoring CoreCLR packages and runtimes necessary for actually running and testing
|
||||
%_nugetexe% restore .\tests\fsharp\project.json -PackagesDirectory packages
|
||||
|
||||
echo Deploy x86 version of compiler and dependencies, ready for testing
|
||||
%_fsiexe% --exec tests\fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x86 --copyCompiler:yes --v:quiet
|
||||
%_fsiexe% --exec tests\fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x86 --copyCompiler:no --v:quiet
|
||||
|
||||
echo Deploy x64 version of compiler, ready for testing
|
||||
%_fsiexe% --exec tests\fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x64 --copyCompiler:yes --v:quiet
|
||||
%_fsiexe% --exec tests\fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x64 --copyCompiler:no --v:quiet
|
||||
|
||||
echo Deploy linux version of built compiler, ready for testing
|
||||
%_fsiexe% --exec tests\fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\ubuntu.14.04-x64 --copyCompiler:yes --v:quiet
|
||||
%_fsiexe% --exec tests\fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\ubuntu.14.04-x64 --copyCompiler:no --v:quiet
|
||||
|
||||
echo Deploy osx version of built compiler, ready for testing
|
||||
%_fsiexe% --exec tests\fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\osx.10.10-x64 --copyCompiler:yes --v:quiet
|
||||
%_fsiexe% --exec tests\fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\osx.10.10-x64 --copyCompiler:no --v:quiet
|
||||
|
||||
)
|
||||
|
||||
|
||||
if 'TEST_NET40_COMPILERUNIT_SUITE' == '0' and 'TEST_PORTABLE_COREUNIT_SUITE' == '0' and 'TEST_CORECLR_COREUNIT_SUITE' == '0' and 'TEST_VS_IDEUNIT_SUITE' == '0' and 'TEST_NET40_FSHARP_SUITE' == '0' and 'TEST_NET40_FSHARPQA_SUITE' == '0' goto :finished
|
||||
|
||||
echo ---------------- Done with update, starting tests -----------------------
|
||||
|
||||
|
||||
pushd tests
|
||||
|
||||
if 'TEST_COMPILERUNIT' == '0' and 'TEST_PORTABLE_COREUNIT' == '0' and 'TEST_CORECLR' == '0' and 'TEST_VS' == '0' and 'TEST_FSHARP_SUITE' == '0' and 'TEST_FSHARPQA_SUITE' == '0' goto :finished
|
||||
|
||||
@echo on
|
||||
call BuildTestTools.cmd %BUILD_CONFIG_LOWERCASE%
|
||||
@if ERRORLEVEL 1 echo Error: 'BuildTestTools.cmd %BUILD_CONFIG_LOWERCASE%' failed && goto :failed_tests
|
||||
|
||||
@echo on
|
||||
if '%TEST_FSHARP_SUITE%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% fsharp %TEST_TAGS%
|
||||
if '%TEST_NET40_FSHARP_SUITE%' == '1' (
|
||||
echo call RunTests.cmd %BUILD_CONFIG% net40-fsharp-suite %TEST_TAGS%
|
||||
call RunTests.cmd %BUILD_CONFIG% net40-fsharp-suite %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\FSharpNunit_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% fsharp %TEST_TAGS%' failed
|
||||
type testresults\net40-fsharp-suite-errors.log
|
||||
echo Error: 'Running tests net40-fsharp-suite %TEST_TAGS%' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
|
||||
if '%TEST_FSHARPQA_SUITE%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% fsharpqa %TEST_TAGS%
|
||||
if '%TEST_NET40_FSHARPQA_SUITE%' == '1' (
|
||||
echo call RunTests.cmd %BUILD_CONFIG% net40-fsharpqa-suite %TEST_TAGS%
|
||||
call RunTests.cmd %BUILD_CONFIG% net40-fsharpqa-suite %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\fsharpqa_failures.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% fsharpqa %TEST_TAGS%' failed
|
||||
echo type testresults\net40-fsharpqa-suite-results.log
|
||||
type testresults\net40-fsharpqa-suite-results.log
|
||||
echo type testresults\net40-fsharpqa-suite-errors.log
|
||||
type testresults\net40-fsharpqa-suite-errors.log
|
||||
echo Error: 'Running tests net40-fsharpqa-suite %TEST_TAGS%' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
|
||||
if '%TEST_COMPILERUNIT%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% compilerunit %TEST_TAGS%
|
||||
if '%TEST_NET40_COMPILERUNIT_SUITE%' == '1' (
|
||||
echo call RunTests.cmd %BUILD_CONFIG% net40-compilerunit-suite %TEST_TAGS%
|
||||
call RunTests.cmd %BUILD_CONFIG% net40-compilerunit-suite %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\CompilerUnit_net40_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% compilerunit' failed
|
||||
type testresults\net40-compilerunit-suite-output.log
|
||||
type testresults\net40-compilerunit-suite-errors.log
|
||||
echo Error: 'Running tests net40-compilerunit-suite' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
if '%TEST_NET40_COREUNIT%' == '1' (
|
||||
if '%TEST_PORTABLE_COREUNIT%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitall %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
@echo "type testresults\CoreUnit_net40_Error.log "
|
||||
type testresults\CoreUnit_net40_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunit' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
if '%TEST_PORTABLE_COREUNIT%' == '0' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunit %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\CoreUnit_Portable_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunit' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
)
|
||||
if '%TEST_NET40_COREUNIT%' == '0' (
|
||||
if '%TEST_PORTABLE_COREUNIT%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitall %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\CoreUnit_all_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitall %TEST_TAGS%' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
)
|
||||
if '%TEST_CORECLR%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitcoreclr %TEST_TAGS%
|
||||
if '%TEST_NET40_COREUNIT_SUITE%' == '1' (
|
||||
echo call RunTests.cmd %BUILD_CONFIG% net40-coreunit-suite %TEST_TAGS%
|
||||
call RunTests.cmd %BUILD_CONFIG% net40-coreunit-suite %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\CoreUnit_coreclr_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitcoreclr %TEST_TAGS%' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% fsharp coreclr
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\FSharp_Failures.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitcoreclr %TEST_TAGS%' failed
|
||||
type testresults\net40-coreunit-suite-output.log
|
||||
type testresults\net40-coreunit-suite-errors.log
|
||||
echo Error: 'Running tests net40-coreunit-suite' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
if '%TEST_VS%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% ideunit %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% ideunit %TEST_TAGS%' failed && goto :failed_tests
|
||||
if '%TEST_PORTABLE_COREUNIT_SUITE%' == '1' (
|
||||
echo call RunTests.cmd %BUILD_CONFIG% portable-coreunit-suite %TEST_TAGS%
|
||||
call RunTests.cmd %BUILD_CONFIG% portable-coreunit-suite %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
@echo "type testresults\portable-coreunit-suite-output.log "
|
||||
@echo "type testresults\portable-coreunit-suite-errors.log "
|
||||
type testresults\portable-coreunit-suite-errors.log
|
||||
echo Error: 'Running tests portable-coreunit-suite' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
|
||||
if '%TEST_CORECLR_COREUNIT_SUITE%' == '1' (
|
||||
echo call RunTests.cmd %BUILD_CONFIG% coreclr-coreunit-suite %TEST_TAGS%
|
||||
call RunTests.cmd %BUILD_CONFIG% coreclr-coreunit-suite %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\coreclr-coreunit-suite-output.log
|
||||
type testresults\coreclr-coreunit-suite-errors.log
|
||||
echo Error: 'Running tests coreclr-coreunit-suite %TEST_TAGS%' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
if '%TEST_CORECLR_FSHARP_SUITE%' == '1' (
|
||||
echo call RunTests.cmd %BUILD_CONFIG% coreclr-fsharp-suite %TEST_TAGS%
|
||||
call RunTests.cmd %BUILD_CONFIG% coreclr-fsharp-suite %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\coreclr-fsharp-suite-output.log
|
||||
type testresults\coreclr-fsharp-suite-errors.log
|
||||
echo Error: 'Running tests coreclr-fsharp-suite %TEST_TAGS%' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
if '%TEST_VS_IDEUNIT_SUITE%' == '1' (
|
||||
echo call RunTests.cmd %BUILD_CONFIG% vs-ideunit-suite %TEST_TAGS%
|
||||
call RunTests.cmd %BUILD_CONFIG% vs-ideunit-suite %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\vs-ideunit-suite-output.log
|
||||
type testresults\vs-ideunit-suite-errors.log
|
||||
echo Error: 'Running tests vs-ideunit-suite %TEST_TAGS%' failed
|
||||
goto :failed_tests
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
:finished
|
||||
@echo "Finished"
|
||||
popd
|
||||
|
|
|
@ -1,51 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="FSharp.Data" version="2.2.5" />
|
||||
<!-- The packages to build and test the F# Compiler -->
|
||||
<!-- Packages for the Visual F# IDE Tools should go in vsintegration\packages.config -->
|
||||
|
||||
<!-- CodeGen-->
|
||||
<package id="FsSrGen" version="2.0.0" targetFramework="net46" />
|
||||
|
||||
<!-- Build infrastructure-->
|
||||
<package id="MicroBuild.Core" version="0.2.0" />
|
||||
<package id="MicroBuild.Core.Sentinel" version="1.0.0" />
|
||||
|
||||
<!-- Actualy dependencies -->
|
||||
<package id="System.Collections.Immutable" version="1.2.0" />
|
||||
<package id="System.Reflection.Metadata" version="1.4.1-beta-24227-04" />
|
||||
<package id="Microsoft.DiaSymReader.PortablePdb" version="1.1.0" />
|
||||
<package id="Microsoft.DiaSymReader" version="1.0.8" />
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" />
|
||||
<package id="Microsoft.VisualFSharp.Msbuild.15.0" version="1.0.1" />
|
||||
|
||||
<!-- Testing -->
|
||||
<package id="FsCheck" version="2.0.3" />
|
||||
<package id="NUnit.Runners" version="3.0.0" targetFramework="net45" />
|
||||
<package id="NUnit" version="3.0.0" targetFramework="net45" />
|
||||
<package id="NUnit.Console" version="3.0.0" targetFramework="net45" />
|
||||
<package id="NUnitLite" version="3.0.0" targetFramework="net45" />
|
||||
<package id="NUnit3TestAdapter" version="3.0.8-ctp-8" targetFramework="net45" />
|
||||
<package id="System.Collections.Immutable" version="1.2.0" />
|
||||
<package id="System.Reflection.Metadata" version="1.4.1-beta-24227-04" />
|
||||
<package id="Microsoft.DiaSymReader.PortablePdb" version="1.1.0" />
|
||||
<package id="Microsoft.DiaSymReader" version="1.0.8" />
|
||||
<package id="FsSrGen" version="2.0.0" targetFramework="net46" />
|
||||
<package id="MicroBuild.Core" version="0.2.0" />
|
||||
<package id="MicroBuild.Core.Sentinel" version="1.0.0" />
|
||||
<package id="MicroBuild.Plugins.SwixBuild" version="1.0.60" />
|
||||
<package id="WiX.Toolset.2015" version="3.10.0.1503" />
|
||||
<package id="Microsoft.VisualFSharp.Core.Redist" version="1.0.0" />
|
||||
<package id="Microsoft.VisualFSharp.Type.Providers.Redist" version="1.0.0" />
|
||||
<package id="Microsoft.CodeAnalysis.Common" version="2.0.0-beta6-61005-05" targetFramework="net46" />
|
||||
<package id="Microsoft.CodeAnalysis.EditorFeatures" version="2.0.0-beta6-61005-05" targetFramework="net46" />
|
||||
<package id="Microsoft.CodeAnalysis.EditorFeatures.Text" version="2.0.0-beta6-61005-05" targetFramework="net46" />
|
||||
<package id="Microsoft.CodeAnalysis.Features" version="2.0.0-beta6-61005-05" targetFramework="net46" />
|
||||
<package id="Microsoft.CodeAnalysis.Workspaces.Common" version="2.0.0-beta6-61005-05" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.LanguageServices" version="2.0.0-beta6-61005-05" targetFramework="net46" />
|
||||
<package id="Microsoft.Composition" version="1.0.27" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Threading" version="14.1.131" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Shell.14.0" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Package.LanguageService.14.0" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Editor" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Text.UI" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Text.UI.Wpf" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Text.Data" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Text.Logic" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.CoreUtility" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Shell.Design" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Utilities" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Language.StandardClassification" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Language.Intellisense" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Designer.Interfaces" version="1.1.4322" />
|
||||
<package id="Roslyn.Microsoft.VisualStudio.ComponentModelHost" version="0.0.2" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualFSharp.Microsoft.VisualStudio.Shell.UI.Internal" version="14.0.25420" targetFramework="net46" />
|
||||
<package id="RoslynDependencies.Microsoft.VisualStudio.Text.Internal" version="14.3.25407" targetFramework="net45" />
|
||||
<package id="RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualFSharp.Msbuild.15.0" version="1.0.1" />
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" />
|
||||
<package id="BenchmarkDotNet" version="0.9.8"/>
|
||||
<package id="BenchmarkDotNet.Diagnostics.Windows" version="0.9.8"/>
|
||||
<package id="VisualCppTools" version="14.0.24519-Pre"/>
|
||||
|
||||
<!-- Annoyingly the build of FSharp.Compiler.Server.Shared references a Visual Studio-specific attribute -->
|
||||
<!-- That DLL is logically part of the F# Compiler and F# Interactive but is shipped as part of the Visual F# IDE Tools -->
|
||||
<package id="Microsoft.VisualStudio.Threading" version="14.1.131" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualStudio.Shell.14.0" version="14.3.25407" targetFramework="net46" />
|
||||
|
||||
<!-- FSharp.Compiler.Tools is 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 -->
|
||||
<package id="FSharp.Compiler.Tools" version="4.0.1.10"/>
|
||||
|
||||
<!-- FSharp.Data is used in some of the scripts ued for the coreclr build -->
|
||||
<package id="FSharp.Data" version="2.2.5" />
|
||||
</packages>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.Collections.Immutable" version="1.2.0" />
|
||||
<package id="System.Reflection.Metadata" version="1.4.1-beta-24227-04" />
|
||||
<package id="Microsoft.DiaSymReader.PortablePdb" version="1.1.0" />
|
||||
<package id="Microsoft.DiaSymReader" version="1.0.8" />
|
||||
<package id="FsSrGen" version="2.0.0" targetFramework="net46" />
|
||||
<package id="MicroBuild.Core" version="0.2.0" />
|
||||
<package id="MicroBuild.Core.Sentinel" version="1.0.0" />
|
||||
<package id="MicroBuild.Plugins.SwixBuild" version="1.0.60" />
|
||||
<package id="WiX.Toolset.2015" version="3.10.0.1503" />
|
||||
<package id="Microsoft.VisualFSharp.Core.Redist" version="1.0.0" />
|
||||
<package id="Microsoft.VisualStudio.Shell.14.0" version="14.3.25407" targetFramework="net46" />
|
||||
<package id="Microsoft.VisualFSharp.Msbuild.15.0" version="1.0.1" />
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" />
|
||||
</packages>
|
|
@ -5,7 +5,8 @@
|
|||
<!-- Tail calls on, even in debug -->
|
||||
<Tailcalls>true</Tailcalls>
|
||||
<TargetFramework Condition="'$(TargetFramework)'==''">net40</TargetFramework>
|
||||
<!-- For .NET 2.0 use a 2.0 proto compiler, otherwise use a 4.0 proto compiler -->
|
||||
|
||||
<!-- Use a net40 proto compiler -->
|
||||
<protoCLIDir Condition="'$(protoCLIDir)' == ''">net40</protoCLIDir>
|
||||
<LkgVersion>14.0.23413.0</LkgVersion>
|
||||
<FsLexUnicode>true</FsLexUnicode>
|
||||
|
@ -15,7 +16,11 @@
|
|||
<ToolsDir>$(MSBuildThisFileDirectory)..\Tools\</ToolsDir>
|
||||
<BuildToolsTaskDir>$(ToolsDir)net45\</BuildToolsTaskDir>
|
||||
<WarningsAsErrors />
|
||||
|
||||
<FX_NO_LOADER Condition=" '$(FX_NO_LOADER)'==''">false</FX_NO_LOADER>
|
||||
|
||||
<!-- Always qualify the IntermediateOutputPath by the TargetFramework if any exists -->
|
||||
<IntermediateOutputPath>obj\$(Configuration)\$(TargetFramework)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(ProjectLanguage)' == 'FSharp' ">
|
||||
|
@ -26,11 +31,12 @@
|
|||
<!-- Standard interpretations of Debug and Release configurations -->
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DebugType Condition=" '$(DebugType)' == '' and '$(TargetFramework)' != 'coreclr' ">full</DebugType>
|
||||
<DebugType Condition=" '$(DebugType)' == '' and '$(TargetFramework)' == 'coreclr' ">embedded</DebugType>
|
||||
<DebugType Condition=" '$(DebugType)' == '' and '$(TargetFramework)' == 'coreclr' ">portable</DebugType>
|
||||
<Optimize Condition=" '$(Optimize)' == '' ">false</Optimize>
|
||||
<ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
|
||||
<OtherFlags Condition=" '$(DebugType)' == '' and '$(TargetFramework)' != 'coreclr' ">$(OtherFlags) --no-jit-optimize</OtherFlags>
|
||||
<OtherFlags Condition=" '$(DebugType)' == '' and '$(TargetFramework)' == 'coreclr' ">$(OtherFlags) --no-jit-optimize --embed</OtherFlags>
|
||||
<OtherFlags>$(OtherFlags) --no-jit-optimize</OtherFlags>
|
||||
<EmbedAllSource Condition=" '$(DebugType)' == 'portable' or '$(DebugType)' == 'embedded' ">true</EmbedAllSource>
|
||||
<SourceLink Condition=" '$(DebugType)' == 'portable' or '$(DebugType)' == 'embedded' ">$(IntermediateOutputPath)source_link.json</SourceLink>
|
||||
<DefineConstants Condition=" '$(ProjectLanguage)' != 'VisualBasic' ">DEBUG;TRACE;CODE_ANALYSIS;$(DefineConstants)</DefineConstants>
|
||||
<DefineConstants Condition=" '$(ProjectLanguage)' == 'VisualBasic' ">DEBUG=True,TRACE=True,CODE_ANALYSIS=True,$(DefineConstants)</DefineConstants>
|
||||
<SIGN_WITH_MSFT_KEY Condition=" '$(SIGN_WITH_MSFT_KEY)' == '' ">false</SIGN_WITH_MSFT_KEY>
|
||||
|
@ -39,6 +45,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DebugType Condition=" '$(DebugType)' == '' ">pdbonly</DebugType>
|
||||
<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>
|
||||
|
@ -57,11 +64,6 @@
|
|||
<WarningLevel Condition=" '$(WarningLevel)' == '' ">3</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Always qualify the IntermediateOutputPath by the TargetFramework if any exists -->
|
||||
<PropertyGroup>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\$(TargetFramework)\</IntermediateOutputPath>
|
||||
</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>
|
||||
|
@ -84,7 +86,6 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<FsiToolPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FsiToolPath>
|
||||
<FsSrGenToolPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FsSrGenToolPath>
|
||||
<FsLexToolPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FsLexToolPath>
|
||||
<FsYaccToolPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FsYaccToolPath>
|
||||
|
@ -94,6 +95,10 @@
|
|||
<RoslynVersion>2.0.0-beta6-61005-05</RoslynVersion>
|
||||
<RoslynVSBinariesVersion>14.0</RoslynVSBinariesVersion>
|
||||
<RoslynVSPackagesVersion>14.3.25407</RoslynVSPackagesVersion>
|
||||
|
||||
<!-- 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.0.1.10\tools</FsiToolPath>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -121,7 +121,6 @@
|
|||
<DefineConstants>$(DefineConstants);PUT_TYPE_PROVIDERS_IN_FSCORE;</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);FX_ATLEAST_LINQ</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);FX_MSBUILDRESOLVER_RUNTIMELIKE</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);FX_LCIDFROMCODEPAGE</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);FX_RESX_RESOURCE_READER</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);FX_RESIDENT_COMPILER</DefineConstants>
|
||||
|
@ -182,7 +181,6 @@
|
|||
<DefineConstants>$(DefineConstants);TODO_REWORK_SERVER</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);NO_LOADER_OPTIMIZATION</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);SILVERLIGHT_COMPILER_FSHARP_CORE</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);I_DONT_KNOW_HOW_TO_DO_THIS_YET</DefineConstants>
|
||||
<OtherFlags>$(OtherFlags) --simpleresolution</OtherFlags>
|
||||
<TargetFrameworkProfile></TargetFrameworkProfile> <!-- We are currently directly referencing corefx assemblies, so profile7 is not really true -->
|
||||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v5.0</TargetFrameworkVersion>
|
||||
|
@ -542,8 +540,24 @@
|
|||
<CompileBefore Remove="@(CompileBefore)"/>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="BeforeBuild" BeforeTargets="Build" Condition="'$(RestorePackages)' == ''">
|
||||
<Exec Command=".\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .\.nuget\NuGet.Config" WorkingDirectory="$(FSharpSourcesRoot)\.."/>
|
||||
<Exec Command=".\.nuget\NuGet.exe restore .\tests\fsharp\project.json -PackagesDirectory packages -ConfigFile .\.nuget\NuGet.Config" WorkingDirectory="$(FSharpSourcesRoot)\.." Condition="'$(TargetFramework)' == 'coreclr'"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSourceLink" BeforeTargets="CoreCompile">
|
||||
<PropertyGroup>
|
||||
<SrcRootDirectory>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory.TrimEnd("\"))))</SrcRootDirectory>
|
||||
</PropertyGroup>
|
||||
<Exec Command="git config --get remote.origin.url" ConsoleToMsBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="RemoteUri" />
|
||||
</Exec>
|
||||
|
||||
<!-- https://raw.githubusercontent.com/KevinRansom/visualfsharp/98e8c9a2ca09a36ebd024eb424fc050a831053cd/build.cmd -->
|
||||
<Exec Command="git rev-parse HEAD" ConsoleToMsBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="LatestCommit" />
|
||||
</Exec>
|
||||
<WriteLinesToFile File="$(IntermediateOutputPath)source_link.json" Overwrite="true" Lines='{"documents": { "$(SrcRootDirectory)/*" : "$(RemoteUri.Replace(".git", "").Replace("github.com", "raw.githubusercontent.com"))/$(LatestCommit)/*" }}' />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -3537,7 +3537,7 @@ let writeDirectory os dict =
|
|||
let writeBytes (os: BinaryWriter) (chunk:byte[]) = os.Write(chunk,0,chunk.Length)
|
||||
|
||||
let writeBinaryAndReportMappings (outfile, ilg, pdbfile: string option, signer: ILStrongNameSigner option, portablePDB, embeddedPDB, embedAllSource, embedSourceList,
|
||||
fixupOverlappingSequencePoints, emitTailcalls, showTimes, dumpDebugInfo) modul noDebugData =
|
||||
sourceLink, fixupOverlappingSequencePoints, emitTailcalls, showTimes, dumpDebugInfo) modul noDebugData =
|
||||
// Store the public key from the signer into the manifest. This means it will be written
|
||||
// to the binary and also acts as an indicator to leave space for delay sign
|
||||
|
||||
|
@ -3690,7 +3690,7 @@ let writeBinaryAndReportMappings (outfile, ilg, pdbfile: string option, signer:
|
|||
let pdbOpt =
|
||||
match portablePDB with
|
||||
| true ->
|
||||
let struct (uncompressedLength, contentId, stream) as pdbStream = generatePortablePdb fixupOverlappingSequencePoints embedAllSource embedSourceList showTimes pdbData
|
||||
let struct (uncompressedLength, contentId, stream) as pdbStream = generatePortablePdb fixupOverlappingSequencePoints embedAllSource embedSourceList sourceLink showTimes pdbData
|
||||
if embeddedPDB then Some (compressPortablePdbStream uncompressedLength contentId stream)
|
||||
else Some (pdbStream)
|
||||
| _ -> None
|
||||
|
@ -4262,6 +4262,7 @@ type options =
|
|||
embeddedPDB: bool
|
||||
embedAllSource: bool
|
||||
embedSourceList: string list
|
||||
sourceLink: string
|
||||
signer: ILStrongNameSigner option
|
||||
fixupOverlappingSequencePoints: bool
|
||||
emitTailcalls : bool
|
||||
|
@ -4270,5 +4271,5 @@ type options =
|
|||
|
||||
let WriteILBinary (outfile, (args: options), modul, noDebugData) =
|
||||
ignore (writeBinaryAndReportMappings (outfile, args.ilg, args.pdbfile, args.signer, args.portablePDB, args.embeddedPDB,
|
||||
args.embedAllSource, args.embedSourceList, args.fixupOverlappingSequencePoints,
|
||||
args.embedAllSource, args.embedSourceList, args.sourceLink, args.fixupOverlappingSequencePoints,
|
||||
args.emitTailcalls, args.showTimes, args.dumpDebugInfo) modul noDebugData)
|
||||
|
|
|
@ -22,6 +22,7 @@ type options =
|
|||
embeddedPDB: bool
|
||||
embedAllSource: bool
|
||||
embedSourceList: string list
|
||||
sourceLink: string
|
||||
signer : ILStrongNameSigner option
|
||||
fixupOverlappingSequencePoints : bool
|
||||
emitTailcalls: bool
|
||||
|
|
|
@ -252,7 +252,7 @@ let fixupOverlappingSequencePoints fixupSPs showTimes methods =
|
|||
Array.sortInPlaceBy fst allSps
|
||||
spCounts, allSps
|
||||
|
||||
let generatePortablePdb fixupSPs (embedAllSource:bool) (embedSourceList:string list) showTimes (info:PdbData) =
|
||||
let generatePortablePdb fixupSPs (embedAllSource:bool) (embedSourceList:string list) (sourceLink:string) showTimes (info:PdbData) =
|
||||
sortMethods showTimes info
|
||||
let _spCounts, _allSps = fixupOverlappingSequencePoints fixupSPs showTimes info.Methods
|
||||
let externalRowCounts = getRowCounts info.TableRowCounts
|
||||
|
@ -277,8 +277,9 @@ let generatePortablePdb fixupSPs (embedAllSource:bool) (embedSourceList:string l
|
|||
|
||||
metadata.GetOrAddBlob(writer)
|
||||
|
||||
let corSymLanguageTypeFSharp = System.Guid(0xAB4F38C9u, 0xB6E6us, 0x43baus, 0xBEuy, 0x3Buy, 0x58uy, 0x08uy, 0x0Buy, 0x2Cuy, 0xCCuy, 0xE3uy)
|
||||
let embeddedSource = System.Guid(0x0e8a571bu, 0x6926us, 0x466eus, 0xb4uy, 0xaduy, 0x8auy, 0xb0uy, 0x46uy, 0x11uy, 0xf5uy, 0xfeuy)
|
||||
let corSymLanguageTypeId = System.Guid(0xAB4F38C9u, 0xB6E6us, 0x43baus, 0xBEuy, 0x3Buy, 0x58uy, 0x08uy, 0x0Buy, 0x2Cuy, 0xCCuy, 0xE3uy)
|
||||
let embeddedSourceId = System.Guid(0x0e8a571bu, 0x6926us, 0x466eus, 0xb4uy, 0xaduy, 0x8auy, 0xb0uy, 0x46uy, 0x11uy, 0xf5uy, 0xfeuy)
|
||||
let sourceLinkId = System.Guid(0xcc110556u, 0xa091us, 0x4d38us, 0x9fuy, 0xecuy, 0x25uy, 0xabuy, 0x9auy, 0x35uy, 0x1auy, 0x6auy)
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of bytes in to write out uncompressed.
|
||||
|
@ -317,7 +318,8 @@ let generatePortablePdb fixupSPs (embedAllSource:bool) (embedSourceList:string l
|
|||
Some (builder.ToImmutableArray())
|
||||
|
||||
let mutable index = new Dictionary<string, DocumentHandle>(docs.Length)
|
||||
metadata.SetCapacity(TableIndex.Document, docs.Length)
|
||||
let docLength = docs.Length + if String.IsNullOrEmpty(sourceLink) then 1 else 0
|
||||
metadata.SetCapacity(TableIndex.Document, docLength)
|
||||
for doc in docs do
|
||||
let handle =
|
||||
match checkSum doc.File with
|
||||
|
@ -326,12 +328,12 @@ let generatePortablePdb fixupSPs (embedAllSource:bool) (embedSourceList:string l
|
|||
(serializeDocumentName doc.File,
|
||||
metadata.GetOrAddGuid(hashAlg),
|
||||
metadata.GetOrAddBlob(checkSum.ToImmutableArray()),
|
||||
metadata.GetOrAddGuid(corSymLanguageTypeFSharp)) |> metadata.AddDocument
|
||||
metadata.GetOrAddGuid(corSymLanguageTypeId)) |> metadata.AddDocument
|
||||
match includeSource doc.File with
|
||||
| None -> ()
|
||||
| Some blob ->
|
||||
metadata.AddCustomDebugInformation(DocumentHandle.op_Implicit(dbgInfo),
|
||||
metadata.GetOrAddGuid(embeddedSource),
|
||||
metadata.GetOrAddGuid(embeddedSourceId),
|
||||
metadata.GetOrAddBlob(blob)) |> ignore
|
||||
dbgInfo
|
||||
| None ->
|
||||
|
@ -339,9 +341,18 @@ let generatePortablePdb fixupSPs (embedAllSource:bool) (embedSourceList:string l
|
|||
(serializeDocumentName doc.File,
|
||||
metadata.GetOrAddGuid(System.Guid.Empty),
|
||||
metadata.GetOrAddBlob(ImmutableArray<byte>.Empty),
|
||||
metadata.GetOrAddGuid(corSymLanguageTypeFSharp)) |> metadata.AddDocument
|
||||
metadata.GetOrAddGuid(corSymLanguageTypeId)) |> metadata.AddDocument
|
||||
dbgInfo
|
||||
index.Add(doc.File, handle)
|
||||
|
||||
if not (String.IsNullOrEmpty(sourceLink)) then
|
||||
let fs = File.OpenRead(sourceLink)
|
||||
let ms = new MemoryStream()
|
||||
fs.CopyTo(ms)
|
||||
metadata.AddCustomDebugInformation(
|
||||
ModuleDefinitionHandle.op_Implicit(EntityHandle.ModuleDefinition),
|
||||
metadata.GetOrAddGuid(sourceLinkId),
|
||||
metadata.GetOrAddBlob(ms.ToArray())) |> ignore
|
||||
index
|
||||
|
||||
let mutable lastLocalVariableHandle = Unchecked.defaultof<LocalVariableHandle>
|
||||
|
|
|
@ -82,7 +82,7 @@ type idd =
|
|||
iddData: byte[];
|
||||
iddChunk: BinaryChunk }
|
||||
|
||||
val generatePortablePdb : fixupSPs:bool -> embedAllSource:bool -> embedSourceList:string list -> showTimes:bool -> info:PdbData -> struct (int64 * BlobContentId * MemoryStream)
|
||||
val generatePortablePdb : fixupSPs:bool -> embedAllSource:bool -> embedSourceList:string list -> sourceLink: string -> showTimes:bool -> info:PdbData -> struct (int64 * BlobContentId * MemoryStream)
|
||||
val compressPortablePdbStream : uncompressedLength:int64 -> contentId:BlobContentId -> stream:MemoryStream -> struct (int64 * BlobContentId * MemoryStream)
|
||||
val embedPortablePdbInfo : uncompressedLength:int64 -> contentId:BlobContentId -> stream:MemoryStream -> showTimes:bool -> fpdb:string -> cvChunk:BinaryChunk -> pdbChunk:BinaryChunk -> idd[]
|
||||
val writePortablePdbInfo : contentId:BlobContentId -> stream:MemoryStream -> showTimes:bool -> fpdb:string -> cvChunk:BinaryChunk -> idd[]
|
||||
|
|
|
@ -2,54 +2,32 @@
|
|||
//
|
||||
// Build nuget package for the fsharp compiler
|
||||
//=========================================================================================
|
||||
open System.IO
|
||||
open System.Diagnostics
|
||||
|
||||
#load "scriptlib.fsx"
|
||||
|
||||
try
|
||||
|
||||
//=========================================================================================
|
||||
// Command line arguments
|
||||
//=========================================================================================
|
||||
|
||||
// Try head was introduced in F# 4.0
|
||||
let tryHead (source : seq<_>) =
|
||||
let checkNonNull argName arg =
|
||||
match box arg with
|
||||
| null -> nullArg argName
|
||||
| _ -> ()
|
||||
checkNonNull "source" source
|
||||
use e = source.GetEnumerator()
|
||||
if (e.MoveNext()) then Some e.Current
|
||||
else None
|
||||
let usage = "usage: BuildNuGets.fsx --version:<build-version> -nuspec:<nuspec-path> --binaries:<binaries-dir>"
|
||||
|
||||
let usage = @"usage: BuildNuGets.fsx --version:<build-version> -nuspec:<nuspec-path> --binaries:<binaries-dir>"
|
||||
|
||||
let Arguments = fsi.CommandLineArgs |> Seq.skip 1
|
||||
|
||||
let GetArgumentFromCommandLine switchName defaultValue =
|
||||
match Arguments |> Seq.filter(fun t -> t.StartsWith(switchName)) |> Seq.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> tryHead with
|
||||
| Some(file) -> if file.Length <> 0 then file else defaultValue
|
||||
| _ -> defaultValue
|
||||
|
||||
let verbose = GetArgumentFromCommandLine "--verbosity:" @"normal"
|
||||
let version = GetArgumentFromCommandLine "--version:" @""
|
||||
let nuspec = GetArgumentFromCommandLine "--nuspec:" @""
|
||||
let bindir = GetArgumentFromCommandLine "--bindir:" @""
|
||||
let nuspecTitle = Path.GetFileNameWithoutExtension(nuspec)
|
||||
let layouts = Path.Combine(Path.GetFullPath(bindir), "layouts", nuspecTitle)
|
||||
let output = Path.Combine(Path.GetFullPath(bindir), "nuget")
|
||||
let verbose = getCmdLineArg "--verbosity:" "normal"
|
||||
let version = getCmdLineArg "--version:" ""
|
||||
let nuspec = getCmdLineArg "--nuspec:" ""
|
||||
let bindir = getCmdLineArg "--bindir:" ""
|
||||
let nuspecTitle = getBasename nuspec
|
||||
let layouts = getFullPath bindir ++ "layouts" ++ nuspecTitle
|
||||
let output = getFullPath bindir ++ "nuget"
|
||||
let isVerbose = verbose = "verbose"
|
||||
|
||||
let makeDirectory output =
|
||||
if not (Directory.Exists(output)) then Directory.CreateDirectory(output) |>ignore
|
||||
()
|
||||
//=========================================================================================
|
||||
// Invoke nuget.exe to build nuget package
|
||||
|
||||
//=========================================================================================
|
||||
// Build Nuget Package
|
||||
//=========================================================================================
|
||||
let author = @"Microsoft"
|
||||
let licenseUrl = @"https://github.com/Microsoft/visualfsharp/blob/master/License.txt"
|
||||
let projectUrl = @"https://github.com/Microsoft/visualfsharp"
|
||||
let tags = @"Visual F# Compiler FSharp coreclr functional programming"
|
||||
let author = "Microsoft"
|
||||
let licenseUrl = "https://github.com/Microsoft/visualfsharp/blob/master/License.txt"
|
||||
let projectUrl = "https://github.com/Microsoft/visualfsharp"
|
||||
let tags = "Visual F# Compiler FSharp coreclr functional programming"
|
||||
|
||||
let nugetArgs = sprintf "pack %s -BasePath \"%s\" -OutputDirectory \"%s\" -ExcludeEmptyDirectories -prop licenseUrl=\"%s\" -prop version=\"%s\" -prop authors=\"%s\" -prop projectURL=\"%s\" -prop tags=\"%s\" -Verbosity detailed"
|
||||
nuspec
|
||||
|
@ -61,32 +39,8 @@ try
|
|||
projectUrl
|
||||
tags
|
||||
|
||||
let nugetExePath = Path.GetFullPath(Path.Combine(__SOURCE_DIRECTORY__, @"..\..\.nuget\nuget.exe"))
|
||||
let executeProcess filename arguments =
|
||||
let processWriteMessage (chan:TextWriter) (message:string) =
|
||||
match message with
|
||||
| null -> ()
|
||||
| _ as m -> chan.WriteLine(m) |>ignore
|
||||
let info = new ProcessStartInfo()
|
||||
let p = new Process()
|
||||
printfn "%s %s" filename arguments
|
||||
info.Arguments <- arguments
|
||||
info.UseShellExecute <- false
|
||||
info.RedirectStandardOutput <- true
|
||||
info.RedirectStandardError <- true
|
||||
info.CreateNoWindow <- true
|
||||
info.FileName <- filename
|
||||
p.StartInfo <- info
|
||||
p.OutputDataReceived.Add(fun x -> processWriteMessage stdout x.Data)
|
||||
p.ErrorDataReceived.Add(fun x -> processWriteMessage stderr x.Data)
|
||||
if p.Start() then
|
||||
p.BeginOutputReadLine()
|
||||
p.BeginErrorReadLine()
|
||||
p.WaitForExit()
|
||||
p.ExitCode
|
||||
else
|
||||
0
|
||||
let nugetExePath = getFullPath (__SOURCE_DIRECTORY__ ++ "../../.nuget/nuget.exe")
|
||||
makeDirectory output
|
||||
exit (executeProcess nugetExePath nugetArgs)
|
||||
with _ ->
|
||||
exit (1)
|
||||
exit 1
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information,
|
||||
//
|
||||
// Scripting utilities
|
||||
//=========================================================================================
|
||||
|
||||
namespace global
|
||||
|
||||
open System
|
||||
open System.IO
|
||||
open System.Diagnostics
|
||||
|
||||
[<AutoOpen>]
|
||||
module Scripting =
|
||||
|
||||
let isNullOrEmpty s = String.IsNullOrEmpty s
|
||||
|
||||
let executeProcess filename arguments =
|
||||
let processWriteMessage (chan:TextWriter) (message:string) =
|
||||
if message <> null then
|
||||
chan.WriteLine(message)
|
||||
printfn "%s %s" filename arguments
|
||||
let info = ProcessStartInfo(Arguments=arguments, UseShellExecute=false,
|
||||
RedirectStandardOutput=true, RedirectStandardError=true,
|
||||
CreateNoWindow=true, FileName=filename)
|
||||
let p = new Process(StartInfo=info)
|
||||
p.OutputDataReceived.Add(fun x -> processWriteMessage stdout x.Data)
|
||||
p.ErrorDataReceived.Add(fun x -> processWriteMessage stderr x.Data)
|
||||
if p.Start() then
|
||||
p.BeginOutputReadLine()
|
||||
p.BeginErrorReadLine()
|
||||
p.WaitForExit()
|
||||
p.ExitCode
|
||||
else
|
||||
0
|
||||
|
||||
let argv = fsi.CommandLineArgs |> Seq.skip 1
|
||||
|
||||
let getCmdLineArg switchName defaultValue =
|
||||
match argv |> Seq.filter(fun t -> t.StartsWith(switchName)) |> Seq.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> Seq.tryHead with
|
||||
| Some(file) -> if file.Length <> 0 then file else defaultValue
|
||||
| _ -> defaultValue
|
||||
|
||||
let makeDirectory output =
|
||||
if not (Directory.Exists(output)) then
|
||||
Directory.CreateDirectory(output) |> ignore
|
||||
|
||||
let (++) a b = Path.Combine(a,b)
|
||||
|
||||
let getBasename a = Path.GetFileNameWithoutExtension a
|
||||
let getFullPath a = Path.GetFullPath a
|
||||
let getFilename a = Path.GetFileName a
|
||||
let getDirectoryName a = Path.GetDirectoryName a
|
||||
|
||||
let copyFile source dir =
|
||||
let dest =
|
||||
if not (Directory.Exists dir) then Directory.CreateDirectory dir |>ignore
|
||||
let result = Path.Combine(dir, Path.GetFileName source)
|
||||
result
|
||||
//printfn "Copy %s --> %s" source dest
|
||||
File.Copy(source, dest, true)
|
||||
|
||||
let deleteDirectory output =
|
||||
if Directory.Exists output then
|
||||
Directory.Delete(output, true)
|
||||
|
|
@ -1,24 +1,11 @@
|
|||
<!-- Copyright (c) Microsoft Corporation. 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>
|
||||
|
||||
<!-- Compiler: .NET 2.0 and 4.0 only -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net20' or
|
||||
'$(TargetFramework)' == 'net40' or
|
||||
'$(TargetFramework)' == 'coreclr' ">
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net40'">
|
||||
|
||||
<ProjectFiles Include="fsharp\FSharp.Build\FSharp.Build.fsproj" />
|
||||
<ProjectFiles Include="fsharp\FSharp.Compiler\FSharp.Compiler.fsproj" />
|
||||
<ProjectFiles Include="fsharp\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj" Condition="'$(TargetFramework)' != 'coreclr'" />
|
||||
<ProjectFiles Include="fsharp\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj" />
|
||||
<ProjectFiles Include="fsharp\Fsc\Fsc.fsproj" />
|
||||
<ProjectFiles Include="fsharp\fsi\Fsi.fsproj" />
|
||||
<ProjectFiles Include="fsharp\fsiAnyCpu\FsiAnyCpu.fsproj" Condition="'$(TargetFramework)' != 'coreclr'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ProjectFiles Include="fsharp\FSharp.Compiler.netcore.nuget\FSharp.Compiler.nuget.proj" Condition="'$(TargetFramework)' == 'coreclr'" />
|
||||
<ProjectFiles Include="fsharp\FSharp.Compiler.Host.netcore.nuget\FSharp.Compiler.Host.proj" Condition="'$(TargetFramework)' == 'coreclr'" />
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'coreclr'">
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="root.traversal.targets"/>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<!-- Core library: all frameworks -->
|
||||
<ItemGroup>
|
||||
<ProjectFiles Include="fsharp\FSharp.Core\FSharp.Core.fsproj" />
|
||||
<ProjectFiles Include="fsharp\fsharp.core.netcore.nuget\FSharp.Core.netcore.nuget.proj" Condition="'$(TargetFramework)' == 'coreclr'" />
|
||||
<ProjectFiles Include="fsharp\FSharp.Core.netcore.nuget\FSharp.Core.netcore.nuget.proj" Condition="'$(TargetFramework)' == 'coreclr'" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="root.traversal.targets"/>
|
||||
|
|
|
@ -1605,7 +1605,7 @@ let GetFSharpCoreReferenceUsedByCompiler(useSimpleResolution) =
|
|||
let fsCoreName = GetFSharpCoreLibraryName()
|
||||
#if FX_RESHAPED_REFLECTION
|
||||
// RESHAPED_REFLECTION does not have Assembly.GetReferencedAssemblies()
|
||||
// So use the fsharp.core.dll from alongside the fsc compiler.
|
||||
// So use the FSharp.Core.dll from alongside the fsc compiler.
|
||||
// This can also be used for the out of gac work on DEV15
|
||||
let fscCoreLocation =
|
||||
let fscLocation = typeof<TypeInThisAssembly>.Assembly.Location
|
||||
|
@ -2072,6 +2072,7 @@ type TcConfigBuilder =
|
|||
mutable embeddedPDB : bool
|
||||
mutable embedAllSource : bool
|
||||
mutable embedSourceList : string list
|
||||
mutable sourceLink : string
|
||||
|
||||
mutable ignoreSymbolStoreSequencePoints : bool
|
||||
mutable internConstantStrings : bool
|
||||
|
@ -2243,6 +2244,7 @@ type TcConfigBuilder =
|
|||
embeddedPDB = false
|
||||
embedAllSource = false
|
||||
embedSourceList = []
|
||||
sourceLink = ""
|
||||
ignoreSymbolStoreSequencePoints = false
|
||||
internConstantStrings = true
|
||||
extraOptimizationIterations = 0
|
||||
|
@ -2560,7 +2562,7 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
|
|||
| _ -> res
|
||||
let primaryAssemblyCcuInitializer = getSystemRuntimeInitializer data.primaryAssembly (computeKnownDllReference >> fst)
|
||||
|
||||
// If either mscorlib.dll/System.Runtime.dll or fsharp.core.dll are explicitly specified then we require the --noframework flag.
|
||||
// If either mscorlib.dll/System.Runtime.dll or FSharp.Core.dll are explicitly specified then we require the --noframework flag.
|
||||
// The reason is that some non-default frameworks may not have the default dlls. For example, Client profile does
|
||||
// not have System.Web.dll.
|
||||
do if ((primaryAssemblyExplicitFilenameOpt.IsSome || fslibExplicitFilenameOpt.IsSome) && data.framework) then
|
||||
|
@ -2732,6 +2734,7 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
|
|||
member x.embeddedPDB = data.embeddedPDB
|
||||
member x.embedAllSource = data.embedAllSource
|
||||
member x.embedSourceList = data.embedSourceList
|
||||
member x.sourceLink = data.sourceLink
|
||||
member x.ignoreSymbolStoreSequencePoints = data.ignoreSymbolStoreSequencePoints
|
||||
member x.internConstantStrings = data.internConstantStrings
|
||||
member x.extraOptimizationIterations = data.extraOptimizationIterations
|
||||
|
@ -2811,7 +2814,9 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
|
|||
#endif
|
||||
try
|
||||
match tcConfig.resolutionEnvironment with
|
||||
#if FX_MSBUILDRESOLVER_RUNTIMELIKE
|
||||
#if TODO_REWORK_ASSEMBLY_LOAD
|
||||
// "RuntimeLike" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
|
||||
#else
|
||||
| ReferenceResolver.RuntimeLike ->
|
||||
[System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()]
|
||||
#endif
|
||||
|
@ -4854,10 +4859,11 @@ module private ScriptPreprocessClosure =
|
|||
tcConfigB.resolutionEnvironment <-
|
||||
match codeContext with
|
||||
| CodeContext.Editing -> ReferenceResolver.DesignTimeLike
|
||||
#if FX_MSBUILDRESOLVER_RUNTIMELIKE
|
||||
| CodeContext.Compilation | CodeContext.Evaluation -> ReferenceResolver.RuntimeLike
|
||||
#else
|
||||
#if TODO_REWORK_ASSEMBLY_LOAD
|
||||
// "RuntimeLike" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
|
||||
| CodeContext.Compilation | CodeContext.Evaluation -> ReferenceResolver.CompileTimeLike
|
||||
#else
|
||||
| CodeContext.Compilation | CodeContext.Evaluation -> ReferenceResolver.RuntimeLike
|
||||
#endif
|
||||
tcConfigB.framework <- false
|
||||
// Indicates that there are some references not in BasicReferencesForScriptLoadClosure which should
|
||||
|
|
|
@ -302,6 +302,7 @@ type TcConfigBuilder =
|
|||
mutable embeddedPDB : bool
|
||||
mutable embedAllSource : bool
|
||||
mutable embedSourceList : string list
|
||||
mutable sourceLink : string
|
||||
mutable ignoreSymbolStoreSequencePoints : bool
|
||||
mutable internConstantStrings : bool
|
||||
mutable extraOptimizationIterations : int
|
||||
|
@ -458,6 +459,7 @@ type TcConfig =
|
|||
member embeddedPDB : bool
|
||||
member embedAllSource : bool
|
||||
member embedSourceList : string list
|
||||
member sourceLink : string
|
||||
member ignoreSymbolStoreSequencePoints : bool
|
||||
member internConstantStrings : bool
|
||||
member extraOptimizationIterations : int
|
||||
|
|
|
@ -525,6 +525,7 @@ let PrintOptionInfo (tcConfigB:TcConfigBuilder) =
|
|||
printfn " embeddedPDB. . . . . . : %+A" tcConfigB.embeddedPDB
|
||||
printfn " embedAllSource . . . . : %+A" tcConfigB.embedAllSource
|
||||
printfn " embedSourceList. . . . : %+A" tcConfigB.embedSourceList
|
||||
printfn " sourceLink . . . . . . : %+A" tcConfigB.sourceLink
|
||||
printfn " debuginfo . . . . . . : %+A" tcConfigB.debuginfo
|
||||
printfn " resolutionEnvironment : %+A" tcConfigB.resolutionEnvironment
|
||||
printfn " product . . . . . . . : %+A" tcConfigB.productNameForBannerText
|
||||
|
@ -672,6 +673,8 @@ let codeGenerationFlags isFsi (tcConfigB : TcConfigBuilder) =
|
|||
Some (FSComp.SR.optsEmbedAllSource()))
|
||||
CompilerOption("embed", tagFileList, OptionStringList (fun f -> tcConfigB.AddEmbeddedSourceFile f), None,
|
||||
Some ( FSComp.SR.optsEmbedSource()));
|
||||
CompilerOption("sourcelink", tagFile, OptionString (fun f -> tcConfigB.sourceLink <- f), None,
|
||||
Some ( FSComp.SR.optsSourceLink()));
|
||||
]
|
||||
let codegen =
|
||||
[CompilerOption("optimize", tagNone, OptionSwitch (SetOptimizeSwitch tcConfigB) , None,
|
||||
|
|
|
@ -838,7 +838,10 @@ optsWin32manifest,"Specify a Win32 manifest file"
|
|||
optsNowin32manifest,"Do not include the default Win32 manifest"
|
||||
optsEmbedAllSource,"Embed all source files in the portable PDB file"
|
||||
optsEmbedSource,"Embed specific source files in the portable PDB file"
|
||||
optsSourceLink,"Source link information file to embed in the portable PDB file"
|
||||
1501,optsEmbeddedSourceRequirePortablePDBs,"--embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded)"
|
||||
1502,optsSourceLinkRequirePortablePDBs,"--sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded)"
|
||||
srcFileTooLarge,"Source file is too large to embed in a portable PDB"
|
||||
optsResource,"Embed the specified managed resource"
|
||||
optsLinkresource,"Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]]"
|
||||
optsDebugPM,"Emit debug information (Short form: -g)"
|
||||
|
|
|
@ -122,6 +122,8 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
let mutable defineConstants : ITaskItem[] = [||]
|
||||
let mutable disabledWarnings : string = null
|
||||
let mutable documentationFile : string = null
|
||||
let mutable embedAllSources = false
|
||||
let mutable embed : string = null
|
||||
let mutable generateInterfaceFile : string = null
|
||||
let mutable keyFile : string = null
|
||||
let mutable noFramework = false
|
||||
|
@ -136,6 +138,7 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
let mutable referencePath : string = null
|
||||
let mutable resources : ITaskItem[] = [||]
|
||||
let mutable sources : ITaskItem[] = [||]
|
||||
let mutable sourceLink : string = null
|
||||
let mutable targetType : string = null
|
||||
#if FX_ATLEAST_35
|
||||
#else
|
||||
|
@ -183,6 +186,10 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
| "EMBEDDED" -> "embedded"
|
||||
| "FULL" -> "full"
|
||||
| _ -> null)
|
||||
if embedAllSources then
|
||||
builder.AppendSwitch("--embed+")
|
||||
builder.AppendSwitchIfNotNull("--embed:", embed)
|
||||
builder.AppendSwitchIfNotNull("--sourcelink:", sourceLink)
|
||||
// NoFramework
|
||||
if noFramework then
|
||||
builder.AppendSwitch("--noframework")
|
||||
|
@ -316,7 +323,7 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
member fsc.DebugSymbols
|
||||
with get() = debugSymbols
|
||||
and set(b) = debugSymbols <- b
|
||||
// --debug <none/portable/pdbonly/full>: Emit debugging information
|
||||
// --debug <none/portable/embedded/pdbonly/full>: Emit debugging information
|
||||
member fsc.DebugType
|
||||
with get() = debugType
|
||||
and set(s) = debugType <- s
|
||||
|
@ -332,6 +339,12 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
member fsc.DocumentationFile
|
||||
with get() = documentationFile
|
||||
and set(s) = documentationFile <- s
|
||||
member fsc.EmbedAllSources
|
||||
with get() = embedAllSources
|
||||
and set(s) = embedAllSources <- s
|
||||
member fsc.Embed
|
||||
with get() = embed
|
||||
and set(e) = embed <- e
|
||||
// --generate-interface-file <string>:
|
||||
// Print the inferred interface of the
|
||||
// assembly to a file.
|
||||
|
@ -398,6 +411,10 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
|
|||
member fsc.Resources
|
||||
with get() = resources
|
||||
and set(a) = resources <- a
|
||||
// SourceLink
|
||||
member fsc.SourceLink
|
||||
with get() = sourceLink
|
||||
and set(s) = sourceLink <- s
|
||||
// source files
|
||||
member fsc.Sources
|
||||
with get() = sources
|
||||
|
|
|
@ -23,6 +23,8 @@ type Fsc = class
|
|||
member DefineConstants : Microsoft.Build.Framework.ITaskItem [] with get,set
|
||||
member DisabledWarnings : string with get,set
|
||||
member DocumentationFile : string with get,set
|
||||
member Embed : string with get,set
|
||||
member EmbedAllSources : bool with get,set
|
||||
member GenerateInterfaceFile : string with get,set
|
||||
member KeyFile : string with get,set
|
||||
member NoFramework : bool with get,set
|
||||
|
@ -37,6 +39,7 @@ type Fsc = class
|
|||
member References : Microsoft.Build.Framework.ITaskItem [] with get,set
|
||||
member ReferencePath : string with get,set
|
||||
member Resources : Microsoft.Build.Framework.ITaskItem [] with get,set
|
||||
member SourceLink : string with get,set
|
||||
member Sources : Microsoft.Build.Framework.ITaskItem [] with get,set
|
||||
member TargetType : string with get,set
|
||||
#if FX_ATLEAST_35
|
||||
|
|
|
@ -160,6 +160,8 @@ this file.
|
|||
DefineConstants="$(DefineConstants)"
|
||||
DisabledWarnings="$(NoWarn)"
|
||||
DocumentationFile="$(DocumentationFile)"
|
||||
EmbedAllSources="$(EmbedAllSources)"
|
||||
Embed="$(Embed)"
|
||||
GenerateInterfaceFile="$(GenerateInterfaceFile)"
|
||||
KeyFile="$(KeyOriginatorFile)"
|
||||
LCID="$(LCID)"
|
||||
|
@ -173,6 +175,7 @@ this file.
|
|||
References="@(ReferencePath)"
|
||||
ReferencePath="$(ReferencePath)"
|
||||
Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile);@(AdditionalEmbeddedResource)"
|
||||
SourceLink="$(SourceLink)"
|
||||
Sources="@(CompileBefore);@(Compile);@(CompileAfter)"
|
||||
Tailcalls="$(Tailcalls)"
|
||||
TargetType="$(OutputType)"
|
||||
|
|
|
@ -9,15 +9,13 @@
|
|||
<PropertyGroup>
|
||||
<pkgversion Condition=" '$(PKGVersion)' == '' ">$(NuGetPerBuildPreReleaseVersion)</pkgversion>
|
||||
<OutDir>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin</OutDir>
|
||||
<Net40FsiToolPath>$(FSharpSourcesRoot)\..\$(Configuration)\net40\bin</Net40FsiToolPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- TODO: Switch to using lkg coreclr fsi and remove dependency on building net40 fsi after fixing #1168 -->
|
||||
<!-- TODO: Switch to using lkg coreclr fsi and remove dependency on running FSharp.Compiler.Tools fsi -->
|
||||
|
||||
<Target Name="Build" Outputs="$(TargetPath)" DependsOnTargets="$(BuildDependsOn)">
|
||||
<MSBuild Projects="$(FSharpSourcesRoot)\fsharp\fsi\Fsi.fsproj" Targets="Build" Properties="Configuration=$(Configuration);TargetFramework=net40" />
|
||||
<Exec Command="$(Net40FsiToolPath)\$(FsiToolExe) --exec layoutfschostnuget.fsx --nuspec:.\Microsoft.FSharp.Compiler.Host.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
<Exec Command="$(Net40FsiToolPath)\$(FsiToolExe) --exec ..\..\buildtools\buildnugets.fsx --version:$(pkgversion) --nuspec:.\Microsoft.FSharp.Compiler.Host.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
<Exec Command="$(FsiToolPath)\$(FsiToolExe) --exec layoutfschostnuget.fsx --nuspec:.\Microsoft.FSharp.Compiler.Host.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
<Exec Command="$(FsiToolPath)\$(FsiToolExe) --exec ..\..\buildtools\buildnugets.fsx --version:$(pkgversion) --nuspec:.\Microsoft.FSharp.Compiler.Host.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="Rebuild" DependsOnTargets="Build" />
|
||||
|
|
|
@ -4,53 +4,30 @@
|
|||
//=========================================================================================
|
||||
open System.IO
|
||||
|
||||
#load "../../buildtools/scriptlib.fsx"
|
||||
|
||||
try
|
||||
//=========================================================================================
|
||||
// Command line arguments
|
||||
//=========================================================================================
|
||||
|
||||
// Try head was introduced in F# 4.0
|
||||
let tryHead (source : seq<_>) =
|
||||
let checkNonNull argName arg =
|
||||
match box arg with
|
||||
| null -> nullArg argName
|
||||
| _ -> ()
|
||||
checkNonNull "source" source
|
||||
use e = source.GetEnumerator()
|
||||
if (e.MoveNext()) then Some e.Current
|
||||
else None
|
||||
let usage = "usage: layoutfcsnhostnuget.fsx -nuspec:<nuspec-path> --binaries:<binaries-dir>"
|
||||
|
||||
let usage = @"usage: layoutfcsnhostnuget.fsx -nuspec:<nuspec-path> --binaries:<binaries-dir>"
|
||||
|
||||
let Arguments = fsi.CommandLineArgs |> Seq.skip 1
|
||||
|
||||
let GetArgumentFromCommandLine switchName defaultValue =
|
||||
match Arguments |> Seq.filter(fun t -> t.StartsWith(switchName)) |> Seq.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> tryHead with
|
||||
| Some(file) -> if file.Length <> 0 then file else defaultValue
|
||||
| _ -> defaultValue
|
||||
|
||||
let verbose = GetArgumentFromCommandLine "--verbosity:" @"normal"
|
||||
let nuspec = GetArgumentFromCommandLine "--nuspec:" @""
|
||||
let bindir = GetArgumentFromCommandLine "--bindir:" @""
|
||||
let nuspecTitle = Path.GetFileNameWithoutExtension(nuspec)
|
||||
let layouts = Path.Combine(Path.GetFullPath(bindir), "layouts", nuspecTitle)
|
||||
let verbose = getCmdLineArg "--verbosity:" "normal"
|
||||
let nuspec = getCmdLineArg "--nuspec:" ""
|
||||
let bindir = getCmdLineArg "--bindir:" ""
|
||||
let nuspecTitle = getBasename nuspec
|
||||
let layouts = getFullPath bindir ++ "layouts" ++ nuspecTitle
|
||||
let isVerbose = verbose = "verbose"
|
||||
|
||||
//=========================================================================================
|
||||
// Layout nuget package --- nothing to do here except make the directory
|
||||
//=========================================================================================
|
||||
let deleteDirectory output =
|
||||
if (Directory.Exists(output)) then Directory.Delete(output, true) |>ignore
|
||||
()
|
||||
|
||||
let makeDirectory output =
|
||||
if not (Directory.Exists(output)) then Directory.CreateDirectory(output) |>ignore
|
||||
()
|
||||
// Layout nuget package
|
||||
|
||||
//Clean intermediate directory
|
||||
deleteDirectory layouts; makeDirectory layouts
|
||||
deleteDirectory layouts
|
||||
makeDirectory layouts
|
||||
exit 0
|
||||
|
||||
with e -> printfn "Exception: %s" e.Message
|
||||
printfn "Stacktrace: %s" e.StackTrace
|
||||
exit (1)
|
||||
exit (0)
|
||||
with e ->
|
||||
printfn "Exception: %s" e.Message
|
||||
printfn "Stacktrace: %s" e.StackTrace
|
||||
exit 1
|
||||
|
|
|
@ -9,15 +9,13 @@
|
|||
<PropertyGroup>
|
||||
<PkgVersion>$(NuGetPerBuildPreReleaseVersion)</PkgVersion>
|
||||
<OutDir>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin</OutDir>
|
||||
<Net40FsiToolPath>$(FSharpSourcesRoot)\..\$(Configuration)\net40\bin</Net40FsiToolPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- TODO: Switch to using lkg coreclr fsi and remove dependency on building net40 fsi after fixing #1168 -->
|
||||
|
||||
<Target Name="Build" Outputs="$(TargetPath)" DependsOnTargets="$(BuildDependsOn)">
|
||||
<MSBuild Projects="$(FSharpSourcesRoot)\fsharp\fsi\Fsi.fsproj" Targets="Build" Properties="Configuration=$(Configuration);TargetFramework=net40" />
|
||||
<Exec Command="$(Net40FsiToolPath)\$(FsiToolExe) --exec layoutfscnuget.fsx --nuspec:.\Microsoft.FSharp.Compiler.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
<Exec Command="$(Net40FsiToolPath)\$(FsiToolExe) --exec ..\..\buildtools\buildnugets.fsx --version:$(PkgVersion) --nuspec:.\Microsoft.FSharp.Compiler.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
<Exec Command="$(FsiToolPath)\$(FsiToolExe) --exec layoutfscnuget.fsx --nuspec:.\Microsoft.FSharp.Compiler.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
<Exec Command="$(FsiToolPath)\$(FsiToolExe) --exec ..\..\buildtools\buildnugets.fsx --version:$(PkgVersion) --nuspec:.\Microsoft.FSharp.Compiler.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="Rebuild" DependsOnTargets="Build" />
|
||||
|
|
|
@ -2,80 +2,45 @@
|
|||
//
|
||||
// Layout the nuget package for the fsharp compiler
|
||||
//=========================================================================================
|
||||
open System.IO
|
||||
|
||||
#load "../../buildtools/scriptlib.fsx"
|
||||
|
||||
try
|
||||
//=========================================================================================
|
||||
// Command line arguments
|
||||
//=========================================================================================
|
||||
|
||||
// Try head was introduced in F# 4.0
|
||||
let tryHead (source : seq<_>) =
|
||||
let checkNonNull argName arg =
|
||||
match box arg with
|
||||
| null -> nullArg argName
|
||||
| _ -> ()
|
||||
checkNonNull "source" source
|
||||
use e = source.GetEnumerator()
|
||||
if (e.MoveNext()) then Some e.Current
|
||||
else None
|
||||
let usage = "usage: layoutfcsnuget.fsx -nuspec:<nuspec-path> --binaries:<binaries-dir>"
|
||||
|
||||
let usage = @"usage: layoutfcsnuget.fsx -nuspec:<nuspec-path> --binaries:<binaries-dir>"
|
||||
|
||||
let Arguments = fsi.CommandLineArgs |> Seq.skip 1
|
||||
|
||||
let GetArgumentFromCommandLine switchName defaultValue =
|
||||
match Arguments |> Seq.filter(fun t -> t.StartsWith(switchName)) |> Seq.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> tryHead with
|
||||
| Some(file) -> if file.Length <> 0 then file else defaultValue
|
||||
| _ -> defaultValue
|
||||
|
||||
let verbose = GetArgumentFromCommandLine "--verbosity:" @"normal"
|
||||
let nuspec = GetArgumentFromCommandLine "--nuspec:" @""
|
||||
let bindir = GetArgumentFromCommandLine "--bindir:" @""
|
||||
let nuspecTitle = Path.GetFileNameWithoutExtension(nuspec)
|
||||
let verbose = getCmdLineArg "--verbosity:" "normal"
|
||||
let nuspec = getCmdLineArg "--nuspec:" ""
|
||||
let bindir = getCmdLineArg "--bindir:" ""
|
||||
let nuspecTitle = getBasename nuspec
|
||||
printfn ">>%s<<" bindir
|
||||
printfn ">>%s<<" nuspecTitle
|
||||
let layouts = Path.Combine(Path.GetFullPath(bindir), "layouts", nuspecTitle)
|
||||
let layouts = getFullPath bindir ++ "layouts" ++ nuspecTitle
|
||||
let isVerbose = verbose = "verbose"
|
||||
|
||||
//=========================================================================================
|
||||
// Layout nuget package
|
||||
//=========================================================================================
|
||||
let copyFile source dir =
|
||||
let dest =
|
||||
if not (Directory.Exists(dir)) then Directory.CreateDirectory(dir) |>ignore
|
||||
let result = Path.Combine(dir, Path.GetFileName(source))
|
||||
result
|
||||
if isVerbose then
|
||||
printfn "source: %s" source
|
||||
printfn "dest: %s" dest
|
||||
File.Copy(source, dest, true)
|
||||
|
||||
let deleteDirectory (output) =
|
||||
if (Directory.Exists(output)) then Directory.Delete(output, true) |>ignore
|
||||
()
|
||||
|
||||
let makeDirectory (output) =
|
||||
if not (Directory.Exists(output)) then Directory.CreateDirectory(output) |>ignore
|
||||
()
|
||||
|
||||
let fsharpCompilerFiles =
|
||||
seq {
|
||||
yield Path.Combine(bindir, "fsc.exe")
|
||||
yield Path.Combine(bindir, "FSharp.Compiler.dll")
|
||||
yield Path.Combine(bindir, "default.win32manifest")
|
||||
yield Path.Combine(bindir, "fsi.exe")
|
||||
yield Path.Combine(bindir, "FSharp.Compiler.Interactive.Settings.dll")
|
||||
yield Path.Combine(bindir, "FSharp.Build.dll")
|
||||
yield Path.Combine(bindir, "Microsoft.FSharp.targets")
|
||||
yield Path.Combine(bindir, "Microsoft.Portable.FSharp.targets")
|
||||
}
|
||||
[ bindir ++ "fsc.exe"
|
||||
bindir ++ "FSharp.Compiler.dll"
|
||||
bindir ++ "default.win32manifest"
|
||||
bindir ++ "fsi.exe"
|
||||
bindir ++ "FSharp.Compiler.Interactive.Settings.dll"
|
||||
bindir ++ "FSharp.Build.dll"
|
||||
bindir ++ "Microsoft.FSharp.targets"
|
||||
bindir ++ "Microsoft.Portable.FSharp.targets" ]
|
||||
|
||||
//Clean intermediate directoriy
|
||||
deleteDirectory(layouts); makeDirectory(layouts)
|
||||
fsharpCompilerFiles |> Seq.iter(fun source -> copyFile source layouts)
|
||||
deleteDirectory layouts
|
||||
makeDirectory layouts
|
||||
for source in fsharpCompilerFiles do
|
||||
copyFile source layouts
|
||||
exit 0
|
||||
|
||||
with e -> printfn "Exception: %s" e.Message
|
||||
printfn "Stacktrace: %s" e.StackTrace
|
||||
exit (1)
|
||||
exit (0)
|
||||
with e ->
|
||||
printfn "Exception: %s" e.Message
|
||||
printfn "Stacktrace: %s" e.StackTrace
|
||||
exit 1
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<Tailcalls>false</Tailcalls>
|
||||
<TargetProfile Condition=" '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259' or '$(TargetFramework)' == 'coreclr' ">netcore</TargetProfile>
|
||||
<NoWarn>$(NoWarn);217</NoWarn>
|
||||
<OutputPath Condition="'$(TargetFramework)' == 'coreclr'">$(FSharpSourcesRoot)\..\tests\testbin\$(Configuration)\coreclr\fsharp.core.unittests</OutputPath>
|
||||
<OutputPath Condition="'$(TargetFramework)' == 'coreclr'">$(FSharpSourcesRoot)\..\tests\testbin\$(Configuration)\coreclr\FSharp.Core.unittests</OutputPath>
|
||||
<CustomOutputPath Condition="'$(TargetFramework)' == 'coreclr'">true</CustomOutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
@ -30,14 +30,12 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
|
|
|
@ -77,7 +77,7 @@ module SurfaceArea =
|
|||
// gets string form of public surface area for the currently-loaded FSharp.Core
|
||||
let private getActual () =
|
||||
|
||||
// get current fsharp.core
|
||||
// get current FSharp.Core
|
||||
let asm =
|
||||
#if portable7 || portable78 || portable259 || coreclr
|
||||
typeof<int list>.GetTypeInfo().Assembly
|
||||
|
|
|
@ -9,15 +9,13 @@
|
|||
<PropertyGroup>
|
||||
<PkgVersion>$(NuGetPerBuildPreReleaseVersion)</PkgVersion>
|
||||
<OutDir>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin</OutDir>
|
||||
<Net40FsiToolPath>$(FSharpSourcesRoot)\..\$(Configuration)\net40\bin</Net40FsiToolPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- TODO: Switch to using lkg coreclr fsi and remove dependency on building net40 fsi after fixing #1168 -->
|
||||
|
||||
<Target Name="Build" Outputs="$(TargetPath)" DependsOnTargets="$(BuildDependsOn)">
|
||||
<MSBuild Projects="$(FSharpSourcesRoot)\fsharp\fsi\Fsi.fsproj" Targets="Build" Properties="Configuration=$(Configuration);TargetFramework=net40" />
|
||||
<Exec Command="$(Net40FsiToolPath)\$(FsiToolExe) --exec layoutfscorenuget.fsx --nuspec:.\Microsoft.FSharp.Core.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
<Exec Command="$(Net40FsiToolPath)\$(FsiToolExe) --exec ..\..\buildtools\buildnugets.fsx --version:$(PkgVersion) --nuspec:.\Microsoft.FSharp.Core.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
<Exec Command="$(FsiToolPath)\$(FsiToolExe) --exec layoutfscorenuget.fsx --nuspec:.\Microsoft.FSharp.Core.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
<Exec Command="$(FsiToolPath)\$(FsiToolExe) --exec ..\..\buildtools\buildnugets.fsx --version:$(PkgVersion) --nuspec:.\Microsoft.FSharp.Core.netcore.nuspec --bindir:$(OutDir)"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="Rebuild" DependsOnTargets="Build" />
|
|
@ -3,7 +3,7 @@
|
|||
<metadata>
|
||||
<id>Microsoft.FSharp.Core.netcore</id>
|
||||
<description>
|
||||
.NET Core compatible version of the fsharp core library fsharp.core.dll
|
||||
.NET Core compatible version of the fsharp core library FSharp.Core.dll
|
||||
Supported Platforms: - .NET Core (netstandard1.6)
|
||||
</description>
|
||||
<language>en-US</language>
|
|
@ -0,0 +1,44 @@
|
|||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information,
|
||||
//
|
||||
// Layout the nuget package for the fsharp compiler
|
||||
//=========================================================================================
|
||||
|
||||
#load "../../buildtools/scriptlib.fsx"
|
||||
|
||||
try
|
||||
|
||||
//=========================================================================================
|
||||
// Command line arguments
|
||||
|
||||
let usage = "usage: layoutfscorenuget.fsx -nuspec:<nuspec-path> --binaries:<binaries-dir>"
|
||||
|
||||
let verbose = getCmdLineArg "--verbosity:" "normal"
|
||||
let nuspec = getCmdLineArg "--nuspec:" ""
|
||||
let bindir = getCmdLineArg "--bindir:" ""
|
||||
let nuspecTitle = getBasename nuspec
|
||||
let layouts = getFullPath bindir ++ "layouts" ++ nuspecTitle
|
||||
let isVerbose = verbose = "verbose"
|
||||
|
||||
//=========================================================================================
|
||||
// Layout nuget package
|
||||
|
||||
let fsharpCoreFiles =
|
||||
[ bindir ++ "FSharp.Core.xml"
|
||||
bindir ++ "FSharp.Core.dll"
|
||||
bindir ++ "FSharp.Core.sigdata"
|
||||
bindir ++ "FSharp.Core.optdata"
|
||||
__SOURCE_DIRECTORY__ ++ "FSharp.Core.runtimeconfig.json" ]
|
||||
|
||||
//Clean intermediate directory
|
||||
deleteDirectory layouts
|
||||
makeDirectory layouts
|
||||
|
||||
for source in fsharpCoreFiles do
|
||||
copyFile source layouts
|
||||
|
||||
exit 0
|
||||
|
||||
with e ->
|
||||
printfn "Exception: %s" e.Message
|
||||
printfn "Stacktrace: %s" e.StackTrace
|
||||
exit 1
|
|
@ -593,7 +593,6 @@
|
|||
<Reference Include="System.Reflection.Metadata"><HintPath>..\..\..\packages\System.Reflection.Metadata.1.4.1-beta-24227-04\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath></Reference>
|
||||
<Reference Include="System.Collections.Immutable"><HintPath>..\..\..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath></Reference>
|
||||
<Reference Include="System.ValueTuple"><HintPath>..\..\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll</HintPath></Reference>
|
||||
<Reference Include="System.ValueTuple"><HintPath>..\..\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\\System.ValueTuple.dll</HintPath></Reference>
|
||||
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj" >
|
||||
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
|
||||
<Name>FSharp.Core</Name>
|
||||
|
|
|
@ -271,8 +271,12 @@ let ProcessCommandLineFlags (tcConfigB: TcConfigBuilder,setProcessThreadLocals,a
|
|||
|
||||
// This is where flags are interpreted by the command line fsc.exe.
|
||||
ParseCompilerOptions (collect, GetCoreFscCompilerOptions tcConfigB, List.tail (PostProcessCompilerArgs abbrevArgs argv))
|
||||
if (tcConfigB.embedAllSource || tcConfigB.embedSourceList |> List.length <> 0) && (not (tcConfigB.portablePDB || tcConfigB.embeddedPDB)) then
|
||||
error(Error(FSComp.SR.optsEmbeddedSourceRequirePortablePDBs(),rangeCmdArgs))
|
||||
|
||||
if not (tcConfigB.portablePDB || tcConfigB.embeddedPDB) then
|
||||
if tcConfigB.embedAllSource || (tcConfigB.embedSourceList |> List.length <> 0) then
|
||||
error(Error(FSComp.SR.optsEmbeddedSourceRequirePortablePDBs(), rangeCmdArgs))
|
||||
if not (String.IsNullOrEmpty(tcConfigB.sourceLink)) then
|
||||
error(Error(FSComp.SR.optsSourceLinkRequirePortablePDBs(),rangeCmdArgs))
|
||||
|
||||
let inputFiles = List.rev !inputFilesRef
|
||||
|
||||
|
@ -1749,6 +1753,7 @@ module FileWriter =
|
|||
embeddedPDB = tcConfig.embeddedPDB
|
||||
embedAllSource = tcConfig.embedAllSource
|
||||
embedSourceList = tcConfig.embedSourceList
|
||||
sourceLink = tcConfig.sourceLink
|
||||
signer = GetSigner signingInfo
|
||||
fixupOverlappingSequencePoints = false
|
||||
dumpDebugInfo = tcConfig.dumpDebugInfo },
|
||||
|
@ -2029,6 +2034,8 @@ let main2b(Args(tcConfig: TcConfig, tcImports, tcGlobals, errorLogger, generated
|
|||
|
||||
let main3(Args(tcConfig, errorLogger: ErrorLogger, staticLinker, ilGlobals, outfile, pdbfile, ilxMainModule, signingInfo, exiter:Exiter)) =
|
||||
|
||||
use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind (BuildPhase.Output)
|
||||
|
||||
let ilxMainModule =
|
||||
try staticLinker ilxMainModule
|
||||
with e ->
|
||||
|
@ -2050,7 +2057,7 @@ let main4 (Args (tcConfig, errorLogger: ErrorLogger, ilGlobals, ilxMainModule, o
|
|||
|
||||
AbortOnError(errorLogger, tcConfig, exiter)
|
||||
|
||||
// Don't copy referenced fharp.core.dll if we are building fsharp.core.dll
|
||||
// Don't copy referenced FSharp.core.dll if we are building FSharp.Core.dll
|
||||
if tcConfig.copyFSharpCore && not tcConfig.compilingFslib && not tcConfig.standalone then
|
||||
copyFSharpCore(outfile, tcConfig.referencedDLLs)
|
||||
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information,
|
||||
//
|
||||
// Layout the nuget package for the fsharp compiler
|
||||
//=========================================================================================
|
||||
open System.IO
|
||||
|
||||
try
|
||||
//=========================================================================================
|
||||
// Command line arguments
|
||||
//=========================================================================================
|
||||
|
||||
// Try head was introduced in F# 4.0
|
||||
let tryHead (source : seq<_>) =
|
||||
let checkNonNull argName arg =
|
||||
match box arg with
|
||||
| null -> nullArg argName
|
||||
| _ -> ()
|
||||
checkNonNull "source" source
|
||||
use e = source.GetEnumerator()
|
||||
if (e.MoveNext()) then Some e.Current
|
||||
else None
|
||||
|
||||
let usage = @"usage: layoutfscorenuget.fsx -nuspec:<nuspec-path> --binaries:<binaries-dir>"
|
||||
|
||||
let Arguments = fsi.CommandLineArgs |> Seq.skip 1
|
||||
|
||||
let GetArgumentFromCommandLine switchName defaultValue =
|
||||
match Arguments |> Seq.filter(fun t -> t.StartsWith(switchName)) |> Seq.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> tryHead with
|
||||
| Some(file) -> if file.Length <> 0 then file else defaultValue
|
||||
| _ -> defaultValue
|
||||
|
||||
let verbose = GetArgumentFromCommandLine "--verbosity:" @"normal"
|
||||
let nuspec = GetArgumentFromCommandLine "--nuspec:" @""
|
||||
let bindir = GetArgumentFromCommandLine "--bindir:" @""
|
||||
let nuspecTitle = Path.GetFileNameWithoutExtension(nuspec)
|
||||
let layouts = Path.Combine(Path.GetFullPath(bindir), "layouts", nuspecTitle)
|
||||
let isVerbose = verbose = "verbose"
|
||||
|
||||
//=========================================================================================
|
||||
// Layout nuget package
|
||||
//=========================================================================================
|
||||
let copyFile source dir =
|
||||
let dest =
|
||||
if not (Directory.Exists(dir)) then Directory.CreateDirectory(dir) |>ignore
|
||||
let result = Path.Combine(dir, Path.GetFileName(source))
|
||||
result
|
||||
if isVerbose then
|
||||
printfn "source: %s" source
|
||||
printfn "dest: %s" dest
|
||||
File.Copy(source, dest, true)
|
||||
|
||||
let deleteDirectory (output) =
|
||||
if (Directory.Exists(output)) then Directory.Delete(output, true) |>ignore
|
||||
()
|
||||
|
||||
let makeDirectory (output) =
|
||||
if not (Directory.Exists(output)) then Directory.CreateDirectory(output) |>ignore
|
||||
()
|
||||
|
||||
let fsharpCoreFiles =
|
||||
seq {
|
||||
yield Path.Combine(bindir, "FSharp.Core.xml")
|
||||
yield Path.Combine(bindir, "FSharp.Core.dll")
|
||||
yield Path.Combine(bindir, "FSharp.Core.sigdata")
|
||||
yield Path.Combine(bindir, "FSharp.Core.optdata")
|
||||
yield Path.Combine( __SOURCE_DIRECTORY__ , "FSharp.Core.runtimeconfig.json")
|
||||
}
|
||||
|
||||
//Clean intermediate directoriy
|
||||
deleteDirectory(layouts); makeDirectory(layouts)
|
||||
|
||||
fsharpCoreFiles |> Seq.iter(fun source -> copyFile source layouts)
|
||||
|
||||
with e -> printfn "Exception: %s" e.Message
|
||||
printfn "Stacktrace: %s" e.StackTrace
|
||||
exit (1)
|
||||
exit (0)
|
|
@ -2217,10 +2217,11 @@ type internal FsiEvaluationSession (argv:string[], inReader:TextReader, outWrite
|
|||
Directory.GetCurrentDirectory(),isInteractive=true,
|
||||
isInvalidationSupported=false)
|
||||
let tcConfigP = TcConfigProvider.BasedOnMutableBuilder(tcConfigB)
|
||||
#if FX_MSBUILDRESOLVER_RUNTIMELIKE
|
||||
do tcConfigB.resolutionEnvironment <- ReferenceResolver.RuntimeLike // See Bug 3608
|
||||
#else
|
||||
#if TODO_REWORK_ASSEMBLY_LOAD
|
||||
// "RuntimeLike" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
|
||||
do tcConfigB.resolutionEnvironment <- ReferenceResolver.DesignTimeLike
|
||||
#else
|
||||
do tcConfigB.resolutionEnvironment <- ReferenceResolver.RuntimeLike // See Bug 3608
|
||||
#endif
|
||||
do tcConfigB.useFsiAuxLib <- true
|
||||
|
||||
|
|
|
@ -44,52 +44,52 @@ set NGEN32=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
|
|||
set NGEN64=%windir%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
|
||||
|
||||
rem Disable strong-name validation for F# binaries built from open source that are signed with the microsoft key
|
||||
%SN32% -Vr FSharp.Core,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.Build,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.Core,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.Build,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a
|
||||
|
||||
%SN32% -Vr fsc,b03f5f7f11d50a3a
|
||||
%SN32% -Vr fsi,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FsiAnyCPU,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr fsc,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr fsi,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FsiAnyCPU,b03f5f7f11d50a3a
|
||||
|
||||
%SN32% -Vr FSharp.Compiler,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.Editor,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.LanguageService,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.LanguageService.Compiler,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.VS.FSI,b03f5f7f11d50a3a
|
||||
%SN32% -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a
|
||||
%SN32% -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a
|
||||
%SN32% -Vr FSharp.Compiler.Unittests,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.Compiler,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.Editor,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.LanguageService,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.LanguageService.Compiler,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.VS.FSI,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a
|
||||
%SN32% -q -Vr FSharp.Compiler.Unittests,b03f5f7f11d50a3a
|
||||
|
||||
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
|
||||
%SN64% -Vr FSharp.Core,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.Build,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.Core,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.Build,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a
|
||||
|
||||
%SN64% -Vr fsc,b03f5f7f11d50a3a
|
||||
%SN64% -Vr fsi,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FsiAnyCPU,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr fsc,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr fsi,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FsiAnyCPU,b03f5f7f11d50a3a
|
||||
|
||||
%SN64% -Vr FSharp.Compiler,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.Editor,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.LanguageService,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.LanguageService.Compiler,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.VS.FSI,b03f5f7f11d50a3a
|
||||
%SN64% -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a
|
||||
%SN64% -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a
|
||||
%SN64% -Vr FSharp.Compiler.Unittests,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.Compiler,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.Editor,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.LanguageService,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.LanguageService.Compiler,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.VS.FSI,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a
|
||||
%SN64% -q -Vr FSharp.Compiler.Unittests,b03f5f7f11d50a3a
|
||||
)
|
||||
|
||||
if /i '%1' == 'signonly' goto :eof
|
||||
|
@ -98,15 +98,15 @@ if /i '%1' == 'debug' set NGEN_FLAGS=/Debug
|
|||
rem NGen fsc, fsi, fsiAnyCpu, and FSharp.Build.dll
|
||||
if /i not "%2"=="-ngen" goto :donengen
|
||||
|
||||
"%NGEN32%" install "%BINDIR%\fsc.exe" %NGEN_FLAGS% /queue:1
|
||||
"%NGEN32%" install "%BINDIR%\fsi.exe" %NGEN_FLAGS% /queue:1
|
||||
"%NGEN32%" install "%BINDIR%\FSharp.Build.dll" %NGEN_FLAGS% /queue:1
|
||||
"%NGEN32%" executeQueuedItems 1
|
||||
"%NGEN32%" install "%BINDIR%\fsc.exe" %NGEN_FLAGS% /queue:1 /nologo
|
||||
"%NGEN32%" install "%BINDIR%\fsi.exe" %NGEN_FLAGS% /queue:1 /nologo
|
||||
"%NGEN32%" install "%BINDIR%\FSharp.Build.dll" %NGEN_FLAGS% /queue:1 /nologo
|
||||
"%NGEN32%" executeQueuedItems 1 /nologo
|
||||
|
||||
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
|
||||
"%NGEN64%" install "%BINDIR%\fsiAnyCpu.exe" %NGEN_FLAGS% /queue:1
|
||||
"%NGEN64%" install "%BINDIR%\FSharp.Build.dll" %NGEN_FLAGS% /queue:1
|
||||
"%NGEN64%" executeQueuedItems 1
|
||||
"%NGEN64%" install "%BINDIR%\fsiAnyCpu.exe" %NGEN_FLAGS% /queue:1 /nologo
|
||||
"%NGEN64%" install "%BINDIR%\FSharp.Build.dll" %NGEN_FLAGS% /queue:1 /nologo
|
||||
"%NGEN64%" executeQueuedItems 1 /nologo
|
||||
)
|
||||
|
||||
:donengen
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
FSharp_*
|
||||
FSharpQA_*
|
||||
net40-fsharpqa-suite-*
|
||||
CoreUnit_*
|
||||
TestResults
|
||||
*.il
|
||||
|
|
|
@ -1,111 +0,0 @@
|
|||
@echo off
|
||||
|
||||
if /i "%1" == "debug" goto :ok
|
||||
if /i "%1" == "release" goto :ok
|
||||
|
||||
echo Builds a few test tools using latest compiler and runtime
|
||||
echo Usage:
|
||||
echo BuildTestTools.cmd debug
|
||||
echo BuildTestTools.cmd release
|
||||
exit /b 1
|
||||
|
||||
:ok
|
||||
|
||||
:: Check prerequisites
|
||||
if not '%VisualStudioVersion%' == '' goto vsversionset
|
||||
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 15.0\common7\ide\devenv.exe" set VisualStudioVersion=15.0
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio 15.0\common7\ide\devenv.exe" set VisualStudioVersion=15.0
|
||||
if exist "%VS150COMNTOOLS%" set VisualStudioVersion=15.0
|
||||
if not '%VisualStudioVersion%' == '' goto vsversionset
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\common7\ide\devenv.exe" set VisualStudioVersion=14.0
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio 14.0\common7\ide\devenv.exe" set VisualStudioVersion=14.0
|
||||
if exist "%VS140COMNTOOLS%" set VisualStudioVersion=14.0
|
||||
if not '%VisualStudioVersion%' == '' goto vsversionset
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\common7\ide\devenv.exe" set VisualStudioVersion=12.0
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\common7\ide\devenv.exe" set VisualStudioVersion=12.0
|
||||
if exist "%VS120COMNTOOLS%" set VisualStudioVersion=12.0
|
||||
|
||||
:vsversionset
|
||||
if '%VisualStudioVersion%' == '' echo Error: Could not find an installation of Visual Studio && goto :failure
|
||||
|
||||
if exist "%VS150COMNTOOLS%..\..\MSBuild\15.0\Bin\MSBuild.exe" (
|
||||
set _msbuildexe="%VS150COMNTOOLS%..\..\MSBuild\15.0\Bin\MSBuild.exe"
|
||||
goto :havemsbuild
|
||||
)
|
||||
if exist "%ProgramFiles(x86)%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" (
|
||||
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe"
|
||||
goto :havemsbuild
|
||||
)
|
||||
if exist "%ProgramFiles%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" (
|
||||
set _msbuildexe="%ProgramFiles%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe"
|
||||
goto :havemsbuild
|
||||
)
|
||||
echo Error: Could not find MSBuild.exe. && goto :failure
|
||||
goto :eof
|
||||
:havemsbuild
|
||||
|
||||
if not exist "%~dp0fsharpqa\testenv\bin" mkdir "%~dp0fsharpqa\testenv\bin" || goto :error
|
||||
%_msbuildexe% %~dp0fsharpqa\testenv\src\ILComparer\ILComparer.fsproj /p:Configuration=%1 /t:Build || goto :error
|
||||
xcopy /Y %~dp0fsharpqa\testenv\src\ILComparer\bin\%1\* %~dp0fsharpqa\testenv\bin || goto :error
|
||||
|
||||
%_msbuildexe% %~dp0fsharpqa\testenv\src\diff\diff.fsproj /p:Configuration=%1 /t:Build || goto :error
|
||||
xcopy /Y %~dp0fsharpqa\testenv\src\diff\bin\%1\* %~dp0fsharpqa\testenv\bin || goto :error
|
||||
|
||||
%_msbuildexe% %~dp0fsharpqa\testenv\src\HostedCompilerServer\HostedCompilerServer.fsproj /p:Configuration=%1 /t:Build || goto :error
|
||||
xcopy /Y %~dp0fsharpqa\testenv\src\HostedCompilerServer\bin\%1\* %~dp0fsharpqa\testenv\bin || goto :error
|
||||
|
||||
%_msbuildexe% %~dp0fsharpqa\testenv\src\ExecAssembly\ExecAssembly.fsproj /p:Configuration=%1 /t:Build /p:Platform=x86 || goto :error
|
||||
xcopy /IY %~dp0fsharpqa\testenv\src\ExecAssembly\bin\%1\* %~dp0fsharpqa\testenv\bin\x86 || goto :error
|
||||
|
||||
%_msbuildexe% %~dp0fsharpqa\testenv\src\ExecAssembly\ExecAssembly.fsproj /p:Configuration=%1 /t:Build /p:Platform=x64 || goto :error
|
||||
xcopy /IY %~dp0fsharpqa\testenv\src\ExecAssembly\bin\%1\* %~dp0fsharpqa\testenv\bin\AMD64 || goto :error
|
||||
|
||||
if exist %~dp0..\%1\net40\bin (
|
||||
xcopy /Y %~dp0..\%1\net40\bin\FSharp.Core.sigdata %~dp0fsharpqa\testenv\bin || goto :error
|
||||
xcopy /Y %~dp0..\%1\net40\bin\FSharp.Core.optdata %~dp0fsharpqa\testenv\bin || goto :error
|
||||
)
|
||||
|
||||
echo set NUNITPATH=%~dp0%..\packages\NUnit.Console.3.0.0\tools\
|
||||
set NUNITPATH=%~dp0%..\packages\NUnit.Console.3.0.0\tools\
|
||||
echo if not exist "%NUNITPATH%"
|
||||
|
||||
set _fsiexe="%~dp0..\%1\net40\bin\fsi.exe"
|
||||
|
||||
if '%BUILD_CORECLR%' == '1' (
|
||||
|
||||
if not exist "%NUNITPATH%" (
|
||||
pushd %~dp0..
|
||||
..\.nuget\nuget.exe restore ..\packages.config -PackagesDirectory ..\packages
|
||||
popd
|
||||
)
|
||||
|
||||
rem deploy x86 version of compiler and dependencies
|
||||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x86 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\fsc\win7-x86 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:yes --v:quiet
|
||||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x86 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\win7-x86 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:no --v:quiet
|
||||
|
||||
rem deploy x64 version of compiler
|
||||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x64 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\fsc\win7-x64 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:yes --v:quiet
|
||||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x64 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\win7-x64 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:no --v:quiet
|
||||
|
||||
rem deploy linux version of built compiler
|
||||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/ubuntu.14.04-x64 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\fsc\ubuntu.14.04-x64 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:yes --v:quiet
|
||||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/ubuntu.14.04-x64 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\ubuntu.14.04-x64 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:no --v:quiet
|
||||
|
||||
rem deploy osx version of built compiler
|
||||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/osx.10.10-x64 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\fsc\osx.10.10-x64 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:yes --v:quiet
|
||||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/osx.10.10-x64 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\osx.10.10-x64 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:no --v:quiet
|
||||
|
||||
echo "%NUNITPATH%*.*" "%~dp0fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
xcopy "%NUNITPATH%*.*" "%~dp0fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
|
||||
echo "%~dp0fsharpqa\testenv\src\nunit*.*" "%~dp0fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
xcopy "%~dp0fsharpqa\testenv\src\nunit*.*" "%~dp0fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
|
||||
)
|
||||
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
echo Failed with error %errorlevel%.
|
||||
exit /b %errorlevel%
|
|
@ -1,82 +0,0 @@
|
|||
#r "System.Core.dll"
|
||||
|
||||
open System
|
||||
|
||||
type CmdArgs = { IncludeCategories: string option; ExcludeCategories: string option }
|
||||
|
||||
type Expr =
|
||||
| And of Expr list
|
||||
| Or of Expr list
|
||||
| CatEqual of string
|
||||
| CatNotEqual of string
|
||||
|
||||
let toWhereExpr (cmdArgs: CmdArgs) =
|
||||
|
||||
let split (line: string) =
|
||||
line.Split([| "," |], StringSplitOptions.RemoveEmptyEntries)
|
||||
|> Array.map (fun s -> s.Trim())
|
||||
|> List.ofArray
|
||||
|
||||
let includesList =
|
||||
cmdArgs.IncludeCategories
|
||||
|> Option.map split
|
||||
|> function None -> [] | Some l -> l
|
||||
let excludesList =
|
||||
cmdArgs.ExcludeCategories
|
||||
|> Option.map split
|
||||
|> function None -> [] | Some l -> l
|
||||
|
||||
let il = includesList |> List.map (fun c -> CatEqual(c)) |> Or
|
||||
|
||||
let el = excludesList |> List.map (fun c -> CatNotEqual(c)) |> And
|
||||
|
||||
And([il; el])
|
||||
|
||||
let rec exprToString (w: Expr) =
|
||||
let addParens = sprintf "(%s)"
|
||||
let sanitize (s: string) = if s.Contains(" ") then sprintf "'%s'" s else s
|
||||
|
||||
match w with
|
||||
| And [] -> None
|
||||
| Or [] -> None
|
||||
| And l ->
|
||||
match l |> List.map exprToString |> List.choose id with
|
||||
| [] -> None
|
||||
| [x] -> Some x
|
||||
| xs -> Some (xs |> List.map addParens |> String.concat " and ")
|
||||
| Or l ->
|
||||
match l |> List.map exprToString |> List.choose id with
|
||||
| [] -> None
|
||||
| [x] -> Some x
|
||||
| xs -> Some (xs |> List.map addParens |> String.concat " or ")
|
||||
| CatEqual v -> Some (sprintf "cat==%s" (sanitize v))
|
||||
| CatNotEqual v -> Some (sprintf "cat != %s" (sanitize v))
|
||||
|
||||
let parseCmdArgs (args: string list) =
|
||||
match args with
|
||||
| [a; b] -> { IncludeCategories = Some a; ExcludeCategories = Some b }
|
||||
| xs -> failwithf "Invalid arguments %A" xs
|
||||
|
||||
let main args =
|
||||
args
|
||||
|> parseCmdArgs
|
||||
|> toWhereExpr
|
||||
|> exprToString
|
||||
|> function None -> "" | Some s -> s
|
||||
|> printfn "%s"
|
||||
|
||||
let rec getScriptArgs l =
|
||||
match l with
|
||||
| [] -> []
|
||||
| "--" :: rest -> rest
|
||||
| _ :: tail -> getScriptArgs tail
|
||||
|
||||
try
|
||||
Environment.GetCommandLineArgs()
|
||||
|> List.ofArray
|
||||
|> getScriptArgs
|
||||
|> main
|
||||
exit 0
|
||||
with e ->
|
||||
printfn "%s" e.Message
|
||||
exit 1
|
|
@ -9,12 +9,6 @@ goto :USAGE
|
|||
:FLAVOR_OK
|
||||
|
||||
set NUNITPATH=%~dp0fsharpqa\testenv\bin\nunit\
|
||||
if not exist "%~dp0..\packages\NUnit.Console.3.0.0\tools\" (
|
||||
pushd %~dp0
|
||||
..\.nuget\nuget.exe restore ..\packages.config -PackagesDirectory ..\packages
|
||||
call buildtesttools.cmd %FLAVOR%
|
||||
popd
|
||||
)
|
||||
SET NUNIT3_CONSOLE=%~dp0..\packages\NUnit.Console.3.0.0\tools\nunit3-console.exe
|
||||
SET FSI_TOOL=%~dp0..\%FLAVOR%\net40\bin\Fsi.exe
|
||||
|
||||
|
@ -25,39 +19,13 @@ if not exist "%link_exe%" (
|
|||
goto :FINISHED
|
||||
)
|
||||
|
||||
rem "ttags" indicates what test areas will be run, based on the tags in the test.lst files
|
||||
set TTAGS_ARG=
|
||||
SET TTAGS=
|
||||
set _tmp=%3
|
||||
if not '%_tmp%' == '' (
|
||||
set TTAGS_ARG=-ttags:%_tmp:"=%
|
||||
set TTAGS=%_tmp:"=%
|
||||
)
|
||||
if /I '%_tmp%' == 'coreclr' (
|
||||
set single_threaded=true
|
||||
set permutations=FSC_CORECLR
|
||||
)
|
||||
|
||||
rem "nottags" indicates which test areas/test cases will NOT be run, based on the tags in the test.lst and env.lst files
|
||||
set NO_TTAGS_ARG=-nottags:NOOPEN
|
||||
set NO_TTAGS=NOOPEN
|
||||
set _tmp=%4
|
||||
if not '%_tmp%' == '' (
|
||||
set NO_TTAGS_ARG=-nottags:NOOPEN,%_tmp:"=%
|
||||
set NO_TTAGS=NOOPEN,%_tmp:"=%
|
||||
)
|
||||
|
||||
if /I "%APPVEYOR_CI%" == "1" (
|
||||
set NO_TTAGS_ARG=%NO_TTAGS_ARG%,NO_CI
|
||||
set NO_TTAGS=%NO_TTAGS%,NO_CI
|
||||
)
|
||||
|
||||
if /I not '%single_threaded%' == 'true' (set PARALLEL_ARG=-procs:%NUMBER_OF_PROCESSORS%) else set PARALLEL_ARG=-procs:0
|
||||
|
||||
rem This can be set to 1 to reduce the number of permutations used and avoid some of the extra-time-consuming tests
|
||||
if "%SKIP_EXPENSIVE_TESTS%" == "1" (
|
||||
set NO_TTAGS_ARG=%NO_TTAGS_ARG%,Expensive
|
||||
set NO_TTAGS=%NO_TTAGS%,Expensive
|
||||
set EXCLUDE_ARG_NUNIT=--where "cat != Expensive"
|
||||
set EXCLUDE_ARG_RUNALL=-nottags:Expensive
|
||||
)
|
||||
|
||||
rem Set this to 1 in order to use an external compiler host process
|
||||
|
@ -73,71 +41,30 @@ rem folder where test logs/results will be dropped
|
|||
set RESULTSDIR=%~dp0TestResults
|
||||
if not exist "%RESULTSDIR%" (mkdir "%RESULTSDIR%")
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
if /I "%2" == "net40-fsharp-suite" (goto :NET40_FSHARP_SUITE)
|
||||
|
||||
SET CONV_V2_TO_V3_CMD="%FSI_TOOL%" --exec --nologo "%~dp0Convert-NUnit2Args-to-NUnit3Where.fsx" -- "!TTAGS!" "!NO_TTAGS!"
|
||||
echo %CONV_V2_TO_V3_CMD%
|
||||
if /I "%2" == "coreclr-fsharp-suite" (goto :CORECLR_FSHARP_SUITE)
|
||||
|
||||
SET CONV_V2_TO_V3_CMD_TEMPFILE=%~dp0nunit3args.txt
|
||||
if /I "%2" == "net40-fsharpqa-suite" (goto :NET40_FSHARPQA_SUITE)
|
||||
|
||||
%CONV_V2_TO_V3_CMD% >%CONV_V2_TO_V3_CMD_TEMPFILE%
|
||||
if /I "%2" == "net40-fsharpqa-suite-downtarget" (goto :NET40_FSHARPQA_SUITE)
|
||||
|
||||
IF ERRORLEVEL 1 (
|
||||
echo Error converting args to nunit 3 test selection language, the nunit3-console --where argument
|
||||
type "%CONV_V2_TO_V3_CMD_TEMPFILE%"
|
||||
del /Q "%CONV_V2_TO_V3_CMD_TEMPFILE%"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set /p TTAGS_NUNIT_WHERE=<%CONV_V2_TO_V3_CMD_TEMPFILE%
|
||||
if not '!TTAGS_NUNIT_WHERE!' == '' (set TTAGS_NUNIT_WHERE=--where "!TTAGS_NUNIT_WHERE!")
|
||||
|
||||
del /Q "%CONV_V2_TO_V3_CMD_TEMPFILE%"
|
||||
|
||||
setlocal DisableDelayedExpansion
|
||||
|
||||
if /I "%2" == "fsharp" (goto :FSHARP)
|
||||
if /I "%2" == "fsharpqa" (goto :FSHARPQA)
|
||||
if /I "%2" == "fsharpqadowntarget" (goto :FSHARPQA)
|
||||
if /I "%2" == "fsharpqaredirect" (goto :FSHARPQA)
|
||||
if /I "%2" == "compilerunit" (
|
||||
if /I "%2" == "net40-compilerunit-suite" (
|
||||
set compilerunitsuffix=net40
|
||||
goto :COMPILERUNIT
|
||||
goto :COMPILERUNIT_SUITE
|
||||
)
|
||||
|
||||
if /I "%2" == "coreunitall" (
|
||||
goto :COREUNITALL
|
||||
if /I "%2" == "portable-coreunit-suite" (
|
||||
goto :PORTABLE_COREUNIT_SUITE
|
||||
)
|
||||
|
||||
if /I "%2" == "coreunitportable" (
|
||||
goto :COREUNITPORTABLE
|
||||
if /I "%2" == "net40-coreunit-suite" (
|
||||
goto :NET40_COREUNIT_SUITE
|
||||
)
|
||||
|
||||
if /I "%2" == "coreunit" (
|
||||
set coreunitsuffix=net40
|
||||
goto :COREUNIT
|
||||
if /I "%2" == "coreclr-coreunit-suite" (
|
||||
goto :CORECLR_COREUNIT_SUITE
|
||||
)
|
||||
if /I "%2" == "coreunitportable47" (
|
||||
set coreunitsuffix=portable47
|
||||
goto :COREUNIT
|
||||
)
|
||||
if /I "%2" == "coreunitportable7" (
|
||||
set coreunitsuffix=portable7
|
||||
goto :COREUNIT
|
||||
)
|
||||
if /I "%2" == "coreunitportable78" (
|
||||
set coreunitsuffix=portable78
|
||||
goto :COREUNIT
|
||||
)
|
||||
if /I "%2" == "coreunitportable259" (
|
||||
set coreunitsuffix=portable259
|
||||
goto :COREUNIT
|
||||
)
|
||||
if /I "%2" == "coreunitcoreclr" (
|
||||
set coreunitsuffix=coreclr
|
||||
goto :COREUNIT_CORECLR
|
||||
)
|
||||
if /I "%2" == "ideunit" (goto :IDEUNIT)
|
||||
if /I "%2" == "vs-ideunit-suite" (goto :VS_IDEUNIT_SUITE)
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
|
@ -145,29 +72,43 @@ REM ----------------------------------------------------------------------------
|
|||
|
||||
echo Usage:
|
||||
echo.
|
||||
echo RunTests.cmd ^<debug^|release^> ^<fsharp^|fsharpqa^|coreunit^|coreunitportable7^|coreunitportable47^|coreunitportable78^|coreunitportable259^|coreunitcoreclr^|ideunit^|compilerunit^> [TagToRun^|"Tags,To,Run"] [TagNotToRun^|"Tags,Not,To,Run"]
|
||||
echo RunTests.cmd ^<debug^|release^> ^<...suite....^> [TagToRun^|"Tags,To,Run"] [TagNotToRun^|"Tags,Not,To,Run"]
|
||||
echo.
|
||||
exit /b 1
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:FSHARP
|
||||
:NET40_FSHARP_SUITE
|
||||
|
||||
set FSHARP_TEST_SUITE_CONFIGURATION=%FLAVOR%
|
||||
set XMLFILE=%RESULTSDIR%\net40-fsharp-suite-results.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\net40-fsharp-suite-output.log
|
||||
set ERRORFILE=%RESULTSDIR%\net40-fsharp-suite-errors.log
|
||||
|
||||
set XMLFILE=%RESULTSDIR%\FSharpNunit_Xml.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\FSharpNunit_Output.log
|
||||
set ERRORFILE=%RESULTSDIR%\FSharpNunit_Error.log
|
||||
|
||||
echo "%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %TTAGS_NUNIT_WHERE% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
|
||||
"%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %TTAGS_NUNIT_WHERE% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
|
||||
echo "%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %EXCLUDE_ARG_NUNIT% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
|
||||
"%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %EXCLUDE_ARG_NUNIT% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
|
||||
|
||||
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:FSHARPQA
|
||||
:CORECLR_FSHARP_SUITE
|
||||
|
||||
set single_threaded=true
|
||||
set permutations=FSC_CORECLR
|
||||
set XMLFILE=%RESULTSDIR%\coreclr-fsharp-suite-results.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\coreclr-fsharp-suite-output.log
|
||||
set ERRORFILE=%RESULTSDIR%\coreclr-fsharp-suite-errors.log
|
||||
|
||||
echo "%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\coreclr\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %EXCLUDE_ARG_NUNIT% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
|
||||
"%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\coreclr\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %EXCLUDE_ARG_NUNIT% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
|
||||
|
||||
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:NET40_FSHARPQA_SUITE
|
||||
set OSARCH=%PROCESSOR_ARCHITECTURE%
|
||||
|
||||
set X86_PROGRAMFILES=%ProgramFiles%
|
||||
|
@ -225,28 +166,16 @@ set FSCOREDLLVPREVPATH=%FSCOREDLLVPREVPATH%\FSharp.Core.dll
|
|||
for /d %%i in (%WINDIR%\Microsoft.NET\Framework\v4.0.?????) do set CORDIR=%%i
|
||||
set PATH=%PATH%;%CORDIR%
|
||||
|
||||
if not exist %WINDIR%\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll set NO_TTAGS_ARG=%NO_TTAGS_ARG%,Req20
|
||||
set RESULTFILE=net40-fsharpqa-suite-results.log
|
||||
set FAILFILE=net40-fsharpqa-suite-errors.log
|
||||
set FAILENV=net40-fsharpqa-suite-errors
|
||||
|
||||
set RESULTFILE=FSharpQA_Results.log
|
||||
set FAILFILE=FSharpQA_Failures.log
|
||||
set FAILENV=FSharpQA_Failures
|
||||
|
||||
if /I "%2" == "fsharpqadowntarget" (
|
||||
if /I "%2" == "net40-fsharpqa-suite-downtarget" (
|
||||
set ISCFLAGS=--noframework -r "%FSCOREDLLVPREVPATH%" -r "%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" -r System.dll -r System.Runtime.dll -r System.Xml.dll -r System.Data.dll -r System.Web.dll -r System.Core.dll -r System.Numerics.dll
|
||||
set NO_TTAGS_ARG=%NO_TTAGS_ARG%,NoCrossVer,FSI
|
||||
set RESULTFILE=FSharpQADownTarget_Results.log
|
||||
set FAILFILE=FSharpQADownTarget_Failures.log
|
||||
set FAILENV=FSharpQADownTarget_Failures
|
||||
)
|
||||
|
||||
if /I "%2" == "fsharpqaredirect" (
|
||||
set ISCFLAGS=--noframework -r "%FSCOREDLLVPREVPATH%" -r "%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" -r System.dll -r System.Runtime.dll -r System.Xml.dll -r System.Data.dll -r System.Web.dll -r System.Core.dll -r System.Numerics.dll
|
||||
set PLATFORM=%OSARCH%
|
||||
set SIMULATOR_PIPE="%~dp0fsharpqa\testenv\bin\$PLATFORM\ExecAssembly.exe"
|
||||
set NO_TTAGS_ARG=%NO_TTAGS_ARG%,NoCrossVer,FSI
|
||||
set RESULTFILE=FSharpQARedirect_Results.log
|
||||
set FAILFILE=FSharpQARedirect_Failures.log
|
||||
set FAILENV=FSharpQARedirect_Failures
|
||||
set EXCLUDE_ARG_RUNALL=%EXCLUDE_ARG_RUNALL%,NoCrossVer,FSI
|
||||
set RESULTFILE=net40-fsharpqa-downtarget-suite-results.log
|
||||
set FAILFILE=net40-fsharpqa-downtarget-suite-errors.log
|
||||
set FAILENV=net40-fsharpqa-downtarget-suite-errors
|
||||
)
|
||||
|
||||
where.exe perl > NUL 2> NUL
|
||||
|
@ -256,43 +185,33 @@ if errorlevel 1 (
|
|||
)
|
||||
|
||||
pushd %~dp0fsharpqa\source
|
||||
echo perl %~dp0fsharpqa\testenv\bin\runall.pl -resultsroot %RESULTSDIR% -results %RESULTFILE% -log %FAILFILE% -fail %FAILENV% -cleanup:no %TTAGS_ARG% %NO_TTAGS_ARG% %PARALLEL_ARG%
|
||||
perl %~dp0fsharpqa\testenv\bin\runall.pl -resultsroot %RESULTSDIR% -results %RESULTFILE% -log %FAILFILE% -fail %FAILENV% -cleanup:no %TTAGS_ARG% %NO_TTAGS_ARG% %PARALLEL_ARG%
|
||||
echo perl %~dp0fsharpqa\testenv\bin\runall.pl -resultsroot %RESULTSDIR% -results %RESULTFILE% -log %FAILFILE% -fail %FAILENV% -cleanup:no %INCLUDE_ARG_RUNALL% %EXCLUDE_ARG_RUNALL% %PARALLEL_ARG%
|
||||
perl %~dp0fsharpqa\testenv\bin\runall.pl -resultsroot %RESULTSDIR% -results %RESULTFILE% -log %FAILFILE% -fail %FAILENV% -cleanup:no %INCLUDE_ARG_RUNALL% %EXCLUDE_ARG_RUNALL% %PARALLEL_ARG%
|
||||
|
||||
popd
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:COREUNIT
|
||||
:NET40_COREUNIT_SUITE
|
||||
|
||||
set XMLFILE=%RESULTSDIR%\CoreUnit_%coreunitsuffix%_Xml.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\CoreUnit_%coreunitsuffix%_Output.log
|
||||
set ERRORFILE=%RESULTSDIR%\CoreUnit_%coreunitsuffix%_Error.log
|
||||
set XMLFILE=%RESULTSDIR%\net40-coreunit-suite-results.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\net40-coreunit-suite-output.log
|
||||
set ERRORFILE=%RESULTSDIR%\net40-coreunit-suite-errors.log
|
||||
|
||||
echo "%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll"
|
||||
"%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll"
|
||||
echo "%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %EXCLUDE_ARG_NUNIT% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\net40\bin\FSharp.Core.Unittests.dll"
|
||||
"%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %EXCLUDE_ARG_NUNIT% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\net40\bin\FSharp.Core.Unittests.dll"
|
||||
|
||||
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
|
||||
goto :EOF
|
||||
|
||||
:COREUNITALL
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
set XMLFILE=%RESULTSDIR%\CoreUnit_all_Xml.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\CoreUnit_all_Output.log
|
||||
set ERRORFILE=%RESULTSDIR%\CoreUnit_all_Error.log
|
||||
:PORTABLE_COREUNIT_SUITE
|
||||
|
||||
echo "%NUNIT3_CONSOLE%" /framework:V4.0 /result="%XMLFILE%;format=nunit2" /output="%OUTPUTFILE%" /err="%ERRORFILE%" /work="%FSCBINPATH%" "%FSCBINPATH%\..\..\net40\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable7\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable47\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable78\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable259\bin\FSharp.Core.Unittests.dll"
|
||||
"%NUNIT3_CONSOLE%" /framework:V4.0 /result="%XMLFILE%;format=nunit2" /output="%OUTPUTFILE%" /err="%ERRORFILE%" /work="%FSCBINPATH%" "%FSCBINPATH%\..\..\net40\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable7\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable47\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable78\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable259\bin\FSharp.Core.Unittests.dll"
|
||||
|
||||
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
|
||||
goto :EOF
|
||||
|
||||
:COREUNITPORTABLE
|
||||
|
||||
set XMLFILE=%RESULTSDIR%\CoreUnit_Portable_Xml.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\CoreUnit_Portable_Output.log
|
||||
set ERRORFILE=%RESULTSDIR%\CoreUnit_Portable_Error.log
|
||||
set XMLFILE=%RESULTSDIR%\portable-coreunit-suite-results.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\portable-coreunit-suite-output.log
|
||||
set ERRORFILE=%RESULTSDIR%\portable-coreunit-suite-errors.log
|
||||
|
||||
echo "%NUNIT3_CONSOLE%" /framework:V4.0 /result="%XMLFILE%;format=nunit2" /output="%OUTPUTFILE%" /err="%ERRORFILE%" /work="%FSCBINPATH%" "%FSCBINPATH%\..\..\portable7\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable47\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable78\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable259\bin\FSharp.Core.Unittests.dll"
|
||||
"%NUNIT3_CONSOLE%" /framework:V4.0 /result="%XMLFILE%;format=nunit2" /output="%OUTPUTFILE%" /err="%ERRORFILE%" /work="%FSCBINPATH%" "%FSCBINPATH%\..\..\portable7\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable47\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable78\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable259\bin\FSharp.Core.Unittests.dll"
|
||||
|
@ -300,15 +219,17 @@ echo "%NUNIT3_CONSOLE%" /framework:V4.0 /result="%XMLFILE%;format=nunit2" /outpu
|
|||
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
|
||||
goto :EOF
|
||||
|
||||
:COREUNIT_CORECLR
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
set XMLFILE=CoreUnit_%coreunitsuffix%_Xml.xml
|
||||
set OUTPUTFILE=CoreUnit_%coreunitsuffix%_Output.log
|
||||
set ERRORFILE=CoreUnit_%coreunitsuffix%_Error.log
|
||||
:CORECLR_COREUNIT_SUITE
|
||||
|
||||
set XMLFILE=coreclr-coreunit-suite-results.xml
|
||||
set OUTPUTFILE=coreclr-coreunit-suite-output.log
|
||||
set ERRORFILE=coreclr-coreunit-suite-errors.log
|
||||
|
||||
set testbinpath=%~dp0testbin\
|
||||
set architecturepath=\coreclr\win7-x64
|
||||
set CORERUNPATH="%testbinpath%%flavor%%architecturepath%"
|
||||
set architecturepath=coreclr\win7-x64
|
||||
set CORERUNPATH="%testbinpath%%flavor%\%architecturepath%"
|
||||
|
||||
echo "%CORERUNPATH%\corerun.exe" "%testbinpath%%flavor%\coreclr\fsharp.core.unittests\FSharp.Core.Unittests.exe"
|
||||
"%CORERUNPATH%\corerun.exe" "%testbinpath%%flavor%\coreclr\fsharp.core.unittests\FSharp.Core.Unittests.exe"
|
||||
|
@ -318,29 +239,29 @@ goto :EOF
|
|||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:COMPILERUNIT
|
||||
:COMPILERUNIT_SUITE
|
||||
|
||||
set XMLFILE=%RESULTSDIR%\CompilerUnit_%compilerunitsuffix%_Xml.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\CompilerUnit_%compilerunitsuffix%_Output.log
|
||||
set ERRORFILE=%RESULTSDIR%\CompilerUnit_%compilerunitsuffix%_Error.log
|
||||
set XMLFILE=%RESULTSDIR%\%compilerunitsuffix%-compilerunit-suite-results.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\%compilerunitsuffix%-compilerunit-suite-output.log
|
||||
set ERRORFILE=%RESULTSDIR%\%compilerunitsuffix%-compilerunit-suite-errors.log
|
||||
|
||||
echo "%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll"
|
||||
"%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll"
|
||||
echo "%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %EXCLUDE_ARG_NUNIT% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll"
|
||||
"%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %EXCLUDE_ARG_NUNIT% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll"
|
||||
|
||||
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:IDEUNIT
|
||||
:VS_IDEUNIT_SUITE
|
||||
|
||||
set XMLFILE=%RESULTSDIR%\IDEUnit_Xml.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\IDEUnit_Output.log
|
||||
set ERRORFILE=%RESULTSDIR%\IDEUnit_Error.log
|
||||
set XMLFILE=%RESULTSDIR%\vs-ideunit-suite-results.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\vs-ideunit-suite-output.log
|
||||
set ERRORFILE=%RESULTSDIR%\vs-ideunit-suite-errors.log
|
||||
|
||||
pushd %FSCBINPATH%
|
||||
echo "%NUNIT3_CONSOLE%" --verbose --x86 --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" --workers=1 --agents=1 --full "%FSCBINPATH%\VisualFSharp.Unittests.dll"
|
||||
"%NUNIT3_CONSOLE%" --verbose --x86 --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" --workers=1 --agents=1 --full "%FSCBINPATH%\VisualFSharp.Unittests.dll"
|
||||
echo "%NUNIT3_CONSOLE%" --verbose --x86 --framework:V4.0 %EXCLUDE_ARG_NUNIT% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" --workers=1 --agents=1 --full "%FSCBINPATH%\VisualFSharp.Unittests.dll"
|
||||
"%NUNIT3_CONSOLE%" --verbose --x86 --framework:V4.0 %EXCLUDE_ARG_NUNIT% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" --workers=1 --agents=1 --full "%FSCBINPATH%\VisualFSharp.Unittests.dll"
|
||||
popd
|
||||
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
|
||||
goto :EOF
|
||||
|
|
|
@ -131,7 +131,7 @@ set command_line_args=%command_line_args% --targetPlatformName:.NETStandard,Vers
|
|||
set command_line_args=%command_line_args% --source:"%~d0%~p0coreclr_utilities.fs" --source:"%sources%"
|
||||
set command_line_args=%command_line_args% --packagesDir:%~d0%~p0..\..\packages
|
||||
set command_line_args=%command_line_args% --projectJsonLock:%~d0%~p0project.lock.json
|
||||
set command_line_args=%command_line_args% --fsharpCore:%~d0%~p0..\testbin\%flavor%\coreclr\fsc\%platform%\fsharp.core.dll
|
||||
set command_line_args=%command_line_args% --fsharpCore:%~d0%~p0..\testbin\%flavor%\coreclr\fsc\%platform%\FSharp.Core.dll
|
||||
set command_line_args=%command_line_args% --define:CoreClr --define:NetCore
|
||||
set command_line_args=%command_line_args% --compilerPath:%~d0%~p0..\testbin\%flavor%\coreclr\fsc\%platform%
|
||||
set command_line_args=%command_line_args% --copyCompiler:yes
|
||||
|
|
|
@ -19,7 +19,7 @@ let singleTestBuild cfg testDir =
|
|||
let buildOkPath = testDir / "build.ok"
|
||||
do if fileExists "build.ok" then del "build.ok"
|
||||
|
||||
//remove FSharp.Core.dll from the target directory to ensure that compiler uses the correct fsharp.core.dll
|
||||
//remove FSharp.Core.dll from the target directory to ensure that compiler uses the correct FSharp.Core.dll
|
||||
do if fileExists "FSharp.Core.dll" then del "FSharp.Core.dll"
|
||||
|
||||
|
||||
|
|
|
@ -178,6 +178,7 @@ goto :EOF
|
|||
set platform=win7-x64
|
||||
set packagesDir=%~d0%~p0..\..\packages
|
||||
For %%A in ("%cd%") do ( Set TestCaseName=%%~nxA)
|
||||
echo %~d0%~p0..\testbin\%flavor%\coreclr\%platform%\corerun.exe %~d0%~p0..\testbin\%flavor%\coreclr\fsharp\core\%TestCaseName%\output\test.exe > coreclr.run.cmd
|
||||
%CLIX% %~d0%~p0..\testbin\%flavor%\coreclr\%platform%\corerun.exe %~d0%~p0..\testbin\%flavor%\coreclr\fsharp\core\%TestCaseName%\output\test.exe
|
||||
dir test.ok > NUL 2>&1 ) || (
|
||||
@echo :FSC_CORECLR failed
|
||||
|
|
|
@ -59,6 +59,8 @@ Copyright (c) Microsoft Corporation. All Rights Reserved.
|
|||
--embed[+|-] Embed all source files in the portable PDB file
|
||||
--embed:<file;...> Embed specific source files in the portable PDB
|
||||
file
|
||||
--sourcelink:<file> Source link information file to embed in the
|
||||
portable PDB file
|
||||
--optimize[+|-] Enable optimizations (Short form: -O)
|
||||
--tailcalls[+|-] Enable or disable tailcalls
|
||||
--crossoptimize[+|-] Enable or disable cross-module optimizations
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
// #Regression #NoMT #CompilerOptions #NoMono
|
||||
//<Expects id="FS1502" status="error">.+sourcelink switch only supported when emitting a Portable PDB .+</Expects>
|
||||
|
||||
exit 1
|
|
@ -0,0 +1 @@
|
|||
{"documents": { "/*" : "ffffffffffffffffffffffffffffffffffffffff/*" }}
|
Двоичные данные
tests/fsharpqa/testenv/bin/System.Reflection.Metadata.dll
Двоичные данные
tests/fsharpqa/testenv/bin/System.Reflection.Metadata.dll
Двоичный файл не отображается.
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,140 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>04c27c52-ecd5-43d2-84d0-40d190640fc0</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>FSharp.Test.ExecAssembly</RootNamespace>
|
||||
<AssemblyName>ExecAssembly</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<OpenBuild Condition=" '$(OpenBuild)' == '' ">True</OpenBuild>
|
||||
<OpenDrop>..\..\..\..\..\$(Configuration)\net40\bin</OpenDrop>
|
||||
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
|
||||
<Name>ExecAssembly</Name>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Tailcalls>false</Tailcalls>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Debug\ExecAssembly.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<Tailcalls>true</Tailcalls>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Release\ExecAssembly.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Tailcalls>false</Tailcalls>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DocumentationFile>bin\Debug\ExecAssembly.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<Tailcalls>true</Tailcalls>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DocumentationFile>bin\Release\ExecAssembly.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Tailcalls>false</Tailcalls>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DocumentationFile>bin\Debug\ExecAssembly.XML</DocumentationFile>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<Tailcalls>true</Tailcalls>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DocumentationFile>bin\Release\ExecAssembly.XML</DocumentationFile>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Numerics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<Reference Include="$(OpenDrop)\FSharp.Core.dll">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' != 'True' ">
|
||||
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' != 'True' ">
|
||||
<None Include="closed\App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<None Include="open\App.config" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(VisualStudioVersion)' == '11.0'">
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<FscToolPath>$(OpenDrop)</FscToolPath>
|
||||
<FSharpTargetsPath>$(OpenDrop)\Microsoft.FSharp.targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<Import Project="$(FSharpTargetsPath)" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -1,32 +0,0 @@
|
|||
open System
|
||||
open System.Security
|
||||
open System.Security.Permissions
|
||||
|
||||
(*
|
||||
This program loads a specified .NET exe and runs it in a dedicated appdomain.
|
||||
Useful for 2 types of tests:
|
||||
- The exe is build against .NET 2
|
||||
- Use this to force it to run in .NET 4+ environment
|
||||
- The exe is built against an earlier version of FSharp.Core
|
||||
- Use this to force it to run with binding to latest FSharp.Core
|
||||
|
||||
Usage: ExecAssembly <path to exe> [optional args for exe]
|
||||
*)
|
||||
|
||||
[<EntryPoint>]
|
||||
let main args =
|
||||
let setup = AppDomainSetup(ApplicationBase = Environment.CurrentDirectory)
|
||||
let name = "App domain with F# vLatest and .NET vLatest"
|
||||
let appDomain = AppDomain.CreateDomain(name, null, setup, PermissionSet(PermissionState.Unrestricted))
|
||||
|
||||
let assemblyUnderTest = args.[0]
|
||||
let exeArgs = args.[1..]
|
||||
|
||||
try
|
||||
exit (appDomain.ExecuteAssembly(assemblyUnderTest, exeArgs))
|
||||
with
|
||||
| :? BadImageFormatException as e ->
|
||||
printfn "%O" e
|
||||
printfn ""
|
||||
printfn "Is the loaded assembly built for the same platform (x86/x64) as ExecAssembly?"
|
||||
exit 1
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
name="FSharp.Core"
|
||||
publicKeyToken="b03f5f7f11d50a3a"
|
||||
culture="neutral"/>
|
||||
<bindingRedirect
|
||||
oldVersion="2.0.0.0-4.4.0.0"
|
||||
newVersion="4.4.1.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
name="FSharp.Core"
|
||||
publicKeyToken="b03f5f7f11d50a3a"
|
||||
culture="neutral"/>
|
||||
<bindingRedirect
|
||||
oldVersion="2.0.0.0-4.4.1.0"
|
||||
newVersion="4.4.1.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,6 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<FSharpSourcesRoot>..\..\..\..\..\src</FSharpSourcesRoot>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
|
@ -11,86 +14,62 @@
|
|||
<AssemblyName>FSharp.Compiler.Hosted</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<OpenBuild Condition=" '$(OpenBuild)' == '' ">True</OpenBuild>
|
||||
<OpenDrop>..\..\..\..\..\$(Configuration)\net40\bin</OpenDrop>
|
||||
<OtherFlags Condition=" '$(OpenBuild)' != 'True' ">$(OtherFlags) --delaysign+ --keyfile:"..\..\bin\msft.pubkey"</OtherFlags>
|
||||
<OtherFlags Condition=" '$(OpenBuild)' == 'True' ">$(OtherFlags) --delaysign+ --keyfile:"..\..\..\..\..\src\fsharp\msft.pubkey"</OtherFlags>
|
||||
<OpenDrop>$(FSharpSourcesRoot)\..\$(Configuration)\net40\bin</OpenDrop>
|
||||
<OtherFlags>$(OtherFlags) --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
|
||||
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
|
||||
<Name>FSharp.Compiler.Hosted</Name>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<OutputPath>..\..\bin\</OutputPath>
|
||||
<CustomOutputPath>true</CustomOutputPath>
|
||||
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Tailcalls>false</Tailcalls>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Debug\FSharp.Compiler.Hosted.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<Tailcalls>true</Tailcalls>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Release\FSharp.Compiler.Hosted.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Compiler.fs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj" >
|
||||
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
|
||||
<Name>FSharp.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler\FSharp.Compiler.fsproj">
|
||||
<Project>{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}</Project>
|
||||
<Name>FSharp.Compiler</Name>
|
||||
</ProjectReference>
|
||||
<Reference Include="Microsoft.DiaSymReader.PortablePdb"><HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath><Private>true</Private> </Reference>
|
||||
<Reference Include="Microsoft.DiaSymReader"><HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.1.0.8\lib\portable-net45+win8\Microsoft.DiaSymReader.dll</HintPath><Private>true</Private></Reference>
|
||||
<Reference Include="System.Reflection.Metadata"><HintPath>$(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.1.4.1-beta-24227-04\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath><Private>true</Private></Reference>
|
||||
<Reference Include="System.Collections.Immutable"><HintPath>$(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath><Private>true</Private></Reference>
|
||||
<Reference Include="System.ValueTuple"><HintPath>$(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll</HintPath><Private>true</Private></Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<Reference Include="$(OpenDrop)\FSharp.Core.dll">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="$(OpenDrop)\FSharp.Compiler.dll">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' != 'True' ">
|
||||
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="..\..\bin\FSharp.Compiler.dll">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Compiler.fs" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(VisualStudioVersion)' == '11.0'">
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<FscToolPath>$(OpenDrop)</FscToolPath>
|
||||
<FSharpTargetsPath>$(OpenDrop)\Microsoft.FSharp.targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<Import Project="$(FSharpTargetsPath)" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
|
||||
|
||||
<Target Name="CopyFSharpCoreOptSigFiles" AfterTargets="Build">
|
||||
<ItemGroup>
|
||||
<FSharpCoreOptSigFiles Include="$(OpenDrop)\FSharp.Core.dll" />
|
||||
<FSharpCoreOptSigFiles Include="$(OpenDrop)\FSharp.Core.optdata" />
|
||||
<FSharpCoreOptSigFiles Include="$(OpenDrop)\FSharp.Core.sigdata" />
|
||||
<FSharpCoreOptSigFiles Include="$(OpenDrop)\FSharp.Core.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(FSharpCoreOptSigFiles)" DestinationFolder="$(OutputPath)" />
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -1,6 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<FSharpSourcesRoot>..\..\..\..\..\src</FSharpSourcesRoot>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
|
@ -11,80 +14,46 @@
|
|||
<AssemblyName>HostedCompilerServer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<OpenBuild Condition=" '$(OpenBuild)' == '' ">True</OpenBuild>
|
||||
<OpenDrop>..\..\..\..\..\$(Configuration)\net40\bin</OpenDrop>
|
||||
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
|
||||
<Name>HostedCompilerServer</Name>
|
||||
<OutputPath>..\..\bin\</OutputPath>
|
||||
<CustomOutputPath>true</CustomOutputPath>
|
||||
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Tailcalls>false</Tailcalls>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Debug\HostedCompilerServer.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<Tailcalls>true</Tailcalls>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Release\HostedCompilerServer.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FSharp.Compiler.Hosted\FSharp.Compiler.Hosted.fsproj"/>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Numerics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<Reference Include="$(OpenDrop)\FSharp.Core.dll">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj" >
|
||||
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
|
||||
<Name>FSharp.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler\FSharp.Compiler.fsproj">
|
||||
<Project>{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}</Project>
|
||||
<Name>FSharp.Compiler</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' != 'True' ">
|
||||
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(VisualStudioVersion)' == '11.0'">
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<FscToolPath>$(OpenDrop)</FscToolPath>
|
||||
<FSharpTargetsPath>$(OpenDrop)\Microsoft.FSharp.targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<Import Project="$(FSharpTargetsPath)" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
|
||||
</Project>
|
|
@ -1,6 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<FSharpSourcesRoot>..\..\..\..\..\src</FSharpSourcesRoot>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
|
@ -11,79 +14,41 @@
|
|||
<AssemblyName>ILComparer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<OpenBuild Condition=" '$(OpenBuild)' == '' ">True</OpenBuild>
|
||||
<OpenDrop>..\..\..\..\..\$(Configuration)\net40\bin</OpenDrop>
|
||||
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
|
||||
<Name>HostedCompilerServer</Name>
|
||||
<Name>ILComparer</Name>
|
||||
<OutputPath>..\..\bin\</OutputPath>
|
||||
<CustomOutputPath>true</CustomOutputPath>
|
||||
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Tailcalls>false</Tailcalls>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Debug\ILComparer.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<Tailcalls>true</Tailcalls>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Release\ILComparer.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj" >
|
||||
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
|
||||
<Name>FSharp.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<Reference Include="$(OpenDrop)\FSharp.Core.dll">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' != 'True' ">
|
||||
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(VisualStudioVersion)' == '11.0'">
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<FscToolPath>$(OpenDrop)</FscToolPath>
|
||||
<FSharpTargetsPath>$(OpenDrop)\Microsoft.FSharp.targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<Import Project="$(FSharpTargetsPath)" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
|
||||
</Project>
|
|
@ -1,12 +0,0 @@
|
|||
try
|
||||
let ps = new System.Security.PermissionSet(System.Security.Permissions.PermissionState.Unrestricted)
|
||||
ps.Demand()
|
||||
printfn "You are running in full trust"
|
||||
0
|
||||
with
|
||||
| :? System.Security.SecurityException -> printfn "You are running in partial trust"
|
||||
1
|
||||
| _ -> printfn "Unknown exception!";
|
||||
2
|
||||
|
||||
|
|
@ -1,327 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using System.Security;
|
||||
using System.Security.Policy;
|
||||
using System.Reflection;
|
||||
using System.Collections;
|
||||
using System.Security.Permissions;
|
||||
using System.Drawing.Printing;
|
||||
using System.Net;
|
||||
using System.Data.OleDb;
|
||||
using System.Data.SqlClient;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.IO;
|
||||
using PTRunner;
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
[assembly: SecurityRules(SecurityRuleSet.Level2)]
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This class holds the data that was parsed from the command line
|
||||
/// </summary>
|
||||
internal class CommandLineData
|
||||
{
|
||||
public CommandLineData()
|
||||
{
|
||||
programName = null;
|
||||
arguments = null;
|
||||
permission = null;
|
||||
fullTrustAssemblies = new List<Assembly>();
|
||||
}
|
||||
//Program name
|
||||
public string programName;
|
||||
//Arguments to the program
|
||||
public string[] arguments;
|
||||
//The permission set that will be granted to the progra
|
||||
public PermissionSet permission;
|
||||
//The full trust list
|
||||
public List<Assembly> fullTrustAssemblies;
|
||||
}
|
||||
|
||||
|
||||
class PartialTrustRunner
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Print the usage of the program
|
||||
/// </summary>
|
||||
public static void Usage()
|
||||
{
|
||||
string name = Process.GetCurrentProcess().ProcessName;
|
||||
string possibleVals = Enum.GetNames(typeof(PermSetNames)).Aggregate((workset, next) => workset + ", " + next);
|
||||
Console.WriteLine("Usage:");
|
||||
Console.WriteLine("{0} [-ps NamedPermissionSet]|[-xml ptrunner.xml] [-af fullTrustAssembly] {{program arguments}}\n", name);
|
||||
Console.WriteLine("Parameters:");
|
||||
Console.WriteLine("\t -ps : PermissionSet The named permission set in which the application could be run. This can be any one of {0}", possibleVals);
|
||||
Console.WriteLine("\n\t -xml : XmlFile File containing the permission set in which the application could be run. ");
|
||||
Console.WriteLine("\n\t -af AddToFullTrust One assembly that you want in the full trust list. Your full trust assembly should be signed. See \"Strong-Named Assemblies\" in msdn for more information.");
|
||||
Console.WriteLine("\n\t program arguments Command and arguments for the runned progam. Once you pass anything that doesn't have a \"-\" as a parameter we consider you are passing the name and the parameters for the program that will be run by this runner.");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Example usage: PTRunner.exe -af Samples\\librarydemander.dll -ps LocalIntranet Samples\\demander.exe");
|
||||
Console.WriteLine("\t This runs Samples\\demander.exe and also makes sure Samples\\librarydemander.dll is loaded as FullTrust");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("{0} is a program designed to run an application in partial trust in an easy and simple way. Under the covers it starts an AppDomain with a permission set and a full trust list and uses this AppDomain to run your application in.", name);
|
||||
Console.WriteLine("If you are creating AppDomains or your application uses a host, you might not be able to use this program. This program is designed to offer an easy solution to those that want to run something in partial trust and don\'t care about the intricacies of this endevour");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("NOTE: Make sure you are passing any parameters for the runner before passing the name of the runned program");
|
||||
Console.WriteLine("NOTE: For the xml parameter, the file format is exactly what caspol -lp would print.The file samples\\perm.xml is a good example.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Command line parser.
|
||||
/// </summary>
|
||||
/// <param name="args">The command line arguments</param>
|
||||
/// <returns>A structure with information about the run</returns>
|
||||
private static CommandLineData ParseCommandLine(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
int i = 0;
|
||||
CommandLineData ret = new CommandLineData();
|
||||
|
||||
while (i < args.Length)
|
||||
{
|
||||
if (args[i].StartsWith("-"))
|
||||
{
|
||||
switch (args[i])
|
||||
{
|
||||
//The partial trust PermissionSet
|
||||
case "-ps":
|
||||
PermSetNames permSet = (PermSetNames)Enum.Parse(typeof(PermSetNames), args[++i], true);
|
||||
ret.permission = PTRunnerLib.GetStandardPermission(permSet);
|
||||
break;
|
||||
//Add full trust assembly
|
||||
case "-af":
|
||||
Assembly asm = Assembly.LoadFrom(args[++i]);
|
||||
ret.fullTrustAssemblies.Add(asm);
|
||||
break;
|
||||
case "-xml":
|
||||
StreamReader sr = new StreamReader(args[++i]);
|
||||
SecurityElement elem = SecurityElement.FromString(sr.ReadToEnd());
|
||||
ret.permission = new PermissionSet(PermissionState.None);
|
||||
ret.permission.FromXml(elem);
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("{0} - unknonw option", args[i]);
|
||||
Usage();
|
||||
return null;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
if (i < args.Length)
|
||||
{
|
||||
//This are the arguments for the program that will be run
|
||||
ret.programName = args[i++];
|
||||
int argsSize = args.Length - i;
|
||||
ret.arguments = new string[argsSize];
|
||||
if (argsSize > 0)
|
||||
Array.Copy(args, i, ret.arguments, 0, argsSize);
|
||||
if (ret.permission == null)
|
||||
ret.permission = PTRunnerLib.GetStandardPermission(PermSetNames.Execution);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(":RUNNER: Got exception while parsing command line: {0}", ex.Message);
|
||||
}
|
||||
Usage();
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The main function of the runner, obviously
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
[SecuritySafeCritical]
|
||||
static int Main(string[] args)
|
||||
{
|
||||
//Parse the command line
|
||||
CommandLineData commands = ParseCommandLine(args);
|
||||
if (commands == null)
|
||||
return 1;
|
||||
AssemblyRunner runner =null;
|
||||
try
|
||||
{
|
||||
//Create the sandbox
|
||||
runner = PTRunnerLib.GetPartialTrustInstance<AssemblyRunner>(commands.permission, commands.fullTrustAssemblies.ToArray());
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
Console.WriteLine("ERROR: {0}", ex.Message);
|
||||
return -1;
|
||||
}
|
||||
//And we execute the assembly!!!
|
||||
return runner.ExecuteAssembly(commands.programName, commands.arguments);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The runner. This class will be instantiated on the sandboxed AppDomain. This will be the actual starter
|
||||
/// </summary>
|
||||
public class AssemblyRunner : MarshalByRefObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Print some preaty information about startup
|
||||
/// </summary>
|
||||
/// <param name="assemblyName"></param>
|
||||
/// <param name="arguments"></param>
|
||||
internal static void PrintStart(string assemblyName, string[] arguments)
|
||||
{
|
||||
string args = "";
|
||||
if (arguments.Length > 0)
|
||||
args = " " + arguments.Aggregate((workingSentence, next) => workingSentence + " " + next);
|
||||
Console.WriteLine(":RUNNER: start: \"{0}{1}\"", assemblyName, args);
|
||||
}
|
||||
/// <summary>
|
||||
/// Print some preaty information about shutdown
|
||||
/// </summary>
|
||||
/// <param name="ret"></param>
|
||||
internal static void PrintStop(int ret)
|
||||
{
|
||||
Console.WriteLine(":RUNNER: return: {0}", ret);
|
||||
}
|
||||
|
||||
public AssemblyRunner()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Execute the client assembly. Arguments are passed to main
|
||||
/// </summary>
|
||||
/// <param name="assemblyName">The name of the assembly</param>
|
||||
/// <param name="arguments">Arguments to the main method</param>
|
||||
/// <returns>The return of the application</returns>
|
||||
public int ExecuteAssembly(string assemblyName, string[] arguments)
|
||||
{
|
||||
//Because there are a total of four possible signatures for main, we need a special indirection level which will hide that variety.
|
||||
//The reason we are not using dirrectly MethodInfo.Invoke is that for calling that a ReflectionPermission is required
|
||||
//which would taint the sandbox. So off to making the logic a touch more complex just to allow the client to get what he expects
|
||||
MainDelegates.MainWrapper main = MainDelegates.MainWrapper.ConstructMainWrapper(assemblyName);
|
||||
PrintStart(assemblyName, arguments);
|
||||
int ret = 0;
|
||||
ret = main.Invoke(arguments);
|
||||
PrintStop(ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
namespace MainDelegates
|
||||
{
|
||||
//MSDN says there are only void/int return values, and non/string[] for parameter. That makes a total of 4 possible delegates
|
||||
|
||||
/// <summary>
|
||||
/// This is the base class for each of the wrapper. These wrappers will be an abstraction over the 4 possible delegates
|
||||
/// </summary>
|
||||
internal abstract class MainWrapper
|
||||
{
|
||||
public abstract int Invoke(string[] args);
|
||||
/// <summary>
|
||||
/// This method is in charge of creating the propper main-delegate wrapper. It loads the assembly, gets the entry point
|
||||
/// and make a decision about which wrapper to create
|
||||
/// </summary>
|
||||
/// <param name="assemblyName">The assembly name</param>
|
||||
/// <returns>One of the four different main-delegate wrappers</returns>
|
||||
[SecuritySafeCritical]
|
||||
public static MainWrapper ConstructMainWrapper(string assemblyName)
|
||||
{
|
||||
(new PermissionSet(PermissionState.Unrestricted)).Assert();
|
||||
Assembly a = Assembly.LoadFrom(assemblyName);
|
||||
MethodInfo mi = a.EntryPoint;
|
||||
|
||||
if (mi.ReturnType == typeof(void))
|
||||
{
|
||||
//No parameter, void return
|
||||
if (mi.GetParameters().Length == 0)
|
||||
return new MainVoidEmpty(mi);
|
||||
else
|
||||
//Parameters but void return
|
||||
return new MainVoidArgs(mi);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Int return but no parameters
|
||||
if (mi.GetParameters().Length == 0)
|
||||
return new MainIntEmpty(mi);
|
||||
else
|
||||
//int return and string[] as parameters
|
||||
return new MainIntFull(mi);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// This wrapper treats the int Main(string[]args) signature
|
||||
/// </summary>
|
||||
internal class MainIntFull : MainWrapper
|
||||
{
|
||||
delegate int MainDelegateIntArg(string[] args);
|
||||
MainDelegateIntArg _dlg;
|
||||
public MainIntFull(MethodInfo mi)
|
||||
{
|
||||
|
||||
_dlg = (MainDelegateIntArg)Delegate.CreateDelegate(typeof(MainDelegateIntArg), mi);
|
||||
}
|
||||
public override int Invoke(string[] args)
|
||||
{
|
||||
return _dlg(args);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// This wrapper treats the void Main(string[]args) signature
|
||||
/// </summary>
|
||||
internal class MainVoidArgs : MainWrapper
|
||||
{
|
||||
delegate void MainDelegateVoidArg(string[] args);
|
||||
MainDelegateVoidArg _dlg;
|
||||
public MainVoidArgs(MethodInfo mi)
|
||||
{
|
||||
_dlg = (MainDelegateVoidArg)Delegate.CreateDelegate(typeof(MainDelegateVoidArg), mi);
|
||||
}
|
||||
public override int Invoke(string[] args)
|
||||
{
|
||||
_dlg(args);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// This wrapper treats the int Main() signature
|
||||
/// </summary>
|
||||
internal class MainIntEmpty : MainWrapper
|
||||
{
|
||||
delegate int MainDelegateIntNoArg();
|
||||
MainDelegateIntNoArg _dlg;
|
||||
public MainIntEmpty(MethodInfo mi)
|
||||
{
|
||||
_dlg = (MainDelegateIntNoArg)Delegate.CreateDelegate(typeof(MainDelegateIntNoArg), mi);
|
||||
}
|
||||
public override int Invoke(string[] args)
|
||||
{
|
||||
return _dlg();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// This wrapper treats the int Main() signature
|
||||
/// </summary>
|
||||
internal class MainVoidEmpty : MainWrapper
|
||||
{
|
||||
delegate void MainDelegateVoidNoArg();
|
||||
MainDelegateVoidNoArg _dlg;
|
||||
public MainVoidEmpty(MethodInfo mi)
|
||||
{
|
||||
_dlg = (MainDelegateVoidNoArg)Delegate.CreateDelegate(typeof(MainDelegateVoidNoArg), mi);
|
||||
}
|
||||
public override int Invoke(string[] args)
|
||||
{
|
||||
_dlg();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
REM ==
|
||||
REM == Latest sources \\clrdrop\drops\CLRv4\PUCLR\sources\<build>\QA\CLR\Testsrc\Desktop\tools\PartialTrustRunner
|
||||
REM ==
|
||||
csc /out:PTRunner.exe PartialTrustRunner.cs ptrunnerlib.cs /keyfile:ptkey.snk
|
Двоичные данные
tests/fsharpqa/testenv/src/PartialTrustRunner/ptkey.snk
Двоичные данные
tests/fsharpqa/testenv/src/PartialTrustRunner/ptkey.snk
Двоичный файл не отображается.
|
@ -1,196 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using System.Security;
|
||||
using System.Security.Policy;
|
||||
using System.Reflection;
|
||||
using System.Collections;
|
||||
using System.Security.Permissions;
|
||||
using System.Drawing.Printing;
|
||||
using System.Net;
|
||||
using System.Data.OleDb;
|
||||
using System.Data.SqlClient;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.IO;
|
||||
|
||||
namespace PTRunner
|
||||
{
|
||||
public enum PermSetNames { Everything, Internet, LocalIntranet, Execution, FullTrust };
|
||||
|
||||
public class PTRunnerLib
|
||||
{
|
||||
|
||||
#region NamedPermissionSets
|
||||
|
||||
private static PermissionSet GetFullTrustPermissionSet()
|
||||
{
|
||||
PermissionSet ps = new PermissionSet(PermissionState.Unrestricted);
|
||||
return ps;
|
||||
}
|
||||
private static PermissionSet GetExecutionPermissionSet()
|
||||
{
|
||||
PermissionSet ps = new PermissionSet(PermissionState.None);
|
||||
ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution));
|
||||
return ps;
|
||||
}
|
||||
private static PermissionSet GetInternetPermissionSet()
|
||||
{
|
||||
Evidence ev = new Evidence();
|
||||
ev.AddHostEvidence(new Zone(SecurityZone.Internet));
|
||||
return SecurityManager.GetStandardSandbox(ev);
|
||||
}
|
||||
private static PermissionSet GetIntranetPermissionSet()
|
||||
{
|
||||
Evidence ev = new Evidence();
|
||||
ev.AddHostEvidence(new Zone(SecurityZone.Intranet));
|
||||
return SecurityManager.GetStandardSandbox(ev);
|
||||
}
|
||||
//The mediapermission and webbrowserpermission are conditionally added to intranet and internet.
|
||||
private static void AddAdditionalPermissions(PermissionSet partialEverything)
|
||||
{
|
||||
foreach (IPermission perm in GetIntranetPermissionSet())
|
||||
{
|
||||
if(partialEverything.GetPermission(perm.GetType())==null)
|
||||
{
|
||||
ConstructorInfo ci = perm.GetType().GetConstructor(new Type[] { typeof(PermissionState) });
|
||||
partialEverything.AddPermission((IPermission)ci.Invoke(new object[]{PermissionState.Unrestricted}));
|
||||
}
|
||||
}
|
||||
}
|
||||
private static PermissionSet GetEverythingPermissionSet()
|
||||
{
|
||||
PermissionSet ps = new PermissionSet(PermissionState.None);
|
||||
ps.AddPermission(new IsolatedStorageFilePermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new EnvironmentPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new FileIOPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new FileDialogPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new ReflectionPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.Assertion | SecurityPermissionFlag.UnmanagedCode | SecurityPermissionFlag.Execution | SecurityPermissionFlag.ControlThread | SecurityPermissionFlag.ControlEvidence | SecurityPermissionFlag.ControlPolicy | SecurityPermissionFlag.ControlAppDomain | SecurityPermissionFlag.SerializationFormatter | SecurityPermissionFlag.ControlDomainPolicy | SecurityPermissionFlag.ControlPrincipal | SecurityPermissionFlag.RemotingConfiguration | SecurityPermissionFlag.Infrastructure | SecurityPermissionFlag.BindingRedirects));
|
||||
ps.AddPermission(new UIPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new SocketPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new WebPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new DnsPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new KeyContainerPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new RegistryPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new PrintingPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new EventLogPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new StorePermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new PerformanceCounterPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new OleDbPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new SqlClientPermission(PermissionState.Unrestricted));
|
||||
ps.AddPermission(new DataProtectionPermission(PermissionState.Unrestricted));
|
||||
AddAdditionalPermissions(ps);
|
||||
return ps;
|
||||
}
|
||||
#endregion
|
||||
|
||||
//The available settings for the partial trust sandboxes
|
||||
|
||||
/// <summary>
|
||||
/// Transform from a PermSetNames enum tu a PermissionSet
|
||||
/// </summary>
|
||||
/// <param name="permSetName">The sandbox that we want</param>
|
||||
/// <returns>The actual permission set</returns>
|
||||
public static PermissionSet GetStandardPermission(PermSetNames permSetName)
|
||||
{
|
||||
PermissionSet ps = null;
|
||||
switch (permSetName)
|
||||
{
|
||||
case PermSetNames.Execution:
|
||||
ps = GetExecutionPermissionSet();
|
||||
break;
|
||||
case PermSetNames.Internet:
|
||||
ps = GetInternetPermissionSet();
|
||||
break;
|
||||
case PermSetNames.LocalIntranet:
|
||||
ps = GetIntranetPermissionSet();
|
||||
break;
|
||||
case PermSetNames.Everything:
|
||||
ps = GetEverythingPermissionSet();
|
||||
break;
|
||||
case PermSetNames.FullTrust:
|
||||
ps = GetFullTrustPermissionSet();
|
||||
break;
|
||||
}
|
||||
return ps;
|
||||
}
|
||||
/// <summary>
|
||||
/// Return the strong name of an Assembly
|
||||
/// </summary>
|
||||
/// <param name="asm">The assembly that we want to get the strong name from</param>
|
||||
/// <returns>The strong name</returns>
|
||||
private static StrongName GetStrongName(Assembly assembly)
|
||||
{
|
||||
//This should actually use assembly.Evidence.GetHostEvidence<StrongName>(), but due to a bug that doesn't work
|
||||
if (assembly == null)
|
||||
throw new ArgumentNullException("assembly");
|
||||
|
||||
StrongName sn = assembly.Evidence.GetHostEvidence<StrongName>();
|
||||
if (sn == null)
|
||||
throw new InvalidOperationException(String.Format("Assembly \"{0}\" is not strongly named. Use /keyfile flag when compiling it", assembly.FullName));
|
||||
|
||||
return sn;
|
||||
}
|
||||
/// <summary>
|
||||
/// Construct the Sandbox in which the program will run. This will have the reduced grant set
|
||||
/// </summary>
|
||||
/// <param name="ps">The permission set in which the program will be run</param>
|
||||
/// <param name="fullTrustList">The full trust list</param>
|
||||
/// <returns>The sandbox AppDomain</returns>
|
||||
public static AppDomain CreateSandboxedDomain(PermissionSet ps, params Assembly[] fullTrustList)
|
||||
{
|
||||
int ftLen = fullTrustList.Length;
|
||||
StrongName[] fullTrustStrongNames = new StrongName[ftLen + 1];
|
||||
//We have to add ourselves to the list of full trust assemblies
|
||||
fullTrustStrongNames[0] = GetStrongName(typeof(PTRunnerLib).Assembly);
|
||||
int i = 1;
|
||||
foreach (Assembly asm in fullTrustList)
|
||||
{
|
||||
StrongName asmStrongName = GetStrongName(asm);
|
||||
fullTrustStrongNames[i++] = asmStrongName;
|
||||
}
|
||||
|
||||
return AppDomain.CreateDomain("Sandbox", null, AppDomain.CurrentDomain.SetupInformation, ps, fullTrustStrongNames);
|
||||
}
|
||||
/// <summary>
|
||||
/// Create a new sandbox AppDomain with the permission and full trust list passed and initialize
|
||||
/// a new instance of the type T in it
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type that will be instantiated in the new domain. This has to be a MarshalByRefObject</typeparam>
|
||||
/// <param name="ps">Permission set for the new domain</param>
|
||||
/// <param name="fullTrustList">List of full trust assemblies. All assemblies in this list have to be fully trusted</param>
|
||||
/// <returns>An instance in the new sandboxed AppDomain</returns>
|
||||
[SecuritySafeCritical]
|
||||
public static T GetPartialTrustInstance<T>(PermissionSet ps, params Assembly[] fullTrustList) where T : MarshalByRefObject
|
||||
{
|
||||
AppDomain domain = CreateSandboxedDomain(ps, fullTrustList);
|
||||
return (T)domain.CreateInstanceAndUnwrap(typeof(T).Assembly.FullName, typeof(T).FullName);
|
||||
}
|
||||
/// <summary>
|
||||
/// Create a new sandbox AppDomain with the permission and full trust list passed and initialize
|
||||
/// a new instance of the type T in it
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type that will be instantiated in the new domain. This has to be a MarshalByRefObject</typeparam>
|
||||
/// <param name="psName">Name of standard permission set for the new domain</param>
|
||||
/// <param name="fullTrustList">List of full trust assemblies. All assemblies in this list have to be fully trusted</param>
|
||||
/// <returns>An instance in the new sandboxed AppDomain</returns>
|
||||
public static T GetPartialTrustInstance<T>(PermSetNames psName, params Assembly[] fullTrustList) where T : MarshalByRefObject
|
||||
{
|
||||
return GetPartialTrustInstance<T>(GetStandardPermission(psName), fullTrustList);
|
||||
}
|
||||
/// <summary>
|
||||
/// Create a new sandbox AppDomain with the permission and full trust list passed and initialize
|
||||
/// a new instance of the type T in it. The permission in the new AppDomain is Execution
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type that will be instantiated in the new domain. This has to be a MarshalByRefObject</typeparam>
|
||||
/// <param name="fullTrustList">List of full trust assemblies. All assemblies in this list have to be fully trusted</param>
|
||||
/// <returns>An instance in the new sandboxed AppDomain</returns>
|
||||
public static T GetPartialTrustInstance<T>(params Assembly[] fullTrustList) where T : MarshalByRefObject
|
||||
{
|
||||
return GetPartialTrustInstance<T>(GetStandardPermission(PermSetNames.Execution), fullTrustList);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,169 +1,64 @@
|
|||
#r @"..\..\..\..\..\packages\FSharp.Data.2.2.5\lib\net40\FSharp.Data.dll"
|
||||
#load @"../../../../../src/buildtools/scriptlib.fsx"
|
||||
#load "crackProjectJson.fsx"
|
||||
|
||||
open System
|
||||
open System.Diagnostics
|
||||
open System.IO
|
||||
open FSharp.Data
|
||||
open FSharp.Data.JsonExtensions
|
||||
|
||||
type AssemblyReferenceType = | forBuild = 0 | forExecute = 1
|
||||
let Sources = argv |> Seq.filter(fun t -> printfn "%s" t; t.StartsWith("--source:")) |> Seq.map(fun t -> t.Remove(0, 9).Trim()) |> Seq.distinct
|
||||
let Defines = argv |> Seq.filter(fun t -> printfn "%s" t; t.StartsWith("--define:")) |> Seq.map(fun t -> t.Remove(0, 9).Trim())
|
||||
|
||||
// Try head was introduced in F# 4.0
|
||||
let tryHead (source : seq<_>) =
|
||||
let checkNonNull argName arg =
|
||||
match box arg with
|
||||
| null -> nullArg argName
|
||||
| _ -> ()
|
||||
checkNonNull "source" source
|
||||
use e = source.GetEnumerator()
|
||||
if (e.MoveNext()) then Some e.Current
|
||||
else None
|
||||
let ProjectJsonLock = getCmdLineArg "--projectJsonLock:" @"tests\fsharp\project.lock.json"
|
||||
let PackagesDir = getCmdLineArg "--packagesDir:" @"packages"
|
||||
let TargetPlatformName = getCmdLineArg "--targetPlatformName:" @"DNXCore,Version=v5.0/win7-x64"
|
||||
let FSharpCore = getCmdLineArg "--fsharpCore:" @"Release\coreclr\bin\FSharp.Core.dll"
|
||||
let Output = getCmdLineArg "--output:" @"."
|
||||
let Verbosity = getCmdLineArg "--v:" @"quiet"
|
||||
let CompilerPath = getCmdLineArg "--compilerPath:" @"."
|
||||
let TestKeyFile = getCmdLineArg "--keyfile:" @""
|
||||
let TestDelaySign = getCmdLineArg "--delaysign:" @""
|
||||
let TestPublicSign = getCmdLineArg "--publicsign:" @""
|
||||
let ExtraDefines = getCmdLineArg "--ExtraDefines:" @""
|
||||
|
||||
let Arguments = fsi.CommandLineArgs |> Seq.skip 1
|
||||
let Sources = Arguments |> Seq.filter(fun t -> printfn "%s" t; t.StartsWith("--source:")) |> Seq.map(fun t -> t.Remove(0, 9).Trim()) |> Seq.distinct
|
||||
let Defines = Arguments |> Seq.filter(fun t -> printfn "%s" t; t.StartsWith("--define:")) |> Seq.map(fun t -> t.Remove(0, 9).Trim())
|
||||
let GetArgumentFromCommandLine switchName defaultValue =
|
||||
match Arguments |> Seq.filter(fun t -> t.StartsWith(switchName)) |> Seq.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> tryHead with
|
||||
| Some(file) -> if file.Length <> 0 then file else defaultValue
|
||||
| _ -> defaultValue
|
||||
let KeyFileOption = if isNullOrEmpty TestKeyFile then "" else sprintf "--keyfile:%s" TestKeyFile
|
||||
let DelaySignOption = if isNullOrEmpty TestDelaySign then "" else "--delaysign"
|
||||
let PublicSignOption = if isNullOrEmpty TestPublicSign then "" else "--publicsign"
|
||||
|
||||
let ProjectJsonLock = GetArgumentFromCommandLine "--projectJsonLock:" @"tests\fsharp\project.lock.json"
|
||||
let PackagesDir = GetArgumentFromCommandLine "--packagesDir:" @"packages"
|
||||
let TargetPlatformName = GetArgumentFromCommandLine "--targetPlatformName:" @"DNXCore,Version=v5.0/win7-x64"
|
||||
let FSharpCore = GetArgumentFromCommandLine "--fsharpCore:" @"Release\coreclr\bin\fsharp.core.dll"
|
||||
let Output = GetArgumentFromCommandLine "--output:" @"."
|
||||
let Verbosity = GetArgumentFromCommandLine "--v:" @"quiet"
|
||||
let CompilerPath = GetArgumentFromCommandLine "--compilerPath:" @"."
|
||||
let TestKeyFile = GetArgumentFromCommandLine "--keyfile:" @""
|
||||
let TestDelaySign = GetArgumentFromCommandLine "--delaysign:" @""
|
||||
let TestPublicSign = GetArgumentFromCommandLine "--publicsign:" @""
|
||||
let ExtraDefines = GetArgumentFromCommandLine "--ExtraDefines:" @""
|
||||
|
||||
let GetKeyFileOption = if String.IsNullOrEmpty(TestKeyFile) then "" else (sprintf "--keyfile:%s" TestKeyFile)
|
||||
let GetDelaySignOption = if String.IsNullOrEmpty(TestDelaySign) then "" else "--delaysign"
|
||||
let GetPublicSignOption = if String.IsNullOrEmpty(TestPublicSign) then "" else "--publicsign"
|
||||
|
||||
let FSharpCoreDir = Path.GetDirectoryName(FSharpCore)
|
||||
let Win32Manifest = Path.Combine(FSharpCoreDir, "default.win32manifest")
|
||||
let FSharpCoreDir = getDirectoryName FSharpCore
|
||||
let Win32Manifest = FSharpCoreDir ++ "default.win32manifest"
|
||||
let FSharpCompilerFiles =
|
||||
seq {
|
||||
yield Path.Combine(FSharpCoreDir, "fsc.exe")
|
||||
yield Path.Combine(FSharpCoreDir, "FSharp.Compiler.dll")
|
||||
yield Path.Combine(FSharpCoreDir, "fsharp.core.sigdata")
|
||||
yield Path.Combine(FSharpCoreDir, "fsharp.core.optdata")
|
||||
yield Win32Manifest
|
||||
yield Path.Combine(FSharpCoreDir, "fsi.exe")
|
||||
yield Path.Combine(FSharpCoreDir, "FSharp.Compiler.Interactive.Settings.dll")
|
||||
}
|
||||
[ FSharpCoreDir ++ "fsc.exe"
|
||||
FSharpCoreDir ++ "FSharp.Compiler.dll"
|
||||
FSharpCoreDir ++ "FSharp.Core.sigdata"
|
||||
FSharpCoreDir ++ "FSharp.Core.optdata"
|
||||
Win32Manifest
|
||||
FSharpCoreDir ++ "fsi.exe"
|
||||
FSharpCoreDir ++ "FSharp.Compiler.Interactive.Settings.dll"]
|
||||
|
||||
let isVerbose = Verbosity = "verbose"
|
||||
|
||||
let makeDirectory (output) =
|
||||
if not (Directory.Exists(output)) then Directory.CreateDirectory(output) |>ignore
|
||||
()
|
||||
|
||||
let executeProcess filename arguments =
|
||||
let processWriteMessage (chan:TextWriter) (message:string) =
|
||||
match message with
|
||||
| null -> ()
|
||||
| _ as m -> chan.WriteLine(m) |>ignore
|
||||
let info = new ProcessStartInfo()
|
||||
let p = new Process()
|
||||
printfn "%s %s" filename arguments
|
||||
info.Arguments <- arguments
|
||||
info.UseShellExecute <- false
|
||||
info.RedirectStandardOutput <- true
|
||||
info.RedirectStandardError <- true
|
||||
info.CreateNoWindow <- true
|
||||
info.FileName <- filename
|
||||
p.StartInfo <- info
|
||||
p.OutputDataReceived.Add(fun x -> processWriteMessage stdout x.Data)
|
||||
p.ErrorDataReceived.Add(fun x -> processWriteMessage stderr x.Data)
|
||||
if p.Start() then
|
||||
p.BeginOutputReadLine()
|
||||
p.BeginErrorReadLine()
|
||||
p.WaitForExit()
|
||||
p.ExitCode
|
||||
else
|
||||
0
|
||||
let dependencies = CrackProjectJson.collectReferences (isVerbose, PackagesDir, TargetPlatformName, ProjectJsonLock, false)
|
||||
|
||||
let executeCompiler sources references =
|
||||
let Win32manifest=Path.Combine(CompilerPath, "default.win32manifest")
|
||||
let listToPrefixedSpaceSeperatedString prefix list = list |> Seq.fold(fun a t -> sprintf "%s %s%s" a prefix t) ""
|
||||
let listToSpaceSeperatedString list = list |> Seq.fold(fun a t -> sprintf "%s %s" a t) ""
|
||||
let addReferenceSwitch list = list |> Seq.map(fun i -> sprintf "--reference:%s" i)
|
||||
printfn ">%s<" (GetKeyFileOption)
|
||||
printfn ">%s<" (GetDelaySignOption)
|
||||
printfn ">%s<" (KeyFileOption)
|
||||
printfn ">%s<" (DelaySignOption)
|
||||
let arguments = sprintf @"%s --debug:portable --debug+ --noframework --simpleresolution --out:%s --define:BASIC_TEST --targetprofile:netcore --target:exe -g --times --win32manifest:%s %s -r:%s %s %s %s %s %s %s"
|
||||
(System.IO.Path.Combine(CompilerPath, "fsc.exe"))
|
||||
(Output)
|
||||
(Win32Manifest)
|
||||
(CompilerPath ++ "fsc.exe")
|
||||
Output
|
||||
Win32Manifest
|
||||
(listToSpaceSeperatedString (addReferenceSwitch references))
|
||||
(FSharpCore)
|
||||
FSharpCore
|
||||
(listToPrefixedSpaceSeperatedString "--define:" Defines)
|
||||
(GetKeyFileOption)
|
||||
(GetDelaySignOption)
|
||||
(GetPublicSignOption)
|
||||
(ExtraDefines)
|
||||
KeyFileOption
|
||||
DelaySignOption
|
||||
PublicSignOption
|
||||
ExtraDefines
|
||||
(listToSpaceSeperatedString sources)
|
||||
executeProcess (CompilerPath + @"\CoreRun.exe") arguments
|
||||
File.WriteAllText("coreclr.fsc.cmd",(CompilerPath ++ "CoreRun.exe") + arguments)
|
||||
executeProcess (CompilerPath ++ "CoreRun.exe") arguments
|
||||
|
||||
let setPathSeperators (path:string) = path.Replace('/', '\\')
|
||||
|
||||
let splitNameAndVersion (ref:string) =
|
||||
let elements = ref.Split [| '/' |]
|
||||
if elements.Length >= 2 then
|
||||
Some(elements.[0], elements.[1])
|
||||
else
|
||||
None
|
||||
|
||||
let collectReferenciesFromProjectJson lockFile assemblyReferenceType =
|
||||
let getAssemblyReferenciesFromTargets (targets:JsonValue) =
|
||||
let getReferencedFiles (referencedFiles:JsonValue) =
|
||||
seq {
|
||||
for path, _ in referencedFiles.Properties do
|
||||
let path = setPathSeperators path
|
||||
if Path.GetFileName(path) = "_._" then ()
|
||||
else yield setPathSeperators path
|
||||
}
|
||||
let buildReferencePaths name version paths =
|
||||
seq {
|
||||
for path in paths do
|
||||
yield sprintf @"%s\%s\%s\%s" PackagesDir name version path
|
||||
}
|
||||
if isVerbose then
|
||||
printfn "lockFile: %A" lockFile
|
||||
printfn "TargetPlatformName: %A" TargetPlatformName
|
||||
printfn "PackagesDir: %A" PackagesDir
|
||||
seq {
|
||||
let target = targets.TryGetProperty(TargetPlatformName)
|
||||
match target with
|
||||
| Some(t) ->
|
||||
for ref, value in t.Properties do
|
||||
match splitNameAndVersion ref with
|
||||
| Some(name, version) ->
|
||||
if isVerbose then
|
||||
printfn "name: %A" name
|
||||
printfn "version: %A" version
|
||||
if assemblyReferenceType = AssemblyReferenceType.forBuild then
|
||||
match value.TryGetProperty("compile") with
|
||||
| None -> ()
|
||||
| Some x -> yield! buildReferencePaths name version (getReferencedFiles x)
|
||||
else
|
||||
match value.TryGetProperty("runtime") with
|
||||
| None -> ()
|
||||
| Some x -> yield! buildReferencePaths name version (getReferencedFiles value?runtime)
|
||||
match value.TryGetProperty("native") with
|
||||
| None -> ()
|
||||
| Some x -> yield! buildReferencePaths name version (getReferencedFiles value?native)
|
||||
| _ -> ()
|
||||
| _ -> ()
|
||||
}
|
||||
|
||||
let getReferencesFromJson (filename:string) =
|
||||
let projectJson = JsonValue.Load( filename )
|
||||
getAssemblyReferenciesFromTargets projectJson?targets
|
||||
(getReferencesFromJson lockFile) |> Seq.distinct
|
||||
|
||||
makeDirectory (Path.GetDirectoryName(Output))
|
||||
exit (executeCompiler Sources (collectReferenciesFromProjectJson ProjectJsonLock AssemblyReferenceType.forBuild) )
|
||||
makeDirectory (getDirectoryName Output)
|
||||
exit (executeCompiler Sources dependencies)
|
||||
|
|
|
@ -1,164 +1,35 @@
|
|||
#r @"..\..\..\..\..\packages\FSharp.Data.2.2.5\lib\net40\FSharp.Data.dll"
|
||||
#load "../../../../../src/buildtools/scriptlib.fsx"
|
||||
#load "crackProjectJson.fsx"
|
||||
|
||||
open System.Diagnostics
|
||||
open System.IO
|
||||
open FSharp.Data
|
||||
open FSharp.Data.JsonExtensions
|
||||
|
||||
type AssemblyReferenceType = | forBuild = 0 | forExecute = 1
|
||||
|
||||
// Try head was introduced in F# 4.0
|
||||
let tryHead (source : seq<_>) =
|
||||
let checkNonNull argName arg =
|
||||
match box arg with
|
||||
| null -> nullArg argName
|
||||
| _ -> ()
|
||||
checkNonNull "source" source
|
||||
use e = source.GetEnumerator()
|
||||
if (e.MoveNext()) then Some e.Current
|
||||
else None
|
||||
|
||||
let Arguments = fsi.CommandLineArgs |> Seq.skip 1
|
||||
|
||||
let GetArgumentFromCommandLine switchName defaultValue =
|
||||
match Arguments |> Seq.filter(fun t -> t.StartsWith(switchName)) |> Seq.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> tryHead with
|
||||
| Some(file) -> if file.Length <> 0 then file else defaultValue
|
||||
| _ -> defaultValue
|
||||
|
||||
let ProjectJson = GetArgumentFromCommandLine "--projectJson:" @"tests\fsharp\project.json"
|
||||
let configFile = GetArgumentFromCommandLine "--nugetConfig:" @".nuget\nuget.config"
|
||||
let ProjectJsonLock = GetArgumentFromCommandLine "--projectJsonLock:" @"tests\fsharp\project.lock.json"
|
||||
let PackagesDir = GetArgumentFromCommandLine "--packagesDir:" @"packages"
|
||||
let TargetPlatformName = GetArgumentFromCommandLine "--targetPlatformName:" @"DNXCore,Version=v5.0/win7-x64"
|
||||
let FSharpCore = GetArgumentFromCommandLine "--fsharpCore:" @"Release\coreclr\bin\fsharp.core.dll"
|
||||
let Output = GetArgumentFromCommandLine "--output:" @"."
|
||||
let NugetPath = GetArgumentFromCommandLine "--nugetPath:" @".nuget\nuget.exe"
|
||||
let Verbosity = GetArgumentFromCommandLine "--v:" @"quiet"
|
||||
let CopyCompiler = GetArgumentFromCommandLine "--copyCompiler:" @"no"
|
||||
let ProjectJsonLock = getCmdLineArg "--projectJsonLock:" @"tests\fsharp\project.lock.json"
|
||||
let PackagesDir = getCmdLineArg "--packagesDir:" @"packages"
|
||||
let TargetPlatformName = getCmdLineArg "--targetPlatformName:" @".NETStandard,Version=v1.6/win7-x64"
|
||||
let FSharpCore = getCmdLineArg "--fsharpCore:" @"release\coreclr\bin\FSharp.Core.dll"
|
||||
let Output = getCmdLineArg "--output:" @"."
|
||||
let Verbosity = getCmdLineArg "--v:" @"quiet"
|
||||
let CopyCompiler = getCmdLineArg "--copyCompiler:" @"no"
|
||||
|
||||
let FSharpCompilerFiles =
|
||||
let FSharpCoreDir = Path.GetDirectoryName(FSharpCore)
|
||||
seq {
|
||||
yield Path.Combine(FSharpCoreDir, "fsc.exe")
|
||||
yield Path.Combine(FSharpCoreDir, "FSharp.Compiler.dll")
|
||||
yield Path.Combine(FSharpCoreDir, "fsharp.core.sigdata")
|
||||
yield Path.Combine(FSharpCoreDir, "fsharp.core.optdata")
|
||||
yield Path.Combine(FSharpCoreDir, "default.win32manifest")
|
||||
yield Path.Combine(FSharpCoreDir, "fsi.exe")
|
||||
yield Path.Combine(FSharpCoreDir, "FSharp.Compiler.Interactive.Settings.dll")
|
||||
}
|
||||
let FSharpCoreDir = getDirectoryName FSharpCore
|
||||
[ FSharpCoreDir ++ "fsc.exe"
|
||||
FSharpCoreDir ++ "FSharp.Compiler.dll"
|
||||
FSharpCoreDir ++ "FSharp.Core.sigdata"
|
||||
FSharpCoreDir ++ "FSharp.Core.optdata"
|
||||
FSharpCoreDir ++ "default.win32manifest"
|
||||
FSharpCoreDir ++ "fsi.exe"
|
||||
FSharpCoreDir ++ "FSharp.Compiler.Interactive.Settings.dll" ]
|
||||
|
||||
let isVerbose = Verbosity = "verbose"
|
||||
|
||||
// Utility functions
|
||||
let copyFile source dir =
|
||||
let dest =
|
||||
if not (Directory.Exists(dir)) then Directory.CreateDirectory(dir) |>ignore
|
||||
let result = Path.Combine(dir, Path.GetFileName(source))
|
||||
result
|
||||
if isVerbose then
|
||||
printfn "source: %s" source
|
||||
printfn "dest: %s" dest
|
||||
File.Copy(source, dest, true)
|
||||
|
||||
let deleteDirectory (output) =
|
||||
if (Directory.Exists(output)) then Directory.Delete(output, true) |>ignore
|
||||
()
|
||||
|
||||
let makeDirectory (output) =
|
||||
if not (Directory.Exists(output)) then Directory.CreateDirectory(output) |>ignore
|
||||
()
|
||||
|
||||
let executeProcess filename arguments =
|
||||
let processWriteMessage (chan:TextWriter) (message:string) =
|
||||
match message with
|
||||
| null -> ()
|
||||
| _ as m -> chan.WriteLine(m) |>ignore
|
||||
let info = new ProcessStartInfo()
|
||||
let p = new Process()
|
||||
if isVerbose then printfn "%s %s" filename arguments
|
||||
info.Arguments <- arguments
|
||||
info.UseShellExecute <- false
|
||||
info.RedirectStandardOutput <- true
|
||||
info.RedirectStandardError <- true
|
||||
info.CreateNoWindow <- true
|
||||
info.FileName <- filename
|
||||
p.StartInfo <- info
|
||||
p.OutputDataReceived.Add(fun x -> processWriteMessage stdout x.Data)
|
||||
p.ErrorDataReceived.Add(fun x -> processWriteMessage stderr x.Data)
|
||||
if p.Start() then
|
||||
p.BeginOutputReadLine()
|
||||
p.BeginErrorReadLine()
|
||||
p.WaitForExit()
|
||||
p.ExitCode
|
||||
else
|
||||
0
|
||||
let _ =
|
||||
let arguments = "restore -configFile "+ configFile + " -PackagesDirectory " + PackagesDir + " " + ProjectJson
|
||||
executeProcess NugetPath arguments
|
||||
|
||||
let setPathSeperators (path:string) = path.Replace('/', '\\')
|
||||
|
||||
let splitNameAndVersion (ref:string) =
|
||||
let elements = ref.Split [| '/' |]
|
||||
if elements.Length >= 2 then
|
||||
Some(elements.[0], elements.[1])
|
||||
else
|
||||
None
|
||||
|
||||
let collectReferenciesFromProjectJson lockFile assemblyReferenceType =
|
||||
let getAssemblyReferenciesFromTargets (targets:JsonValue) =
|
||||
let getReferencedFiles (referencedFiles:JsonValue) =
|
||||
seq {
|
||||
for path, _ in referencedFiles.Properties do
|
||||
let path = setPathSeperators path
|
||||
if Path.GetFileName(path) = "_._" then ()
|
||||
else yield setPathSeperators path
|
||||
}
|
||||
let buildReferencePaths name version paths =
|
||||
seq {
|
||||
for path in paths do
|
||||
yield sprintf @"%s\%s\%s\%s" PackagesDir name version path
|
||||
}
|
||||
if isVerbose then
|
||||
printfn "lockFile: %A" lockFile
|
||||
printfn "TargetPlatformName: %A" TargetPlatformName
|
||||
printfn "PackagesDir: %A" PackagesDir
|
||||
seq {
|
||||
let target = targets.TryGetProperty(TargetPlatformName)
|
||||
match target with
|
||||
| Some(t) ->
|
||||
for ref, value in t.Properties do
|
||||
match splitNameAndVersion ref with
|
||||
| Some(name, version) ->
|
||||
if isVerbose then
|
||||
printfn "name: %A" name
|
||||
printfn "version: %A" version
|
||||
if assemblyReferenceType = AssemblyReferenceType.forBuild then
|
||||
match value.TryGetProperty("compile") with
|
||||
| None -> ()
|
||||
| Some x -> yield! buildReferencePaths name version (getReferencedFiles x)
|
||||
else
|
||||
match value.TryGetProperty("runtime") with
|
||||
| None -> ()
|
||||
| Some x -> yield! buildReferencePaths name version (getReferencedFiles value?runtime)
|
||||
match value.TryGetProperty("native") with
|
||||
| None -> ()
|
||||
| Some x -> yield! buildReferencePaths name version (getReferencedFiles value?native)
|
||||
| _ -> ()
|
||||
| _ -> ()
|
||||
}
|
||||
|
||||
let getReferencesFromJson (filename:string) =
|
||||
let projectJson = JsonValue.Load( filename )
|
||||
getAssemblyReferenciesFromTargets projectJson?targets
|
||||
(getReferencesFromJson lockFile) |> Seq.distinct
|
||||
|
||||
let dependencies = (collectReferenciesFromProjectJson ProjectJsonLock AssemblyReferenceType.forExecute)
|
||||
let dependencies = CrackProjectJson.collectReferences (isVerbose, PackagesDir, TargetPlatformName, ProjectJsonLock, true)
|
||||
|
||||
//Okay copy everything
|
||||
makeDirectory(Output)
|
||||
copyFile FSharpCore Output
|
||||
makeDirectory Output
|
||||
dependencies |> Seq.iter(fun source -> copyFile source Output)
|
||||
if CopyCompiler = "yes" then
|
||||
copyFile FSharpCore Output
|
||||
FSharpCompilerFiles |> Seq.iter(fun source -> copyFile source Output)
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
module CrackProjectJson
|
||||
|
||||
#load "../../../../../src/buildtools/scriptlib.fsx"
|
||||
#r "../../../../../packages/FSharp.Data.2.2.5/lib/net40/FSharp.Data.dll"
|
||||
|
||||
open FSharp.Data
|
||||
open FSharp.Data.JsonExtensions
|
||||
|
||||
/// Collects references from project.json.lock
|
||||
let collectReferences (isVerbose, packagesDir, targetPlatformName, lockFile:string, isForExecute) =
|
||||
let setPathSeperators (path:string) = path.Replace('/', '\\')
|
||||
|
||||
let splitNameAndVersion (ref:string) =
|
||||
let elements = ref.Split [| '/' |]
|
||||
if elements.Length >= 2 then
|
||||
Some(elements.[0], elements.[1])
|
||||
else
|
||||
None
|
||||
|
||||
let getReferencedFiles (referencedFiles:JsonValue) =
|
||||
seq {
|
||||
for path, _ in referencedFiles.Properties do
|
||||
let path = setPathSeperators path
|
||||
if getFilename path = "_._" then ()
|
||||
else yield setPathSeperators path
|
||||
}
|
||||
|
||||
let buildReferencePaths name version paths =
|
||||
seq {
|
||||
for path in paths do
|
||||
yield sprintf @"%s\%s\%s\%s" packagesDir name version path
|
||||
}
|
||||
|
||||
let getAssemblyReferenciesFromTargets (targets:JsonValue) =
|
||||
seq {
|
||||
let target = targets.TryGetProperty(targetPlatformName)
|
||||
match target with
|
||||
| Some t ->
|
||||
for ref, value in t.Properties do
|
||||
match splitNameAndVersion ref with
|
||||
| Some(name, version) ->
|
||||
if isVerbose then
|
||||
printfn "name: %A" name
|
||||
printfn "version: %A" version
|
||||
if not isForExecute then
|
||||
match value.TryGetProperty("compile") with
|
||||
| None -> ()
|
||||
| Some x -> yield! buildReferencePaths name version (getReferencedFiles x)
|
||||
else
|
||||
match value.TryGetProperty("runtime") with
|
||||
| None -> ()
|
||||
| Some x -> yield! buildReferencePaths name version (getReferencedFiles value?runtime)
|
||||
match value.TryGetProperty("native") with
|
||||
| None -> ()
|
||||
| Some x -> yield! buildReferencePaths name version (getReferencedFiles value?native)
|
||||
| _ -> ()
|
||||
| _ -> ()
|
||||
}
|
||||
|
||||
if isVerbose then
|
||||
printfn "lockFile: %A" lockFile
|
||||
printfn "targetPlatformName: %A" targetPlatformName
|
||||
printfn "packagesDir: %A" packagesDir
|
||||
let projectJson = JsonValue.Load(lockFile)
|
||||
getAssemblyReferenciesFromTargets projectJson?targets |> Seq.distinct
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<FSharpSourcesRoot>..\..\..\..\..\src</FSharpSourcesRoot>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
|
@ -11,79 +14,41 @@
|
|||
<AssemblyName>diff</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<OpenBuild Condition=" '$(OpenBuild)' == '' ">True</OpenBuild>
|
||||
<OpenDrop>..\..\..\..\..\$(Configuration)\net40\bin</OpenDrop>
|
||||
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
|
||||
<Name>HostedCompilerServer</Name>
|
||||
<Name>diff</Name>
|
||||
<OutputPath>..\..\bin\</OutputPath>
|
||||
<CustomOutputPath>true</CustomOutputPath>
|
||||
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Tailcalls>false</Tailcalls>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Debug\ILComparer.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<Tailcalls>true</Tailcalls>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DocumentationFile>bin\Release\ILComparer.XML</DocumentationFile>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj" >
|
||||
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
|
||||
<Name>FSharp.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<Reference Include="$(OpenDrop)\FSharp.Core.dll">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(OpenBuild)' != 'True' ">
|
||||
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(VisualStudioVersion)' == '11.0'">
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') AND '$(OpenBuild)' != 'True'">
|
||||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(OpenBuild)' == 'True' ">
|
||||
<FscToolPath>$(OpenDrop)</FscToolPath>
|
||||
<FSharpTargetsPath>$(OpenDrop)\Microsoft.FSharp.targets</FSharpTargetsPath>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<Import Project="$(FSharpTargetsPath)" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
|
||||
</Project>
|
|
@ -18,13 +18,14 @@
|
|||
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
|
||||
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
|
||||
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
|
||||
<ProjectGuid>{604F0DAA-2D33-48DD-B162-EDF0B672803D}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<TargetFramework Condition="'$(TargetFramework)' == ''">net40</TargetFramework>
|
||||
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin\$(TemplateCategory)\$(AssemblyName)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.Common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -41,25 +42,25 @@
|
|||
<InProject>false</InProject>
|
||||
</FilesToLocalize>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<VSTemplate Include="Template\ConsoleApplication.vstemplate" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<TemplateFiles Include="Template\App.config" />
|
||||
<TemplateFiles Include="Template\ConsoleApplication.fsproj" />
|
||||
<TemplateFiles Include="Template\AssemblyInfo.fs" />
|
||||
<TemplateFiles Include="Template\Program.fs" />
|
||||
<TemplateFiles Include="Template\packages.config" />
|
||||
|
||||
<TemplateFiles Include="Template\ConsoleApplication.vstemplate" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.tools.targets" />
|
||||
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
|
||||
|
||||
|
||||
<Target Name="CoreCompile" />
|
||||
|
||||
|
||||
<Target Name="CopyFilesToOutputDirectory" AfterTargets="CoreCompile">
|
||||
<Copy SourceFiles="@(TemplateFiles)" DestinationFiles="@(TemplateFiles->'$(OutDir)$(TemplateCategory)\$(AssemblyName)\%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.fs" />
|
||||
<Compile Include="Program.fs" />
|
||||
<Content Include="packages.config" />
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -17,8 +17,16 @@
|
|||
<Project File="ConsoleApplication.fsproj" ReplaceParameters="true">
|
||||
<ProjectItem ReplaceParameters="true">AssemblyInfo.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Program.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="false">packages.config</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true">App.config</ProjectItem>
|
||||
</Project>
|
||||
</TemplateContent>
|
||||
<WizardExtension>
|
||||
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
|
||||
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
|
||||
</WizardExtension>
|
||||
<WizardData>
|
||||
<packages repository="extension" repositoryId="VisualFSharp">
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
||||
</WizardData>
|
||||
</VSTemplate>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
|
@ -18,13 +18,14 @@
|
|||
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
|
||||
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
|
||||
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
|
||||
<ProjectGuid>{01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<TargetFramework Condition="'$(TargetFramework)' == ''">net40</TargetFramework>
|
||||
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin\$(TemplateCategory)\$(AssemblyName)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.Common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -45,21 +46,20 @@
|
|||
<ItemGroup>
|
||||
<VSTemplate Include="Template\Library.vstemplate" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<TemplateFiles Include="Template\AssemblyInfo.fs" />
|
||||
<TemplateFiles Include="Template\Library.fsproj" />
|
||||
<TemplateFiles Include="Template\Library.vstemplate" />
|
||||
<TemplateFiles Include="Template\Library1.fs" />
|
||||
<TemplateFiles Include="Template\packages.config" />
|
||||
<TemplateFiles Include="Template\Script.fsx" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.tools.targets" />
|
||||
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
|
||||
|
||||
|
||||
<Target Name="CoreCompile" />
|
||||
|
||||
|
||||
<Target Name="CopyFilesToOutputDirectory" AfterTargets="CoreCompile">
|
||||
<Copy SourceFiles="@(TemplateFiles)" DestinationFiles="@(TemplateFiles->'$(OutDir)$(TemplateCategory)\$(AssemblyName)\%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.fs" />
|
||||
<Compile Include="Library1.fs" />
|
||||
<Content Include="packages.config" />
|
||||
<None Include="Script.fsx" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -17,8 +17,16 @@
|
|||
<Project File="Library.fsproj" ReplaceParameters="true">
|
||||
<ProjectItem ReplaceParameters="true">AssemblyInfo.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Library1.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="false">packages.config</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true">Script.fsx</ProjectItem>
|
||||
</Project>
|
||||
</TemplateContent>
|
||||
<WizardExtension>
|
||||
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
|
||||
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
|
||||
</WizardExtension>
|
||||
<WizardData>
|
||||
<packages repository="extension" repositoryId="VisualFSharp">
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
||||
</WizardData>
|
||||
</VSTemplate>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
|
@ -18,15 +18,16 @@
|
|||
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
|
||||
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
|
||||
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
|
||||
<ProjectGuid>{D9D95330-3626-4199-B7AF-17B8E4AF6D87}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<TargetFramework Condition="'$(TargetFramework)' == ''">net40</TargetFramework>
|
||||
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin\$(TemplateCategory)\$(AssemblyName)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.Common.props" />
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToLocalize Include="$(OutDir)$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs">
|
||||
<TranslationFile>$(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs.lcl</TranslationFile>
|
||||
|
@ -41,25 +42,26 @@
|
|||
<InProject>false</InProject>
|
||||
</FilesToLocalize>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<VSTemplate Include="Template\NETCore259PortableLibrary.vstemplate" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<TemplateFiles Include="Template\AssemblyInfo.fs" />
|
||||
<TemplateFiles Include="Template\NETCore259PortableLibrary.vstemplate" />
|
||||
<TemplateFiles Include="Template\PortableLibrary.fsproj" />
|
||||
<TemplateFiles Include="Template\PortableLibrary1.fs" />
|
||||
<TemplateFiles Include="Template\packages.config" />
|
||||
|
||||
<TemplateFiles Include="Template\Script.fsx" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.tools.targets" />
|
||||
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
|
||||
|
||||
<Target Name="CoreCompile" />
|
||||
|
||||
|
||||
<Target Name="CopyFilesToOutputDirectory" AfterTargets="CoreCompile">
|
||||
<Copy SourceFiles="@(TemplateFiles)" DestinationFiles="@(TemplateFiles->'$(OutDir)$(TemplateCategory)\$(AssemblyName)\%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
|
|
@ -17,8 +17,16 @@
|
|||
<Project File="PortableLibrary.fsproj" ReplaceParameters="true">
|
||||
<ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.fs">AssemblyInfo.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true" OpenInEditor="true" TargetFileName="PortableLibrary1.fs">PortableLibrary1.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="false">packages.config</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true">Script.fsx</ProjectItem>
|
||||
</Project>
|
||||
</TemplateContent>
|
||||
<WizardExtension>
|
||||
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
|
||||
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
|
||||
</WizardExtension>
|
||||
<WizardData>
|
||||
<packages repository="extension" repositoryId="VisualFSharp">
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
||||
</WizardData>
|
||||
</VSTemplate>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<Reference Include="FSharp.Core">
|
||||
<Name>FSharp.Core</Name>
|
||||
<AssemblyName>FSharp.Core.dll</AssemblyName>
|
||||
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETCore\$(TargetFSharpCoreVersion)\FSharp.Core.dll</HintPath>
|
||||
<HintPath>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETCore\$(TargetFSharpCoreVersion)\FSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple">
|
||||
<HintPath>..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll</HintPath>
|
||||
|
@ -48,7 +48,6 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.fs" />
|
||||
<Compile Include="PortableLibrary1.fs" />
|
||||
<Content Include="packages.config" />
|
||||
<None Include="Script.fsx" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
|
@ -18,15 +18,14 @@
|
|||
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
|
||||
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
|
||||
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
|
||||
<ProjectGuid>{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<TargetFramework Condition="'$(TargetFramework)' == ''">net40</TargetFramework>
|
||||
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin\$(TemplateCategory)\$(AssemblyName)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.Common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToLocalize Include="$(OutDir)$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs">
|
||||
<TranslationFile>$(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs.lcl</TranslationFile>
|
||||
|
@ -41,25 +40,19 @@
|
|||
<InProject>false</InProject>
|
||||
</FilesToLocalize>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<VSTemplate Include="Template\NETCore78PortableLibrary.vstemplate" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TemplateFiles Include="Template\AssemblyInfo.fs" />
|
||||
<TemplateFiles Include="Template\NETCore78PortableLibrary.vstemplate" />
|
||||
<TemplateFiles Include="Template\PortableLibrary.fsproj" />
|
||||
<TemplateFiles Include="Template\PortableLibrary1.fs" />
|
||||
<TemplateFiles Include="Template\packages.config" />
|
||||
<TemplateFiles Include="Template\Script.fsx" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.tools.targets" />
|
||||
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
|
||||
|
||||
<Target Name="CoreCompile" />
|
||||
|
||||
<Target Name="CopyFilesToOutputDirectory" AfterTargets="CoreCompile">
|
||||
<Copy SourceFiles="@(TemplateFiles)" DestinationFiles="@(TemplateFiles->'$(OutDir)$(TemplateCategory)\$(AssemblyName)\%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
|
|
@ -17,8 +17,16 @@
|
|||
<Project File="PortableLibrary.fsproj" ReplaceParameters="true">
|
||||
<ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.fs">AssemblyInfo.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true" OpenInEditor="true" TargetFileName="PortableLibrary1.fs">PortableLibrary1.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="false">packages.config</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true">Script.fsx</ProjectItem>
|
||||
</Project>
|
||||
</TemplateContent>
|
||||
<WizardExtension>
|
||||
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
|
||||
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
|
||||
</WizardExtension>
|
||||
<WizardData>
|
||||
<packages repository="extension" repositoryId="VisualFSharp">
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
||||
</WizardData>
|
||||
</VSTemplate>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<Reference Include="FSharp.Core">
|
||||
<Name>FSharp.Core</Name>
|
||||
<AssemblyName>FSharp.Core.dll</AssemblyName>
|
||||
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETCore\$(TargetFSharpCoreVersion)\FSharp.Core.dll</HintPath>
|
||||
<HintPath>$(MSBuildProgramFile32)\Reference Assemblies\Microsoft\FSharp\.NETCore\$(TargetFSharpCoreVersion)\FSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple">
|
||||
<HintPath>..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll</HintPath>
|
||||
|
@ -48,7 +48,6 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.fs" />
|
||||
<Compile Include="PortableLibrary1.fs" />
|
||||
<Content Include="packages.config" />
|
||||
<None Include="Script.fsx" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
|
@ -18,6 +18,7 @@
|
|||
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
|
||||
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
|
||||
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
|
||||
<ProjectGuid>{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
|
@ -41,25 +42,25 @@
|
|||
<InProject>false</InProject>
|
||||
</FilesToLocalize>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<VSTemplate Include="Template\NETCore7PortableLibrary.vstemplate" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<TemplateFiles Include="Template\AssemblyInfo.fs" />
|
||||
<TemplateFiles Include="Template\NETCore7PortableLibrary.vstemplate" />
|
||||
<TemplateFiles Include="Template\PortableLibrary.fsproj" />
|
||||
<TemplateFiles Include="Template\PortableLibrary1.fs" />
|
||||
<TemplateFiles Include="Template\Script.fsx" />
|
||||
<TemplateFiles Include="Template\packages.config" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.tools.targets" />
|
||||
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
|
||||
|
||||
|
||||
<Target Name="CoreCompile" />
|
||||
|
||||
|
||||
<Target Name="CopyFilesToOutputDirectory" AfterTargets="CoreCompile">
|
||||
<Copy SourceFiles="@(TemplateFiles)" DestinationFiles="@(TemplateFiles->'$(OutDir)$(TemplateCategory)\$(AssemblyName)\%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
|
|
@ -18,7 +18,15 @@
|
|||
<ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.fs">AssemblyInfo.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true" OpenInEditor="true" TargetFileName="PortableLibrary1.fs">PortableLibrary1.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true">Script.fsx</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="false">packages.config</ProjectItem>
|
||||
</Project>
|
||||
</TemplateContent>
|
||||
<WizardExtension>
|
||||
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
|
||||
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
|
||||
</WizardExtension>
|
||||
<WizardData>
|
||||
<packages repository="extension" repositoryId="VisualFSharp">
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
||||
</WizardData>
|
||||
</VSTemplate>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<Reference Include="FSharp.Core">
|
||||
<Name>FSharp.Core</Name>
|
||||
<AssemblyName>FSharp.Core.dll</AssemblyName>
|
||||
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETCore\$(TargetFSharpCoreVersion)\FSharp.Core.dll</HintPath>
|
||||
<HintPath>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETCore\$(TargetFSharpCoreVersion)\FSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple">
|
||||
<HintPath>..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll</HintPath>
|
||||
|
@ -48,7 +48,6 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.fs" />
|
||||
<Compile Include="PortableLibrary1.fs" />
|
||||
<Content Include="packages.config" />
|
||||
<None Include="Script.fsx" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
|
@ -18,15 +18,16 @@
|
|||
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
|
||||
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
|
||||
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
|
||||
<ProjectGuid>{DB374A0C-7560-479F-9B21-D37C81F7624F}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<TargetFramework Condition="'$(TargetFramework)' == ''">net40</TargetFramework>
|
||||
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin\$(TemplateCategory)\$(AssemblyName)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.Common.props" />
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToLocalize Include="$(OutDir)$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs">
|
||||
<TranslationFile>$(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs.lcl</TranslationFile>
|
||||
|
@ -41,25 +42,19 @@
|
|||
<InProject>false</InProject>
|
||||
</FilesToLocalize>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<VSTemplate Include="Template\PortableLibrary.vstemplate" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TemplateFiles Include="Template\AssemblyInfo.fs" />
|
||||
<TemplateFiles Include="Template\PortableLibrary.vstemplate" />
|
||||
<TemplateFiles Include="Template\PortableLibrary.fsproj" />
|
||||
<TemplateFiles Include="Template\PortableLibrary1.fs" />
|
||||
<TemplateFiles Include="Template\packages.config" />
|
||||
<TemplateFiles Include="Template\Script.fsx" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.tools.targets" />
|
||||
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
|
||||
|
||||
<Target Name="CoreCompile" />
|
||||
|
||||
<Target Name="CopyFilesToOutputDirectory" AfterTargets="CoreCompile">
|
||||
<Copy SourceFiles="@(TemplateFiles)" DestinationFiles="@(TemplateFiles->'$(OutDir)$(TemplateCategory)\$(AssemblyName)\%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<Reference Include="FSharp.Core">
|
||||
<Name>FSharp.Core</Name>
|
||||
<AssemblyName>FSharp.Core.dll</AssemblyName>
|
||||
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETPortable\$(TargetFSharpCoreVersion)\FSharp.Core.dll</HintPath>
|
||||
<HintPath>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETPortable\$(TargetFSharpCoreVersion)\FSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple">
|
||||
<HintPath>..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll</HintPath>
|
||||
|
@ -47,7 +47,6 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.fs" />
|
||||
<Compile Include="PortableLibrary1.fs" />
|
||||
<Content Include="packages.config" />
|
||||
<None Include="Script.fsx" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -18,7 +18,15 @@
|
|||
<ProjectItem ReplaceParameters="true">AssemblyInfo.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true" OpenInEditor="true">PortableLibrary1.fs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true">Script.fsx</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="false">packages.config</ProjectItem>
|
||||
</Project>
|
||||
</TemplateContent>
|
||||
<WizardExtension>
|
||||
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
|
||||
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
|
||||
</WizardExtension>
|
||||
<WizardData>
|
||||
<packages repository="extension" repositoryId="VisualFSharp">
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
||||
</WizardData>
|
||||
</VSTemplate>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
|
@ -62,7 +62,6 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Tutorial.fsx" />
|
||||
<Content Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
|
||||
|
|
|
@ -16,7 +16,15 @@
|
|||
<TemplateContent>
|
||||
<Project File="Tutorial.fsproj" ReplaceParameters="true">
|
||||
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Tutorial.fsx</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="false">packages.config</ProjectItem>
|
||||
</Project>
|
||||
</TemplateContent>
|
||||
<WizardExtension>
|
||||
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
|
||||
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
|
||||
</WizardExtension>
|
||||
<WizardData>
|
||||
<packages repository="extension" repositoryId="VisualFSharp">
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
||||
</WizardData>
|
||||
</VSTemplate>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" targetFramework="net452" />
|
||||
</packages>
|
|
@ -18,15 +18,16 @@
|
|||
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
|
||||
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
|
||||
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
|
||||
<ProjectGuid>{2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<TargetFramework Condition="'$(TargetFramework)' == ''">net40</TargetFramework>
|
||||
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin\$(TemplateCategory)\$(AssemblyName)</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.Common.props" />
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToLocalize Include="$(OutDir)$(TemplateCategory)\$(AssemblyName)\Tutorial.fsx">
|
||||
<TranslationFile>$(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(TemplateCategory)\$(AssemblyName)\Tutorial.fsx.lcl</TranslationFile>
|
||||
|
@ -35,23 +36,23 @@
|
|||
<InProject>false</InProject>
|
||||
</FilesToLocalize>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<VSTemplate Include="Template\Tutorial.vstemplate" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<TemplateFiles Include="Template\Tutorial.fsproj" />
|
||||
<TemplateFiles Include="Template\Tutorial.fsx" />
|
||||
<TemplateFiles Include="Template\packages.config" />
|
||||
|
||||
<TemplateFiles Include="Template\Tutorial.vstemplate" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.tools.targets" />
|
||||
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
|
||||
|
||||
|
||||
<Target Name="CoreCompile" />
|
||||
|
||||
|
||||
<Target Name="CopyFilesToOutputDirectory" AfterTargets="CoreCompile">
|
||||
<Copy SourceFiles="@(TemplateFiles)" DestinationFiles="@(TemplateFiles->'$(OutDir)$(TemplateCategory)\$(AssemblyName)\%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
|
|
@ -59,4 +59,7 @@
|
|||
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="FSharp.Editor" Path="|FSharp.Editor|" AssemblyName="|FSharp.Editor;AssemblyName|" />
|
||||
<Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="FSharp.Editor" Path="|FSharp.Editor|" />
|
||||
</Assets>
|
||||
<Prerequisites>
|
||||
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
|
||||
</Prerequisites>
|
||||
</PackageManifest>
|
|
@ -53,6 +53,7 @@
|
|||
<OutputPath>$(RootBinPath)</OutputPath>
|
||||
<MicroBuildAssemblyVersion>15.4.1.0</MicroBuildAssemblyVersion>
|
||||
<MicroBuildAssemblyFileLanguage>cs</MicroBuildAssemblyFileLanguage>
|
||||
<DeployExtension>false</DeployExtension>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<StartAction>Program</StartAction>
|
||||
|
@ -81,6 +82,11 @@
|
|||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
<Content Include="$(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\System.ValueTuple.4.0.0-rc3-24212-01.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Link>packages\System.ValueTuple.4.0.0-rc3-24212-01.nupkg</Link>
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.6">
|
||||
|
|
|
@ -51,8 +51,7 @@
|
|||
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" Path="ProjectTemplates" d:TargetPath="|TutorialProject;TemplateProjectOutputGroup|" d:ProjectName="TutorialProject" d:VsixSubPath="ProjectTemplates" />
|
||||
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" Path="ProjectTemplates" d:TargetPath="|ConsoleProject;TemplateProjectOutputGroup|" d:ProjectName="ConsoleProject" d:VsixSubPath="ProjectTemplates" />
|
||||
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" Path="ProjectTemplates" d:TargetPath="|LibraryProject;TemplateProjectOutputGroup|" d:ProjectName="LibraryProject" d:VsixSubPath="ProjectTemplates" />
|
||||
|
||||
|
||||
|
||||
<Asset Type="Microsoft.VisualStudio.ItemTemplate" d:Source="Project" Path="ItemTemplates" d:TargetPath="|AppConfig;TemplateProjectOutputGroup|" d:ProjectName="AppConfig" d:VsixSubPath="ItemTemplates" />
|
||||
<Asset Type="Microsoft.VisualStudio.ItemTemplate" d:Source="Project" Path="ItemTemplates" d:TargetPath="|CodeFile;TemplateProjectOutputGroup|" d:ProjectName="CodeFile" d:VsixSubPath="ItemTemplates" />
|
||||
<Asset Type="Microsoft.VisualStudio.ItemTemplate" d:Source="Project" Path="ItemTemplates" d:TargetPath="|ScriptFile;TemplateProjectOutputGroup|" d:ProjectName="ScriptFile" d:VsixSubPath="ItemTemplates" />
|
||||
|
@ -63,4 +62,7 @@
|
|||
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="FSharp.Editor" Path="|FSharp.Editor|" AssemblyName="|FSharp.Editor;AssemblyName|" />
|
||||
<Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="FSharp.Editor" Path="|FSharp.Editor|" />
|
||||
</Assets>
|
||||
<Prerequisites>
|
||||
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
|
||||
</Prerequisites>
|
||||
</PackageManifest>
|
|
@ -53,6 +53,7 @@
|
|||
<OutputPath>$(RootBinPath)</OutputPath>
|
||||
<MicroBuildAssemblyVersion>15.4.1.0</MicroBuildAssemblyVersion>
|
||||
<MicroBuildAssemblyFileLanguage>cs</MicroBuildAssemblyFileLanguage>
|
||||
<DeployExtension>false</DeployExtension>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<StartAction>Program</StartAction>
|
||||
|
@ -81,6 +82,11 @@
|
|||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
<Content Include="$(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\System.ValueTuple.4.0.0-rc3-24212-01.nupkg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Link>packages\System.ValueTuple.4.0.0-rc3-24212-01.nupkg</Link>
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.6">
|
||||
|
|
|
@ -63,4 +63,7 @@
|
|||
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="FSharp.Editor" Path="|FSharp.Editor|" AssemblyName="|FSharp.Editor;AssemblyName|" />
|
||||
<Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="FSharp.Editor" Path="|FSharp.Editor|" />
|
||||
</Assets>
|
||||
<Prerequisites>
|
||||
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
|
||||
</Prerequisites>
|
||||
</PackageManifest>
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче