TIL the format for pasting environment variables into a Rider run configuration

Summary
I was editing a run configuration in Rider and needed to add several environment variables to it. There’s a button in the dialogue to paste them in, but no guidance regarding the format of the data, and no feedback if you paste the wrong format.
What is a run configuration?
Rider allows you to create run configurations, which can be selected from a dropdown and have Run/Debug/Stop buttons next to them. When you open a solution, Rider populates these with several defaults depending on the types of projects in your solution, but you can edit these and add more of your own. It’s this section of the UI:

How to define environment variables
In my case, the relevant project was an Azure function. Editing the run configuration for it, there is a field for Environment Variables. You can type directly into this textbox, but if you click the icon on the right then you can add them as Name/Value pairs, and there’s an icon for pasting the data in.

What format to use
To paste environment variables into the run configuration, you need your variables in this format:
ThingEnabled=true;MySetting=foo;OtherSetting=bar
https://www.jetbrains.com/help/rider/Run_Debug_Configuration.html#envvars-progargs does hint at this format. It says “In the Environment variables field, type the variable name and value: <name>=<value>. If you add several variables, they should be separated with semicolons.” but doesn’t mention pasting so it’s easy to miss. More significantly, there’s no guidance within the IDE so you have to go looking for the documentation to find out the format.




