Skip to content

Update sample to be able use NativeAOT #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update sample to be able use NativeAOT
rd.xml file is workaround to SharpDx limitations.
  • Loading branch information
kant2002 committed Mar 25, 2023
commit 77e68ea6fa7d8b53752166b8e8cfc914df1f42eb
7 changes: 6 additions & 1 deletion src/ImGui.NET.SampleProgram/ImGui.NET.SampleProgram.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishAot>true</PublishAot>
</PropertyGroup>

<ItemGroup>
Expand All @@ -12,6 +13,10 @@
<PackageReference Include="Veldrid.StartupUtilities" Version="4.8.0" />
<ProjectReference Include="..\ImPlot.NET\ImPlot.NET.csproj" />
</ItemGroup>

<ItemGroup>
<RdXmlFile Include="rd.xml" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Shaders/GLSL/imgui-vertex.glsl" LogicalName="imgui-vertex.glsl" />
Expand Down
11 changes: 11 additions & 0 deletions src/ImGui.NET.SampleProgram/rd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Directives>
<Application>
<Assembly Name="SharpDX.DXGI" Dynamic="Required All">
<Type Name="SharpDX.DXGI.Factory" Dynamic="Required All" />
</Assembly>
<Assembly Name="SharpDX.Direct3D11" Dynamic="Required All">
<Type Name="SharpDX.Direct3D11.Texture2D" Dynamic="Required All" />
</Assembly>
</Application>
</Directives>