Build a script using C #

For understanding in the following, read: http://martinfowler.com/articles/rake.html

I recently used Rake (with Albacore) and I like it. Mostly the power of having a Ruby language at hand when I need it.

I have to admit that I am much more at home with C #, and this makes me think if there is an equivalent to Rake in the .NET world.

I am looking for a way to write build scripts in C # or possibly DSL having the same dependency programming model where I can also use C #.

Maybe I left the base by asking this question. But if it is possible to do this with Ruby (and internal DSL), then I cannot say right away why the same will not be possible for C #. And I, of course, do not understand why this has not yet been done :-)

Does anyone have some perspectives on this?

What we already know:

  • C # needs to be compiled to run, so we will need to create a separate build-script file that will be parsed and compiled at runtime by an executable file.

Thanks in advance!

Decision

Using "Cake" http://cakebuild.net/ - with the Roslyn compiler, what I wanted (years ago) is now possible. Thanks to Microsoft. And thanks to the people who wrote Cake.

An alternative is to use Powershell. The library is called Psake (saké)

+4
source share
3 answers

Maybe Cake is what you are looking for: https://github.com/cake-build/cake

+6
source

Many people use Rake to create scripts. There are even Rake tasks for .NET only. http://albacorebuild.net/

But there is a C # based make utility that I know of. http://shake.codeplex.com/ And I thought I saw one on github. But I think they require compilation, and that wasn’t so cool.

I ended up at https://github.com/psake/psake mainly because I wanted to learn Powershell and everyone already installed it.

Hmm Bounce too https://github.com/refractalize/bounce

+4
source

You can script to complete your build / deployment tasks with msbuild, and then script your tasks and execute them from bat files.

0
source

Source: https://habr.com/ru/post/1401921/


All Articles