I am working in Visual Studio 2013. I have written a console application that generates text. I call that application in the post build of another (larger winforms) application. I have been able to configure my output string in such a way that the output of my console application is picked up by Visual Studio, and is displayed in the error or warning list. Hence if I call the console program in the other projects post build, in the warning list of that project, I can see my output of my console application.
Console.WriteLine(String.Format("{0}({1},{2},{1},{3}): {4}: string should be translated. {5}",
filefullpathname,
linenumber,
indexQuote + 2, // index of start of string
nextQuote + 1,
TreatAs,
line.Trim()));
In the variable TreatAs I can put the text "warning" and I can see the warning in my error list window in Visual studio. But can I use a custom warning number like "warning CS9999", so that I could use the following code to suppress my warning:
#pragma warning disable 9999
Just using a random number like 9999 gives a message '9999 is not a valid warning number' so I cannot just pick any number. I also tried just borrowing a number from another warning but that did not work either.
Hence: Are there warning numbers which you can use as custom build warning error numbers?