msix packaging tools
4 TopicsEnvironment variables in MSIX package wont be used by AVD session host
Hi, We've been struggling with environment variables in MSIX packages. The package is created with Microsoft's MSIX Packaging Tool and a script was used under capture. Script is adding environment variables as we can see in the virtual registry after the package has been created. Problem is that session host will not use these environment variable keys. The package works, but there's a SSO feature which doesn't work because of the environment variables. If we add them manually on the session host the SSO feature works fine. We have tried the PSF tool using the fix there for environment variables, but once we change the AppxManifest.xml to point to PsfLauncher32.exe it gives the following error on the session host: 16.03.23 15:54:29 Error 403 avd-mgmt-7 error 0x80080207: Failure to get staging session for: \\?\Volume{9dc101d8-0130-4a01-xxxx-a81e0088b390}\applications\xxxx__trsqtdqqj719r. 16.03.23 15:54:29 Error 481 avd-mgmt-7 error 0x80080207: Opening the loose file package from location xxxx__trsqtdqqj719r failed. Any suggestions on what we can try?3.8KViews0likes12CommentsNew version of MSIX Packaging tool - Generally Available
We are excited to introduce a new version of the MSIX Packaging tool (v1.2023.1005.0). Package Analyzer, PSF-MPT Integration, Desktop shortcuts and a lot more features to help improve productivity during package conversion. We also have a new version of the tool in Insiders, with incremental features! What’s new in MSIX: November 2023 | Windows IT Pro Blog (microsoft.com) Looking forward for you all to try it and provide feedback!1KViews2likes2CommentsHow does "com4:ManagedInProcessServer" work under a MSIX packaging scenario?
I'm trying to create a MSIX package for a classic Windows desktop app. The app is written in C# (.NET Framework 4.7.2), and it's running perfectly both before and after packaging. The problem is that the app exposes a COM class library (also written in C#) for interop with other apps. The original installer of this app registers the COM library with "regasm.exe". Given that MSIX have the ability to expose COM servers, namely with the "windows.comServer" extension, I've tried adding the following extension to package manifest, but it does not work as intended: <com:Extension Category="windows.comServer"> <com:ComServer> <com:SurrogateServer DisplayName="TheApp Class Library"> <com:Class Id="8ae249dd-05f8-403e-ac32-00feab49c1f5" Path="TheApp.Library.dll" ThreadingModel="STA" /> </com:SurrogateServer> </com:ComServer> </com:Extension> After some research I've found that C# COM libraries registers differently with normal ones; namely it requires a few more entries than DLL path and CLSID written into the registry. Digging through the documents, I've found that https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-com4-managedinprocessserver seems to be just what I needed. So I've tried to use the following extension instead: <com4:Extension Category="windows.comServer"> <com4:ComServer> <com4:ManagedInProcessServer Assembly="TheApp.Library, Version=1.0.0.0, Culture=neutral" RuntimeVersion="v4.0.30319"> <com4:Class Id="8ae249dd-05f8-403e-ac32-00feab49c1f5" ImplementationClass="TheApp.Library.ExtensionManager" ThreadingModel="STA" Virtualization="disabled" /> </com4:ManagedInProcessServer> </com4:ComServer> </com4:Extension> But it still does not work. In fact, this time even the "HKEY_CLASSES_ROOT\CLSID\{...}" registry entries do not get generated. I've checked the https://learn.microsoft.com/en-us/windows/win32/appxpkg/troubleshooting#get-diagnostic-information and no error has ever occurred during package installation. It is as if the extension declaration is not there. What confuses me more is that "com4:ManagedInProcessServer" does not allow specifying codebase for the assembly. With "regasm.exe" one can specify the full path to COM library with "/codebase", but "com4:ManagedInProcessServer" does not seem to be allowing this. I've been looking for relevant information for quite some time, but all I could find is the single document page on XML schema (linked above), with no real-world code examples. (And by "no" I mean literally ZERO code example on Internet.) I would like to know if "com4:ManagedInProcessServer" works under the situation described above, and if not so, what should I do to have a C# COM library exposed by a MSIX package? If it matters, I'm using the latest version of Visual Studio Community 2022 with SDK version 10.0.22621.0. The MSIX package is to be deployed on a Windows 11 23H2 system.860Views0likes1CommentMSIX Packaging Tools Install Size
To start off on a positive note, I'm thrilled to finally see a modern replacement for the horribly source-control-unfriendly "https://marketplace.visualstudio.com/items?itemName=visualstudioclient.MicrosoftVisualStudio2017InstallerProjects" (.vdproj) files, but equally disappointed to see the enormous install size requirement. I was very much looking forward to try it out, but unfortunately this is a non-starter for me. I don't even have that much free space on my machine. Surely anyone would agree that 9.78 GB for WSIX is ridiculous. Please bring that down to less than a Gig (including dependencies), which is still excessive, but at least tenable. P.S. When posting this, it's unclear to me the distinction between Labels and Tags for this post, and without any auto-complete suggestions, I just went freestyle. 😉1.7KViews0likes2Comments