Skip to content

Commit 5087d7a

Browse files
rbauduinrb
andauthored
Update DEVGUIDE with using custom FSharp.Core (#16781)
Co-authored-by: rb <[email protected]>
1 parent ecce0b6 commit 5087d7a

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

DEVGUIDE.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Once the "proto" compiler is built, it won't be built again, so you may want to
130130

131131
## Using your custom compiler to build other projects
132132

133-
Building the compiler using `build.cmd` or `build.sh` will output artifacts in `artifacts\bin`.
133+
Building the compiler using `build.cmd` or `build.sh` will output artifacts in `artifacts\bin`.
134134

135135
To use your custom build of `Fsc`, add the `DotnetFscCompilerPath` property to your project's `.fsproj` file, adjusted to point at your local build directory, build configuration, and target framework as appropriate:
136136

@@ -140,6 +140,25 @@ To use your custom build of `Fsc`, add the `DotnetFscCompilerPath` property to y
140140
</PropertyGroup>
141141
```
142142

143+
### Changes in FSharp.Core
144+
145+
The FSharp compiler uses an implicit FSharp.Core. This means that if you introduce changes to FSharp.Core and want to use it in a project, you need to disable the implicit version used by the compiler, and add a reference to your custom FSharp.Core dll. Both are done in the `.fsproj` file of your project.
146+
147+
Disabling the implicit FSharp.Core is done with
148+
```
149+
<PropertyGroup>
150+
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
151+
</PropertyGroup>
152+
```
153+
and referencing your custom FSharp.Core, available after you build the compiler, is done with
154+
```
155+
<ItemGroup>
156+
<Reference Include="FSharp.Core">
157+
<HintPath>D:\Git\fsharp\artifacts\bin\FSharp.Core\Debug\netstandard2.1\FSharp.Core.dll<\HintPath>
158+
</Reference>
159+
</ItemGroup>
160+
```
161+
143162
## Updating FSComp.fs, FSComp.resx and XLF
144163

145164
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

0 commit comments

Comments
 (0)