Forum Discussion
Bertrand_Bram
Mar 27, 2025Copper Contributor
MEF's CompositionException issue with MSIX
I am developing a C# project relying on Managed Extensibility Framework (MEF) to do its job, with Services .DLL like [Export(typeof(IPerson))] public class People : IPerson { ... } ...
Mar 30, 2025
You are using some things I don't have experience with, but I can suggest that you try a sxstrace against the run to see what .Net tells you about the failure to load. A ProcessMonitor trace might also be helpful, but start with the sxstrace.
I don't think there is anything in running in the MSIX container that should interfere with your code, unless the exe is not at the root of the package. When running inside the container the working directory of the exe is the C:\Windows\System32 folder and not the folder of the exe. In that case, the simplest solution would be either to place the dlls in the root folder, or under a VFS\SystemX64 (or VFS\SystemX86 if 32bit) folder. MSIX will always find the dlls if there.
Tim