Skip to content

Commit 0d88d18

Browse files
committed
C#: Add readme to stub folder
1 parent 5a47ddb commit 0d88d18

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

csharp/ql/src/Stubs/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generate stubs
2+
3+
Stubs can be generated from Nuget packages with the `make_stubs_nuget.py` script.
4+
5+
The following calls generate stubs for `Newtonsoft.Json`:
6+
7+
```
8+
python make_stubs_nuget.py Newtonsoft.Json
9+
python make_stubs_nuget.py Newtonsoft.Json latest
10+
python make_stubs_nuget.py Newtonsoft.Json 13.0.1
11+
python make_stubs_nuget.py Newtonsoft.Json 13.0.1 /Users/tmp/working-dir
12+
```
13+
14+
The output stubs are found in the `[DIR]/output/stubs` folder and can be copied over to `csharp/ql/test/resources/stubs`.
15+
16+
In some more involved cases the output files need to be edited. For example `ServiceStack` has Nuget dependencies, which
17+
are included in the `Microsoft.NETCore.App` framework stub. These dependencies generate empty packages, which can be
18+
removed. The `ProjectReference` entries referencing these removed empty packages also need to be deleted from the
19+
`.csproj` files.

0 commit comments

Comments
 (0)