Skip to content

Commit f1894e6

Browse files
Copilotatifaziz
andcommitted
Add Building from Source section to README
Co-authored-by: atifaziz <20511+atifaziz@users.noreply.github.com>
1 parent 11a56ec commit f1894e6

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,58 @@ Install [the package][nupkg] in a .NET project using:
7070

7171
dotnet add package docopt.net
7272

73+
## Building from Source
74+
75+
The repository uses a PowerShell script to orchestrate multi-Roslyn variant builds. Ensure you have the required tools installed:
76+
77+
```bash
78+
dotnet tool restore
79+
```
80+
81+
### Build
82+
83+
To build the project with both Roslyn 3.10 (baseline) and Roslyn 4.4 variants:
84+
85+
```bash
86+
dotnet pwsh ./build.ps1
87+
```
88+
89+
or simply:
90+
91+
```bash
92+
dotnet pwsh ./build.ps1 -Build -Configuration Release
93+
```
94+
95+
### Test
96+
97+
To run tests:
98+
99+
```bash
100+
dotnet pwsh ./build.ps1 -Test
101+
```
102+
103+
To run tests without rebuilding:
104+
105+
```bash
106+
dotnet pwsh ./build.ps1 -Test -NoBuild
107+
```
108+
109+
### Pack
110+
111+
To create a NuGet package containing both analyzer variants:
112+
113+
```bash
114+
dotnet pwsh ./build.ps1 -Pack
115+
```
116+
117+
**Note:** Running `dotnet pack` directly without first building all Roslyn variants will fail with an error message. Always use `./build.ps1 -Pack` to ensure both analyzer variants are included in the package.
118+
119+
To pack with a version suffix:
120+
121+
```bash
122+
dotnet pwsh ./build.ps1 -Pack -VersionSuffix "beta1"
123+
```
124+
73125
## Copyright and License
74126

75127
- &copy; 2012-2014 Vladimir Keleshev <vladimir@keleshev.com>

0 commit comments

Comments
 (0)