开发者

Is there any way to catch compile errors in all build configurations?

I made a simple change of a property to an auto property and broke the build because the property was referenced in a conditional compilation section. I开发者_如何学C was building in debug and the reference was in a section of code that's only compiled in release configuration. Is there any way to catch these errors without manually switching the build configuration in Visual Studio and building in each mode?

I have a CI server so the error was caught right away but I hate breaking the build.


You need to build each configuration to see if something conditional breaks one of them. You can avoid the manual step using the 'batch build' option from the build menu though.


You have to build under each configuration.

Remember that if you were to use all the conditional compiled sections at the same time, its likely that it wouldn't build i.e. if is debug use a, if not use b.

You don't need to do it manually though - that said, double compilation time is an awful thing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜