build: add more projects for sdks
Some checks failed
dotnet publish / package (8.0) (push) Failing after 29s

Add projects for creating new sdk based msbuild projects.
This commit is contained in:
Louis Seubert 2024-03-20 22:57:57 +01:00
parent 2fec5e69e3
commit 8fe75c8876
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
32 changed files with 822 additions and 242 deletions

View file

@ -16,7 +16,11 @@ indent_style = space
indent_size = 2
indent_style = space
[*.{cs,vb}]
[nuget.config]
indent_size = 2
indent_style = space
[*.{cs,vb}] #### .NET Coding Conventions ####
# Organize usings
dotnet_separate_import_directive_groups = true
@ -68,13 +72,12 @@ dotnet_code_quality_unused_parameters = all:suggestion
# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none
[*.cs]
#### C# Coding Conventions ####
[*.cs] #### C# Coding Conventions ####
# var preferences
csharp_style_var_elsewhere = false:silent
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = false:silent
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# Expression-bodied members
csharp_style_expression_bodied_accessors = true:silent
@ -118,7 +121,10 @@ csharp_style_unused_value_expression_statement_preference = discard_variable:sil
# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:silent
#### C# Formatting Rules ####
# 'namespace' preferences
csharp_style_namespace_declarations = file_scoped:warning
[*.cs] #### C# Formatting Rules ####
# New line preferences
csharp_new_line_before_catch = true
@ -165,164 +171,191 @@ csharp_space_between_square_brackets = false
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
#### Naming styles ####
[*.{cs,vb}]
# Naming rules
[*.{cs,vb}] #### .NET Naming styles ####
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types_and_namespaces.required_modifiers =
dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion
dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces
dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase
dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion
dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters
dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase
dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods
dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties
dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.events_should_be_pascalcase.symbols = events
dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion
dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables
dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase
dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion
dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants
dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase
dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion
dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters
dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase
dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields
dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion
dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields
dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
# Symbol specifications
dotnet_naming_symbols.interfaces.applicable_kinds = interface
dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interfaces.required_modifiers =
dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.enums.applicable_kinds = enum
dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.enums.required_modifiers =
dotnet_naming_symbols.events.applicable_kinds = event
dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.events.required_modifiers =
dotnet_naming_symbols.methods.applicable_kinds = method
dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.methods.required_modifiers =
dotnet_naming_symbols.properties.applicable_kinds = property
dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.properties.required_modifiers =
dotnet_naming_symbols.public_fields.applicable_kinds = field
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_fields.required_modifiers =
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_fields.required_modifiers =
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_static_fields.required_modifiers = static
dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types_and_namespaces.required_modifiers =
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion
dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters
dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase
dotnet_naming_symbols.type_parameters.applicable_kinds = namespace
dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
dotnet_naming_symbols.type_parameters.required_modifiers =
dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_constant_fields.required_modifiers = const
dotnet_naming_symbols.local_variables.applicable_kinds = local
dotnet_naming_symbols.local_variables.applicable_accessibilities = local
dotnet_naming_symbols.local_variables.required_modifiers =
dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods
dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.local_constants.applicable_kinds = local
dotnet_naming_symbols.local_constants.applicable_accessibilities = local
dotnet_naming_symbols.local_constants.required_modifiers = const
dotnet_naming_symbols.methods.applicable_kinds = method
dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.methods.required_modifiers =
dotnet_naming_rule.async_methods_end_in_async.severity = suggestion
dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods
dotnet_naming_rule.async_methods_end_in_async.style = end_in_async
dotnet_naming_symbols.any_async_methods.applicable_kinds = method
dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
dotnet_naming_symbols.any_async_methods.required_modifiers = async
dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion
dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters
dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase
dotnet_naming_symbols.parameters.applicable_kinds = parameter
dotnet_naming_symbols.parameters.applicable_accessibilities = *
dotnet_naming_symbols.parameters.required_modifiers =
dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_constant_fields.required_modifiers = const
dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static
dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties
dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.properties.applicable_kinds = property
dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.properties.required_modifiers =
dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.events_should_be_pascalcase.symbols = events
dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.events.applicable_kinds = event
dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.events.required_modifiers =
# local
dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion
dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables
dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase
dotnet_naming_symbols.local_variables.applicable_kinds = local
dotnet_naming_symbols.local_variables.applicable_accessibilities = local
dotnet_naming_symbols.local_variables.required_modifiers =
dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
dotnet_naming_symbols.local_functions.applicable_accessibilities = *
dotnet_naming_symbols.local_functions.required_modifiers =
dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion
dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants
dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase
dotnet_naming_symbols.local_constants.applicable_kinds = local
dotnet_naming_symbols.local_constants.applicable_accessibilities = local
dotnet_naming_symbols.local_constants.required_modifiers = const
# private
dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion
dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields
dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_fields.required_modifiers =
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_static_fields.required_modifiers = static
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
dotnet_naming_symbols.local_functions.applicable_accessibilities = *
dotnet_naming_symbols.local_functions.required_modifiers =
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_constant_fields.required_modifiers = const
# public
dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields
dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.public_fields.applicable_kinds = field
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_fields.required_modifiers =
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_constant_fields.required_modifiers = const
# others
dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
# Naming styles
@ -355,3 +388,56 @@ dotnet_naming_style.s_camelcase.required_prefix = s_
dotnet_naming_style.s_camelcase.required_suffix =
dotnet_naming_style.s_camelcase.word_separator =
dotnet_naming_style.s_camelcase.capitalization = camel_case
dotnet_naming_style.end_in_async.required_prefix =
dotnet_naming_style.end_in_async.required_suffix = Async
dotnet_naming_style.end_in_async.capitalization = pascal_case
dotnet_naming_style.end_in_async.word_separator =
[*.{cs.vb}]
dotnet_diagnostic.IDE0055.severity = error
# IDE0051: Remove unused private member
dotnet_diagnostic.IDE0051.severity = error
# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = error
# IDE0064: Make struct fields writable
dotnet_diagnostic.IDE0064.severity = error
dotnet_analyzer_diagnostic.severity = error
# CS1591: Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = suggestion
# CA1018: Mark attributes with AttributeUsageAttribute
dotnet_diagnostic.CA1018.severity = error
# CA1304: Specify CultureInfo
dotnet_diagnostic.CA1304.severity = warning
# CA1802: Use literals where appropriate
dotnet_diagnostic.CA1802.severity = warning
# CA1813: Avoid unsealed attributes
dotnet_diagnostic.CA1813.severity = error
# CA1815: Override equals and operator equals on value types
dotnet_diagnostic.CA1815.severity = warning
# CA1820: Test for empty strings using string length
dotnet_diagnostic.CA1820.severity = warning
# CA1821: Remove empty finalizers
dotnet_diagnostic.CA1821.severity = warning
# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = suggestion
# CA1823: Avoid unused private fields
dotnet_diagnostic.CA1823.severity = warning
dotnet_code_quality.CA1822.api_surface = private, internal
# CA1825: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = warning
# CA1826: Use property instead of Linq Enumerable method
dotnet_diagnostic.CA1826.severity = suggestion
# CA1827: Do not use Count/LongCount when Any can be used
dotnet_diagnostic.CA1827.severity = warning
# CA1828: Do not use CountAsync/LongCountAsync when AnyAsync can be used
dotnet_diagnostic.CA1828.severity = warning
# CA1829: Use Length/Count property instead of Enumerable.Count method
dotnet_diagnostic.CA1829.severity = warning
#CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
dotnet_diagnostic.CA1847.severity = warning
#CA1854: Prefer the IDictionary.TryGetValue(TKey, out TValue) method
dotnet_diagnostic.CA1854.severity = warning
#CA2211:Non-constant fields should not be visible
dotnet_diagnostic.CA2211.severity = error

View file

@ -0,0 +1,33 @@
name: dotnet publish
on:
push:
tags: [ '[0-9]+.[0-9]+.[0-9]+' ]
branches: [ 'main', 'develop' ]
jobs:
package:
runs-on: debian-latest
strategy:
matrix:
dotnet-version: [ '8.0' ]
container: mcr.microsoft.com/dotnet/sdk:${{ matrix.dotnet-version }}
steps:
- uses: https://git.geekeey.de/actions/checkout@1
- name: NuGet login
shell: bash
run: |
dotnet nuget update source geekeey --store-password-in-clear-text \
--username "${{ github.actor }}" --password "${{ github.token }}"
- name: .NET pack
shell: bash
run: |
dotnet pack --version-suffix "${{ github.ref_name }}"
- name: .NET test
shell: bash
run: |
dotnet test
- name: NuGet publish
if: ${{ github.ref_type == 'tag' }}
shell: bash
run: |
dotnet nuget push artifacts/package/release/shipping/*.nupkg

View file

@ -1,21 +0,0 @@
name: dotnet publish
on:
push:
tags: [ '[0-9]+.[0-9]+.[0-9]+' ]
jobs:
package:
runs-on: debian-latest
strategy:
matrix:
dotnet-version: [ '8.0' ]
container: mcr.microsoft.com/dotnet/sdk:${{ matrix.dotnet-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '3.1.x'
- shell: bash
run: |
dotnet
dotnet sdk check

View file

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<UseArtifactsOutput>true</UseArtifactsOutput>
</PropertyGroup>
<PropertyGroup>
<PackageId>Geekeey.$(MSBuildProjectName)</PackageId>
<AssemblyName>Geekeey.$(MSBuildProjectName)</AssemblyName>
<RootNamespace>Geekeey.$(MSBuildProjectName)</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ImportGroup>
<Import Project=".\src\Geekeey.DotNet.Sdk\sdk\Sdk.props" />
<Import Project=".\src\Geekeey.DotNet.Sdk.Tasks\sdk\Sdk.props" Condition="'$(IsBuildTaskProject)' == 'true'" />
</ImportGroup>
</Project>

View file

@ -1,3 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ImportGroup>
<Import Project=".\src\Geekeey.DotNet.Sdk\sdk\Sdk.targets" />
<Import Project=".\src\Geekeey.DotNet.Sdk.Tasks\sdk\Sdk.targets" Condition="'$(IsBuildTaskProject)' == 'true'" />
</ImportGroup>
</Project>

View file

@ -3,8 +3,8 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageVersion Include="NUnit" Version="3.14.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />

37
Geekeey.DotNet.Build.sln Normal file
View file

@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Geekeey.DotNet.Sdk", "Geekeey.DotNet.Sdk", "{05D09A24-8E73-4CB2-882D-0212A24481E3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Geekeey.DotNet.Sdk", "src\Geekeey.DotNet.Sdk\Geekeey.DotNet.Sdk.csproj", "{1C6DD900-827D-4EC9-8487-E1EAE889DDB4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Geekeey.DotNet.Sdk.Tasks", "src\Geekeey.DotNet.Sdk.Tasks\Geekeey.DotNet.Sdk.Tasks.csproj", "{7C640477-2669-4B08-A2A8-D85F1AA73E3B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1C6DD900-827D-4EC9-8487-E1EAE889DDB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C6DD900-827D-4EC9-8487-E1EAE889DDB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C6DD900-827D-4EC9-8487-E1EAE889DDB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C6DD900-827D-4EC9-8487-E1EAE889DDB4}.Release|Any CPU.Build.0 = Release|Any CPU
{7C640477-2669-4B08-A2A8-D85F1AA73E3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C640477-2669-4B08-A2A8-D85F1AA73E3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C640477-2669-4B08-A2A8-D85F1AA73E3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C640477-2669-4B08-A2A8-D85F1AA73E3B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{1C6DD900-827D-4EC9-8487-E1EAE889DDB4} = {05D09A24-8E73-4CB2-882D-0212A24481E3}
{7C640477-2669-4B08-A2A8-D85F1AA73E3B} = {05D09A24-8E73-4CB2-882D-0212A24481E3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8EA8831A-E957-4B4A-9EE3-F9A9746ED37E}
EndGlobalSection
EndGlobal

View file

@ -1,30 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templating", "templating", "{05D09A24-8E73-4CB2-882D-0212A24481E3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geekeey.DotNet.Common.ProjectTemplates", "templating\Geekeey.DotNet.Common.ProjectTemplates\Geekeey.DotNet.Common.ProjectTemplates.csproj", "{9FEDD1F6-3694-42F4-8472-E0161201DF9A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9FEDD1F6-3694-42F4-8472-E0161201DF9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9FEDD1F6-3694-42F4-8472-E0161201DF9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FEDD1F6-3694-42F4-8472-E0161201DF9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FEDD1F6-3694-42F4-8472-E0161201DF9A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9FEDD1F6-3694-42F4-8472-E0161201DF9A} = {05D09A24-8E73-4CB2-882D-0212A24481E3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8EA8831A-E957-4B4A-9EE3-F9A9746ED37E}
EndGlobalSection
EndGlobal

77
doc/CONTRIBUTING.md Normal file
View file

@ -0,0 +1,77 @@
## <a name="commit"></a> Commit Message Guidelines
We have very precise rules over how our git commit messages can be formatted. This leads to **more
readable messages** that are easy to follow when looking through the **project history**. But also,
we use the git commit messages to **generate the Angular change log**.
### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:
```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The **header** is mandatory and the **scope** of the header is optional.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on your git web ui as well as in various git tools.
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
Samples:
```
docs(changelog): update changelog to beta.5
```
```
fix(release): need to depend on latest version of deps
The version we use in our project gets copied to the one we publish, and users need the latest of these.
```
### Revert
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of
the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is
the SHA of the commit being reverted.
### Type
Must be one of the following:
* **build**: Changes that affect the build system or external dependencies (example scopes: msbuild, npm)
* **ci**: Changes to our CI configuration files and scripts
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **test**: Adding missing tests or correcting existing tests
### Scope
The scope should be the name of the package affected as perceived by the person reading the changelog
generated from commit messages.
### Subject
The subject contains a succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize the first letter
* no dot (.) at the end
### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
The rest of the commit message is then used for this.

19
nuget.config Normal file
View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="defaultPushSource" value="geekeey" />
</config>
<packageSources>
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="geekeey" value="https://git.geekeey.de/api/packages/geekeey/nuget/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget">
<package pattern="*" />
</packageSource>
<packageSource key="geekeey">
<package pattern="Geekeey.*" />
</packageSource>
</packageSourceMapping>
</configuration>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsShipping>true</IsShipping>
</PropertyGroup>
<PropertyGroup>
<IsBuildTaskProject>true</IsBuildTaskProject>
</PropertyGroup>
</Project>

View file

@ -0,0 +1 @@
# Geekeey.DotNet.Sdk.Tasks

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
</Project>

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IsPackable>true</IsPackable>
<!-- Build Tasks should not include any dependencies -->
<SuppressDependenciesWhenPacking Condition="'$(SuppressDependenciesWhenPacking)' == ''">true</SuppressDependenciesWhenPacking>
<!-- Build Tasks should have an assembly version set -->
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<BuildTaskTargetFolder Condition="'$(BuildTaskTargetFolder)' == ''">tools</BuildTaskTargetFolder>
<PackTasks Condition="'$(PackTasks)' == ''">true</PackTasks>
</PropertyGroup>
<!--
Default to including all *.props and *.targets files
from the project directory into the NuGet package root
-->
<ItemGroup Condition="'$(EnableDefaultItems)' != 'false'">
<None Condition="'$(EnableDefaultNoneItems)' != 'false'"
Include="**/*.props;**/*.targets"
Pack="true"
PackagePath="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<!-- Don't include assemblies that MSBuild ships with. -->
<ItemGroup>
<PackageReference Update="Microsoft.Build" Publish="false" />
<PackageReference Update="Microsoft.Build.Framework" Publish="false" />
<PackageReference Update="Microsoft.Build.Tasks.Core" Publish="false" />
<PackageReference Update="Microsoft.Build.Utilities.Core" Publish="false" />
<PackageReference Update="Microsoft.NET.StringTools" Publish="false" />
<PackageReference Update="System.Resources.Extensions" Publish="false" />
</ItemGroup>
<!-- Don't include assemblies that are provided by the SDK, next to MSBuild. -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(SkipSDKInboxPublishExcludes)' != 'true'">
<PackageReference Update="Newtonsoft.Json" Publish="false" />
<PackageReference Update="NuGet.Commands" Publish="false" />
<PackageReference Update="NuGet.Common" Publish="false" />
<PackageReference Update="NuGet.Configuration" Publish="false" />
<PackageReference Update="NuGet.Frameworks" Publish="false" />
<PackageReference Update="NuGet.Packaging" Publish="false" />
<PackageReference Update="NuGet.ProjectModel" Publish="false" />
<PackageReference Update="NuGet.Versioning" Publish="false" />
<PackageReference Update="System.CodeDom" Publish="false" />
<PackageReference Update="System.Security.Cryptography.ProtectedData" Publish="false" />
<PackageReference Update="System.Text.Encoding.CodePages" Publish="false" />
</ItemGroup>
<!-- Don't include assemblies that are inbox in Desktop MSBuild -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Update="Microsoft.Bcl.AsyncInterfaces" Publish="false" />
<PackageReference Update="System.Buffers" Publish="false" />
<PackageReference Update="System.Collections.Immutable" Publish="false" />
<PackageReference Update="System.Memory" Publish="false" />
<PackageReference Update="System.Numerics.Vectors" Publish="false" />
<PackageReference Update="System.Reflection.Metadata" Publish="false" />
<PackageReference Update="System.Reflection.MetadataLoadContext" Publish="false" />
<PackageReference Update="System.Runtime.CompilerServices.Unsafe" Publish="false" />
<PackageReference Update="System.Text.Encodings.Web" Publish="false" />
<PackageReference Update="System.Text.Json" Publish="false" />
<PackageReference Update="System.Threading.Channels" Publish="false" />
<PackageReference Update="System.Threading.Tasks.Dataflow" Publish="false" />
<PackageReference Update="System.Threading.Tasks.Extensions" Publish="false" />
<PackageReference Update="System.ValueTuple" Publish="false" />
</ItemGroup>
<ItemGroup>
<!--
Update all PackageReference items to default Publish to true.
This forces the publish output to contain the dlls.
-->
<PackageReference Update="@(PackageReference)">
<Publish Condition="'%(PackageReference.Publish)' == ''">true</Publish>
<ExcludeAssets Condition="'%(PackageReference.Publish)' == 'false'">runtime</ExcludeAssets>
</PackageReference>
<!--
Update all Reference items to have Pack="false"
This removes the frameworkDependency nodes from the generated nuspec
-->
<Reference Update="@(Reference)"
Pack="false" />
</ItemGroup>
<PropertyGroup>
<TargetsForTfmSpecificContentInPackage Condition="'$(PackTasks)' == 'true'">$(TargetsForTfmSpecificContentInPackage);_AddBuildOutputToPackageCore;_AddBuildOutputToPackageDesktop</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<!-- Publish .NET Core assets and include them in the package under $(BuildTaskTargetFolder) directory. -->
<Target Name="_AddBuildOutputToPackageCore" DependsOnTargets="Publish" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<PropertyGroup>
<BuildTaskTargetTfmSpecificFolder Condition="'$(BuildTaskTargetTfmSpecificFolder)' == ''">$(TargetFramework)</BuildTaskTargetTfmSpecificFolder>
</PropertyGroup>
<ItemGroup>
<TfmSpecificPackageFile Include="$(PublishDir)**"
PackagePath="$(BuildTaskTargetFolder)/$(BuildTaskTargetTfmSpecificFolder)/%(RecursiveDir)%(FileName)%(Extension)" />
</ItemGroup>
</Target>
<!-- Include .NET Framework build outputs in the package under $(BuildTaskTargetFolder) directory. -->
<Target Name="_AddBuildOutputToPackageDesktop" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<PropertyGroup>
<BuildTaskTargetTfmSpecificFolder Condition="'$(BuildTaskTargetTfmSpecificFolder)' == ''">$(TargetFramework)</BuildTaskTargetTfmSpecificFolder>
</PropertyGroup>
<ItemGroup>
<TfmSpecificPackageFile Include="$(OutputPath)**" PackagePath="$(BuildTaskTargetFolder)/$(BuildTaskTargetTfmSpecificFolder)/%(RecursiveDir)%(FileName)%(Extension)" />
</ItemGroup>
</Target>
</Project>

View file

@ -0,0 +1,8 @@
namespace Geekeey.DotNet.Sdk.Tasks;
internal sealed class Program
{
static public void Main(string[] args)
{
}
}

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsShipping>true</IsShipping>
</PropertyGroup>
<PropertyGroup>
<IsBuildTaskProject>true</IsBuildTaskProject>
</PropertyGroup>
</Project>

View file

@ -0,0 +1 @@
# Geekeey.DotNet.Sdk

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemDefinitionGroup>
<AnalyzerReference>
<Visible>false</Visible>
</AnalyzerReference>
</ItemDefinitionGroup>
</Project>

View file

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<IncludeMultiTargetRoslynComponentTargets Condition="'$(IncludeMultiTargetRoslynComponentTargets)' == ''">false</IncludeMultiTargetRoslynComponentTargets>
<BeforePack>IncludeAnalyzersInPackage;$(BeforePack)</BeforePack>
<BuildAnalyzerReferences>$(BuildProjectReferences)</BuildAnalyzerReferences>
</PropertyGroup>
<!-- FROM: https://github.com/dotnet/runtime/blob/main/eng/packaging.targets -->
<ItemGroup>
<!-- Ensure AnalyzerReference items are restored and built
The target framework of Analyzers has no relationship to that of the referencing project,
so we don't apply TargetFramework filters nor do we pass in TargetFramework.
When BuildProjectReferences=false we make sure to set BuildReference=false to make
sure not to try to call GetTargetPath in the outerbuild of the analyzer project. -->
<ProjectReference Include="@(AnalyzerReference)"
SkipGetTargetFrameworkProperties="true"
UndefineProperties="TargetFramework"
ReferenceOutputAssembly="false"
PrivateAssets="all"
Condition="'$(BuildingSlnForDocs)' != 'true'"
BuildReference="$(BuildAnalyzerReferences)" />
</ItemGroup>
<Target Name="IncludeAnalyzersInPackage" Condition="'@(AnalyzerReference)' != ''">
<!-- Call a target in the analyzer project to get all the files it would normally place in a package.
These will be returned as items with identity pointing to the built file, and PackagePath metadata
set to their location in the package. IsSymbol metadata will be set to distinguish symbols. -->
<MSBuild Projects="@(AnalyzerReference)"
Targets="GetAnalyzerPackFiles">
<Output TaskParameter="TargetOutputs" ItemName="_AnalyzerFile" />
</MSBuild>
<ItemGroup>
<Content Include="@(_AnalyzerFile)" Pack="true" Condition="!%(_AnalyzerFile.IsSymbol)" />
<!-- Symbols don't honor PackagePath. By default they are placed in lib/%(TargetFramework).
Pack does honor TargetPath and does Path.Combine("lib/%(TargetFramework)", "%(TargetPath)"),
so a rooted path value for TargetPath will override lib.
https://github.com/NuGet/Home/issues/10860 -->
<_TargetPathsToSymbols Include="@(_AnalyzerFile)" TargetPath="/%(_AnalyzerFile.PackagePath)" Condition="%(_AnalyzerFile.IsSymbol)" />
</ItemGroup>
</Target>
<Target Name="GetAnalyzerPackFiles"
DependsOnTargets="$(GenerateNuspecDependsOn)"
Returns="@(_AnalyzerPackFile)">
<PropertyGroup>
<_AnalyzerPath>analyzers/dotnet</_AnalyzerPath>
<_AnalyzerPath Condition="'$(AnalyzerRoslynVersion)' != ''">$(_AnalyzerPath)/roslyn$(AnalyzerRoslynVersion)</_AnalyzerPath>
<_AnalyzerPath Condition="'$(AnalyzerLanguage)' != ''">$(_AnalyzerPath)/$(AnalyzerLanguage)</_AnalyzerPath>
</PropertyGroup>
<ItemGroup>
<!-- Packs *.dll -->
<_AnalyzerPackFile IsSymbol="false"
Include="%(_BuildOutputInPackage.FinalOutputPath)"
TargetPath="%(_BuildOutputInPackage.TargetPath)"
TargetFramework="%(_BuildOutputInPackage.TargetFramework)" />
<!-- Packs *.pdb -->
<_AnalyzerPackFile IsSymbol="true"
Include="%(_TargetPathsToSymbols.FinalOutputPath)"
TargetPath="%(_TargetPathsToSymbols.TargetPath)"
TargetFramework="%(_TargetPathsToSymbols.TargetFramework)" />
<_AnalyzerPackFile PackagePath="$(_AnalyzerPath)/%(TargetPath)" />
</ItemGroup>
<Error Condition="'%(_AnalyzerPackFile.TargetFramework)' != 'netstandard2.0'"
Text="Analyzers must only target netstandard2.0 since they run in the compiler which targets netstandard2.0. The following files were found to target '%(_AnalyzerPackFile.TargetFramework)': @(_AnalyzerPackFile)" />
</Target>
<PropertyGroup>
<_MultiTargetRoslynComponentTargetsTemplate>$(MSBuildThisFileDirectory)templates\MultiTargetRoslynComponent.targets.template</_MultiTargetRoslynComponentTargetsTemplate>
<MultiTargetRoslynComponentTargetsFileIntermediatePath>$(IntermediateOutputPath)MultiTargetRoslynComponent.targets</MultiTargetRoslynComponentTargetsFileIntermediatePath>
</PropertyGroup>
<!-- In packages that contain Analyzers, include a .targets file that will select the correct analyzer. -->
<Target Name="IncludeMultiTargetRoslynComponentTargetsInPackage"
AfterTargets="IncludeAnalyzersInPackage"
Condition="'@(AnalyzerReference)' != '' AND '$(IncludeMultiTargetRoslynComponentTargets)' == 'true'"
DependsOnTargets="GenerateMultiTargetRoslynComponentTargetsFile">
<ItemGroup>
<Content Include="$(MultiTargetRoslynComponentTargetsFileIntermediatePath)"
PackagePath="buildTransitive\MultiTargetRoslynComponent.targets"
Pack="true" />
</ItemGroup>
</Target>
<Target Name="GenerateMultiTargetRoslynComponentTargetsFile"
Inputs="$(MSBuildProjectFullPath);_MultiTargetRoslynComponentTargetsTemplate"
Outputs="$(MultiTargetRoslynComponentTargetsFileIntermediatePath)">
<PropertyGroup>
<_MultiTargetRoslynComponentTargetPrefix>$(PackageId.Replace('.', '_'))</_MultiTargetRoslynComponentTargetPrefix>
<DisableSourceGeneratorPropertyName Condition="'$(DisableSourceGeneratorPropertyName)' == ''">Disable$(PackageId.Replace('.', ''))SourceGenerator</DisableSourceGeneratorPropertyName>
</PropertyGroup>
<WriteLinesToFile File="$(MultiTargetRoslynComponentTargetsFileIntermediatePath)"
Lines="$([System.IO.File]::ReadAllText('$(_MultiTargetRoslynComponentTargetsTemplate)')
.Replace('{TargetPrefix}', '$(_MultiTargetRoslynComponentTargetPrefix)')
.Replace('{NuGetPackageId}', '$(PackageId)')
.Replace('{DisableSourceGeneratorPropertyName}', '$(DisableSourceGeneratorPropertyName)'))"
Overwrite="true" />
</Target>
</Project>

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
</PropertyGroup>
<PropertyGroup>
<IsShipping Condition="'$(IsShipping)' == ''">true</IsShipping>
<IsShippingPackage Condition="'$(IsShippingPackage)' == ''">$(IsShipping)</IsShippingPackage>
</PropertyGroup>
<PropertyGroup>
<!-- We are doing an outer cross-targeting build if there is a non-empty list of target frameworks specified
and there is no current target framework being built individually. -->
<IsCrossTargetingBuild Condition="'$(TargetFrameworks)' != '' AND '$(TargetFramework)' == ''">true</IsCrossTargetingBuild>
<!-- We are doing a single targeting build if there is a empty list of target frameworks specified
and there is a current target framework being built. -->
<IsPlainTargetingBuild Condition="'$(TargetFrameworks)' == '' AND '$(TargetFramework)' != ''">true</IsPlainTargetingBuild>
</PropertyGroup>
<PropertyGroup>
<!-- respect environment variable for the nuget packages root otherwise fallback to use the default location -->
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' != ''">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)'))</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' and '$(NUGET_PACKAGES)' != ''">$([MSBuild]::NormalizeDirectory('$(NUGET_PACKAGES)'))</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' and '$(OS)' == 'Windows_NT'">$([MSBuild]::NormalizeDirectory('$(UserProfile)', '.nuget', 'packages'))</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' and '$(OS)' != 'Windows_NT'">$([MSBuild]::NormalizeDirectory('$(HOME)', '.nuget', 'packages'))</NuGetPackageRoot>
</PropertyGroup>
<PropertyGroup Condition="'$(DotNetTool)' == ''">
<!-- Respect environment variable for the .NET install directory if set; otherwise, use the repo default location -->
<DotNetRoot Condition="'$(DOTNET_INSTALL_DIR)' != ''">$(DOTNET_INSTALL_DIR)</DotNetRoot>
<DotNetRoot Condition="'$(DotNetRoot)' != ''">$([MSBuild]::NormalizeDirectory('$(DotNetRoot)'))</DotNetRoot>
<DotNetRoot Condition="'$(DotNetRoot)' == ''">$([MSBuild]::NormalizeDirectory('$(RepositoryRoot)', '.dotnet'))</DotNetRoot>
<!-- let the exec task find dotnet on PATH -->
<DotNetRoot Condition="!Exists($(DotNetRoot))" />
<DotNetTool Condition="'$(OS)' == 'Windows_NT'">$(DotNetRoot)dotnet.exe</DotNetTool>
<DotNetTool Condition="'$(OS)' != 'Windows_NT'">$(DotNetRoot)dotnet</DotNetTool>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PackageOutputPath Condition="'$(IsShippingPackage)' == 'true'">$(ArtifactsShippingPackagesDir)</PackageOutputPath>
<PackageOutputPath Condition="'$(IsShippingPackage)' != 'true'">$(ArtifactsInternalPackagesDir)</PackageOutputPath>
<!-- workaround for https://github.com/NuGet/Home/issues/12589 -->
<NuspecOutputPath>$(IntermediateOutputPath)</NuspecOutputPath>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<RepositoryRoot Condition="'$(RepositoryRoot)' == ''">$([MSBuild]::NormalizeDirectory('$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'global.json'))'))</RepositoryRoot>
</PropertyGroup>
<PropertyGroup>
<RepositoryEngDir>$([MSBuild]::NormalizeDirectory('$(RepositoryRoot)', 'eng'))</RepositoryEngDir>
<RepositoryDocDir>$([MSBuild]::NormalizeDirectory('$(RepositoryRoot)', 'doc'))</RepositoryDocDir>
<RepositoryEngGitHooksDir>$([MSBuild]::NormalizeDirectory('$(RepositoryEngDir)', 'hooks'))</RepositoryEngGitHooksDir>
</PropertyGroup>
<PropertyGroup>
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$([MSBuild]::NormalizeDirectory('$(RepositoryRoot)', 'artifacts'))</ArtifactsDir>
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
<ArtifactsLogDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'log', '$(Configuration)'))</ArtifactsLogDir>
<ArtifactsTmpDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'tmp', '$(Configuration)'))</ArtifactsTmpDir>
</PropertyGroup>
<PropertyGroup>
<UseArtifactsOutput>true</UseArtifactsOutput>
<ArtifactsPath>$(ArtifactsDir)</ArtifactsPath>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ArtifactsPackageDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', '$(ArtifactsPackageOutputName)'))</ArtifactsPackageDir>
<ArtifactsPublishDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', '$(ArtifactsPublishOutputName)'))</ArtifactsPublishDir>
<ArtifactsShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsPackageDir)', $(ArtifactsPivots), 'shipping'))</ArtifactsShippingPackagesDir>
<ArtifactsInternalPackagesDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsPackageDir)', $(ArtifactsPivots), 'internal'))</ArtifactsInternalPackagesDir>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="Geekeey.DotNet.Sdk.Repository.props" />
<Import Project="Geekeey.DotNet.Sdk.Common.props" />
<Import Project="Geekeey.DotNet.Sdk.Analyzer.props" />
</Project>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="Geekeey.DotNet.Sdk.Repository.targets" />
<Import Project="Geekeey.DotNet.Sdk.Common.targets" />
<Import Project="Geekeey.DotNet.Sdk.Analyzer.targets" />
</Project>

View file

@ -0,0 +1,69 @@
<Project>
<Target Name="_{TargetPrefix}GatherAnalyzers">
<ItemGroup>
<_{TargetPrefix}Analyzer Include="@(Analyzer)" Condition="'%(Analyzer.NuGetPackageId)' == '{NuGetPackageId}'" />
</ItemGroup>
</Target>
<Target Name="_{TargetPrefix}AnalyzerMultiTargeting"
Condition="'$(SupportsRoslynComponentVersioning)' != 'true'"
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
DependsOnTargets="_{TargetPrefix}GatherAnalyzers">
<ItemGroup>
<!-- Remove our analyzers targeting roslyn4.x -->
<Analyzer Remove="@(_{TargetPrefix}Analyzer)"
Condition="$([System.String]::Copy('%(_{TargetPrefix}Analyzer.Identity)').IndexOf('roslyn4')) >= 0"/>
</ItemGroup>
</Target>
<Target Name="_{TargetPrefix}RemoveAnalyzers"
Condition="'$({DisableSourceGeneratorPropertyName})' == 'true'"
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
DependsOnTargets="_{TargetPrefix}GatherAnalyzers">
<!-- Remove all our analyzers -->
<ItemGroup>
<Analyzer Remove="@(_{TargetPrefix}Analyzer)" />
</ItemGroup>
</Target>
<!--
Microsoft's mandatory guardian build analysis removes all analyzers, including code generators,
from a csproj then adds back only their own. But our projects need generators to build, so we
need a mechanism to add them back.
See: https://dev.azure.com/securitytools/SecurityIntegration/_git/Microsoft.Guardian?path=%2Fsrc%2FMicrosoft.Guardian.RoslynAnalyzers%2FRoslynEnvironment.cs
Workaround is done in two steps (targets):
1. We make a snapshot of set of analyzers BEFORE guardian build analysis removes them,
but AFTER we have evaluated which of them based on the .NET toolchain we should use
(Roslyn3.8 vs. Roslyn4.0 saga).
2. Re-add subset of analyzers back AFTER guardian build analysis runs but BEFORE core
compilation starts, effectively reverting the changes done. Note that this is only
done for analyzers that are shipped with this package only.
-->
<Target Name="_{TargetPrefix}CreateAnalyzerSnapshot"
Condition="'$(GdnRoslynAnalyzersRunId)' != ''"
AfterTargets="_{TargetPrefix}AnalyzerMultiTargeting;_{TargetPrefix}RemoveAnalyzers">
<CreateItem Include="@(Analyzer)">
<Output ItemName="_{TargetPrefix}AnalyzerSnapshot" TaskParameter="Include"/>
</CreateItem>
</Target>
<Target Name="_{TargetPrefix}ReAddCodeGenerators"
Condition="'$(GdnRoslynAnalyzersRunId)' != ''"
AfterTargets="ResolveCodeAnalysisRuleSet"
BeforeTargets="CoreCompile"
DependsOnTargets="_{TargetPrefix}CreateAnalyzerSnapshot">
<ItemGroup>
<Analyzer Include="@(_{TargetPrefix}AnalyzerSnapshot)"
Condition="'%(_{TargetPrefix}AnalyzerSnapshot.NuGetPackageId)' == '{NuGetPackageId}'"/>
</ItemGroup>
</Target>
</Project>

View file

@ -0,0 +1,5 @@
namespace Geekeey.DotNet.Sdk;
internal sealed class Program
{
}

View file

@ -1,40 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>Geekeey.DotNet.Common.ProjectTemplates</PackageId>
<PackageVersion>1.0</PackageVersion>
<Title>Common geekeey project templates</Title>
<Authors>Geekeey</Authors>
<Description>A template for creating new items within geekeey</Description>
<PackageTags>geekeey;template;</PackageTags>
<PackageProjectUrl>https://git.geekeey.de/geekeey/build</PackageProjectUrl>
<!-- Keep package type as 'Template' to show the package as a template package on nuget.org and make your template available in dotnet new search.-->
<PackageType>Template</PackageType>
<TargetFramework>net8.0</TargetFramework>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<NoDefaultExcludes>true</NoDefaultExcludes>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<PropertyGroup>
<LocalizeTemplates>false</LocalizeTemplates>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.TemplateEngine.Tasks" Version="*" PrivateAssets="all" IsImplicitlyDefined="true"/>
</ItemGroup>
<ItemGroup>
<Content Include="content\**\*" Exclude="content\**\bin\**;content\**\obj\**" />
<Compile Remove="**\*" />
</ItemGroup>
<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="" />
</ItemGroup>
</Project>

View file

@ -1,5 +0,0 @@
## Getting started
### Prerequisites
## Usage

View file

@ -1 +0,0 @@
Place your templates to this folder.

View file

@ -1,6 +0,0 @@
## Common project and item templates
[.NET templates](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new-sdk-templates) are located in several repositories.
This folder contains the following common project and item templates:
- Default Geekeey repository layout (`geekeey-repo`)