title: Error installing OpenSSL using VCPKG on Visual Studio code: Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
body: <p>I am trying to fix the error I'm facing while running a rust program on my VScode as shown in the link below, install openssl and  and set the paths using vcpkg by following the post:
  <a href="https://stackoverflow.com/questions/63223387/error-could-not-find-native-static-library-ssl-perhaps-an-l-flag-is-missing">Error: could not find native static library `ssl`, perhaps an -L flag is missing? on WIndows</a></p>
  <p>According to the answer, I ran the following instructions through visual studio code terminal:</p>
  <pre><code>git clone https://github.com/Microsoft/vcpkg.git
  cd vcpkg
  .\bootstrap-vcpkg.bat
  </code></pre>
  <p>The above codes executed successfully but the code below to install openssl resulted in an error.</p>
  <pre><code>.\vcpkg.exe install openssl:x64-windows-static
  </code></pre>
  <p>error:</p>
  <pre><code>Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
  Could not locate a complete Visual Studio instance
  </code></pre>
  <p>How do I resolve the above error? I have cmake installed and functioning properly but still no luck trying to get vcpkg to install openssl.The paths mentioned in the link answer is also set and I am running all the codes above in the correct directory I made.</p>
  <p>Directory where I ran the codes:</p>
  <pre><code>C:\Users\Administrator\Desktop\wintun-maindtls\vcpkgfile\vcpkg&gt;
  </code></pre>