-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
wap packaging: .xbf and .pri generation is not working for us #1816
Comments
Oh, also, this results in a crash when you use builds from Azure DevOps or MSBuild. Yeah. |
Previous (and occasionally silly) discussion as part of another issue thread: #1364 (comment) As Dustin notes above, .appx packages and loose-file app package layouts with this defect will cause Terminal to crash on startup; the precise nature of the crash is discussed in the other thread. |
I have a terrible idea. I'm going to use my holiday and try to replace the WAP packaging project with a native UWP project. Instead of going from EXE to Centennial (which is apparently very hard), why not go from UWP to Centennial (which will probably expose hundreds of other issues, but solve this set of a hundred issues 😁) |
Everything is terrible! 😄
|
WinUI and XAML Desktop apps - may change all this. I hope you are sharing your findings and thoughts with that team. |
@mdtauk not only are we sharing our findings and thoughts with that team, we report to the same engineering manager as that team. 😄 |
@DHowett-MSFT I can only imagine that the VS team, would be developing new compilation and packaging processes, to match the requirements of the frameworks which are to come |
Yeah, if you add TerminalConnection as a direct dependency to wapproj, it has to re-link it during deployment, and it refuses to link in ConTypes.lib. |
/cc @ocalvo for info |
/cc @azchohfi for info |
* Fix the WAP packaging project This commits fixes the centennial package by: * Forcing XBF (XAML binary format) files to be embedded in project PRI files. * Moving package content generation to before PRI generation * Collecting all of the package's PRI files to merge into resources.pri * Fixing the hardcoded resource paths to reflect the new reality. It also includes a magic value that fixes the bug where the project is autodetected as a Mixed (CLR + Native) project. Fixes #1816.
I can't reopen issues after they have been closed, so paging @DHowett-MSFT: It looks like the issue wasn't fixed or was reintroduced - I built the current |
Yuuuup! #2018 to fix :) |
* Fix the WAP packaging project This commits fixes the centennial package by: * Forcing XBF (XAML binary format) files to be embedded in project PRI files. * Moving package content generation to before PRI generation * Collecting all of the package's PRI files to merge into resources.pri * Fixing the hardcoded resource paths to reflect the new reality. It also includes a magic value that fixes the bug where the project is autodetected as a Mixed (CLR + Native) project. Fixes microsoft#1816.
The WAP packaging project, CascadiaPackage, consumes most of its important dependencies transitively. It depends on WindowsTerminal and Host.EXE.
By default, wapproj puts all files collected from a project into a subdirectory named after that project, even if those files were originally from a nested dependency. This includes the
.exe
s.We've suppressed that behavior so that
WindowsTerminal
andconhost
can live in the appx package root next to their DLLs.We must also do this so that the
.winmd
-> AppX Manifest generator works right -- if we don't, it will insert references like this:when our directory structure looks like this:
This will fail validation (and activation)! This cannot be fixed, so we stomp the directory for DLL and EXE files.
terminal/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
Lines 300 to 310 in eae920e
Well, we're also stomping the directory for XBF files. Therefore,
MinMaxCloseControl.xbf
andApp.xbf
end up in the appx root.This works, because we've overridden their resource locator paths:
terminal/src/cascadia/TerminalApp/MinMaxCloseControl.cpp
Lines 17 to 18 in eae920e
That works great when deployed from Visual Studio. However, when the project is deployed by MSBuild (like in our CI), those loose XBF files are missing. If you look in one of the PRI files, it says that the path is
TerminalApp/MinMaxCloseControl.xbf
.Well, that never existed on disk (see above: wapproj would put it in
WindowsTerminal/MinMaxCloseControl.xbf
because it was a transitive dependency.)It gets worse. That path would actually work because the XBF file has been merged into the PRI file(!). However, the PRI files from wapproj transitive dependencies do not get merged into the global
resources.pri
.If the transitive dependency PRI files can be merged into
resources.pri
, we can skip overriding the resource loader and remove the loose XBF files from our package./cc @metathinker, who originally reported a crash from the CI builds.
The text was updated successfully, but these errors were encountered: