Legacyaddin在Natvis Visual Studio 2022中不再工作

发布于 2025-01-28 01:20:03 字数 829 浏览 2 评论 0原文

LegacyAddin的工作正常,直到2019年VisualStudio。但是,下面的“ NATVIS”代码从Visual Studio 2022开始就停止工作:


<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
    <Type Name="ATL::COleDateTime">
        <DisplayString LegacyAddin="ClassLibrary1.dll" Export='Class1'></DisplayString>
    </Type>
</AutoVisualizer>

当我在C ++中编译ClassLibrary1.dll(以前是)时,它甚至都不会负载。当我使用C#进行编译时,它会加载,但会收到以下消息:

NATVIS:C:\ Program Files \ Microsoft Visual Studio \ 2022 \ Community \ Commun77 \ packages \ backages \ debugger \ debugger \ castiosaddin.natvis(4,3):错误(4,3):错误(4,3): :无法从C:\ Program Files \ Microsoft Visual Studio \ 2022 \ Community \ Commun7 \ packages \ debugger \ debugger \ classLibrary1.dll加载addin。

注意:日语字符似乎是导出字符串解释为Unicode ...

LegacyAddin worked fine until VisualStudio 2019. But the 'natvis' code below stopped to work since Visual Studio 2022:


<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
    <Type Name="ATL::COleDateTime">
        <DisplayString LegacyAddin="ClassLibrary1.dll" Export='Class1'></DisplayString>
    </Type>
</AutoVisualizer>

When I compile ClassLibrary1.dll in C++ (as used to be) it not even loads. When I compile it using C#, it loads but I get the following message:

Natvis: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Packages\Debugger\Visualizers\CardiosAddin.natvis(4,3): Error: Failed to load addin from C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Packages\Debugger\Visualizers\ClassLibrary1.dll for type ATL::COleDateTime: Addin dll missing export 汃獡ㅳ.

Note: the japanese characters seems to be the Export string interpreted as unicode...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

锦上情书 2025-02-04 01:20:03

解决!只需在64位(X64平台)中编译DLL(ATL C ++还可以; C#未测试),然后使用extern“ C”导出DLL函数。

Solved! Just compile the dll (ATL C++ is OK; C# not tested) in 64 bits (x64 Platform) and export the dll functions using extern "C".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文