microsoft / Xaml-Islands-Samples

MIT License
102 stars 44 forks source link

MFC Sample Throws Exception #11

Open andrewpitts15 opened 4 years ago

andrewpitts15 commented 4 years ago

When I tried to build and run MFCXamlIslands.sln, it throws an exception.

'MFCApp.exe' (Win32): Unloaded 'D:\Development\Xaml-Islands-Samples\bin\x64\Debug\MFCApp\MyApp.dll' onecore\com\combase\objact\dllcache.cxx(2070)\combase.dll!00007FFED7F4EB9E: (caller: 00007FFED7E36B36) ReturnHr(1) tid(4014) 8007007E The specified module could not be found. onecore\com\combase\objact\dllcache.cxx(4569)\combase.dll!00007FFED7F2D75D: (caller: 00007FFED7E355BD) ReturnHr(2) tid(4014) 8007007E The specified module could not be found. onecore\com\combase\objact\dllcache.cxx(4701)\combase.dll!00007FFED7F2D780: (caller: 00007FFED7E355BD) ReturnHr(3) tid(4014) 8007007E The specified module could not be found. Exception thrown at 0x00007FFED5E9A799 (KernelBase.dll) in MFCApp.exe: WinRT originate error - 0x8007007E : 'The specified module could not be found.'. 'MFCApp.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'. Exception thrown at 0x00007FFED5E9A799 in MFCApp.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x000000DFF7DCF108.

Windows 10 1909 (OS Build 18363.778) Visual Studio 2019 16.6.0

rstefan912 commented 4 years ago

Same problem here. It's trying to construct the SampleLibraryCS run component and that is exactly the type of component I want to use. In the debugger call stack:

MyApp.dll!winrt::impl::factory_cache_entry<winrt::SampleLibraryCS::SampleLibraryCS_XamlTypeInfo::XamlMetaDataProvider,winrt::Windows::Foundation::IActivationFactory>::call<winrt::SampleLibraryCS::SampleLibraryCS_XamlTypeInfo::XamlMetaDataProvider (__cdecl)(winrt::Windows::Foundation::IActivationFactory const &)>(winrt::SampleLibraryCS::SampleLibraryCS_XamlTypeInfo::XamlMetaDataProvider()(const winrt::Windows::Foundation::IActivationFactory &) && callback) Line 6082 C++

BOFH-raf commented 4 years ago

Same problem here. If even the samples are not working...it seems not very reliable.

MattBDev commented 3 years ago

I can confirm this issue. It would be nice to know if these Xaml Islands Samples are being maintained or not. If they aren't they should probably be removed from the Windows Developer Docs.

marb2000 commented 3 years ago

Adding @ocalvo, @asklar, and @kmelmon for awareness.

netx123 commented 1 year ago

I'm having this exact same issue in VS2022, everything seems to build just fine, but I get these exceptions, is this just a bug in the example code? or does XAML islands just not work?