Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 379ee7a

Browse files
committed
F# fixes, readme updates
1 parent 0c1ca52 commit 379ee7a

File tree

5 files changed

+56
-17
lines changed

5 files changed

+56
-17
lines changed

containers/dotnetcore-2.1-fsharp/.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "build",
12-
"program": "${workspaceFolder}/test-project/bin/Debug/netcoreapp2.2/app.dll",
12+
"program": "${workspaceFolder}/test-project/bin/Debug/netcoreapp2.1/app.dll",
1313
"args": [],
1414
"cwd": "${workspaceFolder}/test-project",
1515
"console": "integratedTerminal",

containers/dotnetcore-2.1-fsharp/README.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,49 @@
88
|----------|-------|
99
| *Contributors* | The VS Code Team |
1010
| *Definition type* | Dockerfile |
11-
| *Languages, platforms* | F# |
11+
| *Languages, platforms* | .NET Core, F# |
1212

13-
## Usage
13+
## Using this definition with an existing folder
1414

15-
[See here for information on using this definition with an existing project](../../README.md#using-a-definition).
15+
When using this development container, it's important to note that only the integrated terminal is currently supported in Dev Containers. You may need to modify `launch.json` configurations to include the following value if an external console is used.
1616

17-
If you prefer, you can also just look through the contents of the `.devcontainer` folder to understand how to make changes to your own project.
17+
```json
18+
"console": "integratedTerminal"
19+
```
1820

19-
If you want to try out the test project instead, run **Remote-Container: Open Folder in Container...** in VS Code and select a cloned copy of the entire folder. You can then start the test program from Debug panel in VS Code.
21+
Beyond that, just follow these steps to use the definition:
22+
23+
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.
24+
25+
2. To use VS Code's copy of this definition:
26+
1. Start VS Code and open your project folder.
27+
2. Press <kbd>F1</kbd> select and **Remote-Containers: Create Container Configuration File...** from the command palette.
28+
3. Select the Dart definition.
29+
30+
3. To use latest-and-greatest copy of this definition from the repository:
31+
1. Clone this repository.
32+
2. Copy the contents of `containers/dotnetcore-2.1-fsharp/.devcontainer` to the root of your project folder.
33+
3. Start VS Code and open your project folder.
34+
35+
4. After following step 2 or 3, the contents of the `.devcontainer` folder in your project can be adapted to meet your needs.
36+
37+
5. Finally, press <kbd>F1</kbd> and run **Remote-Containers: Reopen Folder in Container** to start using the definition.
38+
39+
## Testing the definition
40+
41+
This definition includes some test code that will help you verify it is working as expected on your system. Follow these steps:
42+
43+
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.
44+
2. Clone this repository.
45+
3. Start VS Code, press <kbd>F1</kbd>, and select **Remote-Containers: Open Folder in Container...**
46+
4. Select the `containers/dotnetcore-2.1-fsharp` folder.
47+
5. When prompted click "Restore" in the notification to restore packages.
48+
6. After the folder has opened in the container, press <kbd>F5</kbd> to start the project.
49+
7. You should see "Hello Remote World from the F# Container!" in a terminal window after the program executes.
50+
8. From here, you can add breakpoints or edit the contents of the `test-project` folder to do further testing.
2051

2152
## License
2253

2354
Copyright (c) Microsoft Corporation. All rights reserved.
2455

25-
Licensed under the MIT License. See [LICENSE](../../LICENSE).
56+
Licensed under the MIT License. See [LICENSE](https://github.com/Microsoft/vscode-dev-containers/blob/master/LICENSE).

containers/dotnetcore-2.1-fsharp/test-project/Program.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ open System
88
[<EntryPoint>]
99
let main argv =
1010
let from = "F# Container"
11-
let target = "World"
12-
let message = "Hello " + target + " from " + from + "!"
11+
let target = "Remote World"
12+
let message = "Hello " + target + " from the " + from + "!"
1313
printfn "%s" message
1414

1515
0 // return an integer exit code

containers/dotnetcore-2.1-fsharp/test-project/app.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.2</TargetFramework>
5+
<TargetFramework>netcoreapp2.1</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

containers/dotnetcore-2.1/README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@
88
|----------|-------|
99
| *Contributors* | The VS Code Team |
1010
| *Definition type* | Dockerfile |
11-
| *Languages, platforms* | .NET Core |
11+
| *Languages, platforms* | .NET Core, C# |
1212

1313
## Using this definition with an existing folder
1414

15-
This definition does require any special steps to use. Just follow these steps:
15+
When using this development container, it's important to note that only the integrated terminal is currently supported in Dev Containers. You may need to modify `launch.json` configurations to include the following value if an external console is used.
16+
17+
```json
18+
"console": "integratedTerminal"
19+
```
20+
21+
Beyond that, just follow these steps to use the definition:
1622

1723
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.
1824

@@ -38,13 +44,15 @@ This definition includes some test code that will help you verify it is working
3844
2. Clone this repository.
3945
3. Start VS Code, press <kbd>F1</kbd>, and select **Remote-Containers: Open Folder in Container...**
4046
4. Select the `containers/dotnetcore-2.1` folder.
41-
5. After the folder has opened in the container, press <kbd>F5</kbd> to start the project. This will automatically run `pub get` and build the code be for starting it.
42-
6. Once the project is running, press <kbd>F1</kbd> and select **Remote-Containers: Forward Port...**
43-
7. Select port 8090 and open `http://localhost:8090` in a browser. You should see "Hello remote world from ASP.NET Core!"
44-
8. From here, you can add breakpoints or edit the contents of the `test-project` folder to do further testing.
47+
5. After the folder has opened in the container, if prompted to restore packages in a notification, click "Restore".
48+
6. After packages are restored, press <kbd>F5</kbd> to start the project.
49+
7. Once the project is running, press <kbd>F1</kbd> and select **Remote-Containers: Forward Port...**
50+
8. Select port 8090 and open `http://localhost:8090` in a browser.
51+
9. You should see "Hello remote world from ASP.NET Core!" after the page loads.
52+
10. From here, you can add breakpoints or edit the contents of the `test-project` folder to do further testing.
4553

4654
## License
4755

4856
Copyright (c) Microsoft Corporation. All rights reserved.
4957

50-
Licensed under the MIT License. See [LICENSE](https://github.com/Microsoft/vscode-dev-containers/LICENSE).
58+
Licensed under the MIT License. See [LICENSE](https://github.com/Microsoft/vscode-dev-containers/blob/master/LICENSE).

0 commit comments

Comments
 (0)