diff --git a/LockCheck.sln b/LockCheck.sln index ef14600..0bf322a 100644 --- a/LockCheck.sln +++ b/LockCheck.sln @@ -14,7 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution testEnvironments.json = testEnvironments.json EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.NetCore", "test\Test.NetCore\Test.NetCore.csproj", "{880999F1-8C2C-4798-8443-19D6CBED3D0F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.ConsoleApp", "test\Test.ConsoleApp\Test.ConsoleApp.csproj", "{880999F1-8C2C-4798-8443-19D6CBED3D0F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LockCheck.Tests", "test\LockCheck.Tests\LockCheck.Tests.csproj", "{2970DE55-5A3A-4252-ABF9-9146A759AFD2}" EndProject @@ -30,8 +30,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LCTestTarget.linux-x64", "t EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LCTestTarget.win-x64", "test\LCTestTarget.win-x64\LCTestTarget.win-x64.csproj", "{4A4981CF-FA1C-4D38-A39D-8F7AD1356151}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.NetFx", "test\Test.NetFx\Test.NetFx.csproj", "{59AD5D14-E89C-4C69-A611-15F4F112F6EC}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{970DB648-53EB-435B-9A8F-4BFFCA92A54B}" EndProject Global @@ -126,18 +124,6 @@ Global {4A4981CF-FA1C-4D38-A39D-8F7AD1356151}.Release|Mixed Platforms.Build.0 = Release|Any CPU {4A4981CF-FA1C-4D38-A39D-8F7AD1356151}.Release|Win32.ActiveCfg = Release|Any CPU {4A4981CF-FA1C-4D38-A39D-8F7AD1356151}.Release|Win32.Build.0 = Release|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Debug|Win32.ActiveCfg = Debug|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Debug|Win32.Build.0 = Debug|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Release|Any CPU.Build.0 = Release|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Release|Win32.ActiveCfg = Release|Any CPU - {59AD5D14-E89C-4C69-A611-15F4F112F6EC}.Release|Win32.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -151,7 +137,6 @@ Global {F0279C06-9D4E-40D8-A569-3DFEB9926CD2} = {018E2998-2375-4819-9B5A-554C4F46BC1F} {E7A79EE4-7331-4B50-A191-6F16C621F80C} = {018E2998-2375-4819-9B5A-554C4F46BC1F} {4A4981CF-FA1C-4D38-A39D-8F7AD1356151} = {018E2998-2375-4819-9B5A-554C4F46BC1F} - {59AD5D14-E89C-4C69-A611-15F4F112F6EC} = {018E2998-2375-4819-9B5A-554C4F46BC1F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9EFF99EA-5D9E-48B7-A277-E477BD55F517} diff --git a/test/Test.NetCore/Program.cs b/test/Test.ConsoleApp/Program.cs similarity index 100% rename from test/Test.NetCore/Program.cs rename to test/Test.ConsoleApp/Program.cs diff --git a/test/Test.NetCore/Properties/launchSettings.json b/test/Test.ConsoleApp/Properties/launchSettings.json similarity index 100% rename from test/Test.NetCore/Properties/launchSettings.json rename to test/Test.ConsoleApp/Properties/launchSettings.json diff --git a/test/Test.NetCore/Test.NetCore.csproj b/test/Test.ConsoleApp/Test.ConsoleApp.csproj similarity index 64% rename from test/Test.NetCore/Test.NetCore.csproj rename to test/Test.ConsoleApp/Test.ConsoleApp.csproj index a06b367..021ffa0 100644 --- a/test/Test.NetCore/Test.NetCore.csproj +++ b/test/Test.ConsoleApp/Test.ConsoleApp.csproj @@ -1,8 +1,8 @@ - + Exe - net8.0 + net8.0;net481 diff --git a/test/Test.NetFx/App.config b/test/Test.NetFx/App.config deleted file mode 100644 index 5754728..0000000 --- a/test/Test.NetFx/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/test/Test.NetFx/Program.cs b/test/Test.NetFx/Program.cs deleted file mode 100644 index b6c5f9e..0000000 --- a/test/Test.NetFx/Program.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.ComponentModel; -using System.Linq; -using LockCheck; - -namespace Test.NetFx -{ - class Program - { - private static int Main(string[] args) - { - try - { - if (args.Length == 0) - { - Console.Error.WriteLine("Usage: {0} FILE [FILE ...]", - typeof(Program).Assembly.GetName().Name); - } - - var infos = LockManager.GetLockingProcessInfos(args, LockManagerFeatures.UseLowLevelApi); - if (!infos.Any()) - { - Console.WriteLine("No locking processes found."); - return 0; - } - - bool first = true; - foreach (var p in infos) - { - if (!first) - { - Console.WriteLine("----------------------------------------------------"); - } - - Console.WriteLine("Process ID : {0}", p.ProcessId); - Console.WriteLine("Process Start Time: {0}", p.StartTime.ToString("F")); - Console.WriteLine("Process File Path : {0}", p.ExecutableName); - Console.WriteLine("Process User Name : {0}", p.Owner); - Console.WriteLine("Executable Name : {0}", p.ExecutableName); - Console.WriteLine("Application Name : {0}", p.ApplicationName); - Console.WriteLine("Session ID : {0}", p.SessionId); - first = false; - } - } - catch (Win32Exception ex) - { - Console.Error.WriteLine(ex.Message); - return ex.ErrorCode; - } - catch (Exception ex) - { - Console.Error.WriteLine(ex); - return ex.HResult; - } - return 0; - } - } -} diff --git a/test/Test.NetFx/Test.NetFx.csproj b/test/Test.NetFx/Test.NetFx.csproj deleted file mode 100644 index 1f2010e..0000000 --- a/test/Test.NetFx/Test.NetFx.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - net481 - - - - - - - - - - - - - - {CC3BF24A-0A94-4655-A3EF-A722974F0872} - LockCheck - - - - - - \ No newline at end of file