{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vcpkg/issues/4218","repository_url":"https://api.github.com/repos/Microsoft/vcpkg","labels_url":"https://api.github.com/repos/Microsoft/vcpkg/issues/4218/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vcpkg/issues/4218/comments","events_url":"https://api.github.com/repos/Microsoft/vcpkg/issues/4218/events","html_url":"https://github.com/Microsoft/vcpkg/issues/4218","id":356350580,"node_id":"MDU6SXNzdWUzNTYzNTA1ODA=","number":4218,"title":"bootstrap-vcpkg.bat fails","user":{"login":"bitsrules","id":33675621,"node_id":"MDQ6VXNlcjMzNjc1NjIx","avatar_url":"https://avatars2.githubusercontent.com/u/33675621?v=4","gravatar_id":"","url":"https://api.github.com/users/bitsrules","html_url":"https://github.com/bitsrules","followers_url":"https://api.github.com/users/bitsrules/followers","following_url":"https://api.github.com/users/bitsrules/following{/other_user}","gists_url":"https://api.github.com/users/bitsrules/gists{/gist_id}","starred_url":"https://api.github.com/users/bitsrules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitsrules/subscriptions","organizations_url":"https://api.github.com/users/bitsrules/orgs","repos_url":"https://api.github.com/users/bitsrules/repos","events_url":"https://api.github.com/users/bitsrules/events{/privacy}","received_events_url":"https://api.github.com/users/bitsrules/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-03T03:56:47Z","updated_at":"2018-09-03T04:27:38Z","closed_at":null,"author_association":"NONE","body":"When I bootstrap vcpkg I get an error from the compiler.\r\nIs there anyway for me to troubleshoot this issue?\r\n\r\n```\r\nerror MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Utilities.FileTracker' threw an exception. ---> System.IO.FileNotFoundException: The system cannot find the file specified.\r\n```\r\nand   \r\n```\r\nerror MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\scripts\\bootstrap.ps1 : \r\nBuilding vcpkg.exe failed. Please ensure you have installed Visual Studio with \r\nthe Desktop C++ workload and the Windows SDK for Desktop C++.\r\nAt line:1 char:4\r\n+ & {& 'C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\scripts\\ ...\r\n+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorExcep \r\n   tion\r\n    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,bootstrap.ps1\r\n```\r\n\r\nIs this because I am building with the local system account that not have permissions?\r\nI can build other C++ projects just not vcpkg.\r\n\r\nI have setup a gitlab runner that builds vcpkg every night from git.\r\n![image](https://user-images.githubusercontent.com/33675621/44966783-32527080-af78-11e8-9b9e-129f7a3e9f54.png)\r\n\r\nHere is the build script in GitLab:\r\n```\r\nbuild:nightly:vcpkg:\r\n  stage: build\r\n  script:\r\n    - set PATH=c:\\install\\git\\bin;%PATH%\r\n    ## Print out pre-conditions\r\n    - git config -l\r\n    - echo %username%\r\n    ## Build vcpkg\r\n    - git clone https://github.com/Microsoft/vcpkg.git -q\r\n    - cd vcpkg\r\n    - bootstrap-vcpkg.bat\r\n    - cd ..\r\n  tags:\r\n    - windows-cpp\r\n```\r\n\r\nAnd the output from the build looks like this:\r\n\r\n```\r\n\u001B[0KRunning with gitlab-runner 11.2.0 (35e8515d)\r\n\u001B[0;m\u001B[0K  on Windows builder, hyper-v adfd1485\r\n\u001B[0;m\u001B[0KUsing Shell executor...\r\n\u001B[0;msection_start:1535946087:prepare_script\r\n\u001B[0KRunning on DESKTOP-T2TFLC1...\r\nsection_end:1535946088:prepare_script\r\n\u001B[0Ksection_start:1535946088:get_sources\r\n\u001B[0K\u001B[32;1mFetching changes...\u001B[0;m\r\nRemoving buildx64/\r\nHEAD is now at 2910535 Update .gitlab-ci.yml\r\n\u001B[32;1mChecking out bead5610 as build-vcpkg...\u001B[0;m\r\n\u001B[32;1mSkipping Git submodules setup\u001B[0;m\r\nsection_end:1535946093:get_sources\r\n\u001B[0Ksection_start:1535946093:restore_cache\r\n\u001B[0Ksection_end:1535946093:restore_cache\r\n\u001B[0Ksection_start:1535946093:download_artifacts\r\n\u001B[0Ksection_end:1535946093:download_artifacts\r\n\u001B[0Ksection_start:1535946093:build_script\r\n\u001B[0K\u001B[32;1m$ call \"C:\\Program Files ^(x86^)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Auxiliary\\Build\\vcvars64.bat\"\u001B[0;m\r\n**********************************************************************\r\n** Visual Studio 2017 Developer Command Prompt v15.8.2\r\n** Copyright (c) 2017 Microsoft Corporation\r\n**********************************************************************\r\n[vcvarsall.bat] Environment initialized for: 'x64'\r\n\u001B[32;1m$ set PATH=c:\\install\\git\\bin;%PATH%\u001B[0;m\r\n\u001B[32;1m$ echo %username%\u001B[0;m\r\nDESKTOP-T2TFLC1$\r\n\u001B[32;1m$ git clone https://github.com/Microsoft/vcpkg.git -q\u001B[0;m\r\n\u001B[32;1m$ cd vcpkg\u001B[0;m\r\n\u001B[32;1m$ bootstrap-vcpkg.bat\u001B[0;m\r\n\r\nBuilding vcpkg.exe ...\r\n\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018: The \"CL\" task failed unexpectedly. [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Utilities.FileTracker' threw an exception. ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.Shared.NativeMethodsShared.ThrowExceptionForErrorCode(Int32 errorCode) [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.Shared.NativeMethodsShared.GetShortFilePath(String path) [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.Utilities.FileTracker..cctor() [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    --- End of inner exception stack trace --- [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.Utilities.FileTracker.FormatRootingMarker(ITaskItem[] sources) [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.CPPTasks.CL.ComputeOutOfDateSources() [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.SkipTaskExecution() [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.Utilities.ToolTask.Execute() [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.CPPTasks.VCToolTask.Execute() [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.Execute() [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCTargets\\Microsoft.CppCommon.targets(314,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\toolsrc\\vcpkglib\\vcpkglib.vcxproj]\r\nC:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\scripts\\bootstrap.ps1 : \r\nBuilding vcpkg.exe failed. Please ensure you have installed Visual Studio with \r\nthe Desktop C++ workload and the Windows SDK for Desktop C++.\r\nAt line:1 char:4\r\n+ & {& 'C:\\gitlab-runner\\builds\\adfd1485\\0\\ssd-alib\\alib\\vcpkg\\scripts\\ ...\r\n+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorExcep \r\n   tion\r\n    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio \r\n   n,bootstrap.ps1\r\n \r\nsection_end:1535946120:build_script\r\n\u001B[0Ksection_start:1535946120:after_script\r\n\u001B[0Ksection_end:1535946121:after_script\r\n\u001B[0Ksection_start:1535946121:archive_cache\r\n\u001B[0Ksection_end:1535946121:archive_cache\r\n\u001B[0Ksection_start:1535946121:upload_artifacts_on_success\r\n\u001B[0K\u001B[32;1mUploading artifacts...\u001B[0;m\r\n\u001B[0;33mWARNING: vcpkg/*.7z: no matching files            \u001B[0;m \r\n\u001B[31;1mERROR: No files to upload                         \u001B[0;m \r\nsection_end:1535946133:upload_artifacts_on_success\r\n\u001B[0K\u001B[32;1mJob succeeded\r\n\u001B[0;m\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vcpkg/issues/comments/417997022","html_url":"https://github.com/Microsoft/vcpkg/issues/4218#issuecomment-417997022","issue_url":"https://api.github.com/repos/Microsoft/vcpkg/issues/4218","id":417997022,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzk5NzAyMg==","user":{"login":"Voskrese","id":10104740,"node_id":"MDQ6VXNlcjEwMTA0NzQw","avatar_url":"https://avatars3.githubusercontent.com/u/10104740?v=4","gravatar_id":"","url":"https://api.github.com/users/Voskrese","html_url":"https://github.com/Voskrese","followers_url":"https://api.github.com/users/Voskrese/followers","following_url":"https://api.github.com/users/Voskrese/following{/other_user}","gists_url":"https://api.github.com/users/Voskrese/gists{/gist_id}","starred_url":"https://api.github.com/users/Voskrese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Voskrese/subscriptions","organizations_url":"https://api.github.com/users/Voskrese/orgs","repos_url":"https://api.github.com/users/Voskrese/repos","events_url":"https://api.github.com/users/Voskrese/events{/privacy}","received_events_url":"https://api.github.com/users/Voskrese/received_events","type":"User","site_admin":false},"created_at":"2018-09-03T04:27:38Z","updated_at":"2018-09-03T04:27:38Z","author_association":"CONTRIBUTOR","body":"> Please ensure you have installed Visual Studio with \r\n> the Desktop C++ workload and the Windows SDK for Desktop C++."}}
{"actor":{"display_login":"Voskrese"}}