Flutter-desktop-embedding: Can't build using Visual Studio Community 2017

Created on 3 Feb 2019  路  5Comments  路  Source: google/flutter-desktop-embedding

I can't run example app on windows 10.
I'm getting errors:

Severity    Code    Description Project File    Line    Suppression State
Error   MSB3073 The command "C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\library\windows\scripts\update_flutter_engine && C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\library\windows\scripts\get_engine_artifacts && C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\library\windows\scripts\get_GLFW && C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\library\windows\scripts\build_jsonlib --debug
:VCEnd" exited with code 255.   GLFW Library    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets  128 

and

Severity    Code    Description Project File    Line    Suppression State
Error   MSB3073 The command "xcopy /y /d /q "C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\example\windows_fde\bin\x64\Debug Dynamic Library\GLFW Example\..\GLFW Library\flutter_engine.dll" "C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\example\windows_fde\bin\x64\Debug Dynamic Library\GLFW Example\"
:VCEnd" exited with code 4. GLFW Example    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets  133 

Most helpful comment

Yes, this should definitely be in the README; update now in progress. Thanks for following up with the details!

All 5 comments

Do you have any other build output besides the errors? The first step that's failing there is a series of scripts chained together, so it's not clear which one is failing. Many of the script steps will print message when something fails (or in some cases on successful completion, which would give more information about progress).

Here is my build output:

1>------ Build started: Project: GLFW Library, Configuration: Debug Dynamic Library x64 ------
1>Get the flutter engine, engine artifacts, GLFW and jsoncpp
1>Running git merge-base --is-ancestor 390ded9340e529b8475fefd1afdbe59c5b8d4081 HEAD
1>flutter_engine.dll version 15f2b92cce916982b7dd8ce658bbf2a465c06ba4 already present.
1>0 File(s) copied
1>GLFW files already exist.
1>C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\library\windows\scripts\..\..\..\third_party\jsoncpp\src already exists; skipping clone
1>Running git checkout 21a418563406acb42484eff33da0a354a671effc
1>HEAD is now at 21a4185... STYLE: Avoid unnecessary conversions from size_t to unsigned int
1>Running vcvars64.bat 1> nul && msbuild lib_json.vcxproj /p:Platform=x64
1>'vcvars64.bat' is not recognized as an internal or external command,
1>operable program or batch file.
1>Unhandled exception:
1>Exception: vcvars64.bat 1> nul && msbuild lib_json.vcxproj /p:Platform=x64 failed with exit code 1
1>#0      runCommand (file:///C:/Users/user/Desktop/Project/dashboard/desktop/flutter-desktop-embedding/tools/dart_tools/lib/run_command.dart:47:5)
1><asynchronous suspension>
1>#1      buildLibrary (file:///C:/Users/user/Desktop/Project/dashboard/desktop/flutter-desktop-embedding/tools/dart_tools/bin/build_jsoncpp.dart:72:9)
1><asynchronous suspension>
1>#2      main (file:///C:/Users/user/Desktop/Project/dashboard/desktop/flutter-desktop-embedding/tools/dart_tools/bin/build_jsoncpp.dart:44:9)
1><asynchronous suspension>
1>#3      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:298:32)
1>#4      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: The command "C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\library\windows\scripts\update_flutter_engine && C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\library\windows\scripts\get_engine_artifacts && C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\library\windows\scripts\get_GLFW && C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\library\windows\scripts\build_jsonlib --debug
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(128,5): error MSB3073: :VCEnd" exited with code 255.
1>Done building project "GLFW Library.vcxproj" -- FAILED.
2>------ Build started: Project: GLFW Example, Configuration: Debug Dynamic Library x64 ------
2>Build the example app
2>Running C:\Users\user\Desktop\Project\dashboard\desktop\flutter\bin\flutter.bat build bundle
2>Get the flutter_engine.dll file from GLFW Library bin folder
2>File not found - flutter_engine.dll
2>0 File(s) copied
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "xcopy /y /d /q "C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\example\windows_fde\bin\x64\Debug Dynamic Library\GLFW Example\..\GLFW Library\flutter_engine.dll" "C:\Users\user\Desktop\Project\dashboard\desktop\flutter-desktop-embedding\example\windows_fde\bin\x64\Debug Dynamic Library\GLFW Example\"
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 4.
2>Done building project "GLFW Example.vcxproj" -- FAILED.
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

'vcvars64.bat' is not recognized as an internal or external command
Do I have to install some component or add some path to env variables?
Thank you for helping me.

Ok, I found vcvars64.bat in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build and added it to PATH env variable.
Build went ahead but it asked me to add Windows 8.1 SDK. I'm installing now. Will update,

It works!
It would be good to add this steps to readme if someone else has this problem.

Yes, this should definitely be in the README; update now in progress. Thanks for following up with the details!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kiruel picture Kiruel  路  3Comments

GreenTigerEye picture GreenTigerEye  路  4Comments

vanlooverenkoen picture vanlooverenkoen  路  3Comments

ghost picture ghost  路  8Comments

pauldemarco picture pauldemarco  路  6Comments