zsims / hunt-and-peck

Simple vimium/vimperator style navigation for Windows applications based on the UI Automation framework.
621 stars 54 forks source link

how to build from source? #24

Open ghost opened 3 years ago

ghost commented 3 years ago

greetings, love this project! I've been looking at the project and have made a couple edits to the source but I can't figure out how to get it built. I am not super familiar with C# and building in windows and I use vim as my ide so I don't want to have to install VSCode just to use its compiling tools. I am running the build.ps1 script in powershell and getting the following output. I am likely just missing something obvious, if you could help me out with this I'd be happy to dig into any bug/issue you'd like.

PS O:\langs\cs\hunt-and-peck\src> .\build.ps1                                                                           Preparing to run build script...
Running build script...
Analyzing build script...
Processing build script...
Installing tools...
Compiling build script...

========================================
Default
========================================
Executing task: Default

        Targets (run with -Target <target>)
        * Build - Build
        * Test  - Build + run tests
        * Package - Build + package into Dist/

Finished executing task: Default

Task                          Duration
--------------------------------------------------
Default                       00:00:00.0060783
--------------------------------------------------
Total:                        00:00:00.0060783
PS O:\langs\cs\hunt-and-peck\src> .\build.ps1 -Target Package                                                           Preparing to run build script...
Running build script...
Analyzing build script...
Processing build script...
Installing tools...
Compiling build script...

========================================
Restore
========================================
Executing task: Restore
MSBuild auto-detection: using msbuild version '4.0' from 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319'.
C:\Users\sowens26\AppData\Local\Temp\NuGetScratch\gubysu5e.gb4.nugetrestore.targets(455,20): error MSB4086: A numeric comparison was attempted on "$(MSBuildAssemblyVersion)" that evaluates to "" instead of a number, in condition "'$(MSBuildAssemblyVersion)' < '15.0'". [O:\langs\cs\hunt-and-peck\src\NativeMethods\NativeMethods.csproj]
C:\Users\sowens26\AppData\Local\Temp\NuGetScratch\gubysu5e.gb4.nugetrestore.targets(455,20): error MSB4086: A numeric comparison was attempted on "$(MSBuildAssemblyVersion)" that evaluates to "" instead of a number, in condition "'$(MSBuildAssemblyVersion)' < '15.0'". [O:\langs\cs\hunt-and-peck\src\HuntAndPeck\HuntAndPeck.csproj]
C:\Users\sowens26\AppData\Local\Temp\NuGetScratch\gubysu5e.gb4.nugetrestore.targets(455,20): error MSB4086: A numeric comparison was attempted on "$(MSBuildAssemblyVersion)" that evaluates to "" instead of a number, in condition "'$(MSBuildAssemblyVersion)' < '15.0'". [O:\langs\cs\hunt-and-peck\src\HuntAndPeck.Tests\HuntAndPeck.Tests.csproj]

WARNING: Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects will be skipped, only packages.config files will be restored.
All packages listed in packages.config are already installed.
Finished executing task: Restore

========================================
Build
========================================
Executing task: Build
An error occurred when executing task 'Build'.
Error: MSBuild: Could not locate executable.
PS O:\langs\cs\hunt-and-peck\src> vim                                                                                   vim : The term 'vim' 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
+ vim
+ ~~~
    + CategoryInfo          : ObjectNotFound: (vim:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS O:\langs\cs\hunt-and-peck\src>  

I have since realized that my installation of MSBuild did not appear to have been installed correctly. That has been redone and the related errors are now gone. However I still have the same problem. My output is as follows

PS O:\langs\cs\hunt-and-peck\src> .\build.ps1 -Target package
Preparing to run build script...
Running build script...
Analyzing build script...
Processing build script...
Installing tools...
Compiling build script...

========================================
Restore
========================================
Executing task: Restore
MSBuild auto-detection: using msbuild version '16.8.2.56705' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\bin'.
All packages listed in packages.config are already installed.
Finished executing task: Restore

========================================
Build
========================================
Executing task: Build
An error occurred when executing task 'Build'.
Error: MSBuild: Could not locate executable.
PS O:\langs\cs\hunt-and-peck\src>
zsims commented 3 years ago

Hi, sorry for the delay. I'd recommend installing Visual Studio as you need MS Build + some build properties. You might need to copy these from another installation if you're wanting to avoid installing Visual Studio.