midl.exe 无法加载 mscorlib.tlb
我正在尝试使用 midl 将 idl 文件转换为 tlb。但是,当我尝试时,我收到此警告:
warning MIDL2015: failed to load tlb in importlib : mscorlib.tlb
然后我收到后续错误:
error MIDL2337 : unsatisfiedforward statements : _Object.....
我确信错误是由于第一个警告造成的。我在另一台机器上尝试了相同的命令并且成功了,所以我知道 idl 文件是正确的。
我尝试卸载 .NET 框架并重新安装它,希望能够解决问题,但没有效果。
所以我的问题是,我需要在我的计算机上修复什么才能允许 midl 再次找到 mscorlib.tlb?
I'm trying to use midl to turn an idl file into a tlb. However, when I try I get this warning:
warning MIDL2015: failed to load tlb in importlib : mscorlib.tlb
and I then get a subsequent error:
error MIDL2337 : unsatisfied forward declaration : _Object.....
I'm certain that the error is due to the first warning. I've tried the same command on a different machine and it succeeds, so I know that the idl file is correct.
I've tried uninstalling the .NET framework and reinstalling it in the hope that that would fix things, but it had no effect.
So my question is, what do I need to fix on my machine to allow midl to locate mscorlib.tlb once more?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
原来是我的 PATH 环境变量有问题 - 它不包括 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\,但这是在另一台计算机上指定的。
Turned out to be a problem with my PATH env variable - it didn't include C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\, but this was specified on the other machine.