Testing Pre-Built Command Event - visual-studio-2012

Is there anyway I can test pre-built event command line, from visual studio command prompt or from any other tool?
I have this event
REM C:\Program Files\TortoiseSVN\bin\SubWCRev.exe $(SolutionDir). $(SolutionDir)\mynamespace\Release.tmpl $(SolutionDir)\mynamespace\Release.txt
But it does not seems to work (Nothing happens). I also tried to execute this command from simple comand prompt, still without success. any help would be great.
However, if I remove the REM from the front, I get the following error message (as mentioned by #Giorgi):
The command "C:\Program Files\TortoiseSVN\bin\SubWCRev.exe
"C:\Projects\GUI\RTS\Development."
"C:\Projects\GUI\RTS\Development\mynamespace\Release.tmpl"
"C:\Projects\GUI\RTS\Development\mynamespace\Release.txt""
exited with code 9009.

You have REM there.
It means that the line is a comment.
Try deleting REM.
Change
REM C:\Program Files\TortoiseSVN\bin\SubWCRev.exe $(SolutionDir). $(SolutionDir)\mynamespace\Release.tmpl $(SolutionDir)\mynamespace\Release.txt
to
C:\Program Files\TortoiseSVN\bin\SubWCRev.exe $(SolutionDir). $(SolutionDir)\mynamespace\Release.tmpl $(SolutionDir)\mynamespace\Release.txt

Related

Windows - 8(Enterprise Edition) dos prompt (cmd) throws the error like ('C:\Program' not found)

When i run the cmd in run command (or) open the command promt, i execute some npm command means it throws the error like below
C:\Users\sivaprabug>npm
Skipping command-line 'C:\Program Files\Git\git-cmd.exe /K'
('C:\Program' not found)
Need a valid command-line; Edit the string resources accordingly
FYI:-
Kindly find the attachment
Some how the default shell has changed to git-cmd.exe
It need to restored to default.
I have solved the issue because the Windows environment variable wrongly given.
FYI:
How to change the environment variably

Opening Microsoft Visual Studio Code from command prompt Windows

Is there a way to launch Microsoft Visual Studio Code from the command line in windows? I can't even seem to find the directory for code on my computer. It didn't even ask me where to download it.
Navigate to the directory that you want to open and type code . to launch VS Code.
As many folks already suggested ways to open code from command prompt using code . command. This will only open Visual Studio Code Stable build. But If you have downloaded Visual Studio Code Insider build/version (Which has all latest build/features but unstable version) then you need to follow below instructions in windows :
Go to Control Panel\System and Security\System. Click on Advanced System Settings
Click on Environment Variables
Under System Variables tab, Click on Edit for Path Variable
Add a new path C:\Users\tsabu\AppData\Local\Programs\Microsoft VS Code Insiders\bin
(or)
C:\Program Files\Microsoft VS Code Insiders\bin based on location at which you have installed vscode insider in your machine.
Open a new command prompt and type code-insiders . to open vscode-insider
build/version
Short answer:
code your_path your_filename
Long answer:
Here your_path can simply be . if you want to use the current directory as your working path. Or .. for 1 level up, etc.
code is the name of the executable of Visual Studio Code (code.exe). If it doesn't launch, perhaps your VSC path hasn't been added to the path environment variable. Run this command to add it:
set PATH=";C:\Program Files\Microsoft VS Code\bin"
Of course you'll need to specify a different path if your VSC is installed somewhere else.
How can you find out the installation path? (click for screenshot) Go to "Start" menu, type in "Visual Studio Code", right click on the found program, "Properties", check "Target". Now you'll see!
It may come already added to your path when installed. Try using code <filename> in your command line. If it's not you can add the command line script's directory to your path. The command line script's directory is downloaded by default in the following location
C:\Users\<username>\AppData\Local\Code\bin
Point your command prompt to the specific folder that has the file that you want to open. Let's say you want to open the file titled main.scss. Simply run this command:
start code main.scss
If Visual Studio Code is already open, you can simply do:
code main.scss

How do you run non-GUI version of Inno Script Studio from bash?

I have a .iss file created in Inno Script Studio. It has a pre-compilation step which is a feature specific to Inno Script Studio. I can run my .iss file from a Command Prompt window (which is running cmd.exe, right?). The command looks like,
"\Program Files (x86)\Inno Script Studio\isstudio.exe" -compile myscript.iss
If instead, I run /c/system/windows32/cmd from a Git bash window and then try the same command I get an error popup with 'I/O Error 6'. Why? Through experimentation the problem seems to be with the myscript.iss argument: if I leave off that argument the isstudio simply complains that the argument is missing.
I have tried various escaping and quoting changes to the command but nothing fixes it. I tried running cmd in a fresh environment with env -i. I have tried providing the full path to the file using a DOS style path with C: and backslashes.
And I tried creating a .bat file with the above command in it: same error.

setup.exe results in silent installation error

I need to install setup.exe in silent mode. I have recorded the response by using "setup.exe /r" and it created the setup.iss in Windows directory. I copied that file into my working directory where setup.exe file exists. Then I gave the command setup.exe /s, it starts the installation but exit in a second.
There is a log file available in the same directory, it says error code = -3. While surfing in net, -3 refers not enough info available in the .iss file. But how can I find out what information is not available?
For Googlers: I got a -3 exit code when reinstalling a package that was already installed. If I uninstalled and installed again, the exit code would go back to 0.
Also note that InstallShield silent install packages create log files in C:\Windows\, but it doesn't seem to overwrite logged errors with successes e.g.
Install once and have an error, you get a log file with a non-zero exit code.
Install again successfully, you still have the old non-zero exit code in the log file. The time on the file hasn't changed, so it looks like it wasn't written to. If you delete the file, then successfully re-run the setup, you get a new log file with a successful exit code.
Your mileage may vary, but that was my experience.
Error code = -3, meaning is "Required data not found in the Setup.iss file. "

fatal error C1083: Cannot open include file: 'Windows.h': and scons

Today is officially my first day with C++ :P
I've downloaded Visual C++ 2005 Express Edition and Microsoft Platform SDK for Windows Server 2003 SP1, because I want to get my hands on the open source Enso Project.
So, after installing scons I went to the console and tried to compile it using scons, but I got this error:
C:\oreyes\apps\enso\enso-read-only\src\platform\win32\Include\WinSdk.h(64) : fatal error C1083: Cannot open include file: 'Windows.h': No such file or directory
scons: *** [src\platform\win32\InputManager\AsyncEventProcessorRegistry.obj] Error 2
scons: building terminated because of errors.
After checking these links:
VS ans PSDK
Include tiffi.h
Wndows.h
I've managed to configure my installation like this:
And even run this script
And I managed to compile the file below in the IDE.
// Test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
But I still get that exception in the console. Does anyone have scons experience?
EDIT
Actually (and I forgot to tell you this) I started the command prompt with the link "Visual Studio 2005 Command Prompt".
I assume this will include the paths in environment variables. Well after printing them I find that it didn't:
echo %INCLUDE%
echo %LIB%
echo %PATH%
And they were not present, so I created this .bat file:
set PATH=%PATH%;"C:\Program Files\Microsoft Platform SDK\Bin"
set INCLUDE=%INCLUDE%;"C:\ Program Files\Microsoft Platform SDK\Include"
set LIB=%LIB%;"C:\ Program Files\Microsoft Platform SDK\Lib"
Still, scons seeems not to take the vars... :(
Using the above recommendations will not work with scons: scons does not import the user environment (PATH and other variables). The fundamental problem is that scons does not handle recent versions of SDKs/VS .
I am an occasional contributor to scons, and am working on this feature ATM. Hopefully, it will be included soon in scons, but the feature is much harder to implement reliably than I first expected, partly because every sdk/compiler combination is different (and sometimes even MS does not get it right, some of their .bat files are broken), so I can't give you a date. I hope it will be included in 1.2 (to be released in approximatively one month).
You need to set the include file path (and possibly other things). At the command line this is typically done using a batch file that Visual Studio installs called vsvars32.bat (or vcvars32.bat for compatibility with VC6).
I'm not familiar with scons so I don't know the best way to get these settings configured for that tool, but for standard makefiles there's usually a line in the makefile which sets a macro variable with the include directory path and that macro is used as part of a command line parameter in the command that invokes the compiler.
Another possibility might be to have the scons process invoke vsvars32.bat or run the scons script from a command line that has been configured with the batch file.
In short you need to get the things that vsvars32.bat configures into the scons configuration somehow.
There will be a batch file similar to this one (for MSVC 2005) that sets up the environment variables:
c:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat
Step 1: Find a similar file in the Express installation folders
Step 2: Create a shortcut on the desktop with these target details and a suitably modified path:
cmd.exe /K "c:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"
Step 3: Open the DOS prompt via this shortcut
The command line build should now work from within this console window.
You show us how you configured Visual Studio for compilations within Visual Studio but you didn't show us what command line environment you tried. Sorry I haven't tried Express versions so I don't know if they create additional Start menu shortcuts like Pro and above do. If you open a suitable command prompt with its environment variables already set then you can compile on the command line. Otherwise you have to set variables yourself or execute a batch script to set them, each time you open a command prompt.
It'll be nice when scons does this automatically. For now, I use this (run from an SDK command prompt, not sure if there is a difference if run after vsvars32.bat):
import os
env = Environment(ENV={'PATH': os.environ['PATH']})
env['ENV']['TMP'] = os.environ['TMP']
env.AppendUnique(CPPPATH=os.environ['INCLUDE'].split(';'))
env.AppendUnique(LIBPATH=os.environ['LIB'].split(';'))
This works for me while compiling wxwidgets with Visual C++ 2005 Express using the command line prompt:
REM Fix Error error C1083 'windows.h'
(Use /useenv option when compiling.)
set PDSKWIN=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2
(Change to the right one.)
set INCLUDE=%PDSKWIN%\Include;%INCLUDE%
set LIB=%PDSKWIN%\Lib;%LIB%
Then I use this line when compiling. I believe just add /useenv to your lines and everything should work fine:
vcbuild /useenv /nohtmllog /nologo name.proj (or any file to compile)

Resources