- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having a problem with the Command Line in the Custom Build Step for several of the files in a project because the solution/projects are located in a folder that has a "(" in the path name.
I have created a simple solution/project that will demonstrate the problem
The path to the file(s) is "C:\Projects\Working\VTest_Folder\ENV\ACFTSIM\(3)Code\Libraries\APU\Source\lfis". The file name is d731.l. The Command Line entry in the Custom Build Step is "dir" without the quotation marks. The Outputs field contains "$(InputName).f", also without the quotation marks.
When I do a build on this project, it generates the error "error PRJ0019: A tool returned an error code". The buildlog.htm file contains:
-------------------------------------------------------------------------------------
Deleting intermediate files and output files for project 'APU_Lib1', configuration 'Debug|Win32'.
Performing Custom Build Step...
dir
'C:\Projects\Working\VTest_Folder\ENV\ACFTSIM' is not recognized as an internal or external command,
operable program or batch file.
APU_Lib1 : error PRJ0019: A tool returned an error code
APU_Lib1 - 1 error(s), 0 warning(s)
-------------------------------------------------------------------------------------
If I change the pathname to the files to
" C:\Projects\Working\VTest_Folder\ENV\ACFTSIM\3)Code\Libraries\APU\Source\lfis "
everything works great!
Is there a way to get around this problem without moving all of the source code?
Thanks,
Dan
I have created a simple solution/project that will demonstrate the problem
The path to the file(s) is "C:\Projects\Working\VTest_Folder\ENV\ACFTSIM\(3)Code\Libraries\APU\Source\lfis". The file name is d731.l. The Command Line entry in the Custom Build Step is "dir" without the quotation marks. The Outputs field contains "$(InputName).f", also without the quotation marks.
When I do a build on this project, it generates the error "error PRJ0019: A tool returned an error code". The buildlog.htm file contains:
-------------------------------------------------------------------------------------
Deleting intermediate files and output files for project 'APU_Lib1', configuration 'Debug|Win32'.
Performing Custom Build Step...
dir
'C:\Projects\Working\VTest_Folder\ENV\ACFTSIM' is not recognized as an internal or external command,
operable program or batch file.
APU_Lib1 : error PRJ0019: A tool returned an error code
APU_Lib1 - 1 error(s), 0 warning(s)
-------------------------------------------------------------------------------------
If I change the pathname to the files to
" C:\Projects\Working\VTest_Folder\ENV\ACFTSIM\3)Code\Libraries\APU\Source\lfis "
everything works great!
Is there a way to get around this problem without moving all of the source code?
Thanks,
Dan
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dan,
What happens if you type this command from a command prompt or in a batch file? Does it work then?
A possibiity is to put extra sets of " " around the call to the function. Getting Windows to recognise the correct path can be tricky and not immediately obvious. Testing from command prompt can be a useful test.
David
What happens if you type this command from a command prompt or in a batch file? Does it work then?
A possibiity is to put extra sets of " " around the call to the function. Getting Windows to recognise the correct path can be tricky and not immediately obvious. Testing from command prompt can be a useful test.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - David White
Dan,
What happens if you type this command from a command prompt or in a batch file? Does it work then?
A possibiity is to put extra sets of " " around the call to the function. Getting Windows to recognise the correct path can be tricky and not immediately obvious. Testing from command prompt can be a useful test.
David
What happens if you type this command from a command prompt or in a batch file? Does it work then?
A possibiity is to put extra sets of " " around the call to the function. Getting Windows to recognise the correct path can be tricky and not immediately obvious. Testing from command prompt can be a useful test.
David
David,
I tried putting "" around the dir in the Custom Build Step's Command Linebut with the same result (see below).
Performing Custom Build Step...
"dir"
'C:ProjectsWorkingVTest_FolderENVACFTSIM' is not recognized as an internal or external command,
operable program or batch file.
APU_Lib1 : error PRJ0019: A tool returned an error code
APU_Lib1 - 1 error(s), 0 warning(s)
Then I tried using a command window and going down to C:ProjectsworkingVTest_FolderENVACFTSIM(3)CodeLibrariesAPU and typing in dir - that worked.
The next step was to make a .bat file (called test.bat) and putting dir as the first and only line in the file and then saving this file in the above folder as test.bat. When I went back to the command window and typed test.bat, everything worked fine, again.
What should I try next?
Thanks,
Dan
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page