kcat icon indicating copy to clipboard operation
kcat copied to clipboard

Not able to build kafkacat on windows w/ VScode

Open bishgupp opened this issue 3 years ago • 1 comments

PS C:\download\kafkacat> PS C:\download\kafkacat> PS C:\download\kafkacat> dotnet build Microsoft (R) Build Engine version 16.3.0+0f4c62fea for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. PS C:\download\kafkacat> ls

Directory: C:\download\kafkacat

Mode LastWriteTime Length Name


d----- 5/18/2021 11:39 AM .github d----- 5/18/2021 11:39 AM mklove d----- 5/18/2021 11:39 AM resources d----- 5/18/2021 11:39 AM rpm d----- 5/18/2021 11:39 AM tests d----- 5/18/2021 11:39 AM win32 -a---- 5/18/2021 11:39 AM 43 .dir-locals.el -a---- 5/18/2021 11:39 AM 27 .dockerignore -a---- 5/18/2021 11:39 AM 1048 .doozer.json -a---- 5/18/2021 11:39 AM 139 .gitignore -a---- 5/18/2021 11:39 AM 626 .travis.yml -a---- 5/18/2021 11:39 AM 5682 avro.c -a---- 5/18/2021 11:39 AM 5427 bootstrap.sh -a---- 5/18/2021 11:39 AM 1517 CHANGELOG.md -a---- 5/18/2021 11:39 AM 4878 configure -a---- 5/18/2021 11:39 AM 2540 configure.self -a---- 5/18/2021 11:39 AM 1034 Dockerfile -a---- 5/18/2021 11:39 AM 897 Dockerfile.Debian -a---- 5/18/2021 11:39 AM 22589 format.c -a---- 5/18/2021 11:39 AM 11557 input.c -a---- 5/18/2021 11:39 AM 2190 input.h -a---- 5/18/2021 11:39 AM 15002 json.c -a---- 5/18/2021 11:39 AM 1513 kafkacat.1 -a---- 5/18/2021 11:39 AM 96190 kafkacat.c -a---- 5/18/2021 11:39 AM 6954 kafkacat.h -a---- 5/18/2021 11:39 AM 1380 LICENSE -a---- 5/18/2021 11:39 AM 2465 LICENSE.getdelim -a---- 5/18/2021 11:39 AM 2647 LICENSE.wingetopt -a---- 5/18/2021 11:39 AM 1098 Makefile -a---- 5/18/2021 11:39 AM 5143 rdendian.h -a---- 5/18/2021 11:39 AM 2727 rdport.h -a---- 5/18/2021 11:39 AM 9921 README.md -a---- 5/18/2021 11:39 AM 3069 tools.c

PS C:\download\kafkacat> ls

Directory: C:\download\kafkacat

Mode LastWriteTime Length Name


d----- 5/18/2021 11:39 AM .github d----- 5/18/2021 11:39 AM mklove d----- 5/18/2021 11:39 AM resources d----- 5/18/2021 11:39 AM rpm d----- 5/18/2021 11:39 AM tests d----- 5/18/2021 11:39 AM win32 -a---- 5/18/2021 11:39 AM 43 .dir-locals.el -a---- 5/18/2021 11:39 AM 27 .dockerignore -a---- 5/18/2021 11:39 AM 1048 .doozer.json -a---- 5/18/2021 11:39 AM 139 .gitignore -a---- 5/18/2021 11:39 AM 626 .travis.yml -a---- 5/18/2021 11:39 AM 5682 avro.c -a---- 5/18/2021 11:39 AM 5427 bootstrap.sh -a---- 5/18/2021 11:39 AM 1517 CHANGELOG.md -a---- 5/18/2021 11:39 AM 4878 configure -a---- 5/18/2021 11:39 AM 2540 configure.self -a---- 5/18/2021 11:39 AM 1034 Dockerfile -a---- 5/18/2021 11:39 AM 897 Dockerfile.Debian -a---- 5/18/2021 11:39 AM 22589 format.c -a---- 5/18/2021 11:39 AM 11557 input.c -a---- 5/18/2021 11:39 AM 2190 input.h -a---- 5/18/2021 11:39 AM 15002 json.c -a---- 5/18/2021 11:39 AM 1513 kafkacat.1 -a---- 5/18/2021 11:39 AM 96190 kafkacat.c -a---- 5/18/2021 11:39 AM 6954 kafkacat.h -a---- 5/18/2021 11:39 AM 1380 LICENSE -a---- 5/18/2021 11:39 AM 2465 LICENSE.getdelim -a---- 5/18/2021 11:39 AM 2647 LICENSE.wingetopt -a---- 5/18/2021 11:39 AM 1098 Makefile -a---- 5/18/2021 11:39 AM 5143 rdendian.h -a---- 5/18/2021 11:39 AM 2727 rdport.h -a---- 5/18/2021 11:39 AM 9921 README.md -a---- 5/18/2021 11:39 AM 3069 tools.c

PS C:\download\kafkacat> cd .\win32
-a---- 5/18/2021 11:39 AM 1513 kafkacat.1 -a---- 5/18/2021 11:39 AM 96190 kafkacat.c -a---- 5/18/2021 11:39 AM 6954 kafkacat.h -a---- 5/18/2021 11:39 AM 1380 LICENSE -a---- 5/18/2021 11:39 AM 2465 LICENSE.getdelim -a---- 5/18/2021 11:39 AM 2647 LICENSE.wingetopt -a---- 5/18/2021 11:39 AM 1098 Makefile -a---- 5/18/2021 11:39 AM 5143 rdendian.h -a---- 5/18/2021 11:39 AM 2727 rdport.h -a---- 5/18/2021 11:39 AM 9921 README.md -a---- 5/18/2021 11:39 AM 3069 tools.c

PS C:\download\kafkacat> cd .\win32
PS C:\download\kafkacat\win32> nuget restore nuget : The term 'nuget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • nuget restore
  •   + CategoryInfo          : ObjectNotFound: (nuget:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:\download\kafkacat\win32> dotnet restore C:\download\kafkacat\win32\kafkacat.vcxproj : warning NU1503: Skipping restore for project 'C:\download\kafkacat\win32\kafkacat.vcxproj'. The project file may be invalid or missing targets required for restore. [C:\download\kafkacat\win32\kafkacat.sln] C:\Program Files\dotnet\sdk\3.0.100\NuGet.targets(123,5): warning : Unable to find a project to restore! [C:\download\kafkacat\win32\kafkacat.sln]PS C:\download\kafkacat\win32> dotnet build Microsoft (R) Build Engine version 16.3.0+0f4c62fea for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

C:\download\kafkacat\win32\kafkacat.vcxproj : warning NU1503: Skipping restore for project 'C:\download\kafkacat\win32\kafkacat.vcxproj'. The project file may be invalid or missing targets required for restore. [C:\download\kafkacat\win32\kafkacat.sln] C:\Program Files\dotnet\sdk\3.0.100\NuGet.targets(123,5): warning : Unable to find a project to restore! [C:\download\kafkacat\win32\kafkacat.sln] C:\download\kafkacat\win32\kafkacat.vcxproj(26,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Build FAILED.

C:\download\kafkacat\win32\kafkacat.vcxproj : warning NU1503: Skipping restore for project 'C:\download\kafkacat\win32\kafkacat.vcxproj'. The project file may be invalid or missing targets required for restore. [C:\download\kafkacat\win32\kafkacat.sln] C:\Program Files\dotnet\sdk\3.0.100\NuGet.targets(123,5): warning : Unable to find a project to restore! [C:\download\kafkacat\win32\kafkacat.sln] C:\download\kafkacat\win32\kafkacat.vcxproj(26,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. 2 Warning(s) 1 Error(s)

Time Elapsed 00:00:00.39 PS C:\download\kafkacat\win32>

bishgupp avatar May 18 '21 16:05 bishgupp

@bishgupp can you check with updated README from this PR (https://github.com/edenhill/kcat/pull/367)?

I've tried to improve README for Windows users, and it worked for me on Win10 x64 21H2

62mkv avatar Feb 07 '22 09:02 62mkv