From e6cf6c3078a609c360afa33c4521627b485095f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20St=C3=BChmer?= Date: Mon, 18 Nov 2024 17:57:09 +0100 Subject: [PATCH 1/2] feat!: Created Project `NetEvolve.Defaults` --- Defaults.sln | 22 +++++++++++ Directory.Build.props | 1 + Directory.Packages.props | 29 ++++++++++----- README.md | 12 +++++- .../NetEvolve.Defaults.csproj | 19 ++++++++++ .../build/NetEvolve.Defaults.props | 10 +++++ .../build/NetEvolve.Defaults.targets | 2 + .../NetEvolve.Defaults.props | 3 ++ .../NetEvolve.Defaults.targets | 3 ++ .../buildTransitive/NetEvolve.Defaults.props | 3 ++ .../NetEvolve.Defaults.targets | 3 ++ ...etEvolve.Defaults.Tests.Integration.csproj | 37 +++++++++++++++++++ 12 files changed, 132 insertions(+), 12 deletions(-) create mode 100644 src/NetEvolve.Defaults/NetEvolve.Defaults.csproj create mode 100644 src/NetEvolve.Defaults/build/NetEvolve.Defaults.props create mode 100644 src/NetEvolve.Defaults/build/NetEvolve.Defaults.targets create mode 100644 src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.props create mode 100644 src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.targets create mode 100644 src/NetEvolve.Defaults/buildTransitive/NetEvolve.Defaults.props create mode 100644 src/NetEvolve.Defaults/buildTransitive/NetEvolve.Defaults.targets create mode 100644 tests/NetEvolve.Defaults.Tests.Integration/NetEvolve.Defaults.Tests.Integration.csproj diff --git a/Defaults.sln b/Defaults.sln index fad5b5b..0567d56 100644 --- a/Defaults.sln +++ b/Defaults.sln @@ -23,6 +23,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution update-solution.ps1 = update-solution.ps1 EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4AD0D117-4F9D-4288-B0F9-D8C1C120B5E4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetEvolve.Defaults", "src\NetEvolve.Defaults\NetEvolve.Defaults.csproj", "{C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DB9397A5-7522-4CF5-B402-E4FFC93E600B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetEvolve.Defaults.Tests.Integration", "tests\NetEvolve.Defaults.Tests.Integration\NetEvolve.Defaults.Tests.Integration.csproj", "{7A7B8583-0494-496B-A63F-C0134194D633}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -31,4 +39,18 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}.Release|Any CPU.Build.0 = Release|Any CPU + {7A7B8583-0494-496B-A63F-C0134194D633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A7B8583-0494-496B-A63F-C0134194D633}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A7B8583-0494-496B-A63F-C0134194D633}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A7B8583-0494-496B-A63F-C0134194D633}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE} = {4AD0D117-4F9D-4288-B0F9-D8C1C120B5E4} + {7A7B8583-0494-496B-A63F-C0134194D633} = {DB9397A5-7522-4CF5-B402-E4FFC93E600B} + EndGlobalSection EndGlobal diff --git a/Directory.Build.props b/Directory.Build.props index 0d921eb..4087bf1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,6 +14,7 @@ Source Only package, which provides the standard configurations and settings for the NetEvolve projects. Such as `.editorconfig`, build props and targets. https://github.com/dailydevops/defaults.git https://github.com/dailydevops/defaults + $(PackageProjectUrl)/releases editorconfig;configuration;settings;props;targets 2024 diff --git a/Directory.Packages.props b/Directory.Packages.props index a20cd40..6cff745 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,18 +1,27 @@ - true true - - - - - - - - + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + - diff --git a/README.md b/README.md index 0e844c8..f15d558 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ -# template-dotnet -.NET template for repositories +# NetEvolve.Defaults + +This is the NetEvolve.Defaults package, which provides the standard configurations and settings for the NetEvolve projects. Such as `.editorconfig`, build props and targets. +All of our projects are build on top of this package, so we can have a consistent build process and settings across all of our projects. + +## Installation +To install this package, you can use the following command: +```bash +dotnet add package NetEvolve.Defaults +``` \ No newline at end of file diff --git a/src/NetEvolve.Defaults/NetEvolve.Defaults.csproj b/src/NetEvolve.Defaults/NetEvolve.Defaults.csproj new file mode 100644 index 0000000..d156f4d --- /dev/null +++ b/src/NetEvolve.Defaults/NetEvolve.Defaults.csproj @@ -0,0 +1,19 @@ + + + + $(NetEvolve_ProjectTargetFrameworks) + + false + true + snupkg + false + $(NoWarn);NU5128; + + + + + + + + + diff --git a/src/NetEvolve.Defaults/build/NetEvolve.Defaults.props b/src/NetEvolve.Defaults/build/NetEvolve.Defaults.props new file mode 100644 index 0000000..eebb049 --- /dev/null +++ b/src/NetEvolve.Defaults/build/NetEvolve.Defaults.props @@ -0,0 +1,10 @@ + + + + true + all + low + (WarningsAsErrors);NU1900;NU1901;NU1902;NU1903;NU1904 + + + diff --git a/src/NetEvolve.Defaults/build/NetEvolve.Defaults.targets b/src/NetEvolve.Defaults/build/NetEvolve.Defaults.targets new file mode 100644 index 0000000..8c119d5 --- /dev/null +++ b/src/NetEvolve.Defaults/build/NetEvolve.Defaults.targets @@ -0,0 +1,2 @@ + + diff --git a/src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.props b/src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.props new file mode 100644 index 0000000..50c310d --- /dev/null +++ b/src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.props @@ -0,0 +1,3 @@ + + + diff --git a/src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.targets b/src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.targets new file mode 100644 index 0000000..2c805f5 --- /dev/null +++ b/src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.targets @@ -0,0 +1,3 @@ + + + diff --git a/src/NetEvolve.Defaults/buildTransitive/NetEvolve.Defaults.props b/src/NetEvolve.Defaults/buildTransitive/NetEvolve.Defaults.props new file mode 100644 index 0000000..50c310d --- /dev/null +++ b/src/NetEvolve.Defaults/buildTransitive/NetEvolve.Defaults.props @@ -0,0 +1,3 @@ + + + diff --git a/src/NetEvolve.Defaults/buildTransitive/NetEvolve.Defaults.targets b/src/NetEvolve.Defaults/buildTransitive/NetEvolve.Defaults.targets new file mode 100644 index 0000000..2c805f5 --- /dev/null +++ b/src/NetEvolve.Defaults/buildTransitive/NetEvolve.Defaults.targets @@ -0,0 +1,3 @@ + + + diff --git a/tests/NetEvolve.Defaults.Tests.Integration/NetEvolve.Defaults.Tests.Integration.csproj b/tests/NetEvolve.Defaults.Tests.Integration/NetEvolve.Defaults.Tests.Integration.csproj new file mode 100644 index 0000000..583d255 --- /dev/null +++ b/tests/NetEvolve.Defaults.Tests.Integration/NetEvolve.Defaults.Tests.Integration.csproj @@ -0,0 +1,37 @@ + + + + $(NetEvolve_TestTargetFrameworks) + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + From 2071af2b5fbce86328600460f59c8837af56ab63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20St=C3=BChmer?= Date: Mon, 18 Nov 2024 18:01:21 +0100 Subject: [PATCH 2/2] chore: Enabled publish, disabled codeql --- .github/workflows/cicd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 2c298a5..2f576b1 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -24,8 +24,9 @@ jobs: name: Build & Tests uses: dailydevops/pipelines/.github/workflows/cicd-dotnet.yml@0.12.34 with: - disablePublish: true dotnet-logging: ${{ inputs.dotnet-logging }} dotnet-version: ${{ vars.NE_DOTNET_TARGETFRAMEWORKS }} + enableSonarQube: true + disableCodeQL: true solution: ./Defaults.sln secrets: inherit