WindowsAppSDK resource file modification requires rebuild

63 views Asked by At

In WinUI 3 C++ Desktop project I am facing a problem. Every time I modify the localization resource files I need to rebuild the full project.

It's recommended to prepare a post-build command to overcome this issue.

https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/mrtcore/localize-strings

I am not sure how the MakePri.exe command works for generating the resource.pri file for an unpackaged app.

1

There are 1 answers

0
YangXiaoPo-MSFT On BEST ANSWER

We can know that /ConfigXml(cf) is a Required Parameter under MakePri.exe New command. So, you need to create a new, initialized PRI config file for your project.

While according to Loading strings in unpackaged applications,

  • The <PRICONFIG> must omit the "<packaging>" section so that all resources are bundled in a single resources.pri file. If using the default MakePri.exe configuration file created by createconfig, you need to delete the "<packaging>" section manually after it is created.