vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

[Bug] Migrated a workspace

Open RTMDIYguy opened this issue 8 months ago • 1 comments

Brief Issue Summary

I migrated files from one root to another. Now many of my extensions including CMake Tools cannot find their ./dist/main files

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.101.0",
  "cmtVersion": "1.20.53",
  "configurations": [
    {
      "folder": "d:\\DadsLibrary",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    },
    {
      "folder": "d:\\DadsLibrary\\PyProjects",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    },
    {
      "folder": "d:\\DadsLibrary\\Templates",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    },
    {
      "folder": "d:\\DadsLibrary\\tesseract.worktrees",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    },
    {
      "folder": "d:\\DadsLibrary\\tesseract",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    },
    {
      "folder": "d:\\DadsLibrary\\video-library-db",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    },
    {
      "folder": "d:\\DadsLibrary\\vscode-django",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    }
  ],
  "cpptoolsIntegration": {
    "isReady": false,
    "hasCodeModel": false,
    "activeBuildType": "",
    "buildTypesSeen": [],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 0,
    "executablesCount": 0,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    },
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    },
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    },
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    },
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    },
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    },
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

I was not able to find any setting "cmake.loggingLevel": "debug"

Additional Information

Image

Image

Image

Image

CMake Diagnostics.log

RTMDIYguy avatar Jun 15 '25 01:06 RTMDIYguy

Hi @RTMDIYguy, thanks for reporting issue here!

From the CMake Tools Diagnostics output, we can see:

      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "compilers": {}

it indicates that CMake Tools has not been configured and no compiler is available.

In this instance, please

  1. Check if CMake is installed by running cmake --version in terminal window, and ensure cmake.exe is added to your PATH system environment variables.
  2. Make sure a compiler is installed
  3. Configure the project by running: CMake: Configure (if you don't use presets, select a compiler kit in VS Code)
  4. After successful configuration, run: CMake: Build

This will compile your code and generate the expected output (e.g., ./dist/main).

If this cannot resolved your issue, please provide more info for us, the error log, a simple repro project and so on. Thank you!

Amy-Li03 avatar Jun 16 '25 02:06 Amy-Li03

@RTMDIYguy It feels to me like this would be happening with other extensions as well, could you confirm if this is happening with other extensions?

Another workaround would be to uninstall and reinstall.

Thanks,

gcampbell-msft avatar Jun 23 '25 12:06 gcampbell-msft

It was happening to other extensions. I ended up remigrating back to the original root. I am not experienced enough to handle a root migration with only the help of Copilot is VS Code and duck.ai in my browser when the Copilot extension had gone out. Couldn't find all the files to change pathways. After remigration the only conflicts appear to be the push/pull between VS code and this GIT repository. Working that part out now. Did get the workspace and project database working again though and, by the way, the code works. Still have some things to do (don't like the GUI in command line and want to create a new one with added functionality) but at least it all works again.

RTMDIYguy avatar Jun 23 '25 14:06 RTMDIYguy

Hi @RTMDIYguy, thank you for your reply. We are glad to hear that you have solved this issue. We will close this issue, if you have any questions, please feel free to contact us. Thanks.

yanghhhhhhh avatar Jun 25 '25 09:06 yanghhhhhhh