Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitca037f8

Browse files
committed
Cleanup original readme
Removing .NET 2.0 profile and adding fsharp-build.fsproj
1 parent7b4df99 commitca037f8

File tree

1 file changed

+33
-103
lines changed

1 file changed

+33
-103
lines changed

‎README-original.md‎

Lines changed: 33 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ The compiler is normally compiled as a set of .NET 4.0 components. The compiler
88
**Before we start, are sure you're in the right place?**
99

1010
* To get a free F# environment for Windows, go to[fsharp.net](http://fsharp.net).
11-
* To get a free F# environment for Linux or Mac, go to[fsxplat.codeplex.com](http://fsxplat.codeplex.com).
1211
* To learn what F# is and why it's interesting, go to[fsharp.net](http://fsharp.net) or[tryfsharp.org](http://tryfsharp.org).
1312
* If you want to to use F# in Visual Studio 2010 (R) or Visual Studio 2012 (R), go to[fsharp.net](http://fsharp.net).
1413
* Looking for F# coding samples? Go to[fsharp.net](http://fsharp.net) or[tryfsharp.org](http://tryfsharp.org) or[fssnip.net](http://fssnip.net). While the code has its nice points, it is not a model F# codebase and should not be used as guidance for F# coding style - there are plenty of things we would change if we had all the time in the world.
1514

16-
To emphasize, this distribution should not be seen as a way to "get" an F# compiler for immediate use. For that you're better going to[fsharp.net](http://fsharp.net) or[fsxplat.codeplex.com](http://fsxplat.codeplex.com)
17-
1815
**License:** subject to terms and conditions of the Apache License, Version 2.0. A copy of the license can be found in the License.html file at the root of this distribution. By using this source code in any fashion, you are agreeing to be bound by the terms of the Apache License, Version 2.0. You must not remove this notice, or any other, from this software.
1916

2017
**Questions?** If you have questions about the source code, please ask at the[F# Open Source Google Group](http://groups.google.com/group/fsharp-opensource). Please do not ask the F# team at Microsoft for help with this source code: they like to be friendly, but they are very busy working on improving F# and need to focus on that.
@@ -23,15 +20,14 @@ To emphasize, this distribution should not be seen as a way to "get" an F# compi
2320

2421
**Copyright:** Copyright 2002-2012 (c) Microsoft Corporation.
2522

26-
2723
##What do I get when I compile?
2824

2925
When you build the compiler using the standard instructions below, you get`fsc.exe`,`fsi.exe`,`FSharp.Core.dll`,`FSharp.Compiler.dll` and some related DLLs.
3026

3127
The compiler binaries produced are "private" and strong-named signed with a test key (`src\fsharp\test.snk`). They use CLI assembly version nunmber**2.9.9.999**. You can place these components in the GAC but they will not replace the components used by normal Visual Studio or normal F# programs.
3228

3329

34-
##Building Everything
30+
##Building Everything for .NET 2.0 and 4.0 with msbuild/build
3531

3632
To just build everything use:
3733
```
@@ -42,12 +38,14 @@ If on Mono, use 'xbuild' instead of 'msbuild'
4238

4339
##Step by step - Building a Proto Compiler
4440

41+
If you prefer to do things the slow way, then this is step 1:
4542
```
4643
cd src
47-
msbuild fsharp-proto-build.proj/p:TargetFramework=net40
44+
msbuild fsharp-proto-build.proj
4845
```
4946

50-
Note: Make sure you run the .NET 4.0`msbuild.exe`, e.g.`C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe`.
47+
Note: On Windows, make sure you run the .NET 4.0`msbuild.exe`, e.g.`C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe`.
48+
On Linux and Mac, you can use xbuild.
5149

5250
Optional: NGEN the Proto Compiler for faster future startup (optional)
5351

@@ -56,64 +54,56 @@ ngen install ..\Proto\net40\bin\fsc-proto.exe
5654
```
5755

5856

59-
##Steps - Building the F# Core Library
57+
##Steps - Building the F# Core Library with msbuild/build
6058

61-
This uses the proto compiler to build the FSharp.Core library, for Mono/.NET 4.0.
59+
The next step uses the proto compiler to build the FSharp.Core library, for Mono/.NET 4.0.
6260

6361
```
64-
msbuild fsharp-library-build.proj/p:TargetFramework=net40
62+
msbuild fsharp-library-build.proj
6563
```
6664

67-
Note: Make sure you run the .NET 4.0`msbuild.exe`, e.g.`C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe`.
68-
69-
70-
##Steps - Building the F# Compiler
65+
##Steps - Building the F# Compiler with msbuild/build
7166

72-
This uses the proto compiler to build the`FSharp.Compiler.dll` and`fsc.exe` to run on for Mono/.NET 4.0.
67+
The next step uses the proto compiler to build the`FSharp.Compiler.dll` and`fsc.exe` to run on for Mono/.NET 4.0.
7368

7469
```
75-
msbuild fsharp-compiler-build.proj/p:TargetFramework=net40
70+
msbuild fsharp-compiler-build.proj
7671
```
7772

78-
Note: Make sure you run the .NET 4.0`msbuild.exe`, e.g.`C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe`.
7973

8074

81-
##Steps -Buildinga compiler componentforhosting in the browserwithSilverlight or Moonlight
75+
##Buildingthe F# core libraryforalternative CLI/.NET/CIL implementationswithmsbuild/build
8276

83-
This builds`FSharp.Compiler.Silverlight.dll` which is a Silverlight 5.0 component for hosting in the browser.
84-
85-
*Debug configuration for browser-hosted compiler for Silverlight 5.0:*
8677
```
87-
msbuild fsharp-library-build.proj /p:TargetFramework=sl5-compiler
88-
msbuild fsharp-compiler-build.proj /p:TargetFramework=sl5-compiler
78+
msbuild fsharp-library-build.proj /p:TargetFramework=net20
79+
msbuild fsharp-library-build.proj /p:TargetFramework=mono21
80+
msbuild fsharp-library-build.proj /p:TargetFramework=sl3-wp
81+
msbuild fsharp-library-build.proj /p:TargetFramework=sl5
8982
```
9083

91-
*Release configuration for browser-hosted compiler for Silverlight 5.0:*
9284
```
93-
msbuild fsharp-library-build.proj /p:TargetFramework=sl5-compiler /p:Configuration=Release
94-
msbuild fsharp-compiler-build.proj /p:TargetFramework=sl5-compiler /p:Configuration=Release
85+
msbuild fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
86+
msbuild fsharp-library-build.proj /p:TargetFramework=mono21 /p:Configuration=Release
87+
msbuild fsharp-library-build.proj /p:TargetFramework=sl3-wp /p:Configuration=Release
88+
msbuild fsharp-library-build.proj /p:TargetFramework=sl5 /p:Configuration=Release
9589
```
9690

97-
The binaries are placed in`Debug\sl5-compiler`,`Release\sl5-compiler`,`Debug\sl5-compiler` and/or`Release\sl5-compiler`. A custom`FSharp.Core.dll` is used for this configuration, be sure to reference it rather than any other`FSharp.Core.dll` for Silverlight. You may have to edit your project file by hand to ensure you get exactly the right reference to`FSharp.Core.dll`.
91+
Here**net20** gives a runtime for .NET 2.0-3.5,**mono21** fives a runtime for MonoAnrdoid and MonoTouch,
92+
**sl3-wp** gives a runtime for Windows Phone 7, and**sl5** gives a runtime for Silverlight 5.
9893

94+
To build these libraries you may need the corresponding tools installed (e.g. MonoAndroid or the Silverlight tools)
9995

100-
##Building the F# core library for alternative CLI/.NET/CIL implementations
10196

102-
```
103-
msbuild fsharp-library-build.proj /p:TargetFramework=net20
104-
msbuild fsharp-library-build.proj /p:TargetFramework=sl3-wp
105-
msbuild fsharp-library-build.proj /p:TargetFramework=sl5
106-
```
97+
##Some alternative Steps - Building an optimized (Release) compiler and libraries
10798

10899
```
100+
msbuild fsharp-library-build.proj /p:Configuration=Release
101+
msbuild fsharp-compiler-build.proj /p:Configuration=Release
109102
msbuild fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
110103
msbuild fsharp-library-build.proj /p:TargetFramework=sl3-wp /p:Configuration=Release
111104
msbuild fsharp-library-build.proj /p:TargetFramework=sl5 /p:Configuration=Release
112105
```
113106

114-
Here**net20** gives a runtime for .NET 2.0-3.5,**sl3-wp** gives a runtime for Windows Phone 7, and**sl5** gives a runtime for Silverlight 5.
115-
116-
117107
##Steps - Building F# Core Unit Tests for .NET 4.x (optional)
118108

119109
This uses the proto compiler to build the unit tests that check some parts of`FSharp.Core.dll` and`FSharp.Compiler.dll`. There is also another set of tests under`tests\fsharp`.
@@ -137,18 +127,18 @@ cd ..\tests\fsharp\core
137127
The results file will contain one entry for each test directory, plus any reported errors.
138128

139129
```
140-
C:\projects\openfsharp\Compiler\3.0\head\tests\fsharp\core
141-
C:\projects\openfsharp\Compiler\3.0\head\tests\fsharp\core\queriesCustomQueryOps
142-
C:\projects\openfsharp\Compiler\3.0\head\tests\fsharp\core\queriesLeafExpressionConvert
143-
C:\projects\openfsharp\Compiler\3.0\head\tests\fsharp\core\queriesNullableOperators
144-
C:\projects\openfsharp\Compiler\3.0\head\tests\fsharp\core\queriesOverIEnumerable
130+
tests\fsharp\core
131+
tests\fsharp\core\queriesCustomQueryOps
132+
tests\fsharp\core\queriesLeafExpressionConvert
133+
tests\fsharp\core\queriesNullableOperators
134+
tests\fsharp\core\queriesOverIEnumerable
145135
...
146136
```
147137

148138
Some tests for LINQ queries require SQL Server be installed. A failing test will look like this:
149139

150140
```
151-
ERRORLEVEL=1: inC:\projects\openfsharp\Compiler\3.0\head\tests\fsharp\core\csfromfs\build.bat
141+
ERRORLEVEL=1: in tests\fsharp\core\csfromfs\build.bat
152142
```
153143

154144
You can then go to the relevant directory and run`build.bat` and`run.bat`.
@@ -166,6 +156,7 @@ gacutil /i Debug\net40\bin\FSharp.Core.dll
166156
However, this is not recommended except in the rare case you are adding extra functionality to`FSharp.Core` - it is better to just continue to run with the`FSharp.Core` that comes with Visual Studio 2012.
167157

168158

159+
169160
##Preparing for inclusion in Mono
170161

171162
Building for the**mono20** and**mono40** frameworks gives strong-named, delay-signed assemblies with the`msfinal.pub` key and standard version numbers such as**2.0.0.0**,**2.3.0.0**,**4.0.0.0** and**4.3.0.0**. You complete the signing of these assemblies using[http://github.com/fsharp/fsharp/raw/master/mono.snk](http://github.com/fsharp/fsharp/raw/master/mono.snk). These assemblies will not run if you already have a version of them installed in your GAC (e.g. if you have Visual Studio 2012).
@@ -213,67 +204,6 @@ del /q FSharp.Core.dll
213204
```
214205

215206

216-
##Some alternative Steps - Building for .NET 2.0 profile
217-
218-
```
219-
cd src
220-
msbuild fsharp-proto-build.proj /p:TargetFramework=net20
221-
msbuild fsharp-library-build.proj /p:TargetFramework=net20
222-
msbuild fsharp-compiler-build.proj /p:TargetFramework=net20
223-
msbuild fsharp-library-unittests-build.proj /p:TargetFramework=net20
224-
```
225-
226-
```
227-
ngen install ..\Debug\net20\bin\fsi.exe
228-
..\Debug\net20\bin\fsi.exe
229-
1 + 1;;
230-
\#q;;
231-
..\Debug\net20\bin\fsi.exe /help
232-
..\Debug\net20\bin\fsc.exe /help
233-
echo printfn "hello world" > hello.fs
234-
..\Debug\net20\bin\fsc.exe hello.fs
235-
copy ..\Debug\net20\bin\FSharp.Core.dll .
236-
hello.exe
237-
del /q FSharp.Core.dll
238-
```
239-
240-
241-
##Some alternative Steps - Building an optimized (Release) compiler for .NET 4.0 profile
242-
243-
```
244-
msbuild fsharp-compiler-build.proj /p:TargetFramework=net40 /p:Configuration=Release
245-
```
246-
247-
```
248-
ngen install ..\Release\net40\bin\fsi.exe
249-
..\Release\net40\bin\fsi.exe
250-
1 + 1;;
251-
\#q;;
252-
..\Release\net40\bin\fsi.exe /help
253-
..\Release\net40\bin\fsc.exe /help
254-
echo printfn "hello world" > hello.fs
255-
..\Release\net40\bin\fsc.exe hello.fs
256-
copy ..\Release\net40\bin\FSharp.Core.dll .
257-
hello.exe
258-
del /q FSharp.Core.dll
259-
```
260-
261-
262-
##Some alternative Steps - Other examples of building for Release mode (choose some of these as you need)
263-
264-
```
265-
msbuild fsharp-library-build.proj /p:Configuration=Release
266-
msbuild fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
267-
msbuild fsharp-library-build.proj /p:TargetFramework=net40 /p:Configuration=Release
268-
msbuild fsharp-library-build.proj /p:TargetFramework=sl3-wp /p:Configuration=Release
269-
msbuild fsharp-library-build.proj /p:TargetFramework=sl5 /p:Configuration=Release
270-
```
271-
272-
```
273-
msbuild fsharp-compiler-build.proj /p:TargetFramework=net20 /p:Configuration=Release
274-
```
275-
276-
277207
##Editing and Building on Windows using Visual Studio 2012
278208
###Prerequisites
279209

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp