Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build the source code using Visual Studio 2019 #3336

Open
bhrnjica opened this Issue Apr 15, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@bhrnjica
Copy link

bhrnjica commented Apr 15, 2019

System information

  • OS version/distro: Windows 10 1809
  • .NET Version (eg., dotnet --info): .NET Core 2.1
  • Visual Studio version VS2019

Issue

  • I am trying to build the source code using Visual Studio 2019. I have downloaded the source code and followed the developer guide , and run the following build.cmd -Release -TargetArchitecture:x64, the following errors appeared:
  **********************************************************************
  ** Visual Studio 2019 Developer Command Prompt v16.0.1
  ** Copyright (c) 2019 Microsoft Corporation
  **********************************************************************
  [vcvarsall.bat] Environment initialized for: 'x86_x64'
  Commencing native build of dotnet/machinelearning

  Calling "C:\sc\github\machinelearning\src\Native\\gen-buildsys-win.bat" "C:\sc\github\machinelearning\src\Native\" "15
 2017" x64
  CMake Error in CMakeLists.txt:
  -- Configuring incomplete, errors occurred!
  See also "C:/sc/github/machinelearning/bin/obj/x64.Release/Native/CMakeFiles/CMakeOutput.log".
  Failed to generate native component build project!
    Generator

      Visual Studio 15 2017 Win64

    could not find any instance of Visual Studio.

C:\sc\github\machinelearning\src\Native\build.proj(67,5): error MSB3073: The command ""C:\sc\github\machinelearning\src\
Native\build.cmd" Release x64 --mkllibpath C:\sc\github\machinelearning\packages/mlnetmkldeps\0.0.0.9\runtimes\win-x64\n
ative" exited with code 1.

Build FAILED.

C:\sc\github\machinelearning\src\Native\build.proj(67,5): error MSB3073: The command ""C:\sc\github\machinelearning\src\
Native\build.cmd" Release x64 --mkllibpath C:\sc\github\machinelearning\packages/mlnetmkldeps\0.0.0.9\runtimes\win-x64\n
ative" exited with code 1.
    0 Warning(s)
    1 Error(s)

Seems the build scripts are not updated in order to support Visual Studio 2019

@codemzs

This comment has been minimized.

Copy link
Member

codemzs commented Apr 15, 2019

Quick unblock solution:

Please open the VS 2017/2015 developer command prompt and run build.cmd from there. Once native code is built you can open the sln file in VS 2019 and build managed code from there too.

@PeterPann23

This comment has been minimized.

Copy link

PeterPann23 commented Apr 15, 2019

Hi,

When I do that it seems to not find the directory that I have started it from.

logs


** Visual Studio 2017 Developer Command Prompt v15.9.11
** Copyright (c) 2017 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x86_x64'
Commencing native build of dotnet/machinelearning

Calling "D:\GIT\machinelearning\src\Native\gen-buildsys-win.bat" "D:\GIT\machinelearning\src\Native" "15 2017" x64
CMake Error: The source directory "D:/GIT/machinelearning/bin/obj/x64.Debug/Native/Win64 -B. -HD:/GIT/machinelearning/src/Native"" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Failed to generate native component build project!

D:\GIT\machinelearning\src\Native>

@codemzs

This comment has been minimized.

Copy link
Member

codemzs commented Apr 15, 2019

Are you running build.cmd from the root? And what version of cmake do you have installed? Can you please paste anymore logs that you may have?

@bhrnjica

This comment has been minimized.

Copy link
Author

bhrnjica commented Apr 15, 2019

Once I installed Visual Studio 2017 Community Edition along with currently installed Visual Studio 2019, I could successfully run build.cmd, and then compile solution file using VS 2019.

Please, update build scripts to support VS2019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.