Skip to content
This repository was archived by the owner on Feb 8, 2025. It is now read-only.

Commit c37270e

Browse files
authored
Update README.md
1 parent 7463a60 commit c37270e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ File1.cs
4141
.editorconfig
4242
```
4343

44-
### Writing (applies to Slnx 2.0 and later)
44+
### Writing (applies to Slnx 2.0, see below code block for Slnx 3.0)
4545
```cs
4646
using Slnx;
4747
using System.Text.Json;
@@ -70,6 +70,19 @@ var model = SlnxModel.Load(File.ReadAllText("OutputSlnx.txt"));
7070
Console.WriteLine(JsonSerializer.Serialize(model));
7171
```
7272

73+
Note: The constructor of the `Project` class was slightly changed. Change this:
74+
```cs
75+
// ...
76+
folder.AddProject(new Project("./DockerCompose/DockerCompose.dcproj", typeGuid: Guid.NewGuid(), config: new(solution: "*|*", project: "*|*|Deploy")));
77+
var moreFolders = new Folder("C++");
78+
```
79+
to:
80+
```cs
81+
// ...
82+
folder.AddProject(new Project("./DockerCompose/DockerCompose.dcproj", /*HERE -->*/type: Guid.NewGuid().ToString(), /*<-- HERE*/ config: new(solution: "*|*", project: "*|*|Deploy")));
83+
var moreFolders = new Folder("C++");
84+
```
85+
7386
Starting with Slnx 3.0, you can convert `SlnxModel` to `string` asynchronously:
7487
```cs
7588
// ...

0 commit comments

Comments
 (0)