Skip to content

Commit 36eef8a

Browse files
committed
chore: Update command usage in README to use 'dotnetapidiff' for consistency
1 parent 2bf1940 commit 36eef8a

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ task build
142142

143143
```bash
144144
# Compare two assembly versions
145-
dotnet run --project src/DotNetApiDiff -- compare MyLibrary.v1.dll MyLibrary.v2.dll
145+
dotnetapidiff compare MyLibrary.v1.dll MyLibrary.v2.dll
146146

147147
# Generate a JSON report
148-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --output json
148+
dotnetapidiff compare source.dll target.dll --output json
149149

150150
# Save report to file
151-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --output markdown > api-changes.md
151+
dotnetapidiff compare source.dll target.dll --output markdown > api-changes.md
152152
```
153153

154154
## 🔧 Usage Examples
@@ -157,58 +157,58 @@ dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --output
157157

158158
```bash
159159
# Simple comparison with console output
160-
dotnet run --project src/DotNetApiDiff -- compare MyLibrary.v1.dll MyLibrary.v2.dll
160+
dotnetapidiff compare MyLibrary.v1.dll MyLibrary.v2.dll
161161
```
162162

163163
### Filtering Options
164164

165165
```bash
166166
# Filter to specific namespaces
167-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll \
167+
dotnetapidiff compare source.dll target.dll \
168168
--filter "MyLibrary.Core" --filter "MyLibrary.Extensions"
169169

170170
# Filter to specific type patterns
171-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll \
171+
dotnetapidiff compare source.dll target.dll \
172172
--type "MyLibrary.Core.*" --type "MyLibrary.Models.*"
173173

174174
# Exclude internal or test types
175-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll \
175+
dotnetapidiff compare source.dll target.dll \
176176
--exclude "*.Internal*" --exclude "*.Tests*"
177177

178178
# Include internal types (normally excluded)
179-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --include-internals
179+
dotnetapidiff compare source.dll target.dll --include-internals
180180

181181
# Include compiler-generated types
182-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --include-compiler-generated
182+
dotnetapidiff compare source.dll target.dll --include-compiler-generated
183183
```
184184

185185
### Output Formats
186186

187187
```bash
188188
# Generate JSON report
189-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --output json
189+
dotnetapidiff compare source.dll target.dll --output json
190190

191191
# Generate Markdown report
192-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --output markdown
192+
dotnetapidiff compare source.dll target.dll --output markdown
193193

194194
# Generate XML report
195-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --output xml
195+
dotnetapidiff compare source.dll target.dll --output xml
196196

197197
# Generate HTML report
198-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --output html
198+
dotnetapidiff compare source.dll target.dll --output html
199199
```
200200

201201
### Configuration File Usage
202202

203203
```bash
204204
# Use a configuration file for complex scenarios
205-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --config my-config.json
205+
dotnetapidiff compare source.dll target.dll --config my-config.json
206206

207207
# Enable verbose logging
208-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --verbose
208+
dotnetapidiff compare source.dll target.dll --verbose
209209

210210
# Disable colored output (useful for CI/CD)
211-
dotnet run --project src/DotNetApiDiff -- compare source.dll target.dll --no-color
211+
dotnetapidiff compare source.dll target.dll --no-color
212212
```
213213

214214
## ⚙️ Configuration
@@ -382,7 +382,7 @@ jobs:
382382

383383
- name: Run API Diff
384384
run: |
385-
dotnet run --project path/to/dotnet-api-diff -- compare \
385+
dotnetapidiff compare \
386386
./baseline/MyLibrary.dll \
387387
./current/MyLibrary.dll \
388388
--config .github/api-diff-config.json \
@@ -435,8 +435,8 @@ steps:
435435
- task: DotNetCoreCLI@2
436436
displayName: 'Run API Diff'
437437
inputs:
438-
command: 'run'
439-
projects: 'tools/dotnet-api-diff/DotNetApiDiff.csproj'
438+
command: 'custom'
439+
custom: 'dotnetapidiff'
440440
arguments: >
441441
compare
442442
$(Build.ArtifactStagingDirectory)/baseline/MyLibrary.dll
@@ -470,7 +470,7 @@ The tool uses semantic exit codes to integrate with CI/CD systems:
470470
#!/bin/bash
471471
472472
# Run API diff and capture exit code
473-
dotnet run --project dotnet-api-diff -- compare old.dll new.dll --config config.json
473+
dotnetapidiff compare old.dll new.dll --config config.json
474474
EXIT_CODE=$?
475475
476476
case $EXIT_CODE in
@@ -508,7 +508,7 @@ esac
508508
nuget install MyLibrary -Version 1.0.0 -OutputDirectory packages
509509
510510
# Compare with current build
511-
dotnet run --project dotnet-api-diff -- compare \
511+
dotnetapidiff compare \
512512
packages/MyLibrary.1.0.0/lib/net8.0/MyLibrary.dll \
513513
src/MyLibrary/bin/Release/net8.0/MyLibrary.dll \
514514
--output json > api-changes.json
@@ -527,7 +527,7 @@ fi
527527

528528
```bash
529529
# Compare .NET Framework vs .NET Core implementations
530-
dotnet run --project dotnet-api-diff -- compare \
530+
dotnetapidiff compare \
531531
MyLibrary.net48.dll \
532532
MyLibrary.net8.0.dll \
533533
--config framework-migration-config.json \
@@ -538,7 +538,7 @@ dotnet run --project dotnet-api-diff -- compare \
538538

539539
```bash
540540
# Lenient checking for pre-release versions
541-
dotnet run --project dotnet-api-diff -- compare \
541+
dotnetapidiff compare \
542542
MyLibrary.1.0.0-stable.dll \
543543
MyLibrary.1.1.0-beta.dll \
544544
--config samples/lenient-changes.json \
@@ -583,7 +583,7 @@ tests/
583583

584584
```bash
585585
# Ensure assemblies are built for compatible target frameworks
586-
dotnet run --project dotnet-api-diff -- compare source.dll target.dll --verbose
586+
dotnetapidiff compare source.dll target.dll --verbose
587587
```
588588

589589
**Missing Dependencies**
@@ -597,15 +597,15 @@ dotnet run --project dotnet-api-diff -- compare source.dll target.dll --verbose
597597

598598
```bash
599599
# For very large assemblies, consider filtering to specific namespaces
600-
dotnet run --project dotnet-api-diff -- compare source.dll target.dll \
600+
dotnetapidiff compare source.dll target.dll \
601601
--filter "MyLibrary.Core" --exclude "*.Internal*"
602602
```
603603

604604
**Performance Issues**
605605

606606
```bash
607607
# Use configuration files to exclude unnecessary types
608-
dotnet run --project dotnet-api-diff -- compare source.dll target.dll \
608+
dotnetapidiff compare source.dll target.dll \
609609
--config samples/enterprise-config.json
610610
```
611611

@@ -618,7 +618,7 @@ Enable detailed logging for troubleshooting:
618618
export DOTNET_API_DIFF_LOG_LEVEL=Debug
619619
620620
# Run with verbose output
621-
dotnet run --project dotnet-api-diff -- compare source.dll target.dll --verbose
621+
dotnetapidiff compare source.dll target.dll --verbose
622622
```
623623

624624
## 🚀 Advanced Usage
@@ -662,7 +662,7 @@ if (result.HasBreakingChanges)
662662

663663
```xml
664664
<Target Name="CheckApiCompatibility" BeforeTargets="Pack">
665-
<Exec Command="dotnet run --project $(MSBuildThisFileDirectory)tools/dotnet-api-diff -- compare $(PreviousVersionDll) $(OutputPath)$(AssemblyName).dll --config api-config.json"
665+
<Exec Command="dotnetapidiff compare $(PreviousVersionDll) $(OutputPath)$(AssemblyName).dll --config api-config.json"
666666
ContinueOnError="false" />
667667
</Target>
668668
```
@@ -673,9 +673,9 @@ if (result.HasBreakingChanges)
673673
Task("CheckApiCompatibility")
674674
.Does(() =>
675675
{
676-
var exitCode = StartProcess("dotnet", new ProcessSettings
676+
var exitCode = StartProcess("dotnetapidiff", new ProcessSettings
677677
{
678-
Arguments = "run --project tools/dotnet-api-diff -- compare baseline.dll current.dll --config config.json"
678+
Arguments = "compare baseline.dll current.dll --config config.json"
679679
});
680680
681681
if (exitCode == 2)

0 commit comments

Comments
 (0)