Me, Myself and Mayvelous
6 Feb
The Problem:
WinForm application to create and populate the development database.
The generated data, scripts and permissions files+folders are to be copied from the project folder to debug/release folder on a successful build.
Uses a pre-build event from ‘Project properties > Common Properties > Build Events’ of VS.Net 2003.
Uses xcopy to copy files and directories.
The Test and Check :
The (!@#$%*&) Error:
Performing Pre-Build Event…
‘xcopy’ is not recognized as an internal or external command,
operable program or batch file.Project error: A tool returned an error code from the build event
Pre-Build Event failed
The Solution:
After a bit of googling, I found out that I’ve messed up the "Path" variables from the registry while trying to install php manually a few week back. Because of it none of my basic command prompt were working and definitely pre-build xcopy would not work.
The reference article said,
"If commands don’t work, then, the first thing you should check is the contents of your Path variable. At a bare minimum, your Path should start with the following:"
PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\Wbem
The system registry environment variable type should be REG_EXPAND_SZ, not REG_SZ.
You can find the path by: cmd > regedit > browse to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment.
So…
I’ve changed my mess up path:;C:\php;;C:\Program Files\QuickTime\QTSystem\
To the correct path:
C:\PROGRAM FILES\THINKPAD\UTILITIES;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI
Technologies\ATI Control Panel;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL
Server\80\Tools\Binn;C:\php;C:\Program Files\QuickTime\QTSystem\
Well you don’t need all those paths, I just added a few from my friends’ paths to make mine more complete.
Remark:
# 3 days to figure out,
# 10 min to search for the solution,
# 2 min to fix the problem.
You SUX May!
9 Aug
By default, once you create web applications/services, the project files are saved in Inetpub > wwwroot directory.
To move from default location to your own project directory you must:
The new project now will be saved in the folder you speficied rather than in default wwwroot folder. This makes it alot easier to manage your project files and better work folder organization.