You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
* Add documentation about XLF localization and updating resx* Clean up doc a little bit, and make some changes suggested by markdownlint* Grammar* Change wording* Fix formatting mistake* Fix another typo
1. It is recommended to run the build.cmd and the qualifiers be on a command prompt with path set to have the location of MSBuild. If you have Visual Studio, we can also run using`Developer Command Prompt for Visual Studio 20xx` (depends on Visual Studio version). This developer command prompt is easier to use than normal command prompt, because it already has the correct path of Visual Studio and .NET's tooling set for us to use (including MSBuild).
19
-
2. The running command prompt must be run under Administrator right (`Run as Administrator`).
18
+
19
+
1. It is recommended to run`build.cmd` in a command prompt with path set to have the location of MSBuild. If you have Visual Studio, we can run using`Developer Command Prompt for Visual Studio 20xx` (depends on Visual Studio version). This developer command prompt is easier to use than normal command prompt, because it already has the correct path of Visual Studio and .NET's tooling set for us to use (including MSBuild).
20
+
21
+
2. The command prompt must have Administrator rights (`Run as Administrator`).
20
22
21
23
Before running the build scripts, ensure that you have cleaned up the visualfsharp repo by running this git command:
22
24
@@ -59,18 +61,18 @@ After you build the first time you can open and use this solution:
59
61
60
62
or just build it directly:
61
63
62
-
msbuild FSharp.sln
64
+
msbuild FSharp.sln
63
65
64
66
If you are just developing the core compiler and library then building``FSharp.sln`` will be enough.
65
67
66
-
###Developing the F# Compiler (Linux)
68
+
###Developing the F# Compiler (Linux)
67
69
68
70
For Linux/Mono, follow[these instructions](http://www.mono-project.com/docs/getting-started/install/linux/). Also you may need:
69
71
70
72
sudo apt-get install mono-complete make git
71
73
72
74
Then:
73
-
75
+
74
76
make
75
77
76
78
Then to replace your machine-wide installation:
@@ -79,7 +81,7 @@ Then to replace your machine-wide installation:
79
81
80
82
Full testing is not yet enabled on Linux.
81
83
82
-
###Developing the F# Compiler (macOS)
84
+
###Developing the F# Compiler (macOS)
83
85
84
86
Install XCode command line tools (or homebrew equivalents) and Mono or Visual Studio for Mac.
85
87
@@ -99,25 +101,25 @@ You can specify a custom installation path using the DESTDIR shell variable
99
101
100
102
DESTDIR=/my/path/to/fsharp make install
101
103
102
-
###Developing the F# Compiler (Linux or macOS - .NET Core)
104
+
###Developing the F# Compiler (Linux or macOS - .NET Core)
103
105
104
106
Install[the latest .NET SDK](https://www.microsoft.com/net/download/). Then use
105
107
106
-
src/buildfromsource.sh
108
+
src/buildfromsource.sh
107
109
108
-
Outputs are placed in
110
+
Outputs are placed in
109
111
110
112
BuildFromSource/Debug/...
111
113
BuildFromSource/Release/...
112
114
113
-
This uses an installed .NET SDK 2.0 to build the various duplicated project
114
-
115
-
Testing the .NET Core version of the F# compiler on macOS and Linux is TBD.
115
+
This uses an installed .NET SDK 2.0 to build the various duplicated project
116
116
117
+
Testing the .NET Core version of the F# compiler on macOS and Linux is TBD.
117
118
118
119
###Developing the Visual F# IDE Tools (Windows Only)
119
120
120
121
To build and test Visual F# IDE Tools, install these requirements:
122
+
121
123
-[Visual Studio 2017](https://www.visualstudio.com/downloads/)
122
124
- Under the "Windows" workloads, select ".NET desktop development"
123
125
- Select "F# desktop language support" under the optional components
@@ -131,16 +133,16 @@ Steps to build:
131
133
132
134
Use``VisualFSharp.sln`` if you're building the Visual F# IDE Tools.
133
135
134
-
Note on Debug vs Release:``Release`` Configuration has a degraded debugging experience, so if you want to test a change locally, it is recommended to do it in the``Debug`` configuration. For more information seehttps://github.com/Microsoft/visualfsharp/issues/2771 andhttps://github.com/Microsoft/visualfsharp/pull/2773.
136
+
Note on Debug vs Release:``Release`` Configuration has a degraded debugging experience, so if you want to test a change locally, it is recommended to do it in the``Debug`` configuration. For more information seeissues[#2771](https://github.com/Microsoft/visualfsharp/issues/2771) and[#2773](https://github.com/Microsoft/visualfsharp/pull/2773).
135
137
136
-
Note: if you face this error[#2351](https://github.com/Microsoft/visualfsharp/issues/2351):
138
+
Note ([#2351](https://github.com/Microsoft/visualfsharp/issues/2351)): if you face this error:
137
139
138
-
>error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe".
140
+
>error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe".
139
141
140
142
Or hard crash on launch ("Unknown Error"), delete these folders:
141
143
142
-
*`%localappdata%\Microsoft\VisualStudio\15.0_(some number here)RoslynDev`
143
-
*`%localappdata%\Microsoft\VisualStudio\15.0_(some number here)`
144
+
-`%localappdata%\Microsoft\VisualStudio\15.0_(some number here)RoslynDev`
145
+
-`%localappdata%\Microsoft\VisualStudio\15.0_(some number here)`
144
146
145
147
####[Optional] Install the Visual F# IDE Tools (Windows Only)
146
148
@@ -183,7 +185,7 @@ This gives a much tighter inner development loop than uninstalling/reinstalling
183
185
184
186
####[Optional] Clobber the F# SDK on the machine
185
187
186
-
**Note:** The step below will try to clobber the machine-wide installed F# SDK on your machine. This replaces the``fsc.exe`` used by the standard install location or``Microsoft.FSharp.Targets``.**Repairing Visual Studio 15 is currently the only way to revert this step.**
188
+
**Note:*- The step below will try to clobber the machine-wide installed F# SDK on your machine. This replaces the``fsc.exe`` used by the standard install location or``Microsoft.FSharp.Targets``.**Repairing Visual Studio 15 is currently the only way to revert this step.**
187
189
188
190
For**Debug**:
189
191
@@ -230,6 +232,12 @@ If you are behind a proxy server, NuGet client tool must be configured to use it
230
232
231
233
Where you should set proper proxy address, user name and password.
232
234
235
+
####When modifying, adding, or removing keywords or compiler messages
236
+
237
+
If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running`msbuild FSharp.Compiler.Private.fsproj /t:UpdateXlf` (located in[src\fsharp\FSharp.Compiler.Private](https://github.com/Microsoft/visualfsharp/tree/master/src/fsharp/FSharp.Compiler.Private)). This only works on Windows/.NETStandard framework, so changing this from any other platform requires editing and syncing all of the XLF files manually.
238
+
239
+
After this, you must copy any differing`resx` files from the output directory into the corresponding subdirectory in[src\buildfromsource](https://github.com/Microsoft/visualfsharp/tree/master/src/fsharp/FSharp.Compiler.Private). This step will soon be eliminated (see issue[#3905](https://github.com/Microsoft/visualfsharp/issues/3905)).
240
+
233
241
####Resources
234
242
235
243
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.