As per above mentioned link i tried all the possible ways but couldn’t get the expected output.
Could you please suggest me solution like.
I want to pass parameter from Jenkins to my C# script and get the result output
What do I need to change in my C# script so that I can get parameters from Jenkins
I need sample code for passing username and password from jenkins to C# script.
merged your two posts as they seem to be thr same thing
I can see from your many many screenshots you are using freestyle job, with a parameter, then a bunch of other plugins that pull in environment variables from past jobs.
I recommend starting small and simple.
Create a new freestyle job. Add a new parameter called FOOBAR (So there’s no chance of it colliding with anything else), then add a single batch step that just has set (which I believe prints out all environment variables in windows). Assuming you see that FOOBAR variable set to the value you expect move to the more complicated step.
Update the job to run a dotnet app that prints out all, or at least the FOOBAR variable.
Then if that works, enable any more of the other checkboxes you think you need and test again.
This way you are in control and know what is working and what isn’t.
Probably? Assuming that class reads environment variables yes it should.
this is my Jenkin console output… i got all environment variable.
I’m running my project using Nunit console so I’m given Nunit console path to windows batch comment like C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe
next I’m passing My project .dll file path to windows batch comment like–C:\Users\ATSTC004\source\repos\parameterdemo\parameterdemo\bin\Debug\parameterdemo.dll
could you please say how can i call my key-value in windows batch comment.