From 9f385efb6540fd6f80daba31d12f4ae1e7bb7074 Mon Sep 17 00:00:00 2001 From: danielmarbach Date: Wed, 27 Nov 2019 13:50:55 +0100 Subject: [PATCH 1/2] Fix tool and readme --- README.md | 16 ++++++++-------- src/PublicApiGenerator.Tool/Program.cs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e6389a5..77a3307 100644 --- a/README.md +++ b/README.md @@ -126,31 +126,31 @@ dotnet tool uninstall -g PublicApiGenerator.Tool Generate public API for fluent assertions 5.6.0 for runtime framework `netcoreapp2.1` and `net461` ``` -generate-public-api --target-frameworks 'netcoreapp2.1;net461' --package FluentAssertions --package-version 5.6.0 +generate-public-api --target-frameworks netcoreapp2.1;net461 --package FluentAssertions --package-version 5.6.0 ``` Generate public API for fluent assertions 5.* for runtime framework `net47` ``` -generate-public-api --target-frameworks 'netcoreapp2.1;net461' --package FluentAssertions --package-version 5.* +generate-public-api --target-frameworks netcoreapp2.1;net461 --package FluentAssertions --package-version 5.* ``` Generate public API for NServiceBus 7.1.4 for runtime framework `netcoreapp2.2` and `net452`. Note NServiceBus package doesn't contain NServiceBus.dll and therefore it is required to specify the assembly that contains the public API. ``` -generate-public-api --target-frameworks 'netcoreapp2.2;net452' --package NServiceBus --package-version 7.1.4 --assembly NServiceBus.Core.dll +generate-public-api --target-frameworks netcoreapp2.2;net452 --package NServiceBus --package-version 7.1.4 --assembly NServiceBus.Core.dll ``` ### Command line arguments ``` ---target-frameworks framework|'framework;framework' +--target-frameworks framework|framework;framework ``` The target framework in which the package will be restored. The target framework is also used as runtime to generate the public API. It is required to specify a valid runtime framework. For example -- 'netcoreapp2.2;net452' to build a public API for `netcoreapp2.2` and `net452` -- 'netcoreapp2.1;net461' to build a public API for `netcoreapp2.1` and `net461` +- `netcoreapp2.2;net452` to build a public API for `netcoreapp2.2` and `net452` +- `netcoreapp2.1;net461` to build a public API for `netcoreapp2.1` and `net461` - `net47` to build a public API for `net47` It is not possible to use `netstandard2.0` because it is not a valid runtime framework. @@ -191,7 +191,7 @@ The assembly name including the extension to generate a public API from in case A path to a csproj file that contains the public API that needs to be built. By default a release build will be generated. When the project-path switch is used it is required to specify the `--assembly` switch to point to the output assembly that contains the public API. For example -- '..\PublicApiGenerator\PublicApiGenerator.csproj' +- `..\PublicApiGenerator\PublicApiGenerator.csproj` ``` --working-directory Path @@ -217,7 +217,7 @@ By default latest stable release version of PubliApiGenerator will be used in th --verbose ``` -Detailed information about what's going on behind the scenes +Detailed information about whats going on behind the scenes ``` leave-artifacts diff --git a/src/PublicApiGenerator.Tool/Program.cs b/src/PublicApiGenerator.Tool/Program.cs index a0f32a6..f9d9cdd 100644 --- a/src/PublicApiGenerator.Tool/Program.cs +++ b/src/PublicApiGenerator.Tool/Program.cs @@ -248,7 +248,7 @@ public static void Main(string[] args) var outputPath = args[1]; var outputDirectory = args[2]; var asm = Assembly.LoadFile(fullPath); - File.WriteAllText(outputPath, ApiGenerator.GeneratePublicApi(asm)); + File.WriteAllText(outputPath, asm.GeneratePublicApi()); var destinationFilePath = Path.Combine(outputDirectory, Path.GetFileName(outputPath)); if (File.Exists(destinationFilePath)) { From afe8481ac31a0e8989fabbf6fca1525006bb63be Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Wed, 27 Nov 2019 14:03:26 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77a3307..9757df6 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ By default latest stable release version of PubliApiGenerator will be used in th --verbose ``` -Detailed information about whats going on behind the scenes +Detailed information about what's going on behind the scenes ``` leave-artifacts