I am working with a project that uses both c++ and c#. I've been working on a huge messy integration and have been making heavy use of #pragma message to call out code that isn't fully functional yet (broken as a result of the integration). This is a really nice way to clutter up the build log so it's easy to find things that need to be fixed up. The problem is that I can't find anything that will work the same way for c#.
I don't want to use the obsolete attribute, that's not at all what I'm looking for. I tried #warn, but that just generates a "warning as error" which fails the build. Again, not what I'm looking for (I could just use #error if I wanted to fail the build...).
For now I'm just putting my messages in comments that can be searched for, but this requires some knowledge of what to look for as well as the motivation to look for it. Calling issues out with a custom message in the build log is much preferable as it's hard to ignore!
My research leads me to believe that there isn't a way to do what I want but I wanted to see if you experts agree with me or not. :)
Definition of comparable 1 : capable of or suitable for comparison The situations are not at all comparable. 2 : similar, like fabrics of comparable quality The two houses are comparable in size.
A comparable refrigerator today would cost a lot more than the one I bought 10 years ago. The two houses are comparable in size. Their salaries are comparable with those of other managers.
What is an analogy? An analogy is a comparison made to show how two different things are similar, especially in limited ways. An analogy is a technique frequently used in literature to explain something by comparing it to something else (a literary device).
Use comparable to describe two things that are alike. If you are offered two jobs with comparable salaries, you might take the one where the weather is nicer. Comparable can also mean exactly what it looks like: things you are “able” to “compare” are comparable.
I typically use the following code:
#warning //Todo Finish this method by....
#warning
does not have to be treated as an error, it is configurable in each project under Project Configuration | Build Tab:
With the description in the warning the build log should look like the following:
Additionally, the //Todo
comment will add the description to the built-in task list which allows you to distinguish between compiler warnings and user-set compiler warnings:
#warning
does exactly what you want: produce a compile warning. This does not fail the build.
Maybe you have the setting enabled to treat warnings as errors? This setting can be found on your Project Configuration | Build tab.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With