Skip to content

Commit 6edb48b

Browse files
authored
Update DEVGUIDE.md for non-released SDK usage (#18716)
1 parent a8694a2 commit 6edb48b

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

DEVGUIDE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,49 @@ Running tests:
102102

103103
You can then open `FSharp.sln` in your editor of choice.
104104

105+
## Working with non-released .NET SDKs
106+
107+
This repository may require a non-released version of the .NET SDK, as specified in the `global.json` file. When the required SDK version is not publicly available through normal channels, you may encounter an error when running `dotnet build` directly:
108+
109+
```
110+
The .NET SDK could not be found, please run ./eng/common/dotnet.sh.
111+
```
112+
113+
### Setting up the correct SDK
114+
115+
Before using plain `dotnet build` commands, you need to install the required SDK version locally:
116+
117+
**On Linux/macOS:**
118+
```shell
119+
./eng/common/dotnet.sh
120+
```
121+
122+
**On Windows:**
123+
```shell
124+
.\eng\common\dotnet.cmd
125+
```
126+
127+
This downloads and installs the correct SDK version to a local `.dotnet` directory in the repository root.
128+
129+
### Using dotnet commands with the local SDK
130+
131+
After running the setup script once to install the SDK, you can use regular `dotnet` commands normally:
132+
133+
1. **One-time SDK installation**:
134+
```shell
135+
# Linux/macOS
136+
./eng/common/dotnet.sh
137+
138+
# Windows
139+
.\eng\common\dotnet.cmd
140+
```
141+
142+
2. **Regular dotnet commands** (after SDK installation):
143+
```shell
144+
dotnet build FSharp.Compiler.Service.sln
145+
dotnet test tests/FSharp.Compiler.Service.Tests/
146+
```
147+
105148
## Testing from the command line
106149

107150
You can find all test options as separate flags. For example `build -testAll`:

0 commit comments

Comments
 (0)