Author Topic: Problem with workspace environment variables  (Read 16219 times)

rdroaten

  • Community Member
  • Posts: 13
  • Hero Points: 0
Problem with workspace environment variables
« on: November 06, 2008, 03:21:39 PM »
Workspace environment variables don't seem to be getting set correctly unless I restart SE.

I define a single variable that I need for building my projects. It is defined correctly when I start SE, but is not being updated/reset when I switch between workspaces. I am on 13.0.2.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: Problem with workspace environment variables
« Reply #1 on: November 06, 2008, 05:03:11 PM »
Do you have it set in both workspaces?  Is it set to an absolute value or the value of another environment variable.  I just tested this in 13.0.2 and it seems to be working properly for me.

rdroaten

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Problem with workspace environment variables
« Reply #2 on: November 06, 2008, 06:08:43 PM »
I have it set to an absolute value in both workspaces.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: Problem with workspace environment variables
« Reply #3 on: November 10, 2008, 03:09:10 PM »
Can you please run "set" on the SlickEdit command line before and after and double check the value?  If you are not familiar with the SlickEdit command line it is at the bottom of the editor, click there with the mouse.  I am wondering if the variable is being set properly in the editor but not inherited right in the build process.

SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: Problem with workspace environment variables
« Reply #4 on: November 10, 2008, 06:55:19 PM »
1.  Where exactly are you setting the environment variable?  Please list all steps needed to actually set the variable.

2.  I noticed that you said you are required to close and reopen SlickEdit, but are the variables correctly set when you close and reopen the Workspace/Project?  Please see the attached message about this requirement after attempting to set env vars via Project > Workspace Properties.

rdroaten

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Problem with workspace environment variables
« Reply #5 on: November 11, 2008, 01:45:08 PM »
Hi Dan:

Running the set command, and doing a 'set' in the build window, confirms your suspicion that the variable is set in the editor but is not being inherited by the build. If I switch workspaces the set command always shows the expected variable value. However the build window always shows the value of the variable that was inherited from the CMD window from which I launched SE.

Regards,
Bob Roaten

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: Problem with workspace environment variables
« Reply #6 on: November 11, 2008, 02:44:12 PM »
How are you checking the value in the build window?  If you run "exit" in the build window, and restart the build process from the build window, does this make a difference?

rdroaten

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Problem with workspace environment variables
« Reply #7 on: November 11, 2008, 02:53:03 PM »
I check the value in the build window by executing the "set" command. Exiting and restarting the build process does correct the problem. However, I view that as a workaround. IMO the workspace variables should be automatically applied to the build window when a workspace is opened.

Thanks for your help.
Bob Roaten

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: Problem with workspace environment variables
« Reply #8 on: November 11, 2008, 02:55:45 PM »
I agree.  The reason I ask is because when you start that process, as far as I know it has to inherit the environment from the editor.  So I'm a little confused.
 
I don't see it mentioned here, what OS are you using?

rdroaten

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Problem with workspace environment variables
« Reply #9 on: November 11, 2008, 03:09:09 PM »
Windows XP Pro, SP3

lambertia

  • Senior Community Member
  • Posts: 382
  • Hero Points: 14
  • I have nothing sufficiently witty to say.
Re: Problem with workspace environment variables
« Reply #10 on: November 11, 2008, 09:51:33 PM »
Hi!

I've been seeing this problem for some time:

  • Load workspace by opening a visual studio .sln file.
  • Build it.
  • Load a different workspace.
  • Build it <- this build fails because when switching workspaces SE seems to have forgotten all of the path information


When I load the new workspace this is sumped to the output window:

Code: [Select]
C:\Data\Projects\windows.sna.Private_GBarron_SNA_v2_3_1_3\packetdecoder>C: & cd C:\Data\Projects\windows.sna.Development_v3_0\sna

C:\Data\Projects\windows.sna.Development_v3_0\sna>set PATH=C:\Program Files\SlickEdit 2008\win;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\program files\ati technologies\ati.ace\core-static;c:\program files\common files\roxio shared\dllshared\;c:\program files\common files\roxio shared\dllshared\;c:\program files\common files\roxio shared\9.0\dllshared\;c:\program files\microsoft sql server\90\tools\binn\;c:\program files\cvsnt;c:\program files\common files\teleca shared;c:\program files\ember\xide_em250\sif\bin;c:\program files\common files\gtk\2.0\bin;c:\program files\quicktime\qtsystem\;c:\program files\ember\emberznet3.1.0\tool\em2xx_load ;C:\Cygwin\bin;C:\Program Files\SlickEdit 2008\win\;C:\Program Files\CVSNT\

C:\Data\Projects\windows.sna.Development_v3_0\sna>set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\
set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\

C:\Data\Projects\windows.sna.Development_v3_0\sna>
C:\Data\Projects\windows.sna.Development_v3_0\sna>set MSVCDIR=

C:\Data\Projects\windows.sna.Development_v3_0\sna>echo VSLICKERRORPATH="C:\Data\Projects\windows.sna.Development_v3_0\sna"
VSLICKERRORPATH="C:\Data\Projects\windows.sna.Development_v3_0\sna"

C:\Data\Projects\windows.sna.Development_v3_0\sna>C:\PROGRA~1\SLICKE~4\win\vsexecfromfile -d C:\Users\GBARRO~1.DAI\AppData\Local\Temp\5700001b200
set DEVENVDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
set MSVCDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\VC7
set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\;C:\Windows\Microsoft.NET\Framework\
Executing: set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin;C:\Program Files\SlickEdit 2008\win;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\program files\ati technologies\ati.ace\core-static;c:\program files\common files\roxio shared\dllshared\;c:\program files\common files\roxio shared\dllshared\;c:\program files\common files\roxio shared\9.0\dllshared\;c:\program files\microsoft sql server\90\tools\binn\;c:\program files\cvsnt;c:\program files\common files\teleca shared;c:\program files\ember\xide_em250\sif\bin;c:\program files\common files\gtk\2.0\bin;c:\program files\quicktime\qtsystem\;c:\program files\ember\emberznet3.1.0\tool\em2xx_load ;C:\Cygwin\bin;C:\Program Files\SlickEdit 2008\win\;C:\Program Files\CVSNT\;C:\Windows\Microsoft.NET\Framework\;C:\Windows\Microsoft.NET\Framework\\Bin;
set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\LIB;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\;C:\Windows\Microsoft.NET\Framework\
Error executing command: set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin;C:\Program Files\SlickEdit 2008\win;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\program files\ati technologies\ati.ace\core-static;c:\program files\common files\roxio shared\dllshared\;c:\program files\common files\roxio shared\dllshared\;c:\program files\common files\roxio shared\9.0\dllshared\;c:\program files\microsoft sql server\90\tools\binn\;c:\program files\cvsnt;c:\program files\common files\teleca shared;c:\program files\ember\xide_em250\sif\bin;c:\program files\common files\gtk\2.0\bin;c:\program files\quicktime\qtsystem\;c:\program files\ember\emberznet3.1.0\tool\em2xx_load ;C:\Cygwin\bin;C:\Program Files\SlickEdit 2008\win\;C:\Program Files\CVSNT\;C:\Windows\Microsoft.NET\Framework\;C:\Windows\Microsoft.NET\Framework\\Bin;.  errno=-1

C:\Data\Projects\windows.sna.Development_v3_0\sna>
C:\Data\Projects\windows.sna.Development_v3_0\sna>
C:\Data\Projects\windows.sna.Development_v3_0\sna>
C:\Data\Projects\windows.sna.Development_v3_0\sna>
C:\Data\Projects\windows.sna.Development_v3_0\sna>set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE

C:\Data\Projects\windows.sna.Development_v3_0\sna>set VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003

C:\Data\Projects\windows.sna.Development_v3_0\sna>

And when I try to build:

Code: [Select]
C:\Data\Projects\windows.sna.Development_v3_0\sna>"C:\Program Files\SlickEdit 2008\win\vsbuild" -signal 9009 -command devenv "C:\Data\Projects\windows.sna.Development_v3_0\sna\Sna.sln" /build "Debug" /project "C:\Data\Projects\windows.sna.Development_v3_0\sna\Sna.vcproj" /projectconfig "Debug|Win32"
VSLICKERRORPATH="C:\Data\Projects\windows.sna.Development_v3_0\sna"
devenv C:\Data\Projects\windows.sna.Development_v3_0\sna\Sna.sln /build Debug /project C:\Data\Projects\windows.sna.Development_v3_0\sna\Sna.vcproj /projectconfig "Debug|Win32"
vsbuild: File not found (devenv)

C:\Data\Projects\windows.sna.Development_v3_0\sna>

There is no reason why devenv should not be found.

rdroaten

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Problem with workspace environment variables
« Reply #11 on: March 05, 2009, 04:45:47 PM »
Has this been fixed in SE 2009?

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Problem with workspace environment variables
« Reply #12 on: March 05, 2009, 06:48:42 PM »
The "fix" would be for SE to kill the Build process and create a new Build process.
A process can't change the environment of another process.
That seems like it would lead to other issues, though.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: Problem with workspace environment variables
« Reply #13 on: March 11, 2009, 07:51:07 PM »
I think the problem might be that the command line is getting too long.

Can you try launching a cmd window, then eliminate most of the PATH entries, then launch the editor from that cmd window and see what happens?