|
|
|
date: Fri, 14 Mar 2008 03:07:02 -0700,
group: microsoft.public.vstudio.extensibility
back
Re: Add-In and ExecutableDirectories
Hi Michel,
Thanks for the reply. I try to set "Executable files" in VC++ Directories,
hence "put_ExecutableDirectories" used. I believe this setting is IDE-wide
and platfrom dependent, right?
To be clearer:
With the solution opened, when I call "put_ExecutableDirectories" for the
first time and issue a build command, the build does use the new "Executable
files" setting. No problem there. But if I call "put_ExecutableDirectories"
again with another setting and try to build again, it will not use the newer
setting, instead, the one from first time. And that goes the same for all
the subsequent "put_ExecutableDirectories" calls.
So there I do some investigation (also posted on MSDN forum):
For each "put_ExecutableDirectories" call, I can see new setting correctly
shown via the IDE view (i.e. opened up VC++ Directories property page via
Options->Projects and Solutions). So "put_ExecutableDirectories" works, kind
of. But why is the first setting still used in all the following builds,
even after a newer setting is set by calling "put_ExecutableDirectories" ?
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. I notice this environment variable is updated and only updated
during the very first time that "put_ExecutableDirectories" is called in my
add-in and kept forever...later put_ExecutableDirectories calls only changes
to the IDE view, no longer to the PATH environment variable.
However, if I set the new setting "put_ExecutableDirectories" and close and
re-open the project/solution before build it. It will take the new setting
corresponding to the one shown in IDE.
I hope the scenario is not too confusing to understand...
Thanks.
"Michel LAPLANE (MVP)" wrote:
> What sort of directory do you want to set ?.
> Are the settings of the path in the current project solving your problem ?
>
> Enjoy with VS
> "Johnny" a écrit dans le message de
> news:4749A5FF-989A-48DA-BDB1-28B5A8199206@microsoft.com...
> > Hi,
> > I tried to create an Add-In for Visual Studio 2005 which I can change VC++
> > Directories on the fly. I used "put_ExecutableDirectories" method from
> > VCPlatform interface. I notice some inconsistency with it. When I set a
> > new
> > paths, it's correctly reflected shown in the IDE (i.e. opened up VC++
> > Directories property page via Options->Projects and Solutions). However,
> > when I commenced a build, the build did not use the new paths. After some
> > debugging, I found IDE seems to retrieve the settings from environment
> > variables, instead of IDE, prior to BuildBegin event. And the environment
> > variables were not set to use the new paths.
> >
> > Is this an known issue? Is put_ExecutableDirectories supposed to modify
> > those in IDE and environment variables all at once? Or I am missing
> > something else?
> >
> > Any help would be really appreciated,
> > Thanks!
> > Johnny
>
>
date: Tue, 18 Mar 2008 01:24:01 -0700
author: Johnny
Re: Add-In and ExecutableDirectories
Well i think there is a sort of cache. I have notice similar behavior
sometimes that need restarting of th IDE before
modification being visible (especially when developping VS addin).
I'm sorry not to have other idea.
Enjoy with VS
"Johnny" a écrit dans le message de
news:920F1B2D-51AE-4BF9-BFD1-62BACEE5615A@microsoft.com...
> Hi Michel,
> Thanks for the reply. I try to set "Executable files" in VC++
> Directories,
> hence "put_ExecutableDirectories" used. I believe this setting is
> IDE-wide
> and platfrom dependent, right?
>
> To be clearer:
> With the solution opened, when I call "put_ExecutableDirectories" for the
> first time and issue a build command, the build does use the new
> "Executable
> files" setting. No problem there. But if I call
> "put_ExecutableDirectories"
> again with another setting and try to build again, it will not use the
> newer
> setting, instead, the one from first time. And that goes the same for all
> the subsequent "put_ExecutableDirectories" calls.
>
> So there I do some investigation (also posted on MSDN forum):
> For each "put_ExecutableDirectories" call, I can see new setting correctly
> shown via the IDE view (i.e. opened up VC++ Directories property page via
> Options->Projects and Solutions). So "put_ExecutableDirectories" works,
> kind
> of. But why is the first setting still used in all the following builds,
> even after a newer setting is set by calling "put_ExecutableDirectories" ?
>
> 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. I notice this environment variable is updated and only updated
> during the very first time that "put_ExecutableDirectories" is called in
> my
> add-in and kept forever...later put_ExecutableDirectories calls only
> changes
> to the IDE view, no longer to the PATH environment variable.
>
> However, if I set the new setting "put_ExecutableDirectories" and close
> and
> re-open the project/solution before build it. It will take the new
> setting
> corresponding to the one shown in IDE.
>
> I hope the scenario is not too confusing to understand...
> Thanks.
>
> "Michel LAPLANE (MVP)" wrote:
>
>> What sort of directory do you want to set ?.
>> Are the settings of the path in the current project solving your problem
>> ?
>>
>> Enjoy with VS
>> "Johnny" a écrit dans le message de
>> news:4749A5FF-989A-48DA-BDB1-28B5A8199206@microsoft.com...
>> > Hi,
>> > I tried to create an Add-In for Visual Studio 2005 which I can change
>> > VC++
>> > Directories on the fly. I used "put_ExecutableDirectories" method from
>> > VCPlatform interface. I notice some inconsistency with it. When I set
>> > a
>> > new
>> > paths, it's correctly reflected shown in the IDE (i.e. opened up VC++
>> > Directories property page via Options->Projects and Solutions).
>> > However,
>> > when I commenced a build, the build did not use the new paths. After
>> > some
>> > debugging, I found IDE seems to retrieve the settings from environment
>> > variables, instead of IDE, prior to BuildBegin event. And the
>> > environment
>> > variables were not set to use the new paths.
>> >
>> > Is this an known issue? Is put_ExecutableDirectories supposed to
>> > modify
>> > those in IDE and environment variables all at once? Or I am missing
>> > something else?
>> >
>> > Any help would be really appreciated,
>> > Thanks!
>> > Johnny
>>
>>
date: Fri, 21 Mar 2008 08:08:50 +0100
author: Michel LAPLANE \(MVP\)
|
|