Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What you would normally pass when you call the UploadAndScan action from the command line would look more or less like this:</p> <p>VeracodeC#API.exe -action uploadandscan -appname appName -version version -createprofile true -filepath filePath -vuser username -vpassword password</p> <p>So for your code to work you would need to modify it as follows:</p> <pre><code>using System; using System.Reflection; using com.veracode.apiwrapper; namespace ConsoleApplication3 { using System; { static void Main() { //---------------------------------------------------------- String appName = "enter-application-name-here"; String version = "enter-version-here"; bool createProfile = true;//or false; String filePath = "enter-filepath-here";//ie: "C:\\file.exe" String username = "enter-username-here"; String password = "enter-password-here"; //---------------------------------------------------------- //String[] args = &lt;the same args that you pass when you call the UploadAndScan composite action&gt;; String[] args = new String[] { "-action", "uploadandscan", "-appname", appName, "-version", version, "-createprofile", createProfile.ToString(), "-filepath", filePath, "-vuser", username, "-vpassword", password }; Type t = System.Reflection.Assembly.GetAssembly(typeof(AbstractAPIWrapper)).GetType("com.veracode.apiwrapper.cli.VeracodeCommand"); MethodInfo m = t.GetMethod("Main", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public); m.Invoke(null, new Object[] { args }); Console.Read(); } } </code></pre> <p>}</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload