Comments (5)
我的最小化 demo 在 AOT 下起不来,也看不到 stack trace
是资源文件被错误剪裁掉了吗?建议可以用 HxD 之类的工具看看生成的 exe 有没有正确包括两个 ttf 文件
from fluenticons.
确认了字体文件是有打包进exe的。
而且在xaml里指定Segoe字体是可以运行的:
<StackPanel>
<ic:SymbolIcon Symbol="Home" />
<ic:SymbolIcon Symbol="Home" UseSegoeMetrics="True"/>
</StackPanel>
在 BuildAvaloniaApp
里调用 UseSegoeMetrics()
就会崩溃
from fluenticons.
AOT 要加些啥东西,怎么查 trace?我这边 demo 起不来。
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<PublishAot>true</PublishAot>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.*" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.*" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.*" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.*" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.*" />
<PackageReference Include="FluentIcons.Avalonia" Version="1.1.*" />
<!-- <PackageReference Include="SkiaSharp" Version="3.0.0-preview.0.132" /> -->
</ItemGroup>
<ItemGroup>
<TrimmerRootDescriptor Include=".\TrimmerRoots.xml" />
</ItemGroup>
</Project>
<linker>
<!-- App -->
<assembly fullname="AvaloniaDemo" preserve="All" />
<!-- Avalonia Themes -->
<assembly fullname="Avalonia.Themes.Fluent" preserve="All" />
</linker>
from fluenticons.
csproj里加<PublishAot>true</PublishAot>
我用Rider直接运行就可以看到崩溃堆栈
from fluenticons.
上游 bug。参见链接 issue。
Upstream bug. See linked isssue.
from fluenticons.
Related Issues (9)
- Can I use these icons with FluentAvalonia HOT 7
- Can it be used in Winform? HOT 1
- Issue with RTL language support HOT 2
- Why disable inherit FontSize? HOT 2
- Recent base class change from Avalonia IconElement to Control HOT 7
- Avalonia Foreground Color Broken on macOS HOT 7
- Support MarkupExtensions HOT 2
- Can't set properties using style selector HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluenticons.