title: CMake error while running flutter desktop application
body: <p>When I am trying to launch flutter desktop application, this error occurred to me:</p>
  <blockquote>
  <p>&quot;CMake Error at CMakeLists.txt:2 (project):</p>
  <p>Generator</p>
  <p>Visual Studio 16 2019</p>
  <p>could not find any instance of Visual Studio.</p>
  <p>Building Windows application...</p>
  <p>Exception: Unable to generate build files&quot;</p>
  </blockquote>
  <p><strong>What I did...</strong></p>
  <p><strong>1- Installed Visual Studio 2022 with (Desktop development with C++ and Universal Windows Platform development)</strong></p>
  <p><strong>2- Run these commands:</strong></p>
  <blockquote>
  <p>flutter config --enable-windows-desktop</p>
  <p>flutter create .</p>
  <p>flutter run -d windows</p>
  </blockquote>
  <p>Also I tried to use dev channel:</p>
  <blockquote>
  <p>flutter channel dev</p>
  <p>flutter upgrade</p>
  <p>flutter config--enable-windows-uwp-desktop</p>
  </blockquote>
  <p>And these what I have when I run <strong>flutter devices</strong> and <strong>flutter doctor</strong></p>
  <p><strong>flutter devices</strong></p>
  <blockquote>
  <p>4 connected devices:
  Windows (desktop)       • windows • windows-x64     • Microsoft
  Windows [Version 10.0.22000.318] Windows (UWP) (desktop) • winuwp  •
  windows-uwp-x64 • Chrome (web)            • chrome  • web-javascript
  • Google Chrome 94.0.4606.81 Edge (web)              • edge    •
  web-javascript  • Microsoft Edge 95.0.1020.44</p>
  </blockquote>
  <p><strong>flutter doctor</strong></p>
  <blockquote>
  <p>[√] Flutter (Channel dev, 2.6.0-11.0.pre, on Microsoft Windows
  [Version 10.0.22000.318], locale en-US)</p>
  <p>[√] Android toolchain - develop for Android devices (Android SDK
  version 31.0.0)</p>
  <p>[√] Chrome - develop for the web</p>
  <p>[√] Visual Studio - develop for Windows (Visual Studio Community 2022
  17.0.0)</p>
  <p>[√] Android Studio (version 2020.3)</p>
  <p>[√] VS Code (version 1.61.1)</p>
  <p>[√] Connected device (4 available)</p>
  <p>• No issues found!</p>
  </blockquote>