Call a method from a build event

时间秒杀一切 提交于 2019-12-21 04:57:21

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/28454473/call-a-method-from-a-build-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!