From 7668c82cf9f70bf42f0412ae63b76c3849d67ca0 Mon Sep 17 00:00:00 2001 From: Noi Date: Sat, 8 Jun 2024 19:00:10 -0700 Subject: [PATCH] Switch to .NET 8 * Bump version * Update dependencies * Copy .editorconfig from BirthdayBot * Still want to properly look over it some time * Set up dotnet-ef as project tool --- .config/dotnet-tools.json | 12 +++++++++++ .editorconfig | 45 +++++---------------------------------- .vscode/launch.json | 4 ++-- RegexBot.csproj | 24 +++++++++++---------- 4 files changed, 32 insertions(+), 53 deletions(-) create mode 100644 .config/dotnet-tools.json diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..b99844e --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "8.0.6", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig index 0b8c1b3..452f49d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,13 +13,13 @@ tab_width = 4 # New line preferences end_of_line = crlf -insert_final_newline = false +insert_final_newline = true #### .NET Coding Conventions #### # Organize usings dotnet_separate_import_directive_groups = false -dotnet_sort_system_directives_first = false +dotnet_sort_system_directives_first = true file_header_template = unset # this. and Me. preferences @@ -63,7 +63,7 @@ dotnet_style_prefer_simplified_interpolation = true dotnet_style_readonly_field = true # Parameter preferences -dotnet_code_quality_unused_parameters = all +dotnet_code_quality_unused_parameters = true # Suppression preferences dotnet_remove_unnecessary_suppression_exclusions = none @@ -77,7 +77,7 @@ dotnet_style_allow_statement_immediately_after_block_experimental = true # var preferences csharp_style_var_elsewhere = false:silent csharp_style_var_for_built_in_types = true:suggestion -csharp_style_var_when_type_is_apparent = false:silent +csharp_style_var_when_type_is_apparent = true:suggestion # Expression-bodied members csharp_style_expression_bodied_accessors = true:silent @@ -101,7 +101,6 @@ csharp_style_conditional_delegate_call = true:suggestion # Modifier preferences csharp_prefer_static_local_function = true:suggestion -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async # Code-block preferences csharp_prefer_braces = when_multiline:silent @@ -221,38 +220,4 @@ csharp_style_prefer_local_over_anonymous_function = true:suggestion csharp_style_prefer_tuple_swap = true:suggestion csharp_style_prefer_extended_property_pattern = true:suggestion -[*.{cs,vb}] -dotnet_style_operator_placement_when_wrapping = beginning_of_line -tab_width = 4 -indent_size = 4 -end_of_line = crlf -dotnet_style_coalesce_expression = true:suggestion -dotnet_style_null_propagation = true:suggestion -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion -dotnet_style_prefer_auto_properties = true:suggestion -dotnet_style_object_initializer = true:suggestion -dotnet_style_collection_initializer = true:suggestion -dotnet_style_prefer_simplified_boolean_expressions = true:suggestion -dotnet_style_prefer_conditional_expression_over_assignment = true:silent -dotnet_style_prefer_conditional_expression_over_return = true:silent -dotnet_style_explicit_tuple_names = true:suggestion -dotnet_style_namespace_match_folder = true:suggestion -dotnet_style_prefer_inferred_tuple_names = true:suggestion -dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion -dotnet_style_prefer_compound_assignment = true:suggestion -dotnet_style_prefer_simplified_interpolation = true:suggestion -dotnet_style_readonly_field = true:suggestion -dotnet_style_predefined_type_for_locals_parameters_members = true:silent -dotnet_style_predefined_type_for_member_access = true:silent -dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent -dotnet_style_allow_multiple_blank_lines_experimental = false:suggestion -dotnet_style_allow_statement_immediately_after_block_experimental = true:silent -dotnet_code_quality_unused_parameters = all:suggestion -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent -dotnet_style_qualification_for_field = false:silent -dotnet_style_qualification_for_property = false:silent -dotnet_style_qualification_for_method = false:silent -dotnet_style_qualification_for_event = false:silent \ No newline at end of file +csharp_style_prefer_primary_constructors = true:suggestion \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index eb527f9..49a830b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,8 +10,8 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/bin/Debug/net6.0/RegexBot.dll", - "args": [ "-c", "${workspaceFolder}/bin/Debug/net6.0/config.json" ], + "program": "${workspaceFolder}/bin/Debug/net8.0/RegexBot.dll", + "args": [ "-c", "${workspaceFolder}/bin/Debug/config.json" ], "cwd": "${workspaceFolder}", // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console "console": "internalConsole", diff --git a/RegexBot.csproj b/RegexBot.csproj index e1a4cf4..a72b95c 100644 --- a/RegexBot.csproj +++ b/RegexBot.csproj @@ -1,29 +1,31 @@  - Exe - net6.0 + 3.2.1 NoiTheCat Advanced and flexible Discord moderation bot. - 3.2.0 + + Exe + net8.0 enable enable True + en - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + +