0

I would like to execute an application (C# .NET core) by a little PowerShell script. However I would like during the execution of this application to send one parameter present in the PowerShell script.

How can I execute that ?

Thanks you for your help!

1 Answer 1

0

I think you can send the parameter as an argument to the exe directly and you can read that in the main method easily. Some thing like this:

C:\Foo.exe "test"

Sign up to request clarification or add additional context in comments.

3 Comments

Let me know if you are facing any issues with this approach.
Hello, I am very sorry for the delay. However I can not get the parameter in C #. You know how can I gete a parameter on C# ? Thanks for your help!
Inside the Main method you need to add arguments property using that you can get the parameters. Take a look here stackoverflow.com/questions/5700631/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.