Alternative to Pre/Post Build Events in Visual Studio

雨燕双飞 提交于 2019-12-07 12:08:59

问题


The Pre/Post Build Events in Visual Studio has bugged me for a few years, but I just haven't got around to research a better alternative. The thing that I want to achieve is pretty much the same as I get with Post Build Events: I call a piece of code that does something before or after a project build.

The two things with the Pre/Post Build Events that really bugs me is that (1) the code is separated from my project and compiled into a command line .exe and (2) that every error I get will end up as a cryptical message in the error pane.

I would ideally want to write a static method inside my project that gets called before or after the project builds and if an exception pops up, it gets stack traced like any other exception in debug mode.

What existing (simple) approach can I use to get something like this done?

来源:https://stackoverflow.com/questions/16550034/alternative-to-pre-post-build-events-in-visual-studio

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