diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
index d3a2e6a..c4b6329 100644
--- a/.github/workflows/ci-build.yml
+++ b/.github/workflows/ci-build.yml
@@ -42,6 +42,7 @@ jobs:
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
with:
dotnet-version: 9.0.x
+ cache: true
- name: 'Restore external dependencies'
run: dotnet restore
@@ -63,19 +64,19 @@ jobs:
- name: 'Test'
id: test
- run: dotnet test --no-build --restore --collect:"XPlat Code Coverage" --logger junit
+ run: dotnet test --no-build --restore --collect:"XPlat Code Coverage" --logger junit tests/UnitTests/BCrypt.Net.UnitTests.csproj
- name: 'Create test summary'
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
- paths: test/**/TestResults.xml
+ paths: tests/**/TestResults.xml
show: "fail, skip"
if: always()
- name: 'Generate Coverage Reports'
uses: danielpalme/ReportGenerator-GitHub-Action@c38c522d4b391c1b0da979cbb2e902c0a252a7dc # 5.4.3
with:
- reports: "test/**/coverage.cobertura.xml"
+ reports: "tests/**/coverage.cobertura.xml"
targetdir: "${{ github.workspace }}"
reporttypes: "Cobertura"
verbosity: "Info"
@@ -110,11 +111,11 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
if: always()
with:
- files: "test/**/TestResults.xml"
+ files: "tests/**/TestResults.xml"
- name: Upload Test Artifacts
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: test-results
- path: "test/**/TestResults.xml"
+ path: "tests/**/TestResults.xml"
retention-days: 5
diff --git a/.github/workflows/ci-manual-build-test-sign.yml b/.github/workflows/ci-manual-build-test-sign.yml
index 96380bb..7d1012a 100644
--- a/.github/workflows/ci-manual-build-test-sign.yml
+++ b/.github/workflows/ci-manual-build-test-sign.yml
@@ -52,7 +52,7 @@ jobs:
run: dotnet build --configuration Release --property:PublicRelease=${{ inputs.public_release }}
- name: 'Test'
- run: dotnet test --configuration Release --no-restore --no-build --property:PublicRelease=${{ inputs.public_release }}
+ run: dotnet test --configuration Release --no-restore --no-build --property:PublicRelease=${{ inputs.public_release }} tests/UnitTests/BCrypt.Net.UnitTests.csproj
- name: 'Pack release'
run: dotnet pack --configuration Release --no-restore --no-build --output ${{ env.nupkgDirectory }} --property:PublicRelease=${{ inputs.public_release }}
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 573665c..13896d4 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -62,6 +62,7 @@ jobs:
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
with:
dotnet-version: 9.0.x
+ cache: true
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml
new file mode 100644
index 0000000..d5338b6
--- /dev/null
+++ b/.github/workflows/devskim.yml
@@ -0,0 +1,28 @@
+name: 'MSFT Dev Skim'
+
+on:
+ workflow_dispatch:
+ pull_request:
+ branches:
+ - 'main'
+
+permissions:
+ # required for all workflows
+ security-events: write
+ # only required for workflows in private repositories
+ actions: read
+ contents: read
+
+jobs:
+ dependency-review:
+ runs-on: ubuntu-24.04
+ steps:
+ - name: Harden Runner
+ uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
+ with:
+ egress-policy: audit
+ - uses: actions/checkout@v4
+ - uses: microsoft/DevSkim-Action@v1
+ - uses: github/codeql-action/upload-sarif@v3
+ with:
+ sarif_file: devskim-results.sarif
\ No newline at end of file
diff --git a/.github/workflows/generate-publish-docs.yml b/.github/workflows/generate-publish-docs.yml
index bb170d7..62841f5 100644
--- a/.github/workflows/generate-publish-docs.yml
+++ b/.github/workflows/generate-publish-docs.yml
@@ -38,6 +38,7 @@ jobs:
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
with:
dotnet-version: 9.0.x
+ cache: true
- run: dotnet tool update -g docfx
- run: docfx ./docs/docfx.json
diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml
index be230fe..bb6671e 100644
--- a/.github/workflows/markdown-link-check.yml
+++ b/.github/workflows/markdown-link-check.yml
@@ -12,9 +12,9 @@ on:
- main
paths:
- '**.md'
- schedule:
+ #schedule:
# Run every-day at 9:00 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)
- - cron: "0 9 * * *"
+ #- cron: "0 9 * * *"
permissions:
contents: read
diff --git a/Directory.Packages.props b/Directory.Packages.props
index e414248..67c92ba 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -6,16 +6,16 @@
+
-
-
-
-
+
+
+
-
+
-
+
diff --git a/benchmark/BCryptNet.BenchMarks.csproj b/benchmark/BCryptNet.BenchMarks.csproj
index 6a2425d..57aecc8 100644
--- a/benchmark/BCryptNet.BenchMarks.csproj
+++ b/benchmark/BCryptNet.BenchMarks.csproj
@@ -36,7 +36,7 @@
-
+
diff --git a/examples/ConsoleApp/ExampleConsoleApp/Program.cs b/examples/ConsoleApp/ExampleConsoleApp/Program.cs
index 664b8f6..b4023a9 100644
--- a/examples/ConsoleApp/ExampleConsoleApp/Program.cs
+++ b/examples/ConsoleApp/ExampleConsoleApp/Program.cs
@@ -1,4 +1,6 @@
-namespace ExampleConsoleApp;
+using System;
+
+namespace ExampleConsoleApp;
using BCryptNet;
diff --git a/src/BCrypt.Net/BCrypt.Net.csproj b/src/BCrypt.Net/BCrypt.Net.csproj
index 9e758e1..9eee218 100644
--- a/src/BCrypt.Net/BCrypt.Net.csproj
+++ b/src/BCrypt.Net/BCrypt.Net.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;netstandard2.1;net9.0
- netstandard2.0;netstandard2.1;net462;net6.0;net8.0;net9.0
+ netstandard2.0;netstandard2.1;net8.0
+ netstandard2.0;netstandard2.1;net462;net8.0
BCrypt.Net-Next
BCrypt.Net-Next
diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props
index ce212ec..ccced02 100644
--- a/tests/Directory.Build.props
+++ b/tests/Directory.Build.props
@@ -25,6 +25,6 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/tests/UnitTests/BCrypt.Net.UnitTests.csproj b/tests/UnitTests/BCrypt.Net.UnitTests.csproj
index 4a93412..f80933c 100644
--- a/tests/UnitTests/BCrypt.Net.UnitTests.csproj
+++ b/tests/UnitTests/BCrypt.Net.UnitTests.csproj
@@ -2,10 +2,14 @@
BCrypt.Net.UnitTests
BCryptNet.UnitTests
- net9.0
+ net9.0
Debug
default
+ true
+ Exe
+ true
+
Full
$(DefineConstants);WINDOWS
diff --git a/tests/UnitTests/BCryptTests.cs b/tests/UnitTests/BCryptTests.cs
index 18d1c86..301fc1f 100644
--- a/tests/UnitTests/BCryptTests.cs
+++ b/tests/UnitTests/BCryptTests.cs
@@ -22,6 +22,7 @@ IN THE SOFTWARE.
using System.Diagnostics.CodeAnalysis;
using System.Security.Cryptography;
using System.Text;
+using Xunit;
namespace BCryptNet.UnitTests
{
diff --git a/tests/UnitTests/BCryptTestsExtendedv3.cs b/tests/UnitTests/BCryptTestsExtendedv3.cs
index 3ad2d77..6b6c467 100644
--- a/tests/UnitTests/BCryptTestsExtendedv3.cs
+++ b/tests/UnitTests/BCryptTestsExtendedv3.cs
@@ -22,6 +22,7 @@ IN THE SOFTWARE.
using System.Diagnostics.CodeAnalysis;
using System.Security.Cryptography;
using System.Text;
+using Xunit;
namespace BCryptNet.UnitTests
{
diff --git a/tests/UnitTests/Base64Tests.cs b/tests/UnitTests/Base64Tests.cs
index fc8974e..b320d68 100644
--- a/tests/UnitTests/Base64Tests.cs
+++ b/tests/UnitTests/Base64Tests.cs
@@ -19,6 +19,7 @@
using System;
using System.Text;
+using Xunit;
namespace BCryptNet.UnitTests;