From 7a1ba24d0b96df0996f0fd84e57737c8cab81bf1 Mon Sep 17 00:00:00 2001 From: Timothy Small Date: Sat, 16 Mar 2024 15:02:56 -0400 Subject: [PATCH 1/5] Update Lib project directory - Rename directory to Lib - Update project file to target .NET 8 and restructure the properties. --- src/Lib/Lib.csproj | 24 +++++++++++++++++++ .../enums/ParsedNetAddressStringType.cs | 0 .../models/BinaryNumber.cs | 0 .../models/BitRepresentation.cs | 0 .../models/IPv4Subnet.cs | 0 .../models/IPv4SubnetMask.cs | 0 .../models/IPv4WildcardMask.cs | 0 .../models/Octet.cs | 0 .../models/ParsedNetAddressString.cs | 0 .../models/UsableHostRange.cs | 0 .../SmallsOnline.Subnetting.Lib.csproj | 18 -------------- 11 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 src/Lib/Lib.csproj rename src/{SmallsOnline.Subnetting.Lib => Lib}/enums/ParsedNetAddressStringType.cs (100%) rename src/{SmallsOnline.Subnetting.Lib => Lib}/models/BinaryNumber.cs (100%) rename src/{SmallsOnline.Subnetting.Lib => Lib}/models/BitRepresentation.cs (100%) rename src/{SmallsOnline.Subnetting.Lib => Lib}/models/IPv4Subnet.cs (100%) rename src/{SmallsOnline.Subnetting.Lib => Lib}/models/IPv4SubnetMask.cs (100%) rename src/{SmallsOnline.Subnetting.Lib => Lib}/models/IPv4WildcardMask.cs (100%) rename src/{SmallsOnline.Subnetting.Lib => Lib}/models/Octet.cs (100%) rename src/{SmallsOnline.Subnetting.Lib => Lib}/models/ParsedNetAddressString.cs (100%) rename src/{SmallsOnline.Subnetting.Lib => Lib}/models/UsableHostRange.cs (100%) delete mode 100644 src/SmallsOnline.Subnetting.Lib/SmallsOnline.Subnetting.Lib.csproj diff --git a/src/Lib/Lib.csproj b/src/Lib/Lib.csproj new file mode 100644 index 0000000..84bec04 --- /dev/null +++ b/src/Lib/Lib.csproj @@ -0,0 +1,24 @@ + + + + SmallsOnline.Subnetting.Lib + SmallsOnline.Subnetting.Lib + net8.0;netstandard2.0 + latest + enable + enable + true + + + + SmallsOnline.Subnetting.Lib + + A class library for running network subnet calculations. + + Tim Small + Smalls.Online + © 2024 Smalls.Online + https://github.com/Smalls1652/SmallsOnline.Subnetting + MIT + + \ No newline at end of file diff --git a/src/SmallsOnline.Subnetting.Lib/enums/ParsedNetAddressStringType.cs b/src/Lib/enums/ParsedNetAddressStringType.cs similarity index 100% rename from src/SmallsOnline.Subnetting.Lib/enums/ParsedNetAddressStringType.cs rename to src/Lib/enums/ParsedNetAddressStringType.cs diff --git a/src/SmallsOnline.Subnetting.Lib/models/BinaryNumber.cs b/src/Lib/models/BinaryNumber.cs similarity index 100% rename from src/SmallsOnline.Subnetting.Lib/models/BinaryNumber.cs rename to src/Lib/models/BinaryNumber.cs diff --git a/src/SmallsOnline.Subnetting.Lib/models/BitRepresentation.cs b/src/Lib/models/BitRepresentation.cs similarity index 100% rename from src/SmallsOnline.Subnetting.Lib/models/BitRepresentation.cs rename to src/Lib/models/BitRepresentation.cs diff --git a/src/SmallsOnline.Subnetting.Lib/models/IPv4Subnet.cs b/src/Lib/models/IPv4Subnet.cs similarity index 100% rename from src/SmallsOnline.Subnetting.Lib/models/IPv4Subnet.cs rename to src/Lib/models/IPv4Subnet.cs diff --git a/src/SmallsOnline.Subnetting.Lib/models/IPv4SubnetMask.cs b/src/Lib/models/IPv4SubnetMask.cs similarity index 100% rename from src/SmallsOnline.Subnetting.Lib/models/IPv4SubnetMask.cs rename to src/Lib/models/IPv4SubnetMask.cs diff --git a/src/SmallsOnline.Subnetting.Lib/models/IPv4WildcardMask.cs b/src/Lib/models/IPv4WildcardMask.cs similarity index 100% rename from src/SmallsOnline.Subnetting.Lib/models/IPv4WildcardMask.cs rename to src/Lib/models/IPv4WildcardMask.cs diff --git a/src/SmallsOnline.Subnetting.Lib/models/Octet.cs b/src/Lib/models/Octet.cs similarity index 100% rename from src/SmallsOnline.Subnetting.Lib/models/Octet.cs rename to src/Lib/models/Octet.cs diff --git a/src/SmallsOnline.Subnetting.Lib/models/ParsedNetAddressString.cs b/src/Lib/models/ParsedNetAddressString.cs similarity index 100% rename from src/SmallsOnline.Subnetting.Lib/models/ParsedNetAddressString.cs rename to src/Lib/models/ParsedNetAddressString.cs diff --git a/src/SmallsOnline.Subnetting.Lib/models/UsableHostRange.cs b/src/Lib/models/UsableHostRange.cs similarity index 100% rename from src/SmallsOnline.Subnetting.Lib/models/UsableHostRange.cs rename to src/Lib/models/UsableHostRange.cs diff --git a/src/SmallsOnline.Subnetting.Lib/SmallsOnline.Subnetting.Lib.csproj b/src/SmallsOnline.Subnetting.Lib/SmallsOnline.Subnetting.Lib.csproj deleted file mode 100644 index feddfed..0000000 --- a/src/SmallsOnline.Subnetting.Lib/SmallsOnline.Subnetting.Lib.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - net6.0;netstandard2.0 - 9.0 - SmallsOnline.Subnetting.Lib - Timothy Small - Smalls.Online - https://github.com/Smalls1652/SmallsOnline.Subnetting - 2021.10.00 - alpha-04 - - A class library for running network subnet calculations. - - true - - - \ No newline at end of file From 59bce97a817e596472c294f7b229844614f3f7fd Mon Sep 17 00:00:00 2001 From: Timothy Small Date: Sat, 16 Mar 2024 15:04:38 -0400 Subject: [PATCH 2/5] Recreate solution file --- ...ting.Lib.sln => SmallsOnline.Subnetting.sln | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename SmallsOnline.Subnetting.Lib.sln => SmallsOnline.Subnetting.sln (50%) diff --git a/SmallsOnline.Subnetting.Lib.sln b/SmallsOnline.Subnetting.sln similarity index 50% rename from SmallsOnline.Subnetting.Lib.sln rename to SmallsOnline.Subnetting.sln index c1476d1..39e1307 100644 --- a/SmallsOnline.Subnetting.Lib.sln +++ b/SmallsOnline.Subnetting.sln @@ -1,11 +1,11 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30114.105 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C264B21B-0D93-4511-8455-C01EA1F64D96}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{41EE1CE9-D967-4AEF-AD16-6EFE39FBE6E4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmallsOnline.Subnetting.Lib", "src\SmallsOnline.Subnetting.Lib\SmallsOnline.Subnetting.Lib.csproj", "{CB83EAFE-E298-4244-BB58-F645C6004D27}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lib", "src\Lib\Lib.csproj", "{4C0FD7A2-96CD-4BF3-BFE6-FB7CED132DBF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -16,12 +16,12 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CB83EAFE-E298-4244-BB58-F645C6004D27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB83EAFE-E298-4244-BB58-F645C6004D27}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB83EAFE-E298-4244-BB58-F645C6004D27}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB83EAFE-E298-4244-BB58-F645C6004D27}.Release|Any CPU.Build.0 = Release|Any CPU + {4C0FD7A2-96CD-4BF3-BFE6-FB7CED132DBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4C0FD7A2-96CD-4BF3-BFE6-FB7CED132DBF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4C0FD7A2-96CD-4BF3-BFE6-FB7CED132DBF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4C0FD7A2-96CD-4BF3-BFE6-FB7CED132DBF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution - {CB83EAFE-E298-4244-BB58-F645C6004D27} = {C264B21B-0D93-4511-8455-C01EA1F64D96} + {4C0FD7A2-96CD-4BF3-BFE6-FB7CED132DBF} = {41EE1CE9-D967-4AEF-AD16-6EFE39FBE6E4} EndGlobalSection EndGlobal From dd06c841fb187e9c06d47cae49a730148ba81dac Mon Sep 17 00:00:00 2001 From: Timothy Small Date: Sat, 16 Mar 2024 15:05:10 -0400 Subject: [PATCH 3/5] Re-initialize workspace --- .config/dotnet-tools.json | 12 ++ .gitignore | 60 +++++--- .vscode/settings.json | 10 ++ .vscode/tasks.json | 289 +++++++++++++++++++++++++++++++++++--- Directory.Build.props | 8 ++ GitVersion.yml | 8 ++ global.json | 6 + nuget.config | 8 ++ 8 files changed, 363 insertions(+), 38 deletions(-) create mode 100644 .config/dotnet-tools.json create mode 100644 .vscode/settings.json create mode 100644 Directory.Build.props create mode 100644 GitVersion.yml create mode 100644 global.json create mode 100644 nuget.config diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..95adf14 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "gitversion.tool": { + "version": "5.12.0", + "commands": [ + "dotnet-gitversion" + ] + } + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2ffe6c0..104b544 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,10 @@ -[Bb]uild/ - ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +## Get latest from `dotnet new gitignore` + +# dotenv files +.env # User-specific files *.rsuser @@ -59,7 +60,7 @@ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ -# .NET Core +# .NET project.lock.json project.fragment.lock.json artifacts/ @@ -95,6 +96,7 @@ StyleCopReport.xml *.tmp_proj *_wpftmp.csproj *.log +*.tlog *.vspscc *.vssscc .builds @@ -298,6 +300,17 @@ node_modules/ # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts @@ -354,6 +367,9 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ +# Visual Studio History (VSHistory) files +.vshistory/ + # BeatPulse healthcheck temp database healthchecksdb @@ -366,6 +382,28 @@ MigrationBackup/ # Fody - auto-generated XML schema FodyWeavers.xsd +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea + ## ## Visual studio for Mac ## @@ -442,15 +480,5 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk -# JetBrains Rider -.idea/ -*.sln.iml - -## -## Visual Studio Code -## -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json +# Vim temporary swap files +*.swp diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..0a2298a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "debug.internalConsoleOptions": "neverOpen", + "git.detectSubmodules": false, + "dotnet.defaultSolution": "SmallsOnline.Subnetting.sln", + "dotnet.server.useOmnisharp": true, + "dotnet.server.path": "latest", + "task.quickOpen.history": 0, + "task.autoDetect": "off", + "powershell.startAutomatically": false +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 25edde3..7d0bf26 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,24 +1,269 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "build: SmallsOnline.Subnetting.Lib", - "detail": "Build the SmallsOnline.Subnetting.Lib class library.", - "command": "dotnet", - "type": "shell", - "args": [ - "build", - "./SmallsOnline.Subnetting.Lib.sln", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "group": "build", - "presentation": { - "reveal": "silent" - }, - "problemMatcher": "$msCompile" +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Watch", + "detail": "Run an app for local debugging and watch for changes.", + "icon": { + "id": "eye-watch", + "color": "terminal.ansiCyan" + }, + "type": "process", + "command": "dotnet", + "args": [ + "watch", + "--", + "run", + "/consoleloggerparameters:NoSummary" + ], + "options": { + "cwd": "${workspaceFolder}/${input:watchProject}", + "env": { + "DOTNET_ENVIRONMENT": "Development" } - ] + }, + "runOptions": { + "instanceLimit": 2 + }, + "presentation": { + "echo": false, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": true + }, + "isBackground": true, + "problemMatcher": [ + { + "base": "$msCompile", + "background": { + "activeOnStart": true, + "beginsPattern": "^info: Microsoft.\\Hosting\\.Lifetime", + "endsPattern": "^\\s*Application started\\..+?$" + } + } + ] + }, + { + "label": "Run", + "detail": "Run an app locally.", + "icon": { + "id": "play", + "color": "terminal.ansiCyan" + }, + "type": "process", + "command": "dotnet", + "args": [ + "run", + "/consoleloggerparameters:NoSummary" + ], + "options": { + "cwd": "${workspaceFolder}/${input:runProject}", + "env": { + "DOTNET_ENVIRONMENT": "Development" + } + }, + "runOptions": { + "instanceLimit": 2 + }, + "presentation": { + "echo": false, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": true + }, + "isBackground": true, + "problemMatcher": [ + { + "base": "$msCompile", + "background": { + "activeOnStart": true, + "beginsPattern": "^info: Microsoft.\\Hosting\\.Lifetime", + "endsPattern": "^\\s*Application started\\..+?$" + } + } + ] + }, + { + "label": "Build project", + "detail": "Build a project.", + "icon": { + "id": "tools", + "color": "terminal.ansiYellow" + }, + "type": "process", + "command": "dotnet", + "args": [ + "build", + "${workspaceFolder}/${input:projectItem}", + "--configuration", + "${input:dotnetConfiguration}" + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": "$msCompile" + }, + { + "label": "Clean project", + "detail": "Clean a project.", + "icon": { + "id": "trashcan", + "color": "terminal.ansiBlack" + }, + "type": "process", + "command": "dotnet", + "args": [ + "clean", + "${workspaceFolder}/${input:projectItem}", + "--configuration", + "${input:dotnetConfiguration}" + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": "$msCompile" + }, + { + "label": "Compile project (Native AOT)", + "detail": "Compile a project with Native AOT.", + "icon": { + "id": "package", + "color": "terminal.ansiRed" + }, + "type": "process", + "command": "dotnet", + "args": [ + "publish", + "${workspaceFolder}/${input:nativeAotCompileProject}", + "--configuration", + "Release", + "--runtime", + "${input:runtimeIdentifier}" + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": "$msCompile", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } + }, + { + "label": "Restore project", + "detail": "Restore a project.", + "icon": { + "id": "sync", + "color": "terminal.ansiBlue" + }, + "type": "process", + "command": "dotnet", + "args": [ + "restore", + "${workspaceFolder}/${input:projectItem}" + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": "$msCompile" + } + ], + "inputs": [ + { + "id": "dotnetConfiguration", + "description": "Select a configuration for compilation.", + "type": "pickString", + "default": "Debug", + "options": [ + { + "label": "Debug", + "value": "Debug" + }, + { + "label": "Release", + "value": "Release" + } + ] + }, + { + "id": "projectItem", + "description": "Select a project.", + "type": "pickString", + "default": "SmallsOnline.Subnetting.sln", + "options": [ + { + "label": "Entire solution", + "value": "SmallsOnline.Subnetting.sln" + }, + { + "label": "Lib", + "value": "src/Lib/" + } + ] + }, + { + "id": "containerPlatformArch", + "description": "Select a platform architecture for the container.", + "type": "pickString", + "default": "linux/arm64", + "options": [ + "linux/amd64", + "linux/arm64" + ] + }, + { + "id": "runtimeIdentifier", + "description": "Select a runtime identifier for the build.", + "type": "pickString", + "default": "osx-arm64", + "options": [ + { + "label": "macOS (arm64)", + "value": "osx-arm64" + }, + { + "label": "macOS (x64)", + "value": "osx-x64" + }, + { + "label": "Linux (arm64)", + "value": "linux-arm64" + }, + { + "label": "Linux (x64)", + "value": "linux-x64" + }, + { + "label": "Windows (x64)", + "value": "win-x64" + }, + { + "label": "Windows (x86)", + "value": "win-x86" + } + ] + }, + { + "id": "watchProject", + "description": "Select a project to run 'dotnet watch' on.", + "type": "pickString", + "default": "", + "options": [] + }, + { + "id": "runProject", + "description": "Select a project to run 'dotnet run' on.", + "type": "pickString", + "default": "", + "options": [] + } + ] } \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..a88390e --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,8 @@ + + + + + $(MSBuildThisFileDirectory)artifacts + + + diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000..b672dda --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,8 @@ +assembly-versioning-scheme: MajorMinorPatchTag +mode: ContinuousDeployment +increment: Inherit +continuous-delivery-fallback-tag: 'preview' +branches: {} +ignore: + sha: [] +merge-message-formats: {} \ No newline at end of file diff --git a/global.json b/global.json new file mode 100644 index 0000000..afce8bd --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "rollForward": "latestMinor", + "version": "8.0.202" + } +} \ No newline at end of file diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..6ce9759 --- /dev/null +++ b/nuget.config @@ -0,0 +1,8 @@ + + + + + + + + From e4a3b9c7c8cf8cb4c7811611b44aebd184cced7c Mon Sep 17 00:00:00 2001 From: Timothy Small Date: Sat, 16 Mar 2024 15:07:07 -0400 Subject: [PATCH 4/5] Update build workflow --- .github/workflows/build.yml | 39 ++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab9f8f1..2d9a889 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,26 +1,39 @@ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow name: Build on: - - push - - pull_request - - workflow_dispatch + push: + branches: + - "main" + paths-ignore: + - "README.md" + pull_request: + workflow_dispatch: + jobs: - build-classlib: - name: Build class library + build: + name: Build runs-on: ubuntu-latest strategy: matrix: - framework: [ 'net6.0', 'netstandard2.0' ] + project: [ + "./src/Lib" + ] + target-framwork: [ + "net8.0", + "netstandard2.0", + ] env: DOTNET_NOLOGO: true steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 + with: + submodules: true + - name: Setup dotnet SDK - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: - dotnet-version: '6.0.x' - - name: Run 'dotnet restore' - run: dotnet restore "SmallsOnline.Subnetting.Lib.sln" - - name: Run 'dotnet publish' - run: dotnet publish "SmallsOnline.Subnetting.Lib.sln" --framework ${{ matrix.framework }} \ No newline at end of file + global-json-file: global.json + + - name: Run 'dotnet build' + run: dotnet build ${{ matrix.project }} --configuration Release --framework ${{ matrix.target-framwork }} \ No newline at end of file From 135e1243caf6dd24c6225eaf9b768e44a02ed22c Mon Sep 17 00:00:00 2001 From: Timothy Small Date: Sat, 16 Mar 2024 15:11:54 -0400 Subject: [PATCH 5/5] Add prompting for target framework for tasks --- .vscode/tasks.json | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7d0bf26..8d6d095 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,4 +1,4 @@ -{ +{ "version": "2.0.0", "tasks": [ { @@ -12,6 +12,8 @@ "command": "dotnet", "args": [ "watch", + "--framework", + "${input:targetFramework}", "--", "run", "/consoleloggerparameters:NoSummary" @@ -56,7 +58,9 @@ "command": "dotnet", "args": [ "run", - "/consoleloggerparameters:NoSummary" + "/consoleloggerparameters:NoSummary", + "--framework", + "${input:targetFramework}" ], "options": { "cwd": "${workspaceFolder}/${input:runProject}", @@ -100,7 +104,9 @@ "build", "${workspaceFolder}/${input:projectItem}", "--configuration", - "${input:dotnetConfiguration}" + "${input:dotnetConfiguration}", + "--framework", + "${input:targetFramework}" ], "options": { "cwd": "${workspaceFolder}" @@ -120,7 +126,9 @@ "clean", "${workspaceFolder}/${input:projectItem}", "--configuration", - "${input:dotnetConfiguration}" + "${input:dotnetConfiguration}", + "--framework", + "${input:targetFramework}" ], "options": { "cwd": "${workspaceFolder}" @@ -251,6 +259,22 @@ } ] }, + { + "id": "targetFramework", + "description": "Select a target framework for the build.", + "type": "pickString", + "default": "net8.0", + "options": [ + { + "label": "net8.0", + "value": "net8.0" + }, + { + "label": "netstandard2.0", + "value": "netstandard2.0" + } + ] + }, { "id": "watchProject", "description": "Select a project to run 'dotnet watch' on.",