插件中的put_ExecutableDirectories无法正常工作 [英] put_ExecutableDirectories not working properly in add-in

查看:115
本文介绍了插件中的put_ExecutableDirectories无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我尝试为Visual Studio 2005创建一个加载项,该加载项可以动态更改VC ++目录.我使用了"put_ExecutableDirectories" VCPlatform接口中的方法.我试图在BuildEventsSink的OnBuildBegin和OnBuildDone中调用该方法,以设置和还原临时的可执行文件".每个构建任务的设置.

Hi
I tried to create an add-in for Visual Studio 2005 which changes VC++ Directories on the fly. I used "put_ExecutableDirectories" method from VCPlatform interface.  I tried to call the method within BuildEventsSink's OnBuildBegin and OnBuildDone to set and restore the temporary "Executable files" setting for each build task.

问题:

我找到了可执行文件"设置卡住了我的方法所做的第一个更改.所有后续的构建任务也不会采用我的方法进行的新更改.

I found the "Executable files" setting is stuck with the first change made by my method.  All the subsequent build tasks will not take new changes also made by my method.

调查:

所以首先我要再次检查该方法-每次调用该方法时,都会通过IDE视图正确显示新设置(即通过选项->项目和解决方案打开VC ++目录属性页面).因此,"put_ExecutableDirectories"我认为我的方法行得通.但是,即使在使用相同方法修改设置后,为什么在后续版本中仍会使用第一个设置呢?

So first I double check the method - for every time it's called, new setting is correctly shown via the IDE view (i.e. opened up VC++ Directories property page via Options->Projects and Solutions).  So "put_ExecutableDirectories" and my method works, I think.  But why is the first setting still used in the following builds, even after the setting is modifed against using the same method?

我使用SysInternals的Process Explorer并实现IDE直接使用PATH环境变量中的设置并将其设置为cl.exe和link.exe.并且环境变量是从我的方法第一次被调用并永久保存以来的更新...后来的put_ExecutableDirectories调用仅更改IDE视图,不再更改环境变量.

put_ExecutableDirectories是否应该仅修改到IDE视图但不是环境变量?还是我做错了什么?

I use Process Explorer from SysInternals and realize the IDE uses the setting directly from PATH environment variable and set to cl.exe and link.exe.  And the environment variable is updated from the very first time that my method is called and kept forever...later put_ExecutableDirectories calls only changes the IDE view, no longer changes the environment variable.

Is put_ExecutableDirectories supposed to modify only to IDE view but NOT the environment variable?  Or I am simply doing things wrong?

该外接程序是使用VC/ATL编写的.

The add-in is written using VC/ATL.


任何帮助将不胜感激,
JB


Any help would be really appreciated,
Thanks!
J.B.

推荐答案

要解决此问题,我们确实需要源代码和详细的复制步骤来重现此问题,以便我们可以在内部进行调查.不必发送完整的项目源.我们只需要一个最简单的示例即可重现该问题.您可以从中删除任何机密信息或业务逻辑.

To troubleshoot this issue, we really need the source code and the detailed repro steps to reproduce the problem, so that we can investigate the issue in house. It is not necessary that you send out the complete source of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it.


这篇关于插件中的put_ExecutableDirectories无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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