From e8397f46474a3cc5604683f98e050d8458a1b8fd Mon Sep 17 00:00:00 2001 From: reduckted Date: Tue, 25 Feb 2025 20:26:07 +1000 Subject: [PATCH 1/3] Improve use of SDK-style project. --- Directory.Build.props | 6 ++- source/ProjectFilter/ProjectFilter.csproj | 52 ++++--------------- .../source.extension.vsixmanifest | 2 +- .../ProjectFilter.UnitTests.csproj | 4 -- 4 files changed, 15 insertions(+), 49 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 583c636..005d343 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,11 @@ - 10 + 2.5.0 + net48 + enable + 10.0 + AllEnabledByDefault diff --git a/source/ProjectFilter/ProjectFilter.csproj b/source/ProjectFilter/ProjectFilter.csproj index 08d8d19..bdefbc0 100644 --- a/source/ProjectFilter/ProjectFilter.csproj +++ b/source/ProjectFilter/ProjectFilter.csproj @@ -1,18 +1,12 @@ - - - + - net48 - ProjectFilter - true - enable - 10.0 - AllEnabledByDefault + $(VsSDKInstall)\Microsoft.VsSDK.targets - 2.5.0 + ProjectFilter + true @@ -86,15 +80,15 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive compile; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -108,33 +102,8 @@ - - - Always - - - - - - source.extension.vsixmanifest - $(IntermediateOutputPath)$(VsixManifestOriginal).backup - - - - - - - - - - - + + @@ -144,7 +113,4 @@ - - - diff --git a/source/ProjectFilter/source.extension.vsixmanifest b/source/ProjectFilter/source.extension.vsixmanifest index e96854e..65cd890 100644 --- a/source/ProjectFilter/source.extension.vsixmanifest +++ b/source/ProjectFilter/source.extension.vsixmanifest @@ -1,7 +1,7 @@ - + Project Filter Quickly load and unload projects. https://github.com/reduckted/ProjectFilter diff --git a/tests/ProjectFilter.UnitTests/ProjectFilter.UnitTests.csproj b/tests/ProjectFilter.UnitTests/ProjectFilter.UnitTests.csproj index 67453f3..17f0a91 100644 --- a/tests/ProjectFilter.UnitTests/ProjectFilter.UnitTests.csproj +++ b/tests/ProjectFilter.UnitTests/ProjectFilter.UnitTests.csproj @@ -1,12 +1,8 @@ - net48 ProjectFilter false - enable - 10.0 - AllEnabledByDefault From 0049754a7df5c679004d21afeb8a2d275f86bf69 Mon Sep 17 00:00:00 2001 From: reduckted Date: Tue, 25 Feb 2025 20:28:36 +1000 Subject: [PATCH 2/3] Used .NET CLI to build and test. --- .github/workflows/ci.yml | 10 +++++----- ProjectFilter.sln | 1 + global.json | 5 +++++ .../ProjectFilter.UnitTests.csproj | 14 +++----------- 4 files changed, 14 insertions(+), 16 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f873c5..cf2067a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,13 +21,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.0.2 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 - name: Build - run: msbuild /t:Rebuild /Restore /v:Minimal + run: dotnet build - name: Test - run: msbuild tests/ProjectFilter.UnitTests /t:Test /v:Minimal + run: dotnet test tests/ProjectFilter.UnitTests diff --git a/ProjectFilter.sln b/ProjectFilter.sln index de65416..bf33df6 100644 --- a/ProjectFilter.sln +++ b/ProjectFilter.sln @@ -15,6 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".solution", ".solution", "{ .editorconfig = .editorconfig CHANGELOG.md = CHANGELOG.md Directory.Build.props = Directory.Build.props + global.json = global.json nuget.config = nuget.config README.md = README.md EndProjectSection diff --git a/global.json b/global.json new file mode 100644 index 0000000..4871c2a --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "9.0.200" + } +} \ No newline at end of file diff --git a/tests/ProjectFilter.UnitTests/ProjectFilter.UnitTests.csproj b/tests/ProjectFilter.UnitTests/ProjectFilter.UnitTests.csproj index 17f0a91..4ca9fc5 100644 --- a/tests/ProjectFilter.UnitTests/ProjectFilter.UnitTests.csproj +++ b/tests/ProjectFilter.UnitTests/ProjectFilter.UnitTests.csproj @@ -1,4 +1,4 @@ - + ProjectFilter @@ -6,8 +6,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -17,10 +17,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -36,8 +32,4 @@ - - - - From bdb2f1a6a00abccb0980021940e8eb38da585c0b Mon Sep 17 00:00:00 2001 From: reduckted Date: Tue, 25 Feb 2025 20:32:26 +1000 Subject: [PATCH 3/3] Removed CI for push triggers. --- .github/workflows/ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf2067a..007d58f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,6 @@ name: Continuous Integration on: - push: - branches: - - "**" - - tags-ignore: - - "**" - pull_request: types: [opened, synchronize, edited]