|
-
May 9th, 2008, 11:03 AM
#2
Re: Post-build event command line is screwy; only one argument passed to the app?
it's something screwed up with "$(TargetDir)"
If I hard code the path to be "c:\temp" or soemthing, then it works fine..
If I put "$(TargetDir)" as the last argument on the line then look:
Argument: C:\Documents and Settings\MyProj\bin\Release\"
What's the quote doing there?
Can someone else check this for me? Make a new console app called ListArgs, here is the code:
Code:
using System;
using System.Collections.Generic;
using System.Text;
namespace ListArgs
{
class Program
{
static void Main(string[] args)
{
foreach (String s in args)
Console.Out.WriteLine(s);
}
}
}
simple.. :)
Now go into that project properties, BUILD tab and put it to OUTPUT TO c:\windows (its on the path)
Now go into BUILD EVENTS and paste thisi n the Post build:
Code:
ListArgs.exe "something first" "$(TargetDir)" "$(TargetDir)" "$(TargetDir)" "something else"
heres what mine prints:
------ Rebuild All started: Project: ListArgs, Configuration: Debug Any CPU ------
Compile complete -- 0 errors, 0 warnings
ListArgs -> C:\windows\ListArgs.exe
ListArgs.exe "something first" "C:\windows\" "C:\windows\" "C:\windows\" "something else"
something first
C:\windows" C:\windows"
C:\windows" something
else
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
What the heck are those arguments supposed to be?
Last edited by cjard; May 9th, 2008 at 11:11 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|