1 instantiation of Parts
Microsoft.Build.Utilities.Core (1)
CanonicalError.cs (1)
265Parts parsedMessage = new Parts();
189 references to Parts
Microsoft.Build.Utilities.Core (15)
CanonicalError.cs (12)
166/// Initializes a new instance of the <see cref="Parts"/> class. 180internal int line = Parts.numberNotSpecified; 185internal int column = Parts.numberNotSpecified; 190internal int endLine = Parts.numberNotSpecified; 195internal int endColumn = Parts.numberNotSpecified; 231result = CanonicalError.Parts.numberNotSpecified; 243internal static Parts Parse(string message) 265Parts parsedMessage = new Parts(); 304parsedMessage.category = Parts.Category.Error; 308parsedMessage.category = Parts.Category.Warning; 342parsedMessage.category = Parts.Category.Error; 346parsedMessage.category = Parts.Category.Warning;
TaskLoggingHelper.cs (3)
1380CanonicalError.Parts messageParts = CanonicalError.Parse(lineOfText); 1401case CanonicalError.Parts.Category.Error: 1418case CanonicalError.Parts.Category.Warning:
Microsoft.Build.Utilities.UnitTests (174)
CanonicalError_Tests.cs (174)
17ValidateToolError(@"error CS0006: Metadata file 'C:\WINDOWS\Microsoft.NET\Framework\v1.2.21213\System.dll' could not be found", "", CanonicalError.Parts.Category.Error, "CS0006", @"Metadata file 'C:\WINDOWS\Microsoft.NET\Framework\v1.2.21213\System.dll' could not be found"); 24ValidateToolError(@"ALINK: error AL1017: No target filename was specified", "ALINK", CanonicalError.Parts.Category.Error, "AL1017", @"No target filename was specified"); 31ValidateFileNameLineColumnError(@"foo.resx(2,1): error CS0116: A namespace does not directly contain members such as fields or methods", @"foo.resx", 2, 1, CanonicalError.Parts.Category.Error, "CS0116", "A namespace does not directly contain members such as fields or methods"); 32ValidateFileNameLineColumnError(@"Main.cs(17,20): warning CS0168: The variable 'foo' is declared but never used", @"Main.cs", 17, 20, CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 39ValidateFileNameLineError(@"C:\WINDOWS\Microsoft.NET\Framework\v1.2.x86fre\foo.resx(2) : error BC30188: Declaration expected.", @"C:\WINDOWS\Microsoft.NET\Framework\v1.2.x86fre\foo.resx", 2, CanonicalError.Parts.Category.Error, "BC30188", "Declaration expected."); 46ValidateFileNameLineError(@"foo.cpp(1) : error C2143: syntax error : missing ';' before '++'", @"foo.cpp", 1, CanonicalError.Parts.Category.Error, "C2143", "syntax error : missing ';' before '++'"); 53ValidateFileNameLineColumnError(@"foo.resx(2,1) : error JS1135: Variable 'blech' has not been declared", @"foo.resx", 2, 1, CanonicalError.Parts.Category.Error, "JS1135", "Variable 'blech' has not been declared"); 62ValidateFileNameError(@"foo.cpp : fatal error LNK1106: invalid file or disk full: cannot seek to 0x5361", @"foo.cpp", CanonicalError.Parts.Category.Error, "LNK1106", "invalid file or disk full: cannot seek to 0x5361"); 69ValidateToolError(@"BSCMAKE: error BK1510 : corrupt .SBR file 'foo.cpp'", "BSCMAKE", CanonicalError.Parts.Category.Error, "BK1510", @"corrupt .SBR file 'foo.cpp'"); 76ValidateToolError(@"CVTRES : warning CVT4001: machine type not specified; assumed X86", "CVTRES", CanonicalError.Parts.Category.Warning, "CVT4001", @"machine type not specified; assumed X86"); 77ValidateToolError(@"CVTRES : fatal error CVT1103: cannot read file", "CVTRES", CanonicalError.Parts.Category.Error, "CVT1103", @"cannot read file"); 84ValidateFileNameError(@"foo.cpp : warning LNK4048: Invalid format file; ignored", @"foo.cpp", CanonicalError.Parts.Category.Warning, "LNK4048", "Invalid format file; ignored"); 92ValidateFileNameError(@"foo.cpp : fatal error LNK1106: invalid file or disk full: cannot seek to 0x5361", @"foo.cpp", CanonicalError.Parts.Category.Error, "LNK1106", "invalid file or disk full: cannot seek to 0x5361"); 99ValidateFileNameLineError(@"bar.h(2) : error A2008: syntax error : lksdflksj", @"bar.h", 2, CanonicalError.Parts.Category.Error, "A2008", "syntax error : lksdflksj"); 100ValidateFileNameLineError(@"bar.h(2) : error A2088: END directive required at end of file", @"bar.h", 2, CanonicalError.Parts.Category.Error, "A2088", "END directive required at end of file"); 107ValidateToolError(@"vcdeploy : error VCD0041: IIS must be installed on this machine in order for this program to function correctly.", "vcdeploy", CanonicalError.Parts.Category.Error, "VCD0041", @"IIS must be installed on this machine in order for this program to function correctly."); 114ValidateFileNameLineError(@"1>c:\temp\testprefast\testprefast\testprefast.cpp(12) : error C4996: 'sprintf' was declared deprecated", @"c:\temp\testprefast\testprefast\testprefast.cpp", 12, CanonicalError.Parts.Category.Error, "C4996", "'sprintf' was declared deprecated"); 115ValidateFileNameLineError(@"1234>c:\temp\testprefast\testprefast\testprefast.cpp(12) : error C4996: 'sprintf' was declared deprecated", @"c:\temp\testprefast\testprefast\testprefast.cpp", 12, CanonicalError.Parts.Category.Error, "C4996", "'sprintf' was declared deprecated"); 121ValidateFileNameMultiLineColumnError("foo.cpp(1):error TST0000:Text", "foo.cpp", 1, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.Category.Error, "TST0000", "Text"); 127ValidateFileNameMultiLineColumnError("foo.cpp(1-5):error TST0000:Text", "foo.cpp", 1, CanonicalError.Parts.numberNotSpecified, 5, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.Category.Error, "TST0000", "Text"); 133ValidateFileNameMultiLineColumnError("foo.cpp(1,15):error TST0000:Text", "foo.cpp", 1, 15, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.Category.Error, "TST0000", "Text"); 139ValidateFileNameMultiLineColumnError("foo.cpp(1,15-25):error TST0000:Text", "foo.cpp", 1, 15, CanonicalError.Parts.numberNotSpecified, 25, CanonicalError.Parts.Category.Error, "TST0000", "Text"); 145ValidateFileNameMultiLineColumnError("foo.cpp(1,15,2,25):error TST0000:Text", "foo.cpp", 1, 15, 2, 25, CanonicalError.Parts.Category.Error, "TST0000", "Text"); 152ValidateFileNameMultiLineColumnError("PathologicalFile.txt(1):error TST0000:Text", "PathologicalFile.txt", 1, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.Category.Error, "TST0000", "Text"); 162CanonicalError.Parts parts = CanonicalError.Parse(error); 171"", CanonicalError.Parts.Category.Error, "CS2011", "Error opening response file 'e:\foo\test.rsp' -- 'The device is not ready. '"); 178"BUILDMSG", CanonicalError.Parts.Category.Error, "", @"Path 'c:\binaries.x86chk\bin\i386\System.AddIn.Contract.dll' is not under client's root 'c:\vstamq'."); 181"BUILDMSG", CanonicalError.Parts.Category.Error, "", @"Path 'c:\binaries.x86chk\bin\i386\System.AddIn.Contract.dll' is not under client's root 'c:\vstamq'."); 197"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 198CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 203"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 3, CanonicalError.Parts.numberNotSpecified, 204CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 208"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 209CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 212"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 2, CanonicalError.Parts.numberNotSpecified, 213CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 216"Main.cs", 1, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 217CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 221"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 222CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 225"Main.cs", CanonicalError.Parts.numberNotSpecified, 2, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 226CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 229"Main.cs", 1, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 230CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 235"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 2, 236CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 239"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 240CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 244"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 245CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 248"Main.cs", 2, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 249CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 252"Main.cs", CanonicalError.Parts.numberNotSpecified, 4, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 253CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 256"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 6, 257CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 260"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 261CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 265"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 266CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 269"Main.cs", 2, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 270CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 273"Main.cs", CanonicalError.Parts.numberNotSpecified, 3, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 274CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 277"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 4, CanonicalError.Parts.numberNotSpecified, 278CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 281"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 5, 282CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 287"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 288CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 291"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 292CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 295"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 296CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 299"Main.cs", CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, 300CanonicalError.Parts.Category.Warning, "CS0168", "The variable 'foo' is declared but never used"); 306CanonicalError.Parts errorParts = CanonicalError.Parse( 311errorParts.category.ShouldBe(CanonicalError.Parts.Category.Error); 317errorParts.endLine.ShouldBe(CanonicalError.Parts.numberNotSpecified); 318errorParts.endColumn.ShouldBe(CanonicalError.Parts.numberNotSpecified); 328CanonicalError.Parts.numberNotSpecified, 329CanonicalError.Parts.numberNotSpecified, 330CanonicalError.Parts.Category.Error, 337private static void ValidateToolError(string message, string tool, CanonicalError.Parts.Category severity, string code, string text) 339CanonicalError.Parts errorParts = CanonicalError.Parse(message); 346errorParts.line.ShouldBe(CanonicalError.Parts.numberNotSpecified); 347errorParts.column.ShouldBe(CanonicalError.Parts.numberNotSpecified); 348errorParts.endLine.ShouldBe(CanonicalError.Parts.numberNotSpecified); 349errorParts.endColumn.ShouldBe(CanonicalError.Parts.numberNotSpecified); 352private static void ValidateFileNameMultiLineColumnError(string message, string filename, int line, int column, int endLine, int endColumn, CanonicalError.Parts.Category severity, string code, string text) 354CanonicalError.Parts errorParts = CanonicalError.Parse(message); 367private static void ValidateFileNameLineColumnError(string message, string filename, int line, int column, CanonicalError.Parts.Category severity, string code, string text) 369ValidateFileNameMultiLineColumnError(message, filename, line, column, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, severity, code, text); 372private static void ValidateFileNameLineError(string message, string filename, int line, CanonicalError.Parts.Category severity, string code, string text) 374ValidateFileNameMultiLineColumnError(message, filename, line, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, severity, code, text); 377private static void ValidateFileNameError(string message, string filename, CanonicalError.Parts.Category severity, string code, string text) 379ValidateFileNameMultiLineColumnError(message, filename, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, CanonicalError.Parts.numberNotSpecified, severity, code, text); 384CanonicalError.Parts errorParts = CanonicalError.Parse(message);