相关文章推荐
体贴的打火机  ·  springmvc controller ...·  1 年前    · 
失恋的橡皮擦  ·  C/C++ ...·  2 年前    · 

I'm getting this exception at the start of my application.

Exception thrown at 0x7689A892 (KernelBase.dll) in Workbench.exe: WinRT originate error - 0x80040155 : 'Failed to find proxy registration for IID: {18F80E27-59B9-5ABD-B917-B24E077FCEDB}.'.
onecore\com\combase\dcomrem\marshal.cxx(1282)\combase.dll!76F2B8AF: (caller: 76F2B41C) ReturnHr(1) tid(2d28) 80040155 Interface not registered
Msg:[Failed to marshal with IID={18F80E27-59B9-5ABD-B917-B24E077FCEDB}]

This is a WinUI application, I've commented out all of my own code so the xaml is ...

<Window
    x:Class="Workbench.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Workbench"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
</Window>

And I've put a breakpoint at the start of the MainWindow constructor ...

/// <summary>
/// An empty window that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainWindow : Window
    // brushes
    SolidColorBrush brush = new(Colors.DarkGray);
    Rectangle FrameMetricsBackgroundRect;
    public MainWindow()
        Title = Workbench"; // ** breakpoint **

And I already have the following output ...

Exception thrown at 0x7775A892 (KernelBase.dll) in Workbench.exe: WinRT originate error - 0x80040155 : 'Failed to find proxy registration for IID: {18F80E27-59B9-5ABD-B917-B24E077FCEDB}.'.
onecore\com\combase\dcomrem\marshal.cxx(1282)\combase.dll!7618B8AF: (caller: 7618B41C) ReturnHr(1) tid(607c) 80040155 Interface not registered
Msg:[Failed to marshal with IID={18F80E27-59B9-5ABD-B917-B24E077FCEDB}]
onecore\com\combase\dcomrem\marshal.cxx(1177)\combase.dll!7618B5B5: (caller: 76180BE2) LogHr(1) tid(607c) 80040155 Interface not registered
D:\a\1\s\dev\MRTCore\mrt\Core\src\MRM.cpp(276)\MRM.dll!7AA1DEA1: (caller: 7AA1F6A8) ReturnHr(1) tid(607c) 80073B17 NamedResource Not Found.
D:\a\1\s\dev\MRTCore\mrt\Core\src\MRM.cpp(403)\MRM.dll!7AA1F6C5: (caller: 7A9CBF9E) ReturnHr(2) tid(607c) 80073B17 NamedResource Not Found.
D:\a\1\s\dev\MRTCore\mrt\Core\src\MRM.cpp(755)\MRM.dll!7AA1F8E0: (caller: 7A9CBF9E) ReturnHr(3) tid(607c) 80073B17 NamedResource Not Found.
The program '[15828] Workbench.exe' has exited with code 0 (0x0).

[VS 16.9.2]

@Gavin Williams
I can't reproduce your issue based on the code you provided. Could you give more explanation to Title = Workbench? Should the 7th line of code read: SolidColorBrush brush = new SolidColorBrush(Colors.DarkGray); in your second part code sinppet? Please give me more info to create a sample to reproduce your error?