Groups | Blog | Home
all groups > dotnet framework > may 2007 >

dotnet framework : VS 2005 post Build event problem


Steve B.
5/31/2007 3:30:51 PM
Hi,

I'm working on Windows 2003 Server SP2 X64 edition to create SharePoint
extentions.

After each rebuild, I have to recycle app pool that use the extention I've
build, that's why I wanted to add the following line in post build events :

"%windir%\system32\cscript.exe" "%windir%\system32\iisapp.vbs" /a "My SP app
pool" /r

This command line is working perfectly when I open it in a cmd window, but
in VS, I get an error (in the output pane):



"Microsoft (R) Windows Script Host Version 5.6

Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Input Error: Can not find script file "c:\windows\system32\iisapp.vbs".



What is wrong ?



Thanks,

Steve

Andrew McDonald
5/31/2007 10:18:10 PM
[quoted text, click to view]

I've no idea about the Windows Script Host, but perhaps it's interpreting
the quote marks as part of the filename. What happens if you remove them
from %windir%\system32\iisapp.vbs?

--
Andy

Steve B.
6/1/2007 12:00:00 AM
I tried but that does not change...

Steve


"Andrew McDonald" <myrmecophagavir@no-spam-thanks.hotmail.com> wrote in
message news:OkaHBx8oHHA.4632@TK2MSFTNGP04.phx.gbl...
[quoted text, click to view]

Ashot Geodakov
6/1/2007 7:14:21 PM
Perhaps Visual Studio can not translate the environment variables that you
specify between %%s.

Try instead just hardcode these paths like:
C:\Windows\system32\cscript.exe C:\Windows\System32\system32\iisapp.vbs /a
"My SP app pool" /r

[quoted text, click to view]

Steve B.
6/4/2007 12:00:00 AM
As you can see in my first post, the error message says that the file
c:\windows\system32\iisapp.vbs cannot be found.
So I suppose the env variable are correctly expanded.

I also tried with the full hardcoded path (in case my hypothesis was not
correct), but I got the same error.

Thanks,
Steve

[quoted text, click to view]

Ashot Geodakov
6/4/2007 12:05:19 AM
Sorry I misread your first post.

As an option, could you create a .BAT file with that command and call that
..BAT from VS?


[quoted text, click to view]

Steve B.
6/5/2007 12:00:00 AM
I also tried, with the same result...


[quoted text, click to view]

AddThis Social Bookmark Button