libgit2 / libgit2sharp.nativebinaries

MIT License
29 stars 63 forks source link

No more freely available VS Community 2019 :( #136

Open ScottHaney opened 2 years ago

ScottHaney commented 2 years ago

To build requires VS 2019, but the community edition doesn't seem to be available anymore. Is it possible to get this working in the latest community version (VS Community 2022)?

Megasware128 commented 2 years ago

You could retarget the project but a better option is just installing the VS 2019 build tools in VS 2022

image
ethomson commented 2 years ago

Definitely should be possible. Visual Studio 2019 is not strictly required; the culprit is the cmake invocation: https://github.com/libgit2/libgit2sharp.nativebinaries/blob/master/build.libgit2.ps1#L132

I think that you could remove the -G entirely (leaving the -A). IOW:

Run-Command -Fatal { & $cmake -A x64 -D THREADSAFE=ON -D USE_SSH=OFF -D ENABLE_TRACE=ON -D "BUILD_CLAR=$build_clar" -D "LIBGIT2_FILENAME=$binaryFilename" ../.. }