5 Commits
Author SHA1 Message Date
ds5678 43573a623e Bump version to 1.1.0 and update copyright year
Updated the project version from 1.0.1 to 1.1.0 and changed the copyright year to 2026 in Directory.Build.props.
2026-01-03 15:17:50 -08:00
ds5678 da64c1a6d0 Replace .sln with .slnx XML-based solution format
Replaced the traditional Visual Studio .sln file with a new .slnx file using an XML-based format. The new solution file includes all projects and solution items, modernizing the solution structure and improving compatibility with alternative tooling and editors.
2026-01-03 15:14:50 -08:00
dependabot[bot] 76e1f42c15 Bump actions/upload-artifact from 4 to 6 (#14)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-03 15:11:38 -08:00
dependabot[bot] 1e60e65ae4 Bump actions/checkout from 4 to 6 (#13)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-03 15:11:28 -08:00
Marceli Antosik efd1956ab9 Require CETCompat to be false and other improvements (#15)
* Disable CETCompat

Solves issue described here:
https://github.com/AssetRipper/AssetRipper/issues/2047

* .NET 10 and Readme Update

* Update .NET version in Directory.Build.props

* TerraFX 10.0.26100.6 and publish.yaml fix

- Changed TerraFX version from 10.0.26100.2 -> 10.0.26100.6
- Changed net9.0 path to net10.0 in publish.yaml
- Removed TargetFramework property from .csproj
- Added links to similar issues in README.md

* All Files Filter name changed in Save Dialog

To stay consistent with the standard convention and keep the behavior uniform across dialogs, I also changed All Files to All Files (*.*) in the Save File dialog.
2026-01-03 15:10:59 -08:00
10 changed files with 59 additions and 73 deletions

No files matched your search

+14 -14
View File
@@ -22,11 +22,11 @@ jobs:
- { name: mac_arm64, os: macos-latest, runtime: osx-arm64, executable: AssetRipper.NativeDialogs.Example }
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
# https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/cross-compile#linux
- name: Install Arm64 Dependencies
@@ -52,14 +52,14 @@ jobs:
run: ls -R ./AssetRipper.NativeDialogs.Example/bin/Release/
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: Example_${{ matrix.config.name }}
path: |
./AssetRipper.NativeDialogs.Example/bin/Release/net9.0/${{ matrix.config.runtime }}/publish/${{ matrix.config.executable }}
./AssetRipper.NativeDialogs.Example/bin/Release/net9.0/${{ matrix.config.runtime }}/publish/*.dll
./AssetRipper.NativeDialogs.Example/bin/Release/net9.0/${{ matrix.config.runtime }}/publish/*.so
./AssetRipper.NativeDialogs.Example/bin/Release/net9.0/${{ matrix.config.runtime }}/publish/*.dylib
./AssetRipper.NativeDialogs.Example/bin/Release/net10.0/${{ matrix.config.runtime }}/publish/${{ matrix.config.executable }}
./AssetRipper.NativeDialogs.Example/bin/Release/net10.0/${{ matrix.config.runtime }}/publish/*.dll
./AssetRipper.NativeDialogs.Example/bin/Release/net10.0/${{ matrix.config.runtime }}/publish/*.so
./AssetRipper.NativeDialogs.Example/bin/Release/net10.0/${{ matrix.config.runtime }}/publish/*.dylib
if-no-files-found: error
publish_web_api:
@@ -76,11 +76,11 @@ jobs:
- { name: mac_arm64, os: macos-latest, runtime: osx-arm64, executable: AssetRipper.NativeDialogs.WebApi }
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
# https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/cross-compile#linux
- name: Install Arm64 Dependencies
@@ -106,12 +106,12 @@ jobs:
run: ls -R ./AssetRipper.NativeDialogs.WebApi/bin/Release/
- name: Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: WebApi_${{ matrix.config.name }}
path: |
./AssetRipper.NativeDialogs.WebApi/bin/Release/net9.0/${{ matrix.config.runtime }}/publish/${{ matrix.config.executable }}
./AssetRipper.NativeDialogs.WebApi/bin/Release/net9.0/${{ matrix.config.runtime }}/publish/*.dll
./AssetRipper.NativeDialogs.WebApi/bin/Release/net9.0/${{ matrix.config.runtime }}/publish/*.so
./AssetRipper.NativeDialogs.WebApi/bin/Release/net9.0/${{ matrix.config.runtime }}/publish/*.dylib
./AssetRipper.NativeDialogs.WebApi/bin/Release/net10.0/${{ matrix.config.runtime }}/publish/${{ matrix.config.executable }}
./AssetRipper.NativeDialogs.WebApi/bin/Release/net10.0/${{ matrix.config.runtime }}/publish/*.dll
./AssetRipper.NativeDialogs.WebApi/bin/Release/net10.0/${{ matrix.config.runtime }}/publish/*.so
./AssetRipper.NativeDialogs.WebApi/bin/Release/net10.0/${{ matrix.config.runtime }}/publish/*.dylib
if-no-files-found: error
@@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<PublishAot>true</PublishAot>
<CETCompat>false</CETCompat>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<PublishAot>true</PublishAot>
<CETCompat>false</CETCompat>
</PropertyGroup>
<ItemGroup>
-48
View File
@@ -1,48 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36301.6
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetRipper.NativeDialogs.Example", "AssetRipper.NativeDialogs.Example\AssetRipper.NativeDialogs.Example.csproj", "{637F54CA-046C-41C3-BC47-488F6CAB4A58}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetRipper.NativeDialogs", "AssetRipper.NativeDialogs\AssetRipper.NativeDialogs.csproj", "{B666C286-5649-456B-A356-FB91DC0DE0C3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
.github\dependabot.yml = .github\dependabot.yml
Directory.Build.props = Directory.Build.props
LICENSE = LICENSE
.github\workflows\publish.yml = .github\workflows\publish.yml
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetRipper.NativeDialogs.WebApi", "AssetRipper.NativeDialogs.WebApi\AssetRipper.NativeDialogs.WebApi.csproj", "{18204EF5-F8B0-4314-BF6C-3FBB2AD6FB12}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{637F54CA-046C-41C3-BC47-488F6CAB4A58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{637F54CA-046C-41C3-BC47-488F6CAB4A58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{637F54CA-046C-41C3-BC47-488F6CAB4A58}.Release|Any CPU.ActiveCfg = Release|Any CPU
{637F54CA-046C-41C3-BC47-488F6CAB4A58}.Release|Any CPU.Build.0 = Release|Any CPU
{B666C286-5649-456B-A356-FB91DC0DE0C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B666C286-5649-456B-A356-FB91DC0DE0C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B666C286-5649-456B-A356-FB91DC0DE0C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B666C286-5649-456B-A356-FB91DC0DE0C3}.Release|Any CPU.Build.0 = Release|Any CPU
{18204EF5-F8B0-4314-BF6C-3FBB2AD6FB12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18204EF5-F8B0-4314-BF6C-3FBB2AD6FB12}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18204EF5-F8B0-4314-BF6C-3FBB2AD6FB12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18204EF5-F8B0-4314-BF6C-3FBB2AD6FB12}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1D6CFC53-7372-4EF6-B954-364EC2218A9B}
EndGlobalSection
EndGlobal
+14
View File
@@ -0,0 +1,14 @@
<Solution>
<Folder Name="/Solution Items/">
<File Path=".editorconfig" />
<File Path=".github/dependabot.yml" />
<File Path=".github/workflows/publish.yml" />
<File Path=".gitignore" />
<File Path="Directory.Build.props" />
<File Path="LICENSE" />
<File Path="README.md" />
</Folder>
<Project Path="AssetRipper.NativeDialogs.Example/AssetRipper.NativeDialogs.Example.csproj" />
<Project Path="AssetRipper.NativeDialogs.WebApi/AssetRipper.NativeDialogs.WebApi.csproj" />
<Project Path="AssetRipper.NativeDialogs/AssetRipper.NativeDialogs.csproj" />
</Solution>
@@ -2,6 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CETCompat>false</CETCompat>
<PackageId>AssetRipper.NativeDialogs</PackageId>
<PackageTags>C# file</PackageTags>
@@ -13,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TerraFX.Interop.Windows" Version="10.0.26100.2" />
<PackageReference Include="TerraFX.Interop.Windows" Version="10.0.26100.6" />
</ItemGroup>
<ItemGroup>
+3 -4
View File
@@ -1,5 +1,4 @@
using System.Buffers;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using TerraFX.Interop.Windows;
@@ -37,7 +36,7 @@ public static class OpenFileDialog
new Span<char>(buffer).Clear();
fixed (char* bufferPtr = buffer)
fixed (char* filterPtr = "All Files\0*.*\0")
fixed (char* filterPtr = "All Files (*.*)\0*.*\0\0")
{
OPENFILENAMEW ofn = default;
ofn.lStructSize = (uint)Unsafe.SizeOf<OPENFILENAMEW>();
@@ -46,7 +45,7 @@ public static class OpenFileDialog
ofn.nMaxFile = (uint)buffer.Length;
ofn.lpstrFilter = filterPtr;
ofn.nFilterIndex = 1; // The first pair of strings has an index value of 1.
ofn.Flags = OFN.OFN_PATHMUSTEXIST | OFN.OFN_FILEMUSTEXIST;
ofn.Flags = OFN.OFN_PATHMUSTEXIST | OFN.OFN_FILEMUSTEXIST | OFN.OFN_EXPLORER;
if (Windows.GetOpenFileNameW(&ofn))
{
int length = Array.IndexOf(buffer, '\0');
@@ -116,7 +115,7 @@ public static class OpenFileDialog
new Span<char>(buffer).Clear();
fixed (char* bufferPtr = buffer)
fixed (char* filterPtr = "All Files\0*.*\0")
fixed (char* filterPtr = "All Files (*.*)\0*.*\0\0")
{
OPENFILENAMEW ofn = default;
ofn.lStructSize = (uint)Unsafe.SizeOf<OPENFILENAMEW>();
+1 -1
View File
@@ -35,7 +35,7 @@ public static class SaveFileDialog
char[] buffer = ArrayPool<char>.Shared.Rent(ushort.MaxValue + 1); // Should be enough for the overwhelming majority of cases.
new Span<char>(buffer).Clear();
string filter = "All Files\0*.*\0\0";
string filter = "All Files (*.*)\0*.*\0\0";
fixed (char* bufferPtr = buffer)
fixed (char* filterPtr = filter)
+3 -3
View File
@@ -1,13 +1,13 @@
<Project>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>Latest</LangVersion>
<Nullable>enable</Nullable>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<VersionPrefix>1.0.1</VersionPrefix>
<Copyright>Copyright (c) 2025 ds5678</Copyright>
<VersionPrefix>1.1.0</VersionPrefix>
<Copyright>Copyright (c) 2026 ds5678</Copyright>
<Authors>ds5678</Authors>
<Company>AssetRipper</Company>
<Description>Cross platform library for native file dialogs.</Description>
+19
View File
@@ -1,3 +1,22 @@
# AssetRipper.NativeDialogs
A cross-platform library for picking files and folders in .NET applications.
## CETCompat requirement (Windows)
On Windows, downstream projects must disable `CETCompat`. Leaving it enabled may cause crashes when opening native file dialogs.
Add the following to the consuming project’s `.csproj`:
```xml
<PropertyGroup>
<CETCompat>false</CETCompat>
</PropertyGroup>
```
### Why?
Native file dialogs can load .NET Framework components that do not support CET mitigations. When CETCompat is enabled, this may lead to shadow stack violations and runtime crashes. CET affects the entire process, so it must be disabled by the application that uses this library.
### Similar issues in other repositories
- https://github.com/dotnet/wpf/issues/10483#issuecomment-2669897861
- https://github.com/microsoft/PowerToys/issues/37254#issue-2826006174