为什么我不能使用Visual Studio附加到托管的Powershell进程? [英] Why can't I attach to a hosted Powershell process with Visual Studio?

查看:101
本文介绍了为什么我不能使用Visual Studio附加到托管的Powershell进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

推荐答案

你好CaryR,

Hi CaryR,

根据你的描述,我创建了一个基于
的样本PS托管应用程序此文档,然后尝试通过Visual Studio附加PowerShell进程 - >附加。

According to your description, I create a sample PS hosted application based on this document and then try attach the PowerShell process through Visual Studio -> Attach.

但我没有在我的进程列表中找到Msiexec.exe和RunDll32.exe。我还尝试在我的列表中附加所有与PowerShell相关的进程,并且所有这些进程都可以成功连接而没有任何错误。

But I don't find Msiexec.exe and RunDll32.exe in my process list. I also tried attach all PowerShell related process in my list and all of them could be attached successful without any error.

我建议您先尝试使用Windows PowerShell执行PowerShell脚本,然后再附加Windows  PowerShell流程,以检查它是否可以成功运行。然后,请在您的申请中托管您的PS流程并附上
申请流程。

I suggest you try execute your PowerShell script with Windows PowerShell first and then attach the Windows PowerShell process to check whether it could be run successful. Then please host your PS process on your application and attach your application process.

如果可能,请提供更多详细信息以帮助我们重现此问题,例如  a示例PS托管项目和您执行的详细步骤。

If possible, please provide more detailed information to help us reproduce this issue, such as a sample PS hosted project and detailed steps that you do.

最好的问候,

威威 

Best Regards,
Weiwei 


这篇关于为什么我不能使用Visual Studio附加到托管的Powershell进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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