【发布时间】:2020-06-05 06:46:40
【问题描述】:
我在与我的 C++/CX UWP 项目相同的解决方案中创建了一个基于 Visual Studio 模板的 C# 运行时组件:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace httpServer
{
public sealed class Class1
{
public int SampleProperty { get; set; }
}
}
我在我的 C++/CX UWP 项目中添加了对组件的引用,并创建了如下对象:
auto srv = ref new httpServer::Class1();
解决方案编译,但在这一行我得到一个异常:
在盆景大师 UWP.exe 中的 0x776A3DB2 处引发异常:Microsoft C++ 异常:内存位置 0x05598104 处出现 EEFileLoadException。
onecore\com\combase\objact\dllcache.cxx(4713)\combase.dll!75CF6DE2: (调用者:75CFE2BB)ReturnHr(1) tid(8408) 80131040 抛出异常 Bonsai Master UWP.exe 中的 0x776A3DB2 (KernelBase.dll):WinRT 起源 错误 - 0x80131040 : '与此错误代码相关的文本可能 找不到。'。
【问题讨论】: