Calling a method from an assembly event

Is it possible to call a method call from the postbuild event?

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

Of course, this class is in the project, the assembly events of which I indicate. Is there a way to trigger DoSomething as a postbuild event?

+4
source share
1 answer

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

Once the solution is built, run it to run the executable that you just compiled, and you should be there.

+5
source

All Articles