Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call a method from a build event

is it possible to make a method call from a postbuild event?

namespace Test
{
    public class MyClass
    {
        public void DoSomething()
        {
            // Do something
        }
     }
}

Of course this class resides in a project whose build events I specify. Is there a way to call DoSomething as a postbuild event?

like image 709
Mefhisto1 Avatar asked Feb 11 '15 12:02

Mefhisto1


1 Answers

You can't do this directly, but you could include a small executable as part of your solution, with a reference to the method you want to call.

Once the solution builds, trigger it to fire the executable you just compiled and you should be there.

like image 130
Ian Avatar answered Oct 08 '22 01:10

Ian