add support for images in clipboards on macos

This commit is contained in:
Pius Friesch
2021-12-15 17:58:38 +01:00
parent 8cb235527d
commit 159c1f46c1
2 changed files with 6 additions and 1 deletions

View File

@@ -588,8 +588,12 @@ namespace ElectronNET.API
public Task<string> GetNameAsync() => BridgeConnector.OnResult<string>("appGetName", "appGetNameCompleted");
private App()
private App()
{
if (OperatingSystem.IsMacOS() || OperatingSystem.IsLinux())
{
AppContext.SetSwitch("System.Drawing.EnableUnixSupport", true);
}
CommandLine = CommandLine.Instance;
}

View File

@@ -16,6 +16,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="6.0.5.128" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ElectronNET.API\ElectronNET.API.csproj" />