Build events not honoring multiple command-line arguments

前端 未结 3 1788
梦谈多话
梦谈多话 2021-01-07 09:52

I have the following as my post-build event in a C# .NET 4.0 project in Visual Studio 2010:

call \"$(SolutionDir)Publish\\Publish.exe\" \"$(TargetDir)\" \"\\         


        
3条回答
  •  时光说笑
    2021-01-07 10:27

    I'm not getting this behaviour at all.

    I created a post-build event of

    call "$(SolutionDir)test.cmd" "$(SolutionDir)a.txt" "$(SolutionDir)b.txt"
    

    Where test.cmd contains:

    if '%1' == '' GOTO END
    notepad.exe %1
    if '%2' == '' GOTO END
    notepad.exe %2
    :END
    

    a.txt & b.txt just have "This is File A" & "This is File B"

    When I do the build, Notepad fires up with a.txt, and when I close it then Notepad fires up with b.txt.

    So the parameters are definitely being sent separately for me.

    Can you try this same test to see what behaviour you get?

提交回复
热议问题