当禁用Visual Studio 2015中的以下解决方案设置时,为什么.Net控制台应用程序无法输出所需的结果 - “启用Visual Studio托管过程” ? [英] Why a .Net Console application does not output the desired results when the following solution setting in Visual Studio 2015 is disabled - "Enable the Visual Studio hosting process" ?

查看:96
本文介绍了当禁用Visual Studio 2015中的以下解决方案设置时,为什么.Net控制台应用程序无法输出所需的结果 - “启用Visual Studio托管过程” ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们构建了一个使用第三方com组件的.net控制台应用程序。它在调试模式下按预期工作。为了在这个应用程序中自动化逻辑,我们将bin \debug的所有内容沿着
与其他配置文件一起复制到另一个文件夹。然后我们在

windows任务调度程序并将操作引用到此应用程序的.exe文件。应用程序失败,COM组件抛出内部
错误。 
我们能够隔离问题并确定故障情况。 
应用程序在Visual Studio 2015中关注选项时会抛出错误, 
"启用Visua l工作室托管
流程"复选框已禁用。您可以按照MSDN网址中的步骤重现此问题:https://msdn.microsoft.com/en-us/library/ms185330.aspx。

< span style ="color:#212121; font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif,serif,EmojiFont; font-size:15px">我们验证了该选项已启用Visual Studio在托管过程中运行.exe。*。vshost.exe"
作为32位应用程序运行,因此在加载和调用自定义COM组件时不会抱怨。

过去有没有人遇到过这个问题?如果没有,是否有人可以建议解决此问题的方法?

推荐答案

您好,

感谢您在此处发帖。

>>应用程序失败,内部错误被抛出COM组件。

您是否检查过该组件是否为Microsoft所信任?

Have you checked if the component is trusted by Microsoft?

Visual Studio托管过程可提高调试器性能,启用新的调试器功能,例如部分信任调试和设计时表达式评估。

The Visual Studio hosting process improves debugger performance and enables new debugger features, such as partial-trust debugging and design-time expression evaluation.

这是一份关于启用和禁用托管流程之间差异的文档。

Here is a document about the differences between enable and disable the hosting process.

https://msdn.microsoft.com/en-us/library/ms242202.aspx

此论坛是关于使用Microsoft产品进行c ++开发的。对于与第三方组件问题更相关的案例,我建议您在第三方论坛上发帖或联系他们的作者以获得更好的支持。

This forum is about c++ development with Microsoft products. For your case which is more related to third-party component issue, I suggest you post on the third-party forum or contact their author for better support.

您的理解与合作将不胜感激。

Your understanding and cooperation will be grateful.

最好的问候,

Baron Bi


这篇关于当禁用Visual Studio 2015中的以下解决方案设置时,为什么.Net控制台应用程序无法输出所需的结果 - “启用Visual Studio托管过程” ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆