diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..bba08dd
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,188 @@
+# editorconfig.org
+
+# top-most EditorConfig file
+root = true
+
+# Default settings:
+# A newline ending every file
+# Use 4 spaces as indentation
+[*]
+guidelines = 120 1px dotted 504CFF00, 150 1px dotted 50FF6A00
+indent_style = space
+indent_size = 4
+
+[*.json]
+indent_size = 2
+
+# C# and VB files
+[*.{cs,vb}]
+charset = utf-8-bom
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# avoid this. unless absolutely necessary
+dotnet_style_qualification_for_field = false:suggestion
+dotnet_style_qualification_for_property = false:suggestion
+dotnet_style_qualification_for_method = false:suggestion
+dotnet_style_qualification_for_event = false:suggestion
+# use language keywords instead of BCL types
+dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
+dotnet_style_predefined_type_for_member_access = true:suggestion
+
+# name all constant fields using PascalCase
+dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
+dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
+
+dotnet_naming_symbols.constant_fields.applicable_kinds = field
+dotnet_naming_symbols.constant_fields.required_modifiers = const
+
+dotnet_naming_style.pascal_case_style.capitalization = pascal_case
+
+# static fields should have s_ prefix
+dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
+dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
+dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
+
+dotnet_naming_symbols.static_fields.applicable_kinds = field
+dotnet_naming_symbols.static_fields.required_modifiers = static
+
+dotnet_naming_style.static_prefix_style.required_prefix = s_
+dotnet_naming_style.static_prefix_style.capitalization = camel_case
+
+# internal and private fields should be _camelCase
+dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
+dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
+dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
+
+dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
+dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
+
+dotnet_naming_style.camel_case_underscore_style.required_prefix = _
+dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
+
+# Code style defaults
+dotnet_sort_system_directives_first = true
+
+# Expression-level preferences
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+
+# C# files
+[*.cs]
+
+# .NET diagnostic
+dotnet_diagnostic.RS0041.severity = none
+dotnet_diagnostic.IDE0005.severity = warning
+
+# New line preferences
+csharp_new_line_before_open_brace = all
+csharp_new_line_before_else = true
+csharp_new_line_before_catch = true
+csharp_new_line_before_finally = true
+csharp_new_line_before_members_in_object_initializers = true
+csharp_new_line_before_members_in_anonymous_types = true
+csharp_new_line_between_query_expression_clauses = true
+
+# Indentation preferences
+csharp_indent_block_contents = true
+csharp_indent_braces = false
+csharp_indent_case_contents = true
+csharp_indent_switch_labels = true
+csharp_indent_labels = one_less_than_current
+
+# only use var when it's obvious what the variable type is
+csharp_style_var_for_built_in_types = false:silent
+csharp_style_var_when_type_is_apparent = true:silent
+csharp_style_var_elsewhere = false:silent
+
+# Code style defaults
+csharp_preserve_single_line_blocks = true
+csharp_preserve_single_line_statements = false
+
+# Expression-bodied members
+csharp_style_expression_bodied_methods = false:none
+csharp_style_expression_bodied_constructors = false:none
+csharp_style_expression_bodied_operators = false:none
+csharp_style_expression_bodied_properties = true:none
+csharp_style_expression_bodied_indexers = true:none
+csharp_style_expression_bodied_accessors = true:none
+
+# Pattern matching
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+csharp_style_inlined_variable_declaration = true:suggestion
+
+# Null checking preferences
+csharp_style_throw_expression = true:suggestion
+csharp_style_conditional_delegate_call = true:suggestion
+
+# Space preferences
+csharp_space_after_cast = false
+csharp_space_after_colon_in_inheritance_clause = true
+csharp_space_after_comma = true
+csharp_space_after_dot = false
+csharp_space_after_keywords_in_control_flow_statements = true
+csharp_space_after_semicolon_in_for_statement = true
+csharp_space_around_binary_operators = before_and_after
+csharp_space_around_declaration_statements = do_not_ignore
+csharp_space_before_colon_in_inheritance_clause = true
+csharp_space_before_comma = false
+csharp_space_before_dot = false
+csharp_space_before_open_square_brackets = false
+csharp_space_before_semicolon_in_for_statement = false
+csharp_space_between_empty_square_brackets = false
+csharp_space_between_method_call_empty_parameter_list_parentheses = false
+csharp_space_between_method_call_name_and_opening_parenthesis = false
+csharp_space_between_method_call_parameter_list_parentheses = false
+csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
+csharp_space_between_method_declaration_name_and_open_parenthesis = false
+csharp_space_between_method_declaration_parameter_list_parentheses = false
+csharp_space_between_parentheses = false
+csharp_space_between_square_brackets = false
+
+# IDE0008: Use explicit type
+dotnet_diagnostic.IDE0008.severity = silent
+
+# Visual Basic files
+
+[*.vb]
+# Modifier preferences
+visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
+
+# C++ Files
+[*.{cpp,h,in}]
+curly_bracket_next_line = true
+indent_brace_style = Allman
+
+# Xml project files
+[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
+indent_size = 2
+
+# Xml build files
+[*.builds]
+indent_size = 2
+
+# Xml files
+[*.{xml,stylecop,ruleset}]
+indent_size = 2
+
+# Xml config files
+[*.{props,targets,config,nuspec}]
+indent_size = 2
+
+# resx Files
+[*.{resx,xlf}]
+indent_size = 2
+charset = utf-8-bom
+insert_final_newline = true
+
+# Shell scripts
+[*.sh]
+end_of_line = lf
+
+[*.{cmd,bat}]
+end_of_line = crlf
\ No newline at end of file
diff --git a/src/Directory.Build.props b/Directory.Build.props
similarity index 67%
rename from src/Directory.Build.props
rename to Directory.Build.props
index b5bff01..8ce4053 100644
--- a/src/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,14 +1,22 @@
-
-
-
- Git Extensions
- Git Extensions
- https://github.com/gitextensions/gitextensions.pluginmanager
- latest
- 0.0.0
- 0.0.0.1
- 0.0.0.1
- 0.0.0.1
- 0.0.0.1
-
-
+
+
+
+ net6.0-windows
+ latest
+ $(NoWarn);1573;1591;1712
+ true
+
+
+
+ Git Extensions
+ Git Extensions
+ https://github.com/gitextensions/gitextensions.pluginmanager
+ latest
+ 0.0.0
+ 0.0.0.1
+ 0.0.0.1
+ 0.0.0.1
+ 0.0.0.1
+
+
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
new file mode 100644
index 0000000..498bd13
--- /dev/null
+++ b/Directory.Build.targets
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/GitExtensions.PluginManager.sln b/GitExtensions.PluginManager.sln
index c74430e..4f389d9 100644
--- a/GitExtensions.PluginManager.sln
+++ b/GitExtensions.PluginManager.sln
@@ -1,11 +1,11 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27703.2000
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.33130.490
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitExtensions.PluginManager", "src\GitExtensions.PluginManager\GitExtensions.PluginManager.csproj", "{4EB0566E-6D4F-43AF-AA97-2A15ABB66787}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackageManager.UI", "src\PackageManager.UI\PackageManager.UI.csproj", "{6F4FA02A-B061-4607-925E-27B122DE60BC}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PackageManager.UI", "src\PackageManager.UI\PackageManager.UI.csproj", "{6F4FA02A-B061-4607-925E-27B122DE60BC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PackageManager", "src\PackageManager\PackageManager.csproj", "{3B5E3720-B3CB-4A12-B2D4-6BCB6BE78FF1}"
EndProject
@@ -18,6 +18,24 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PackageManager.NuGet.Tests", "test\PackageManager.NuGet.Tests\PackageManager.NuGet.Tests.csproj", "{7EE3B4B1-0BAA-4EB3-BBCB-30BEA09019A3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{7184D694-3B8B-4C4D-BD6E-7EBF73AB9CCA}"
+ ProjectSection(SolutionItems) = preProject
+ test\Directory.Build.props = test\Directory.Build.props
+ test\Directory.Build.targets = test\Directory.Build.targets
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FA57D002-774F-432E-AE8E-09B7690EF0CC}"
+ ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
+ .gitignore = .gitignore
+ appveyor.yml = appveyor.yml
+ Directory.Build.props = Directory.Build.props
+ Directory.Build.targets = Directory.Build.targets
+ GitExtensions.settings = GitExtensions.settings
+ Packages.props = Packages.props
+ README.md = README.md
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B13A9C49-3262-4F06-B929-FB46D10A4820}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -25,6 +43,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4EB0566E-6D4F-43AF-AA97-2A15ABB66787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4EB0566E-6D4F-43AF-AA97-2A15ABB66787}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4EB0566E-6D4F-43AF-AA97-2A15ABB66787}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4EB0566E-6D4F-43AF-AA97-2A15ABB66787}.Release|Any CPU.Build.0 = Release|Any CPU
{6F4FA02A-B061-4607-925E-27B122DE60BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F4FA02A-B061-4607-925E-27B122DE60BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F4FA02A-B061-4607-925E-27B122DE60BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -37,10 +59,6 @@ Global
{B302D166-37CE-439D-8AE1-0CCB80BAD332}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B302D166-37CE-439D-8AE1-0CCB80BAD332}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B302D166-37CE-439D-8AE1-0CCB80BAD332}.Release|Any CPU.Build.0 = Release|Any CPU
- {4EB0566E-6D4F-43AF-AA97-2A15ABB66787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4EB0566E-6D4F-43AF-AA97-2A15ABB66787}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4EB0566E-6D4F-43AF-AA97-2A15ABB66787}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4EB0566E-6D4F-43AF-AA97-2A15ABB66787}.Release|Any CPU.Build.0 = Release|Any CPU
{72134702-9CC0-408F-9E07-B4D59C9D7E43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72134702-9CC0-408F-9E07-B4D59C9D7E43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72134702-9CC0-408F-9E07-B4D59C9D7E43}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -58,7 +76,12 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
+ {4EB0566E-6D4F-43AF-AA97-2A15ABB66787} = {B13A9C49-3262-4F06-B929-FB46D10A4820}
+ {6F4FA02A-B061-4607-925E-27B122DE60BC} = {B13A9C49-3262-4F06-B929-FB46D10A4820}
+ {3B5E3720-B3CB-4A12-B2D4-6BCB6BE78FF1} = {B13A9C49-3262-4F06-B929-FB46D10A4820}
+ {B302D166-37CE-439D-8AE1-0CCB80BAD332} = {B13A9C49-3262-4F06-B929-FB46D10A4820}
{72134702-9CC0-408F-9E07-B4D59C9D7E43} = {7184D694-3B8B-4C4D-BD6E-7EBF73AB9CCA}
+ {E7AD4376-D8B1-469D-A2E3-38059A5EB152} = {B13A9C49-3262-4F06-B929-FB46D10A4820}
{7EE3B4B1-0BAA-4EB3-BBCB-30BEA09019A3} = {7184D694-3B8B-4C4D-BD6E-7EBF73AB9CCA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
diff --git a/Packages.props b/Packages.props
new file mode 100644
index 0000000..ca304bf
--- /dev/null
+++ b/Packages.props
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/appveyor.yml b/appveyor.yml
index 8c46eb8..90b9d2e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -3,7 +3,7 @@
#---------------------------------#
# version format
-version: 2.0.0.{build}
+version: 3.0.0.{build}
# version suffix, if any (e.g. '-RC1', '-beta' otherwise '')
environment:
@@ -18,7 +18,7 @@ skip_tags: true
# Build worker image (VM template)
image:
-- Visual Studio 2019
+- Visual Studio 2022
# enable patching of Directory.Build.props
dotnet_csproj:
diff --git a/src/GitExtensions.PluginManager/GitExtensions.PluginManager.csproj b/src/GitExtensions.PluginManager/GitExtensions.PluginManager.csproj
index e7fd671..6159b4a 100644
--- a/src/GitExtensions.PluginManager/GitExtensions.PluginManager.csproj
+++ b/src/GitExtensions.PluginManager/GitExtensions.PluginManager.csproj
@@ -1,26 +1,25 @@
- net5.0-windows
true
NuGet-based Plugin Manager for Git Extensions
GitExtensions
https://github.com/gitextensions/gitextensions.pluginmanager
OnOutputUpdated
$(MSBuildThisFileDirectory)$(MSBuildProjectName).nuspec
- 1701;1702;NU5100
+ 1701;1702;NU5100;NU5101;NU5103;NU5128
PackageManager\PackageManager.UI.exe
- ..\PackageManager.UI\bin\Release\$(TargetFramework)\publish\PackageManager.UI.exe
true
+ ..\PackageManager.UI\bin\$(Configuration)\$(TargetFramework)\publish\PackageManager.UI.exe
-
-
-
+
+
+
@@ -42,7 +41,7 @@
-
+
True
@@ -59,6 +58,7 @@
+
diff --git a/src/GitExtensions.PluginManager/GitExtensions.PluginManager.nuspec b/src/GitExtensions.PluginManager/GitExtensions.PluginManager.nuspec
index 33ddddc..825c1f9 100644
--- a/src/GitExtensions.PluginManager/GitExtensions.PluginManager.nuspec
+++ b/src/GitExtensions.PluginManager/GitExtensions.PluginManager.nuspec
@@ -9,12 +9,12 @@
$tags$
LICENSE.md
-
+
-
-
+
+
\ No newline at end of file
diff --git a/src/GitExtensions.PluginManager/Plugin.cs b/src/GitExtensions.PluginManager/Plugin.cs
index b0d0633..a0b93a4 100644
--- a/src/GitExtensions.PluginManager/Plugin.cs
+++ b/src/GitExtensions.PluginManager/Plugin.cs
@@ -24,7 +24,7 @@ public class Plugin : GitPluginBase
public const string PackageId = @"GitExtensions.PluginManager";
public const string GitExtensionsRelativePath = @"GitExtensions.exe";
public const string PluginManagerRelativePath = @"PackageManager\PackageManager.UI.exe";
- public static readonly List FrameworkMonikers = new List() { "net5.0", "any", "netstandard2.0" };
+ public static readonly List FrameworkMonikers = new List() { "net5.0", "net6.0", "any", "netstandard2.0" };
internal PluginSettings Configuration { get; private set; }
@@ -53,7 +53,7 @@ public override bool Execute(GitUIEventArgs gitUiCommands)
Args args = new Args();
args.Path = pluginsPath;
- args.Dependencies = new List() { new Args.Dependency("GitExtensions.Extensibility", "0.2.0") };
+ args.Dependencies = new List() { new Args.Dependency("GitExtensions.Extensibility", "0.3.0") };
args.Tags = "GitExtensions";
args.Monikers = FrameworkMonikers;
args.SelfPackageId = PackageId;
diff --git a/src/PackageManager.Cli/PackageManager.Cli.csproj b/src/PackageManager.Cli/PackageManager.Cli.csproj
index ac8922c..66cf9db 100644
--- a/src/PackageManager.Cli/PackageManager.Cli.csproj
+++ b/src/PackageManager.Cli/PackageManager.Cli.csproj
@@ -2,9 +2,7 @@
Exe
- net5.0
PackageManager
- latest
@@ -16,8 +14,8 @@
-
-
+
+
diff --git a/src/PackageManager.NuGet/PackageManager.NuGet.csproj b/src/PackageManager.NuGet/PackageManager.NuGet.csproj
index d5027f3..8e64d3e 100644
--- a/src/PackageManager.NuGet/PackageManager.NuGet.csproj
+++ b/src/PackageManager.NuGet/PackageManager.NuGet.csproj
@@ -1,14 +1,12 @@
- net5.0
PackageManager
- latest
-
-
+
+
diff --git a/src/PackageManager.UI/PackageManager.UI.csproj b/src/PackageManager.UI/PackageManager.UI.csproj
index 8eb1142..0f0a19b 100644
--- a/src/PackageManager.UI/PackageManager.UI.csproj
+++ b/src/PackageManager.UI/PackageManager.UI.csproj
@@ -1,13 +1,17 @@
- net5.0-windows
WinExe
true
PackageManager
PackageManager.UI
Views\Assets\box-search-result.ico
PackageManager.Program
+
+ true
+ false
+ win-x86
+ true
@@ -15,8 +19,8 @@
-
-
+
+
diff --git a/src/PackageManager.UI/Services/SelfUpdateService.cs b/src/PackageManager.UI/Services/SelfUpdateService.cs
index b932ebb..ecba85e 100644
--- a/src/PackageManager.UI/Services/SelfUpdateService.cs
+++ b/src/PackageManager.UI/Services/SelfUpdateService.cs
@@ -3,7 +3,6 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
-using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Neptuo;
@@ -24,13 +23,15 @@ public SelfUpdateService(IApplication application, ProcessService processes)
this.processes = processes;
}
- public string CurrentFileName => Path.GetFileName(Assembly.GetExecutingAssembly().Location);
+ public string CurrentFileName => Path.GetFileName(GetCurrentApplicationPath());
+
+ private static string GetCurrentApplicationPath() => Process.GetCurrentProcess().MainModule!.FileName!;
public bool IsSelfUpdate => application.Args.IsSelfUpdate;
public void Update(IPackage latest)
{
- string current = Assembly.GetExecutingAssembly().Location;
+ string current = GetCurrentApplicationPath();
string temp = CopySelfToTemp(current);
IArgs arguments = CreateArguments(current, latest);
RerunFromTemp(temp, arguments);
diff --git a/src/PackageManager/PackageManager.csproj b/src/PackageManager/PackageManager.csproj
index 4ed56b8..ad7c2e0 100644
--- a/src/PackageManager/PackageManager.csproj
+++ b/src/PackageManager/PackageManager.csproj
@@ -1,13 +1,8 @@
-
- net5.0
- latest
-
-
-
-
+
+
diff --git a/src/PackageManager/ViewModels/PackageSourceViewModel.cs b/src/PackageManager/ViewModels/PackageSourceViewModel.cs
index 062e2b8..1f7f8dd 100644
--- a/src/PackageManager/ViewModels/PackageSourceViewModel.cs
+++ b/src/PackageManager/ViewModels/PackageSourceViewModel.cs
@@ -9,6 +9,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using MoveCommand = PackageManager.ViewModels.Commands.MoveCommand;
namespace PackageManager.ViewModels
{
@@ -21,8 +22,8 @@ public class PackageSourceViewModel : ObservableModel
public DelegateCommand Edit { get; }
public RemoveSourceCommand Remove { get; }
- public MoveCommand MoveUp { get; }
- public MoveCommand MoveDown { get; }
+ public MoveCommand MoveUp { get; }
+ public MoveCommand MoveDown { get; }
public SaveSourceCommand Save { get; }
public Command Cancel { get; }
@@ -52,8 +53,8 @@ public PackageSourceViewModel(IPackageSourceCollection service)
Edit = new DelegateCommand(OnEdit, CanEdit);
Remove = new RemoveSourceCommand(Sources, service);
- MoveUp = new MoveCommand(Sources, source => service.MoveUp(source), source => Sources.IndexOf(source) > 0);
- MoveDown = new MoveCommand(Sources, source => service.MoveDown(source), source => Sources.IndexOf(source) < Sources.Count - 1);
+ MoveUp = new MoveCommand(Sources, source => service.MoveUp(source), source => Sources.IndexOf(source) > 0);
+ MoveDown = new MoveCommand(Sources, source => service.MoveDown(source), source => Sources.IndexOf(source) < Sources.Count - 1);
Save = new SaveSourceCommand(Sources, service);
Save.Executed += () => IsEditActive = false;
diff --git a/test/Directory.Build.props b/test/Directory.Build.props
new file mode 100644
index 0000000..5aa7950
--- /dev/null
+++ b/test/Directory.Build.props
@@ -0,0 +1,17 @@
+
+
+
+
+ false
+ PackageManager
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/Directory.Build.targets b/test/Directory.Build.targets
deleted file mode 100644
index 8700660..0000000
--- a/test/Directory.Build.targets
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- latest
- false
- PackageManager
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/PackageManager.NuGet.Tests/PackageManager.NuGet.Tests.csproj b/test/PackageManager.NuGet.Tests/PackageManager.NuGet.Tests.csproj
index 99c0d9a..dd8604e 100644
--- a/test/PackageManager.NuGet.Tests/PackageManager.NuGet.Tests.csproj
+++ b/test/PackageManager.NuGet.Tests/PackageManager.NuGet.Tests.csproj
@@ -1,9 +1,5 @@
-
- net5.0
-
-
diff --git a/test/PackageManager.Tests/PackageManager.Tests.csproj b/test/PackageManager.Tests/PackageManager.Tests.csproj
index 556d84c..02676cd 100644
--- a/test/PackageManager.Tests/PackageManager.Tests.csproj
+++ b/test/PackageManager.Tests/PackageManager.Tests.csproj
@@ -1,9 +1,5 @@
-
- net5.0
-
-
@@ -12,4 +8,4 @@
-
+
\ No newline at end of file
diff --git a/tools/Prepare-Release.ps1 b/tools/Prepare-Release.ps1
index c39fdd9..df83f24 100644
--- a/tools/Prepare-Release.ps1
+++ b/tools/Prepare-Release.ps1
@@ -11,20 +11,33 @@ If (!$isAppveyor)
$targetPath = Join-Path $targetPath 'artifacts';
}
-dotnet restore ..\GitExtensions.PluginManager.sln
-dotnet publish ..\src\PackageManager.UI\PackageManager.UI.csproj -c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:RuntimeIdentifier=win-x86 -p:SelfContained=false -p:PublishDir=bin\Release\net5.0-windows\publish\ -bl:$targetPath\build-PackageManager.UI.binlog
-dotnet publish ..\src\GitExtensions.PluginManager\GitExtensions.PluginManager.csproj --configuration Release -verbosity:minimal -bl:$targetPath\build-GitExtensions.PluginManager.binlog
-if (!($LastExitCode -eq 0))
+function EnsureLastCommandSucceeded()
{
- Pop-Location;
- Write-Error -Message "MSBuild failed with $LastExitCode" -ErrorAction Stop
+ if (!($LastExitCode -eq 0))
+ {
+ Pop-Location;
+ Write-Error -Message "MSBuild failed with $LastExitCode" -ErrorAction Stop
+ }
}
+Write-Host "Restore solution"
+dotnet restore ..\GitExtensions.PluginManager.sln -p:RuntimeIdentifier=win-x86
+EnsureLastCommandSucceeded
+
+Write-Host "Publish PackageManager.UI"
+dotnet publish ..\src\PackageManager.UI\PackageManager.UI.csproj -c Release -p:PublishDir=bin\Release\net6.0-windows\publish\ -bl:$targetPath\build-PackageManager.UI.binlog
+EnsureLastCommandSucceeded
+
+Write-Host "Publish GitExtensions.PluginManager"
+dotnet publish ..\src\GitExtensions.PluginManager\GitExtensions.PluginManager.csproj --configuration Release -verbosity:minimal -bl:$targetPath\build-GitExtensions.PluginManager.binlog
+EnsureLastCommandSucceeded
+
if (!(Test-Path $targetPath))
{
New-Item -ItemType Directory -Force -Path $targetPath
}
+Write-Host "Copy artifacts"
Copy-Item ..\src\GitExtensions.PluginManager\bin\Release\GitExtensions.PluginManager.*.zip $targetPath
Copy-Item ..\src\GitExtensions.PluginManager\bin\Release\GitExtensions.PluginManager.*.nupkg $targetPath
diff --git a/tools/Zip-GitExtensionsPlugin.ps1 b/tools/Zip-GitExtensionsPlugin.ps1
index 311be89..6f91ff5 100644
--- a/tools/Zip-GitExtensionsPlugin.ps1
+++ b/tools/Zip-GitExtensionsPlugin.ps1
@@ -17,8 +17,8 @@ $tempPmPath = Join-Path $tempPath -ChildPath "PackageManager";
New-Item -Force -ItemType Directory $tempPath | Out-Null;
New-Item -Force -ItemType Directory $tempPmPath | Out-Null;
-Copy-Item -Force ($sourceBasePath + "\net5.0-windows\GitExtensions.PluginManager.dll") $tempPath | Out-Null;
-Copy-Item -Force ($sourceBasePath + "\net5.0-windows\PackageManager\PackageManager.UI.exe") $tempPmPath | Out-Null;
+Copy-Item -Force ($sourceBasePath + "\net6.0-windows\GitExtensions.PluginManager.dll") $tempPath | Out-Null;
+Copy-Item -Force ($sourceBasePath + "\net6.0-windows\PackageManager\PackageManager.UI.exe") $tempPmPath | Out-Null;
Compress-Archive -Path ($tempPath + "\*") -DestinationPath $target -Force;
Write-Host ("Created release zip at '" + $target + "'");