diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..29dedfb
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,69 @@
+on:
+ workflow_call:
+ inputs:
+ forRelease:
+ description: 'Run for release?'
+ required: true
+ type: boolean
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ fetch-depth: 0
+
+ - name: Git Semantic Version
+ id: version
+ uses: PaulHatch/semantic-version@v6.0.3
+ with:
+ tag_prefix: ''
+ version_format: "${major}.${minor}.${patch}${{ !inputs.forRelease && '-preview${increment}' || '' }}"
+ search_commit_body: true
+
+ - name: Setup dotnet from global.json
+ uses: actions/setup-dotnet@v6
+ with:
+ global-json-file: global.json
+
+ - name: Build and Pack
+ run: dotnet build -c Release -p:Version=${{ steps.version.outputs.version}}
+
+ - name: Run tests
+ run: dotnet test -c Release --no-build --report-trx --report-trx-filename "{asm}_report.trx" --coverage --coverage-output-format cobertura
+
+ - name: Upload dotnet test results
+ uses: dorny/test-reporter@v3.0.0
+ if: ${{ !cancelled() }}
+ with:
+ name: .NET Tests
+ path: 'TestResults/*_report.trx'
+ reporter: dotnet-trx
+ fail-on-error: true
+
+ - name: Install ReportGenerator
+ run: dotnet tool install --global dotnet-reportgenerator-globaltool
+
+ - name: Generate code coverage report
+ run: |
+ reportgenerator \
+ -reports:"**/TestResults/**/*.cobertura.xml" \
+ -targetDir:"codecoveragereport" \
+ -reporttypes:"Html;MarkdownSummaryGitHub"
+
+ - name: Publish code coverage summary
+ run: cat codecoveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
+
+ - name: Upload code coverage report
+ uses: actions/upload-artifact@v7
+ with:
+ name: code-coverage-report
+ path: codecoveragereport
+
+ - name: Upload package artifact
+ uses: actions/upload-artifact@v7
+ with:
+ name: packages
+ path: "**/*.nupkg"
\ No newline at end of file
diff --git a/.github/workflows/buildAndPublish.yml b/.github/workflows/buildAndPublish.yml
deleted file mode 100644
index 338845d..0000000
--- a/.github/workflows/buildAndPublish.yml
+++ /dev/null
@@ -1,61 +0,0 @@
-on:
- workflow_call:
- inputs:
- feedUrl:
- description: "NuGet feed URL"
- required: true
- type: string
- forRelease:
- description: "Run for release?"
- required: true
- type: boolean
- secrets:
- feedAPIKey:
- description: "NuGet feed API key"
- required: true
-
-jobs:
- build:
- strategy:
- fail-fast: false
- runs-on: windows-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v5
- with:
- fetch-depth: 0
-
- - name: Git Semantic Version
- id: version
- uses: PaulHatch/semantic-version@v5.4.0
- with:
- tag_prefix: ""
- version_format: "${major}.${minor}.${patch}${{ !inputs.forRelease && '-preview${increment}' || '' }}"
- search_commit_body: true
-
- - name: Setup dotnet ${{ env.DOTNET_VERSION }}
- uses: actions/setup-dotnet@v5
- with:
- dotnet-version: ${{ env.DOTNET_VERSION }}
-
- - name: Build and Pack
- run: dotnet build -c Release -p:Version=${{ steps.version.outputs.version}}
-
- - name: Run tests
- run: dotnet test -c Release --no-build -l trx --results-directory TestResults
-
- - name: Upload dotnet test results
- uses: dorny/test-reporter@v2.1.1
- if: ${{ !cancelled() }}
- with:
- name: .NET Tests
- path: "TestResults/**/*.trx"
- reporter: dotnet-trx
- fail-on-error: true
-
- - name: Push to NuGet package feed
- env:
- NUGET_URL: ${{ inputs.feedUrl }}
- NUGET_API_KEY: ${{ secrets.feedAPIKey }}
- run: dotnet nuget push '**/*.nupkg' --source "$($env:NUGET_URL)" --api-key "$($env:NUGET_API_KEY)"
- if: github.event_name == 'push'
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 324f955..4f02a45 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,21 +12,25 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
-env:
- DOTNET_VERSION: '9.0.x'
-
permissions:
checks: write
contents: read
jobs:
- call_buildAndPublish:
- uses: ./.github/workflows/buildAndPublish.yml
+ build:
+ uses: ./.github/workflows/build.yml
with:
- feedUrl: https://www.myget.org/F/mgrosperrin/api/v3/index.json
forRelease: false
- secrets:
- feedAPIKey: ${{ secrets.MYGET_CI_API_KEY }}
generate_docs:
- uses: ./.github/workflows/generateDocs.yml
+ uses: ./.github/workflows/generate-docs.yml
+
+ publish_package:
+ needs: build
+ uses: ./.github/workflows/publish-packages-myget.yml
+ with:
+ feedUrl: https://www.myget.org/F/mgrosperrin/api/v3/index.json
+ environmentName: myget
+ secrets:
+ feedAPIKey: ${{ secrets.MYGET_CI_API_KEY }}
+ if: github.event_name == 'push'
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 470e6b6..ebf2c15 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -8,9 +8,6 @@ on:
schedule:
- cron: '38 16 * * 5'
-env:
- DOTNET_VERSION: '9.0.x'
-
jobs:
analyze:
name: Analyze
@@ -29,7 +26,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v5
+ uses: actions/checkout@v7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
@@ -37,10 +34,10 @@ jobs:
with:
languages: ${{ matrix.language }}
- - name: Setup dotnet ${{ env.DOTNET_VERSION }}
- uses: actions/setup-dotnet@v5
+ - name: Setup dotnet from global.json
+ uses: actions/setup-dotnet@v6
with:
- dotnet-version: ${{ env.DOTNET_VERSION }}
+ global-json-file: global.json
- name: Build projects
run: dotnet build -c Release
diff --git a/.github/workflows/generateDocs.yml b/.github/workflows/generate-docs.yml
similarity index 55%
rename from .github/workflows/generateDocs.yml
rename to .github/workflows/generate-docs.yml
index d4a0fbf..f01523b 100644
--- a/.github/workflows/generateDocs.yml
+++ b/.github/workflows/generate-docs.yml
@@ -1,19 +1,21 @@
on:
workflow_call:
inputs: {}
+
jobs:
build:
- strategy:
- fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v5
- - name: Build documenation site
- uses: nunit/docfx-action@v4.1.0
+ uses: actions/checkout@v7
+
+ - name: Build documentation site
+ uses: wechooz/docfx-action@v10.0.0
with:
args: docs/docfx.json
+
- name: Upload documentation archive
- uses: actions/upload-pages-artifact@v4
+ uses: actions/upload-pages-artifact@v5
with:
path: artifacts/_site
+
\ No newline at end of file
diff --git a/.github/workflows/publish-packages-myget.yml b/.github/workflows/publish-packages-myget.yml
new file mode 100644
index 0000000..e9b2a1b
--- /dev/null
+++ b/.github/workflows/publish-packages-myget.yml
@@ -0,0 +1,32 @@
+on:
+ workflow_call:
+ inputs:
+ environmentName:
+ description: "Name of the environment"
+ required: true
+ type: string
+ feedUrl:
+ description: 'NuGet feed URL'
+ required: true
+ type: string
+ secrets:
+ feedAPIKey:
+ description: 'NuGet feed API key'
+ required: true
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ environment:
+ name: ${{ inputs.environmentName }}
+ steps:
+ - name: Download package artifact
+ uses: actions/download-artifact@v8
+ with:
+ name: packages
+
+ - name: Push to NuGet package feed
+ env:
+ NUGET_URL: ${{ inputs.feedUrl }}
+ NUGET_API_KEY: ${{ secrets.feedAPIKey }}
+ run: dotnet nuget push '**/*.nupkg' --source "$NUGET_URL" --api-key "$NUGET_API_KEY"
\ No newline at end of file
diff --git a/.github/workflows/publish-packages-nuget.yml b/.github/workflows/publish-packages-nuget.yml
new file mode 100644
index 0000000..f6d47bf
--- /dev/null
+++ b/.github/workflows/publish-packages-nuget.yml
@@ -0,0 +1,33 @@
+on:
+ workflow_call:
+ inputs:
+ environmentName:
+ description: "Name of the environment"
+ required: true
+ type: string
+ secrets:
+ owner:
+ description: 'NuGet feed owner'
+ required: true
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ environment:
+ name: ${{ inputs.environmentName }}
+ permissions:
+ id-token: write
+ steps:
+ - name: Download package artifact
+ uses: actions/download-artifact@v8
+ with:
+ name: packages
+
+ - name: NuGet login (OIDC → temp API key)
+ uses: NuGet/login@v1
+ id: login
+ with:
+ user: ${{ secrets.owner }}
+
+ - name: Push to NuGet package feed
+ run: dotnet nuget push '**/*.nupkg' --source https://api.nuget.org/v3/index.json --api-key ${{steps.login.outputs.NUGET_API_KEY}}
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5253be8..a3774f8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,27 +9,30 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
-env:
- DOTNET_VERSION: "9.0.x"
-
permissions:
checks: write
contents: read
jobs:
- call_buildAndPublish:
- uses: ./.github/workflows/buildAndPublish.yml
+ build:
+ uses: ./.github/workflows/build.yml
with:
- feedUrl: https://api.nuget.org/v3/index.json
forRelease: true
- secrets:
- feedAPIKey: ${{ secrets.NUGET_API_KEY }}
generate_docs:
- uses: ./.github/workflows/generateDocs.yml
+ uses: ./.github/workflows/generate-docs.yml
+
+ publish_package:
+ needs: [build, generate_docs]
+ uses: ./.github/workflows/publish-packages-nuget.yml
+ with:
+ environmentName: nuget
+ secrets:
+ owner: ${{ secrets.NUGET_OWNER }}
+ if: github.event_name == 'push'
publish_docs:
- needs: [call_buildAndPublish, generate_docs]
+ needs: [publish_package, generate_docs]
permissions:
pages: write
id-token: write
@@ -39,5 +42,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Publish documentation
- uses: actions/deploy-pages@v4
+ uses: actions/deploy-pages@v5
id: deployment
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 532ba1e..4c6fc39 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -5,23 +5,17 @@
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
-
-
- all
- runtime; build; native; contentfiles; analyzers
-
+
\ No newline at end of file
diff --git a/MGR.CommandLineParser.sln b/MGR.CommandLineParser.sln
deleted file mode 100644
index f9e2242..0000000
--- a/MGR.CommandLineParser.sln
+++ /dev/null
@@ -1,118 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.9.34616.47
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MGR.CommandLineParser", "src\MGR.CommandLineParser\MGR.CommandLineParser.csproj", "{EF6019C2-2C4D-4874-BBBF-D76CA30F7E8D}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{569ED12A-DA23-4457-B304-6B00C0CB335E}"
- ProjectSection(SolutionItems) = preProject
- tests\Directory.Build.props = tests\Directory.Build.props
- EndProjectSection
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MGR.CommandLineParser.UnitTests", "tests\MGR.CommandLineParser.UnitTests\MGR.CommandLineParser.UnitTests.csproj", "{22F60D05-F6DB-4410-80AD-E558EF1BDF6F}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{0B84161D-C735-43F0-A525-4ED42CC4B17C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MGR.CommandLineParser.IntegrationTests", "tests\MGR.CommandLineParser.IntegrationTests\MGR.CommandLineParser.IntegrationTests.csproj", "{7FD4CEB3-040B-4581-9B7C-EF8CB99B0951}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleApp", "samples\SimpleApp\SimpleApp.csproj", "{F192F36D-7EDD-4E1E-82A4-95CA11665D2B}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EF849FD3-293F-4CC8-B227-9680CF929A66}"
- ProjectSection(SolutionItems) = preProject
- .editorconfig = .editorconfig
- .gitattributes = .gitattributes
- .gitignore = .gitignore
- coverlet.runsettings = coverlet.runsettings
- Directory.Build.props = Directory.Build.props
- Directory.Packages.props = Directory.Packages.props
- global.json = global.json
- LICENSE = LICENSE
- MGR.CommandLineParser.lutconfig = MGR.CommandLineParser.lutconfig
- README.md = README.md
- EndProjectSection
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MGR.CommandLineParser.Tests.Commands", "tests\MGR.CommandLineParser.Tests.Commands\MGR.CommandLineParser.Tests.Commands.csproj", "{A422BACE-2758-4ABD-9DAA-ADF289FCCE65}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{172E24C2-BF99-4DA9-A7DF-8C0BB44C138D}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FB795A12-C939-492F-9377-4C468D01EF3C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MGR.CommandLineParser.Command.Lambda", "src\MGR.CommandLineParser.Command.Lambda\MGR.CommandLineParser.Command.Lambda.csproj", "{9F5A0142-E0A1-45A2-961E-55611B4440AD}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MGR.CommandLineParser.Hosting", "src\MGR.CommandLineParser.Hosting\MGR.CommandLineParser.Hosting.csproj", "{40EAA8E2-7AFE-4ED1-A961-35BD7E424985}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "docs", "docs\docs.csproj", "{405858FA-1E78-48C7-9915-B558D0F15CAE}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{AF37E9B0-D41E-4CC2-8641-61FA6B28362B}"
- ProjectSection(SolutionItems) = preProject
- .github\dependabot.yml = .github\dependabot.yml
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{BCD738AE-36C9-4CD9-B0F5-EAB942B193DC}"
- ProjectSection(SolutionItems) = preProject
- .github\workflows\buildAndPublish.yml = .github\workflows\buildAndPublish.yml
- .github\workflows\ci.yml = .github\workflows\ci.yml
- .github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
- .github\workflows\generateDocs.yml = .github\workflows\generateDocs.yml
- .github\workflows\release.yml = .github\workflows\release.yml
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {EF6019C2-2C4D-4874-BBBF-D76CA30F7E8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EF6019C2-2C4D-4874-BBBF-D76CA30F7E8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EF6019C2-2C4D-4874-BBBF-D76CA30F7E8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EF6019C2-2C4D-4874-BBBF-D76CA30F7E8D}.Release|Any CPU.Build.0 = Release|Any CPU
- {22F60D05-F6DB-4410-80AD-E558EF1BDF6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {22F60D05-F6DB-4410-80AD-E558EF1BDF6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {22F60D05-F6DB-4410-80AD-E558EF1BDF6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {22F60D05-F6DB-4410-80AD-E558EF1BDF6F}.Release|Any CPU.Build.0 = Release|Any CPU
- {7FD4CEB3-040B-4581-9B7C-EF8CB99B0951}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7FD4CEB3-040B-4581-9B7C-EF8CB99B0951}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7FD4CEB3-040B-4581-9B7C-EF8CB99B0951}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7FD4CEB3-040B-4581-9B7C-EF8CB99B0951}.Release|Any CPU.Build.0 = Release|Any CPU
- {F192F36D-7EDD-4E1E-82A4-95CA11665D2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F192F36D-7EDD-4E1E-82A4-95CA11665D2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F192F36D-7EDD-4E1E-82A4-95CA11665D2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F192F36D-7EDD-4E1E-82A4-95CA11665D2B}.Release|Any CPU.Build.0 = Release|Any CPU
- {A422BACE-2758-4ABD-9DAA-ADF289FCCE65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A422BACE-2758-4ABD-9DAA-ADF289FCCE65}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A422BACE-2758-4ABD-9DAA-ADF289FCCE65}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A422BACE-2758-4ABD-9DAA-ADF289FCCE65}.Release|Any CPU.Build.0 = Release|Any CPU
- {9F5A0142-E0A1-45A2-961E-55611B4440AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9F5A0142-E0A1-45A2-961E-55611B4440AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9F5A0142-E0A1-45A2-961E-55611B4440AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9F5A0142-E0A1-45A2-961E-55611B4440AD}.Release|Any CPU.Build.0 = Release|Any CPU
- {40EAA8E2-7AFE-4ED1-A961-35BD7E424985}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {40EAA8E2-7AFE-4ED1-A961-35BD7E424985}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {40EAA8E2-7AFE-4ED1-A961-35BD7E424985}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {40EAA8E2-7AFE-4ED1-A961-35BD7E424985}.Release|Any CPU.Build.0 = Release|Any CPU
- {405858FA-1E78-48C7-9915-B558D0F15CAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {405858FA-1E78-48C7-9915-B558D0F15CAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {405858FA-1E78-48C7-9915-B558D0F15CAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {405858FA-1E78-48C7-9915-B558D0F15CAE}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {EF6019C2-2C4D-4874-BBBF-D76CA30F7E8D} = {FB795A12-C939-492F-9377-4C468D01EF3C}
- {22F60D05-F6DB-4410-80AD-E558EF1BDF6F} = {569ED12A-DA23-4457-B304-6B00C0CB335E}
- {7FD4CEB3-040B-4581-9B7C-EF8CB99B0951} = {569ED12A-DA23-4457-B304-6B00C0CB335E}
- {F192F36D-7EDD-4E1E-82A4-95CA11665D2B} = {0B84161D-C735-43F0-A525-4ED42CC4B17C}
- {A422BACE-2758-4ABD-9DAA-ADF289FCCE65} = {569ED12A-DA23-4457-B304-6B00C0CB335E}
- {9F5A0142-E0A1-45A2-961E-55611B4440AD} = {FB795A12-C939-492F-9377-4C468D01EF3C}
- {40EAA8E2-7AFE-4ED1-A961-35BD7E424985} = {FB795A12-C939-492F-9377-4C468D01EF3C}
- {405858FA-1E78-48C7-9915-B558D0F15CAE} = {172E24C2-BF99-4DA9-A7DF-8C0BB44C138D}
- {AF37E9B0-D41E-4CC2-8641-61FA6B28362B} = {EF849FD3-293F-4CC8-B227-9680CF929A66}
- {BCD738AE-36C9-4CD9-B0F5-EAB942B193DC} = {AF37E9B0-D41E-4CC2-8641-61FA6B28362B}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {827031C5-AE76-4B4C-9503-E13F15B497E9}
- EndGlobalSection
-EndGlobal
diff --git a/MGR.CommandLineParser.slnx b/MGR.CommandLineParser.slnx
new file mode 100644
index 0000000..f8987db
--- /dev/null
+++ b/MGR.CommandLineParser.slnx
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/global.json b/global.json
index d051024..ccb6baf 100644
--- a/global.json
+++ b/global.json
@@ -1,7 +1,10 @@
{
"sdk": {
- "version": "9.0.306",
+ "version": "10.0.302",
"allowPrerelease": false,
"rollForward": "latestFeature"
+ },
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
}
}
\ No newline at end of file
diff --git a/src/MGR.CommandLineParser.Command.Lambda/MGR.CommandLineParser.Command.Lambda.csproj b/src/MGR.CommandLineParser.Command.Lambda/MGR.CommandLineParser.Command.Lambda.csproj
index 39770d1..a741da8 100644
--- a/src/MGR.CommandLineParser.Command.Lambda/MGR.CommandLineParser.Command.Lambda.csproj
+++ b/src/MGR.CommandLineParser.Command.Lambda/MGR.CommandLineParser.Command.Lambda.csproj
@@ -1,5 +1,16 @@
+
+ README.md
+
+
+
+
+ True
+ \
+
+
+
diff --git a/src/MGR.CommandLineParser.Hosting/MGR.CommandLineParser.Hosting.csproj b/src/MGR.CommandLineParser.Hosting/MGR.CommandLineParser.Hosting.csproj
index b3f0326..6a7f9e1 100644
--- a/src/MGR.CommandLineParser.Hosting/MGR.CommandLineParser.Hosting.csproj
+++ b/src/MGR.CommandLineParser.Hosting/MGR.CommandLineParser.Hosting.csproj
@@ -1,6 +1,17 @@
-
+
+ README.md
+
+
+
+
+ True
+ \
+
+
+
+
diff --git a/src/MGR.CommandLineParser/MGR.CommandLineParser.csproj b/src/MGR.CommandLineParser/MGR.CommandLineParser.csproj
index 8b6320b..25669b9 100644
--- a/src/MGR.CommandLineParser/MGR.CommandLineParser.csproj
+++ b/src/MGR.CommandLineParser/MGR.CommandLineParser.csproj
@@ -1,5 +1,16 @@
+
+ README.md
+
+
+
+
+ True
+ \
+
+
+
diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props
index 8c26b4c..26cf284 100644
--- a/tests/Directory.Build.props
+++ b/tests/Directory.Build.props
@@ -1,8 +1,7 @@
-
- net8.0;net48
+ net8.0
false
Exe
diff --git a/tests/MGR.CommandLineParser.IntegrationTests/MGR.CommandLineParser.IntegrationTests.csproj b/tests/MGR.CommandLineParser.IntegrationTests/MGR.CommandLineParser.IntegrationTests.csproj
index cfdb61c..5e3c9f3 100644
--- a/tests/MGR.CommandLineParser.IntegrationTests/MGR.CommandLineParser.IntegrationTests.csproj
+++ b/tests/MGR.CommandLineParser.IntegrationTests/MGR.CommandLineParser.IntegrationTests.csproj
@@ -5,10 +5,9 @@
-
-
-
-
+
+
+
diff --git a/tests/MGR.CommandLineParser.IntegrationTests/SpecificCommand/EnumTests.cs b/tests/MGR.CommandLineParser.IntegrationTests/SpecificCommand/EnumTests.cs
index f8d0dfa..65d5b61 100644
--- a/tests/MGR.CommandLineParser.IntegrationTests/SpecificCommand/EnumTests.cs
+++ b/tests/MGR.CommandLineParser.IntegrationTests/SpecificCommand/EnumTests.cs
@@ -3,6 +3,7 @@
using Xunit;
namespace MGR.CommandLineParser.IntegrationTests.SpecificCommand;
+
public class EnumTests : ConsoleLoggingTestsBase
{
[Fact]
diff --git a/tests/MGR.CommandLineParser.IntegrationTests/SpecificCommand/InternalTypesTests.cs b/tests/MGR.CommandLineParser.IntegrationTests/SpecificCommand/InternalTypesTests.cs
index 540289d..2f06fdd 100644
--- a/tests/MGR.CommandLineParser.IntegrationTests/SpecificCommand/InternalTypesTests.cs
+++ b/tests/MGR.CommandLineParser.IntegrationTests/SpecificCommand/InternalTypesTests.cs
@@ -3,6 +3,7 @@
using Xunit;
namespace MGR.CommandLineParser.IntegrationTests.SpecificCommand;
+
public class InternalTypesTests : ConsoleLoggingTestsBase
{
[Fact]
diff --git a/tests/MGR.CommandLineParser.IntegrationTests/UnspecifiedCommand/SimpleOptionsWithArgumentsTests.cs b/tests/MGR.CommandLineParser.IntegrationTests/UnspecifiedCommand/SimpleOptionsWithArgumentsTests.cs
index 0eca188..598b814 100644
--- a/tests/MGR.CommandLineParser.IntegrationTests/UnspecifiedCommand/SimpleOptionsWithArgumentsTests.cs
+++ b/tests/MGR.CommandLineParser.IntegrationTests/UnspecifiedCommand/SimpleOptionsWithArgumentsTests.cs
@@ -10,9 +10,9 @@ public class SimpleOptionsWithArgumentsTests : ConsoleLoggingTestsBase
public async Task ParseWithValidArgs()
{
// Arrange
- var fileArgument = @"C:\temp\file.txt";
- var expectedOutputDirectory = @"C:\Temp";
- var expectedOutputFile = @"C:\Temp\otherfile.txt";
+ var fileArgument = Path.GetTempFileName();
+ var expectedOutputDirectory = Path.GetTempPath();
+ var expectedOutputFile = Path.GetTempFileName();
IEnumerable args = ["import", fileArgument, "-p:50", @"-o:" + expectedOutputDirectory, @"-of:" + expectedOutputFile];
var expectedReturnCode = CommandParsingResultCode.Success;
var expectedMaxParallel = 50;
diff --git a/tests/MGR.CommandLineParser.Tests.Commands/EnumCommand.cs b/tests/MGR.CommandLineParser.Tests.Commands/EnumCommand.cs
index 7d74af0..d80a95a 100644
--- a/tests/MGR.CommandLineParser.Tests.Commands/EnumCommand.cs
+++ b/tests/MGR.CommandLineParser.Tests.Commands/EnumCommand.cs
@@ -1,6 +1,7 @@
using MGR.CommandLineParser.Command;
namespace MGR.CommandLineParser.Tests.Commands;
+
public class EnumCommand : CommandBase
{
public class EnumCommandData : HelpedCommandData
diff --git a/tests/MGR.CommandLineParser.UnitTests/Extensibility/Converters/FileSystemInfoConverterTests.cs b/tests/MGR.CommandLineParser.UnitTests/Extensibility/Converters/FileSystemInfoConverterTests.cs
index 10dd843..2f35ec6 100644
--- a/tests/MGR.CommandLineParser.UnitTests/Extensibility/Converters/FileSystemInfoConverterTests.cs
+++ b/tests/MGR.CommandLineParser.UnitTests/Extensibility/Converters/FileSystemInfoConverterTests.cs
@@ -24,7 +24,7 @@ public void FileInfo_WithValidPath_Conversion()
{
// Arrange
IConverter converter = new FileSystemInfoConverter();
- var value = @"C:\temp\file.txt";
+ var value = Path.GetTempFileName();
// Act
var actual = converter.Convert(value, typeof(FileInfo));
@@ -40,7 +40,7 @@ public void DirectoryInfo_WithValidPath_Conversion()
{
// Arrange
IConverter converter = new FileSystemInfoConverter();
- var value = @"C:\temp\file.txt";
+ var value = Path.GetTempPath();
// Act
var actual = converter.Convert(value, typeof(DirectoryInfo));
diff --git a/tests/MGR.CommandLineParser.UnitTests/MGR.CommandLineParser.UnitTests.csproj b/tests/MGR.CommandLineParser.UnitTests/MGR.CommandLineParser.UnitTests.csproj
index bdb87da..8a1affa 100644
--- a/tests/MGR.CommandLineParser.UnitTests/MGR.CommandLineParser.UnitTests.csproj
+++ b/tests/MGR.CommandLineParser.UnitTests/MGR.CommandLineParser.UnitTests.csproj
@@ -5,11 +5,10 @@
-
-
+
+
-
-
+