dotnet / pinvoke

A library containing all P/Invoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.
MIT License
2.12k stars 223 forks source link

Add a build script #205

Closed vbfox closed 8 years ago

vbfox commented 8 years ago

I find myself pretty often needing to run the build in command line with something like :

msbuild src\PInvoke.sln /m /v:m

But sometimes I also want to run unit tests and need to move to visual studio. Lot of open source projects have a build script in the root of the project doing that automatically. The big advantage is that you can run it before opening a Pull Request and if it builds without warning be pretty sure that it's mostly correct.

I'm used to FAKE as I use it everywhere but anything would do as long as it fit the spec (Batch scripting could do if we don't want to expand it beyond that)

AArnott commented 8 years ago

FAKE looks like a nice framework. Building this project only takes a single msbuild command. So if we have a build script to make that "even simpler" I'd say it should run nuget restore as well. Since FAKE itself requires a nuget restore to work first, it seems to fall victim to the chicken-and-egg problem. So I'm more in favor of a script that doesn't have any dependencies that don't ship with Windows. I'm drafting a PS1 script (with a .cmd wrapper) now.

vbfox commented 8 years ago

I was citing FAKE as it's the framework I know the most but it didn't seem very adapted as most things done typically in a FAKE script like generating nuget package are done via msbuild in the project. (The chicken and egg problem being solved by paket & it's bootstraper on most projects but the current incompatibility of paket with project.json based projects make it unsuitable here)

Powershell being used already elsewhere seem perfect