gpt4 book ai didi

c# - 在 UWP 中可以从 C# 代码设置 package.manifest 属性吗?

转载 作者:行者123 更新时间:2023-12-04 10:53:06 27 4
gpt4 key购买 nike

在 UWP 中可以设置包。来自 C# 代码的 list 属性?

我想根据某些条件从 C# 代码设置所有 Assets 图像 if(MA) - Assets Type 1 if(OC) - Assets Type 2

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="MangoAppsUWP.App">
<uap:VisualElements
DisplayName="MangoApps"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="MangoApps"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
<uap:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#ffffff" />
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.appService">
<uap:AppService Name="MangoAppsUWPWin32ExtensionService" />
</uap:Extension>
<uap5:Extension
Category="windows.startupTask"
Executable="MangoAppsUWP.exe"
EntryPoint="MangoAppsUWP.App">
<uap5:StartupTask
TaskId="MangoAppsUWPStartUpId"
Enabled="true"
DisplayName="MangoApps" />
</uap5:Extension>
</Extensions>
</Application>
</Applications>

最佳答案

Is it possible in UWP to set package.manifest property from C# code?



目前,没有这样的方式可以编辑 package.manifest 在运行时以编程方式。

The package manifest is an XML document that contains the info the system needs to deploy, display, or update a Windows app. This info includes package identity, package dependencies, required capabilities, visual elements, and extensibility points.



Manifest 用于部署应用程序并设置应用程序对系统的权限。所以它不能在运行时改变值。

关于c# - 在 UWP 中可以从 C# 代码设置 package.manifest 属性吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59371931/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com