Legacyaddin在Natvis Visual Studio 2022中不再工作
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决!只需在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"
.