Home > Software engineering >  Trying to setup Environment Variable for Visual Basic
Trying to setup Environment Variable for Visual Basic

Time:06-03

I'm suppose to setup the Environment Variable, so I can compile Visual Basic files in the Command Prompt.

So I go to System variables create a New Variable, named 'VisualBasic', but I'm not sure what root to use. Below are a couple, but non of them work. Where can is find the right folder or is my process wrong?

C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VB\Bin

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VB\Bin

CodePudding user response:

I guess you need to add those paths to the already existing environmet variable Path that already exists. If you create a new environment variable VisualBasic that is not used by the command line like Path is.

To add a path to the PATH environment variable

  1. On the Start menu, right-click Computer.

  2. On the context menu, click Properties.

  3. In the System dialog box, click Advanced system settings.

  4. On the Advanced tab of the System Properties dialog box, click Environment Variables.

  5. In the System Variables box of the Environment Variables dialog box, scroll to Path and select it.

  6. Click the lower of the two Edit buttons in the dialog box.

  7. In the Edit System Variable dialog box, scroll to the end of the string in the Variable value box and add a semicolon ;.

  8. Add the new path after the semicolon.

  9. Click OK in three successive dialog boxes, and then close the System dialog box.

If Visual Studio is open when you make changes to system environment variables, it will not recognize the changes until you close and reopen it.

  • Related