简体   繁体   English

我无法将 a.svg 文件设置为 maui 应用程序图标

[英]I can't set a .svg file as a maui app icon

I can't set my.svg file as my app icon.我无法将 my.svg 文件设置为我的应用程序图标。 I put the.svg file inside the Resources folder and changed its "Build Actions" properties to MauiIcon and in the.csproj file I wrote: [1]: https://i.stack.imgur.com/8YDAo.png我将 .svg 文件放在 Resources 文件夹中,并将其“Build Actions”属性更改为 MauiIcon,在 .csproj 文件中我写道:[1]: https://i.stack.imgur.com/8YDAo.png

Try the following steps尝试以下步骤

  1. Make it a basic svg file, you can take a png file and use tool to convert it to svg file.将其设为基本的 svg 文件,您可以获取 png 文件并使用工具将其转换为 svg 文件。

  2. Call the file the same as the default so appicon.svg , edit in your .csproj调用与默认文件相同的文件appicon.svg ,在您的.csproj中编辑

    <MauiIcon Include="Resources\appicon.svg" />

Refer to https://github.com/do.net/maui/issues/3755#issuecomment-1063138958 .参考https://github.com/do.net/maui/issues/3755#issuecomment-1063138958

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM