diff --git a/.gitignore b/.gitignore index add57be..68fa935 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ bin/ obj/ /packages/ riderModule.iml -/_ReSharper.Caches/ \ No newline at end of file +/_ReSharper.Caches/ +.vscode/ \ No newline at end of file diff --git a/NativeFileDialogSharp.sln b/NativeFileDialogSharp.sln index db33b15..39284c4 100644 --- a/NativeFileDialogSharp.sln +++ b/NativeFileDialogSharp.sln @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NativeFileDialogSharp", "Na EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NativeFileDialogSharpSandbox", "NativeFileDialogSharpSandbox\NativeFileDialogSharpSandbox.csproj", "{427E5F76-8418-4EA3-9AA3-C1DBFDE0478F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NativeFileDialogSharpSandboxNetFramework", "NativeFileDialogSharpSandboxNetFramework\NativeFileDialogSharpSandboxNetFramework.csproj", "{0FD91168-D8F5-4776-8D91-CB9B9C55AA1B}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/NativeFileDialogSharp/Native/NativeFunctions.cs b/NativeFileDialogSharp/Native/NativeFunctions.cs index 9b702ea..f8ab492 100644 --- a/NativeFileDialogSharp/Native/NativeFunctions.cs +++ b/NativeFileDialogSharp/Native/NativeFunctions.cs @@ -10,88 +10,110 @@ public struct nfdpathset_t public UIntPtr count; } - public enum nfdresult_t + public enum Nfdresult_t { NFD_ERROR, NFD_OKAY, NFD_CANCEL } - public static class NativeFunctions + public static partial class NativeFunctions { public const string LibraryName = "nfd"; - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe nfdresult_t NFD_OpenDialog(byte* filterList, byte* defaultPath, out IntPtr outPath); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial Nfdresult_t NFD_OpenDialog(byte* filterList, byte* defaultPath, out IntPtr outPath); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe nfdresult_t NFD_OpenDialogMultiple(byte* filterList, byte* defaultPath, + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial Nfdresult_t NFD_OpenDialogMultiple(byte* filterList, byte* defaultPath, nfdpathset_t* outPaths); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe nfdresult_t NFD_SaveDialog(byte* filterList, byte* defaultPath, out IntPtr outPath); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial Nfdresult_t NFD_SaveDialog(byte* filterList, byte* defaultPath, out IntPtr outPath); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe nfdresult_t NFD_PickFolder(byte* defaultPath, out IntPtr outPath); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial Nfdresult_t NFD_PickFolder(byte* defaultPath, out IntPtr outPath); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe byte* NFD_GetError(); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial byte* NFD_GetError(); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe UIntPtr NFD_PathSet_GetCount(nfdpathset_t* pathSet); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial UIntPtr NFDPathSetGetCount(nfdpathset_t* pathSet); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe byte* NFD_PathSet_GetPath(nfdpathset_t* pathSet, UIntPtr index); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial byte* NFDPathSetGetPath(nfdpathset_t* pathSet, UIntPtr index); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe void NFD_PathSet_Free(nfdpathset_t* pathSet); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial void NFDPathSetFree(nfdpathset_t* pathSet); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe void NFD_Dummy(); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial void NFD_Dummy(); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe IntPtr NFD_Malloc(UIntPtr bytes); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial IntPtr NFD_Malloc(UIntPtr bytes); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe void NFD_Free(IntPtr ptr); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial void NFD_Free(IntPtr ptr); } - public static class NativeFunctions32 + public static partial class NativeFunctions32 { public const string LibraryName = "nfd_x86"; - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe nfdresult_t NFD_OpenDialog(byte* filterList, byte* defaultPath, out IntPtr outPath); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial Nfdresult_t NFD_OpenDialog(byte* filterList, byte* defaultPath, out IntPtr outPath); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe nfdresult_t NFD_OpenDialogMultiple(byte* filterList, byte* defaultPath, + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial Nfdresult_t NFD_OpenDialogMultiple(byte* filterList, byte* defaultPath, nfdpathset_t* outPaths); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe nfdresult_t NFD_SaveDialog(byte* filterList, byte* defaultPath, out IntPtr outPath); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial Nfdresult_t NFD_SaveDialog(byte* filterList, byte* defaultPath, out IntPtr outPath); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe nfdresult_t NFD_PickFolder(byte* defaultPath, out IntPtr outPath); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial Nfdresult_t NFD_PickFolder(byte* defaultPath, out IntPtr outPath); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe byte* NFD_GetError(); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial byte* NFD_GetError(); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe UIntPtr NFD_PathSet_GetCount(nfdpathset_t* pathSet); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial UIntPtr NFD_PathSet_GetCount(nfdpathset_t* pathSet); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe byte* NFD_PathSet_GetPath(nfdpathset_t* pathSet, UIntPtr index); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial byte* NFD_PathSet_GetPath(nfdpathset_t* pathSet, UIntPtr index); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe void NFD_PathSet_Free(nfdpathset_t* pathSet); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial void NFD_PathSet_Free(nfdpathset_t* pathSet); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe void NFD_Dummy(); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial void NFD_Dummy(); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe IntPtr NFD_Malloc(UIntPtr bytes); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial IntPtr NFD_Malloc(UIntPtr bytes); - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern unsafe void NFD_Free(IntPtr ptr); + [LibraryImport(LibraryName)] + [UnmanagedCallConv(CallConvs = [typeof(System.Runtime.CompilerServices.CallConvCdecl)])] + public static unsafe partial void NFD_Free(IntPtr ptr); } } \ No newline at end of file diff --git a/NativeFileDialogSharp/NativeFileDialogSharp.csproj b/NativeFileDialogSharp/NativeFileDialogSharp.csproj index bbfcf40..0bafb16 100644 --- a/NativeFileDialogSharp/NativeFileDialogSharp.csproj +++ b/NativeFileDialogSharp/NativeFileDialogSharp.csproj @@ -1,8 +1,8 @@ - 7.3 0.5.0 + enable disable true Zlib @@ -10,7 +10,7 @@ https://github.com/milleniumbug/NativeFileDialogSharp https://github.com/milleniumbug/NativeFileDialogSharp Cross-platform native file dialog controls for Windows, Linux and macOS - netstandard2.0 + net10.0 diff --git a/NativeFileDialogSharp/NativeWrappers.cs b/NativeFileDialogSharp/NativeWrappers.cs index 54f41d4..5b9d21d 100644 --- a/NativeFileDialogSharp/NativeWrappers.cs +++ b/NativeFileDialogSharp/NativeWrappers.cs @@ -18,7 +18,7 @@ private static bool Is32BitWindowsOnNetFramework() try { // we call a function that does nothing just to test if we can load it properly - NativeFileDialogSharp.Native.NativeFunctions.NFD_Dummy(); + NativeFunctions.NFD_Dummy(); return false; } catch @@ -26,7 +26,7 @@ private static bool Is32BitWindowsOnNetFramework() // a call to a default library failed, let's attempt the other one try { - NativeFileDialogSharp.Native.NativeFunctions32.NFD_Dummy(); + NativeFunctions32.NFD_Dummy(); return true; } catch @@ -77,15 +77,14 @@ public static unsafe DialogResult FileOpen(string filterList = null, string defa { string path = null; string errorMessage = null; - IntPtr outPathIntPtr; - var result = need32bit - ? NativeFunctions32.NFD_OpenDialog(filterListNts, defaultPathNts, out outPathIntPtr) + var result = need32bit + ? NativeFunctions32.NFD_OpenDialog(filterListNts, defaultPathNts, out nint outPathIntPtr) : NativeFunctions.NFD_OpenDialog(filterListNts, defaultPathNts, out outPathIntPtr); - if (result == nfdresult_t.NFD_ERROR) + if (result == Nfdresult_t.NFD_ERROR) { errorMessage = FromUtf8(NativeFunctions.NFD_GetError()); } - else if (result == nfdresult_t.NFD_OKAY) + else if (result == Nfdresult_t.NFD_OKAY) { var outPathNts = (byte*)outPathIntPtr.ToPointer(); path = FromUtf8(outPathNts); @@ -107,11 +106,11 @@ public static unsafe DialogResult FileSave(string filterList = null, string defa var result = need32bit ? NativeFunctions32.NFD_SaveDialog(filterListNts, defaultPathNts, out outPathIntPtr) : NativeFunctions.NFD_SaveDialog(filterListNts, defaultPathNts, out outPathIntPtr); - if (result == nfdresult_t.NFD_ERROR) + if (result == Nfdresult_t.NFD_ERROR) { errorMessage = FromUtf8(NativeFunctions.NFD_GetError()); } - else if (result == nfdresult_t.NFD_OKAY) + else if (result == Nfdresult_t.NFD_OKAY) { var outPathNts = (byte*)outPathIntPtr.ToPointer(); path = FromUtf8(outPathNts); @@ -132,11 +131,11 @@ public static unsafe DialogResult FolderPicker(string defaultPath = null) var result = need32bit ? NativeFunctions32.NFD_PickFolder(defaultPathNts, out outPathIntPtr) : NativeFunctions.NFD_PickFolder(defaultPathNts, out outPathIntPtr); - if (result == nfdresult_t.NFD_ERROR) + if (result == Nfdresult_t.NFD_ERROR) { errorMessage = FromUtf8(NativeFunctions.NFD_GetError()); } - else if (result == nfdresult_t.NFD_OKAY) + else if (result == Nfdresult_t.NFD_OKAY) { var outPathNts = (byte*)outPathIntPtr.ToPointer(); path = FromUtf8(outPathNts); @@ -158,20 +157,20 @@ public static unsafe DialogResult FileOpenMultiple(string filterList = null, str var result = need32bit ? NativeFunctions32.NFD_OpenDialogMultiple(filterListNts, defaultPathNts, &pathSet) : NativeFunctions.NFD_OpenDialogMultiple(filterListNts, defaultPathNts, &pathSet); - if (result == nfdresult_t.NFD_ERROR) + if (result == Nfdresult_t.NFD_ERROR) { errorMessage = FromUtf8(NativeFunctions.NFD_GetError()); } - else if (result == nfdresult_t.NFD_OKAY) + else if (result == Nfdresult_t.NFD_OKAY) { - var pathCount = (int)NativeFunctions.NFD_PathSet_GetCount(&pathSet).ToUInt32(); + var pathCount = (int)NativeFunctions.NFDPathSetGetCount(&pathSet).ToUInt32(); paths = new List(pathCount); for (int i = 0; i < pathCount; i++) { - paths.Add(FromUtf8(NativeFunctions.NFD_PathSet_GetPath(&pathSet, new UIntPtr((uint)i)))); + paths.Add(FromUtf8(NativeFunctions.NFDPathSetGetPath(&pathSet, new UIntPtr((uint)i)))); } - NativeFunctions.NFD_PathSet_Free(&pathSet); + NativeFunctions.NFDPathSetFree(&pathSet); } return new DialogResult(result, null, paths, errorMessage); @@ -181,21 +180,21 @@ public static unsafe DialogResult FileOpenMultiple(string filterList = null, str public class DialogResult { - private readonly nfdresult_t result; + private readonly Nfdresult_t result; public string Path { get; } public IReadOnlyList Paths { get; } - public bool IsError => result == nfdresult_t.NFD_ERROR; + public bool IsError => result == Nfdresult_t.NFD_ERROR; public string ErrorMessage { get; } - public bool IsCancelled => result == nfdresult_t.NFD_CANCEL; + public bool IsCancelled => result == Nfdresult_t.NFD_CANCEL; - public bool IsOk => result == nfdresult_t.NFD_OKAY; + public bool IsOk => result == Nfdresult_t.NFD_OKAY; - internal DialogResult(nfdresult_t result, string path, IReadOnlyList paths, string errorMessage) + internal DialogResult(Nfdresult_t result, string path, IReadOnlyList paths, string errorMessage) { this.result = result; Path = path; diff --git a/NativeFileDialogSharpSandbox/NativeFileDialogSharpSandbox.csproj b/NativeFileDialogSharpSandbox/NativeFileDialogSharpSandbox.csproj index 5f3b95e..5b94ef9 100644 --- a/NativeFileDialogSharpSandbox/NativeFileDialogSharpSandbox.csproj +++ b/NativeFileDialogSharpSandbox/NativeFileDialogSharpSandbox.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 enable enable diff --git a/NativeFileDialogSharpSandbox/Program.cs b/NativeFileDialogSharpSandbox/Program.cs index f0a57a1..58fb361 100644 --- a/NativeFileDialogSharpSandbox/Program.cs +++ b/NativeFileDialogSharpSandbox/Program.cs @@ -1,19 +1,19 @@ using NativeFileDialogSharp; -using System; namespace NativeFileDialogSharpSandbox { internal class Program { - static void Main(string[] args) + private static void Main(string[] args) { - PrintResult(Dialog.FileOpenMultiple("pdf", null)); - PrintResult(Dialog.FileOpen(null)); - PrintResult(Dialog.FileSave(null)); - PrintResult(Dialog.FolderPicker(null)); + RunTest(); + // PrintResult(Dialog.FileOpenMultiple("pdf", null)); + // PrintResult(Dialog.FileOpen(null)); + // PrintResult(Dialog.FileSave(null)); + // PrintResult(Dialog.FolderPicker(null)); } - static void PrintResult(DialogResult result) + private static void PrintResult(DialogResult result) { Console.WriteLine($"Path: {result.Path}, IsError {result.IsError}, IsOk {result.IsOk}, IsCancelled {result.IsCancelled}, ErrorMessage {result.ErrorMessage}"); if (result.Paths != null) @@ -22,5 +22,52 @@ static void PrintResult(DialogResult result) Console.WriteLine(string.Join("\n", result.Paths)); } } + + + private static DialogResult OpenDialog(string? filterList = null, string? defaultPath = null) + { + var dialogResult = Dialog.FileOpen(filterList, defaultPath); + return dialogResult; + } + + public static bool TryOpenDialog(out DialogResult? dialogResult, string? filterList = null, string? defaultPath = null) + { + dialogResult = OpenDialog(filterList, defaultPath); + return dialogResult.IsOk; + } + + private static void RunTest() + { + var desktopDir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); + var status = TryOpenDialog( + out DialogResult? dialogResult, + filterList: "bamc", + defaultPath: desktopDir + ); + + if (!status || dialogResult == null) + { + var cancelled = dialogResult?.IsCancelled ?? false; + var errored = dialogResult?.ErrorMessage != null; + var message = + cancelled ? "Operation cancelled." : + errored ? dialogResult!.ErrorMessage : + "Unspecified"; + + Console.WriteLine + ( + string.Join(Environment.NewLine, [ + "Unable to complete the OpenFileDialog process.", + "Error Log:", + message + ]) + ); + Environment.Exit(1); + } + + Console.WriteLine($"Selected file path: {dialogResult.Path}"); + } + + } } diff --git a/NativeFileDialogSharpSandboxNetFramework/App.config b/NativeFileDialogSharpSandboxNetFramework/App.config deleted file mode 100644 index e89424b..0000000 --- a/NativeFileDialogSharpSandboxNetFramework/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/NativeFileDialogSharpSandboxNetFramework/NativeFileDialogSharpSandboxNetFramework.csproj b/NativeFileDialogSharpSandboxNetFramework/NativeFileDialogSharpSandboxNetFramework.csproj deleted file mode 100644 index b460e14..0000000 --- a/NativeFileDialogSharpSandboxNetFramework/NativeFileDialogSharpSandboxNetFramework.csproj +++ /dev/null @@ -1,102 +0,0 @@ - - - - - Debug - AnyCPU - {0FD91168-D8F5-4776-8D91-CB9B9C55AA1B} - Exe - NativeFileDialogSharpSandboxNetFramework - NativeFileDialogSharpSandboxNetFramework - v4.6.2 - 512 - true - true - - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - 7.3 - prompt - true - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - 7.3 - prompt - true - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - 7.3 - prompt - true - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - 7.3 - prompt - true - - - - ..\packages\NativeFileDialogSharp.0.5.0\lib\netstandard2.0\NativeFileDialogSharp.dll - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/NativeFileDialogSharpSandboxNetFramework/Program.cs b/NativeFileDialogSharpSandboxNetFramework/Program.cs deleted file mode 100644 index 485a57f..0000000 --- a/NativeFileDialogSharpSandboxNetFramework/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using NativeFileDialogSharp; -using System; - -namespace NativeFileDialogSharpSandboxNetFramework -{ - internal class Program - { - static void Main(string[] args) - { - PrintResult(Dialog.FileOpenMultiple("pdf", null)); - PrintResult(Dialog.FileOpen(null)); - PrintResult(Dialog.FileSave(null)); - PrintResult(Dialog.FolderPicker(null)); - } - - static void PrintResult(DialogResult result) - { - Console.WriteLine($"Path: {result.Path}, IsError {result.IsError}, IsOk {result.IsOk}, IsCancelled {result.IsCancelled}, ErrorMessage {result.ErrorMessage}"); - if (result.Paths != null) - { - Console.WriteLine("Paths"); - Console.WriteLine(string.Join("\n", result.Paths)); - } - } - } -} diff --git a/NativeFileDialogSharpSandboxNetFramework/Properties/AssemblyInfo.cs b/NativeFileDialogSharpSandboxNetFramework/Properties/AssemblyInfo.cs deleted file mode 100644 index ffd8a87..0000000 --- a/NativeFileDialogSharpSandboxNetFramework/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NativeFileDialogSharpSandboxNetFramework")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NativeFileDialogSharpSandboxNetFramework")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0fd91168-d8f5-4776-8d91-cb9b9c55aa1b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/NativeFileDialogSharpSandboxNetFramework/nfd.dll b/NativeFileDialogSharpSandboxNetFramework/nfd.dll deleted file mode 100644 index 76865ae..0000000 Binary files a/NativeFileDialogSharpSandboxNetFramework/nfd.dll and /dev/null differ diff --git a/NativeFileDialogSharpSandboxNetFramework/nfd_x86.dll b/NativeFileDialogSharpSandboxNetFramework/nfd_x86.dll deleted file mode 100644 index 4aa6782..0000000 Binary files a/NativeFileDialogSharpSandboxNetFramework/nfd_x86.dll and /dev/null differ diff --git a/NativeFileDialogSharpSandboxNetFramework/packages.config b/NativeFileDialogSharpSandboxNetFramework/packages.config deleted file mode 100644 index 8336421..0000000 --- a/NativeFileDialogSharpSandboxNetFramework/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/README.md b/README.md index b71a43a..fefc53f 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,7 @@ The library currently implements - Windows x86-64 - Linux x86-64 - macOS x86-64 + +All credits to [milleniumbug](https://github.com/milleniumbug/NativeFileDialogSharp) + +I simply updated the codebase from .NET 6 to .NET 10, and removed .NET Framework support due to it not fitting my project requirements.