Tech Community Live: Windows edition
Jun 05 2024, 07:30 AM - 11:30 AM (PDT)
Microsoft Tech Community

problems with MSIX packaging and Hyper-V

Copper Contributor

I just tried creating an msix package for avd on my Hyper-V Win11 VM. I also executed the MSIX Packaging Tool on this particular VM - everything worked fine there. I used Notepad++ for test purposes and I also worked with attaching to it to the avd sessionhost.

 

Now I tried to use the win10 msix-packaging template from ms. Like above, if I use the Packaging Tool on the VM itself it works. 

 

But now I want to start the tool from my hostdevice and use the VM just for the installation process which also makes more sense to use.

 

There I'm facing this error after clicking trough the installation on the VM (I'm now using Putty for testing), after the step "First launch tasks" 

NZ463_1-1694069256703.png

 

 

Full Error:

 

[07/09/2023 08:46:19] [Error] Error Occurred: Exception caught at MSIXRemoteServer - Method: Invoke, Message: Exception caught at MSIXRemoteServer - Method: <PreparePackage>b__3_3, Message: Object reference not set to an instance of an object.
Server exception: Exception caught at MSIXRemoteServer - Method: <PreparePackage>b__3_3, Message: Object reference not set to an instance of an object.
at MsixGenerator.LocalOrRemoteExecution.Wcf.STAOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

 

 

Thanks for your help!

 

 

 

 

3 Replies
I would suggest that you read through the comments at the top of this script that describes what is needed on the setup for remote packaging. One or more of those steps were probably missed. Note: I keep the hypervisor and any VMs in use domain joined to make it easier. This github is my fork of the automated repackaing for multiple packages, you don't need the script but do need the setup information described..
https://github.com/TimMangan/MSIX-Toolkit/blob/master/Scripts/BatchConversion/entry.ps1
Hey, thanks for your answer.
I only "missed" the step of domain joining the worker machine.
However I'm still getting the same error as beforehand...
Unfortunately I can't debug the MMPT. But I'd guess that this is a basic permissions-like issue. I would suggest verifying that you can remote powershell using psremoting from the involking machine into the packaging VM. Trouble shoot that way and the MMPT should be OK.