Skip to content

The visual studio 2022 Infobar can not deploy CMake automatically on WSL:Ubuntu. #111

Open

Description

I follow the instructions here.

After I created a CMake project which named "hello1"
The CMake Output:
The remote system does not have CMake 3.8 or greater. An infobar to automatically deploy CMake to the remote system will be displayed if you are building on a supported architecture. See https://aka.ms/linuxcmakeconfig for more info

The visual studio infobar tips me:
Supprted CMake version is not present on "WSL:Ubuntu".Install latest CMake binaries from CMake.org? Yes No

after selected yes, and wait a moment, the cross platform logging output the following,

22:02:56.2620768 [Info, Thread 51]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.WaitableIndexService: WaitableIndexService changed to FileScanning from FileSystem
22:02:58.4603354 [Info, Thread 39]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.ConfigurationService: ConfigSwitched Initial config switch to linux-default
22:02:58.4883060 [Warning, Thread 50]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.UI.CachedBuildProjects: SwitchToPurgingState due to error CreationTimeUtc:2021/11/25 10:41:18 Workspace open:2021/11/25 14:02:52
22:02:58.4933083 [Info, Thread 50]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: Rehydrating projects for 1 VBP Waiting:linux-default HasData: HasError:
22:02:58.5063414 [Info, Thread 39]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: Starting scan ...
22:02:59.0343057 [Info, Thread 39]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.ParseCache: CancelOldTasksAsync: Canceling old tasks for rootFile='CMakeLists.txt' and config='linux-default'.
22:02:59.0443069 [Info, Thread 46]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: Scanner Parsing starting: projectfilepath CMakeLists.txt FileScanType: System.Collections.Generic.IReadOnlyDictionary`2[System.Type,System.Object] Config Name:linux-default
22:02:59.1343059 [Info, Thread 6]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: OnFileScannerCompleted for out\build\windows-default\CMakeFiles\3.21.21080301-MSVC_2\CMakeCXXCompiler.cmake
22:02:59.1343059 [Info, Thread 44]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: OnFileScannerCompleted for out\build\windows-default\CMakeFiles\3.21.21080301-MSVC_2\CMakeCCompiler.cmake
22:02:59.1373072 [Info, Thread 45]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: OnFileScannerCompleted for out\build\windows-default\cmake_install.cmake
22:02:59.1483072 [Info, Thread 56]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: OnFileScannerCompleted for out\build\windows-default\CMakeFiles\3.21.21080301-MSVC_2\CMakeRCCompiler.cmake
22:02:59.1483072 [Info, Thread 44]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: OnFileScannerCompleted for out\build\windows-default\CMakeFiles\3.21.21080301-MSVC_2\CMakeSystem.cmake
22:02:59.1513119 [Info, Thread 6]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: OnFileScannerCompleted for out\build\windows-default\hello1\cmake_install.cmake
22:02:59.3133038 [Info, Thread 52]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.ParseCache: CacheGenerationStarted root: CMAKELISTS.TXTlinux-default CMakeLists.txt linux-default
22:02:59.3493078 [Info, Thread 12]	Microsoft.VisualStudio.CMake.Linux.Project.RemoteCMakeParser: RemoteCMakeParser ctor
22:02:59.3503067 [Info, Thread 12]	libcmake.Linux.RemoteCMakeParser: RemoteCMakeParser ctor
22:02:59.3513068 [Info, Thread 12]	Microsoft.VisualStudio.CMake.Linux.Project.RemoteCMakeParser: RemoteCMakeParser finished
22:02:59.5403050 [Info, Thread 12]	libcmake.Linux.RemoteCMakeUtils: RemoteCMakeCopyFilesStarted Copying source directory 'C:\Users\zzg\Documents\WorkCenter\cppprojects\hello1\' to destination directory '/home/tet/.vs/hello1' on '' (method=rsync).
22:02:59.7563098 [Info, Thread 6]	libcmake.Linux.IO.DirectoryScan: Scan time: 9
22:02:59.7633146 [Info, Thread 6]	libcmake.Linux.IO.DirectoryScan: Compare time: 4
22:03:02.5860626 [Info, Thread 43]	libcmake.Linux.RemoteCMakeUtils: RemoteCMakeCopyFilesFinished Finished copying files (elapsed time 00h:00m:02s:910ms).
22:03:02.7107202 [Info, Thread 44]	libcmake.Linux.RemoteCMakeParser: ParseAsync
22:03:02.7187458 [Info, Thread 6]	libcmake.Linux.RemoteCMakeParser: CreateCMakeDaemonAsync
22:03:02.7207459 [Info, Thread 6]	libcmake.Linux.RemoteCMakeParameters: Connecting to the remote system
22:03:02.8176466 [Info, Thread 6]	libcmake.Linux.RemoteCMakeParameters: Connected to the remote system
22:03:02.9006413 [Error, Thread 52]	Microsoft.VisualStudio.CMake.Project.ExternalBuildProject.ProjectProvider: libcmake.CMakeDaemonUnsupportedException: CMake executable could not be found: cmake does not exist or is not a regular file.
The remote system does not have CMake 3.8 or greater. An infobar to automatically deploy CMake to the remote system will be displayed if you are building on a supported architecture. See https://aka.ms/linuxcmakeconfig for more info.
   at libcmake.Linux.RemoteCMakeParameters.<InitializeAsync>d__61.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at libcmake.Linux.RemoteCMakeParser.<CreateCMakeDaemonAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at libcmake.CMakeListsParser.<ParseImplAsync>d__39.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at libcmake.Linux.RemoteCMakeParser.<ParseAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.CMake.Linux.Project.RemoteCMakeParser.<ParseAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.CMake.Linux.Project.RemoteCMakeParser.<ParseAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.TaskStatusCenter.TaskStatusCenterModel.<>c__DisplayClass40_0.<<LogTelemetryOnTaskFailure>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.CMake.Project.ExternalBuildProject.ProjectProvider.<ParseProjectAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.CMake.Project.ExternalBuildProject.ProjectProvider.<ParseProjectAsync>d__33.MoveNext()
22:03:02.9116440 [Info, Thread 52]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.ParseCache: CacheGenerationFinished Cache gen & parsing done: root:CMAKELISTS.TXTlinux-default CMakeLists.txt linux-default
22:03:02.9266394 [Info, Thread 10]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: Scanner Parsing done: projectfilepath CMakeLists.txt FileScanType: System.Collections.Generic.IReadOnlyDictionary`2[System.Type,System.Object] Config Name:linux-default
22:03:02.9496574 [Info, Thread 10]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: Compute file data values for CMakeLists.txt Config linux-default
22:03:02.9540147 [Error, Thread 56]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: FDV Error for CMakeLists.txt Config linux-default Canceled False AutoGenerateCanceled False
22:03:02.9726532 [Info, Thread 52]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: OnFileScannerCompleted for CMakeLists.txt
22:03:02.9759579 [Info, Thread 52]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: Finishing scan.
22:03:02.9996397 [Info, Thread 52]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.BuildProjectScannerService: OnFileScannerTypeCompleted
22:03:03.0234013 [Info, Thread 51]	Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.Services.WaitableIndexService: WaitableIndexService changed to Completed from FileScanning
22:03:16.2832746 [Info, Thread 1]	Microsoft.VisualStudio.CMake.Linux.Project.RemoteCMakeDeploy: RemoteCMakeDeployStarted Remote CMake deployment to WSL: Ubuntu started.
22:04:56.3973785 [Info, Thread 1]	Microsoft.VisualStudio.CMake.Linux.Project.RemoteCMakeDeploy: RemoteCMakeDeployFinished Deployment failed.

The cross platform just tell "Deployment failed " in the last statement, but didn't tell why .
any geek can tell how to resolve this prob ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions