On .NET Framework you can use System.Windows.Forms.OpenFileDialog for open files with the native Windows UI but that only works on Windows.
There is a System.Windows.Forms.OpenFileDialog implementation for .Net Core or another alternative?
On .NET Framework you can use System.Windows.Forms.OpenFileDialog for open files with the native Windows UI but that only works on Windows.
There is a System.Windows.Forms.OpenFileDialog implementation for .Net Core or another alternative?
.NET Core itself does not include APIs for any UI. For example, https://docs.microsoft.com/en-us/dotnet/api/?view=netcore-2.0&term=File shows nothing relevant. This is also the current stance of .NET Core developers: https://github.com/dotnet/core/issues/374
There are several external libraries that may work on specific platforms:
If you are not really tied to .NET Core itself. UWP (which builds on top of .NET Standard but is different from .NET Core) may be an option too.
Since .NET Core added support for Windows desktop applications, WPF and Windows Forms applications that target .NET Core can use the
OpenFileDialog
andSaveFileDialog
APIs exactly the same way as they would do in the .NET Framework.These APIs have been ported to the Windows specific desktop packs that sit on top of .NET Core 3 and later.