CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #2
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    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.
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured