diff --git a/samples/extensions/src/ExampleClass.cs b/samples/extensions/src/ExampleClass.cs index ad4f678c926..ac7a0cef7db 100644 --- a/samples/extensions/src/ExampleClass.cs +++ b/samples/extensions/src/ExampleClass.cs @@ -1,3 +1,5 @@ +using System; + namespace MyExample { public class ExampleClass @@ -6,7 +8,7 @@ public class ExampleClass public string MyField; - public string Myroperty { get; set; } + public string MyProperty { get; set; } public ExampleClass() { diff --git a/src/Microsoft.DocAsCode.Dotnet/CompilationHelper.cs b/src/Microsoft.DocAsCode.Dotnet/CompilationHelper.cs index fe4e1640f28..b024261d775 100644 --- a/src/Microsoft.DocAsCode.Dotnet/CompilationHelper.cs +++ b/src/Microsoft.DocAsCode.Dotnet/CompilationHelper.cs @@ -29,7 +29,7 @@ public static void Main(string[] foo) { } """), }; - public static bool CheckDiagnostics(this Compilation compilation) + public static void CheckDiagnostics(this Compilation compilation, List errors) { var errorCount = 0; @@ -47,14 +47,13 @@ public static bool CheckDiagnostics(this Compilation compilation) if (diagnostic.Severity is DiagnosticSeverity.Error) { Logger.LogError(diagnostic.ToString()); + errors.Add(diagnostic); if (++errorCount >= 20) break; } } - return errorCount > 0; - static bool IsKnownError(Diagnostic diagnostic) { // Ignore these VB errors on non-Windows platform: diff --git a/src/Microsoft.DocAsCode.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs b/src/Microsoft.DocAsCode.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs index b3f7c0bcf07..cd9a56f949d 100644 --- a/src/Microsoft.DocAsCode.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs +++ b/src/Microsoft.DocAsCode.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs @@ -102,7 +102,7 @@ public async Task ExtractMetadataAsync() } } - var hasCompilationError = false; + var compilationErrors = new List(); var assemblySymbols = new List(); if (_files.TryGetValue(FileType.Solution, out var solutionFiles)) @@ -138,21 +138,21 @@ public async Task ExtractMetadataAsync() Logger.LogInfo($"Compiling project {project.FilePath}"); var compilation = await project.GetCompilationAsync(); - hasCompilationError |= compilation.CheckDiagnostics(); + compilation.CheckDiagnostics(compilationErrors); assemblySymbols.Add(compilation.Assembly); } if (_files.TryGetValue(FileType.CSSourceCode, out var csFiles)) { var compilation = CompilationHelper.CreateCompilationFromCSharpFiles(csFiles.Select(f => f.NormalizedPath)); - hasCompilationError |= compilation.CheckDiagnostics(); + compilation.CheckDiagnostics(compilationErrors); assemblySymbols.Add(compilation.Assembly); } if (_files.TryGetValue(FileType.VBSourceCode, out var vbFiles)) { var compilation = CompilationHelper.CreateCompilationFromVBFiles(vbFiles.Select(f => f.NormalizedPath)); - hasCompilationError |= compilation.CheckDiagnostics(); + compilation.CheckDiagnostics(compilationErrors); assemblySymbols.Add(compilation.Assembly); } @@ -162,14 +162,14 @@ public async Task ExtractMetadataAsync() { Logger.LogInfo($"Loading assembly {assemblyFile.NormalizedPath}"); var (compilation, assembly) = CompilationHelper.CreateCompilationFromAssembly(assemblyFile.NormalizedPath, _references); - hasCompilationError |= compilation.CheckDiagnostics(); + compilation.CheckDiagnostics(compilationErrors); assemblySymbols.Add(assembly); } } - if (hasCompilationError) + if (compilationErrors.Count > 0) { - throw new DocfxException("Abort .NET API generation due to compilation errors"); + throw new DocfxException($"Abort .NET API generation due to compilation errors:\n\n{string.Join('\n', compilationErrors)}"); } if (assemblySymbols.Count <= 0) diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.-ctor.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.-ctor.html.view.verified.json index a2298b401b7..6351d9ddab8 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.-ctor.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.-ctor.html.view.verified.json @@ -74,7 +74,7 @@ }, "id": ".ctor", "path": "src/ExampleClass.cs", - "startLine": 10.0, + "startLine": 12.0, "endLine": 0.0, "isExternal": false }, @@ -131,7 +131,7 @@ "summary": "", "platform": null, "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass__ctor.md&value=---%0Auid%3A%20MyExample.ExampleClass.%23ctor%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", - "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L11", + "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L13", "remarks": null, "conceptual": "", "implements": null, @@ -187,7 +187,7 @@ }, "id": ".ctor", "path": "src/ExampleClass.cs", - "startLine": 10.0, + "startLine": 12.0, "endLine": 0.0, "isExternal": false }, @@ -353,7 +353,7 @@ "_shared": {} }, "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass__ctor_.md&value=---%0Auid%3A%20MyExample.ExampleClass.%23ctor*%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", - "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L11", + "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L13", "summary": "", "remarks": null, "conceptual": "", diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyEvent.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyEvent.html.view.verified.json index 74d8b01afe4..0470b41fd3e 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyEvent.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyEvent.html.view.verified.json @@ -60,7 +60,7 @@ }, "id": "MyEvent", "path": "src/ExampleClass.cs", - "startLine": 4.0, + "startLine": 6.0, "endLine": 0.0, "isExternal": false }, @@ -126,8 +126,8 @@ ], "return": { "type": { - "uid": "Action{System.String}", - "definition": "Action`1", + "uid": "System.Action{System.String}", + "definition": "System.Action`1", "name": [ { "lang": "csharp", @@ -151,21 +151,21 @@ "fullName": [ { "lang": "csharp", - "value": "Action" + "value": "System.Action" }, { "lang": "vb", - "value": "Action(Of String)" + "value": "System.Action(Of String)" } ], "specName": [ { "lang": "csharp", - "value": "<>" + "value": "<>" }, { "lang": "vb", - "value": "(Of )" + "value": "(Of )" } ] } @@ -283,7 +283,7 @@ "_shared": {} }, "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass_MyEvent.md&value=---%0Auid%3A%20MyExample.ExampleClass.MyEvent%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", - "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L5", + "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L7", "summary": "", "remarks": null, "conceptual": "", diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyField.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyField.html.view.verified.json index 0ba9379d9ff..bf86815190f 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyField.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyField.html.view.verified.json @@ -60,7 +60,7 @@ }, "id": "MyField", "path": "src/ExampleClass.cs", - "startLine": 6.0, + "startLine": 8.0, "endLine": 0.0, "isExternal": false }, @@ -282,7 +282,7 @@ "_shared": {} }, "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass_MyField.md&value=---%0Auid%3A%20MyExample.ExampleClass.MyField%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", - "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L7", + "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L9", "summary": "", "remarks": null, "conceptual": "", diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyMethod.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyMethod.html.view.verified.json index c794a253e64..e13cfe5c6ca 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyMethod.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyMethod.html.view.verified.json @@ -119,7 +119,7 @@ }, "id": "MyMethod", "path": "src/ExampleClass.cs", - "startLine": 15.0, + "startLine": 17.0, "endLine": 0.0, "isExternal": false }, @@ -176,7 +176,7 @@ "summary": "", "platform": null, "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass_MyMethod.md&value=---%0Auid%3A%20MyExample.ExampleClass.MyMethod%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", - "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L16", + "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L18", "remarks": null, "conceptual": "", "implements": null, @@ -232,7 +232,7 @@ }, "id": "MyMethod", "path": "src/ExampleClass.cs", - "startLine": 15.0, + "startLine": 17.0, "endLine": 0.0, "isExternal": false }, @@ -398,7 +398,7 @@ "_shared": {} }, "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass_MyMethod_.md&value=---%0Auid%3A%20MyExample.ExampleClass.MyMethod*%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", - "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L16", + "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L18", "summary": "", "remarks": null, "conceptual": "", diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.Myroperty.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyProperty.html.view.verified.json similarity index 77% rename from test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.Myroperty.html.view.verified.json rename to test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyProperty.html.view.verified.json index e7f0642e49d..e72fb9f5c86 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.Myroperty.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.MyProperty.html.view.verified.json @@ -1,5 +1,5 @@ { - "uid": "MyExample.ExampleClass.Myroperty*", + "uid": "MyExample.ExampleClass.MyProperty*", "isEii": false, "isExtensionMethod": false, "children": [ @@ -9,7 +9,7 @@ "id": "properties", "children": [ { - "uid": "MyExample.ExampleClass.Myroperty", + "uid": "MyExample.ExampleClass.MyProperty", "isEii": false, "isExtensionMethod": false, "parent": "MyExample.ExampleClass", @@ -17,52 +17,52 @@ "name": [ { "lang": "csharp", - "value": "Myroperty" + "value": "MyProperty" }, { "lang": "vb", - "value": "Myroperty" + "value": "MyProperty" } ], "nameWithType": [ { "lang": "csharp", - "value": "ExampleClass.Myroperty" + "value": "ExampleClass.MyProperty" }, { "lang": "vb", - "value": "ExampleClass.Myroperty" + "value": "ExampleClass.MyProperty" } ], "fullName": [ { "lang": "csharp", - "value": "MyExample.ExampleClass.Myroperty" + "value": "MyExample.ExampleClass.MyProperty" }, { "lang": "vb", - "value": "MyExample.ExampleClass.Myroperty" + "value": "MyExample.ExampleClass.MyProperty" } ], "specName": [ { "lang": "csharp", - "value": "" + "value": "" }, { "lang": "vb", - "value": "" + "value": "" } ], "syntax": { "content": [ { "lang": "csharp", - "value": "public string Myroperty { get; set; }" + "value": "public string MyProperty { get; set; }" }, { "lang": "vb", - "value": "Public Property Myroperty As String" + "value": "Public Property MyProperty As String" } ], "parameters": [], @@ -119,9 +119,9 @@ "branch": "main", "repo": "/~https://github.com/dotnet/docfx" }, - "id": "Myroperty", + "id": "MyProperty", "path": "src/ExampleClass.cs", - "startLine": 8.0, + "startLine": 10.0, "endLine": 0.0, "isExternal": false }, @@ -130,61 +130,61 @@ ], "namespace": "MyExample", "overload": { - "uid": "MyExample.ExampleClass.Myroperty*", + "uid": "MyExample.ExampleClass.MyProperty*", "name": [ { "lang": "csharp", - "value": "Myroperty" + "value": "MyProperty" }, { "lang": "vb", - "value": "Myroperty" + "value": "MyProperty" } ], "nameWithType": [ { "lang": "csharp", - "value": "ExampleClass.Myroperty" + "value": "ExampleClass.MyProperty" }, { "lang": "vb", - "value": "ExampleClass.Myroperty" + "value": "ExampleClass.MyProperty" } ], "fullName": [ { "lang": "csharp", - "value": "MyExample.ExampleClass.Myroperty" + "value": "MyExample.ExampleClass.MyProperty" }, { "lang": "vb", - "value": "MyExample.ExampleClass.Myroperty" + "value": "MyExample.ExampleClass.MyProperty" } ], "specName": [ { "lang": "csharp", - "value": "" + "value": "" }, { "lang": "vb", - "value": "" + "value": "" } ], - "id": "MyExample_ExampleClass_Myroperty_" + "id": "MyExample_ExampleClass_MyProperty_" }, "level": 0.0, "type": "property", "summary": "", "platform": null, - "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass_Myroperty.md&value=---%0Auid%3A%20MyExample.ExampleClass.Myroperty%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", - "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L9", + "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass_MyProperty.md&value=---%0Auid%3A%20MyExample.ExampleClass.MyProperty%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", + "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L11", "remarks": null, "conceptual": "", "implements": null, "example": null, "seealso": null, - "id": "MyExample_ExampleClass_Myroperty", + "id": "MyExample_ExampleClass_MyProperty", "hideTitleType": false, "hideSubtitle": false } @@ -198,31 +198,31 @@ "name": [ { "lang": "csharp", - "value": "Myroperty" + "value": "MyProperty" }, { "lang": "vb", - "value": "Myroperty" + "value": "MyProperty" } ], "nameWithType": [ { "lang": "csharp", - "value": "ExampleClass.Myroperty" + "value": "ExampleClass.MyProperty" }, { "lang": "vb", - "value": "ExampleClass.Myroperty" + "value": "ExampleClass.MyProperty" } ], "fullName": [ { "lang": "csharp", - "value": "MyExample.ExampleClass.Myroperty" + "value": "MyExample.ExampleClass.MyProperty" }, { "lang": "vb", - "value": "MyExample.ExampleClass.Myroperty" + "value": "MyExample.ExampleClass.MyProperty" } ], "type": "property", @@ -232,9 +232,9 @@ "branch": "main", "repo": "/~https://github.com/dotnet/docfx" }, - "id": "Myroperty", + "id": "MyProperty", "path": "src/ExampleClass.cs", - "startLine": 8.0, + "startLine": 10.0, "endLine": 0.0, "isExternal": false }, @@ -326,12 +326,12 @@ "additionalNotes" ], "_splitReference": true, - "_key": "api/MyExample.ExampleClass.Myroperty.yml", + "_key": "api/MyExample.ExampleClass.MyProperty.yml", "_lang": "csharp", "_navKey": "~/toc.yml", "_navPath": "toc.html", "_navRel": "../toc.html", - "_path": "api/MyExample.ExampleClass.Myroperty.html", + "_path": "api/MyExample.ExampleClass.MyProperty.html", "_rel": "../", "_tocKey": "~/api/toc.yml", "_tocPath": "api/toc.html", @@ -399,8 +399,8 @@ "backToTop": "Back to top", "_shared": {} }, - "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass_Myroperty_.md&value=---%0Auid%3A%20MyExample.ExampleClass.Myroperty*%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", - "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L9", + "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass_MyProperty_.md&value=---%0Auid%3A%20MyExample.ExampleClass.MyProperty*%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", + "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L11", "summary": "", "remarks": null, "conceptual": "", @@ -408,7 +408,7 @@ "implements": null, "example": null, "seealso": null, - "id": "MyExample_ExampleClass_Myroperty_", + "id": "MyExample_ExampleClass_MyProperty_", "hideTitleType": false, "hideSubtitle": false, "_disableToc": false, diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.html.view.verified.json index 9ae440355fc..18dd8f98eb3 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/MyExample.ExampleClass.html.view.verified.json @@ -191,47 +191,47 @@ "id": "properties", "children": [ { - "uid": "MyExample.ExampleClass.Myroperty", + "uid": "MyExample.ExampleClass.MyProperty", "isExtensionMethod": false, "parent": "MyExample.ExampleClass", "name": [ { "lang": "csharp", - "value": "Myroperty" + "value": "MyProperty" }, { "lang": "vb", - "value": "Myroperty" + "value": "MyProperty" } ], "nameWithType": [ { "lang": "csharp", - "value": "ExampleClass.Myroperty" + "value": "ExampleClass.MyProperty" }, { "lang": "vb", - "value": "ExampleClass.Myroperty" + "value": "ExampleClass.MyProperty" } ], "fullName": [ { "lang": "csharp", - "value": "MyExample.ExampleClass.Myroperty" + "value": "MyExample.ExampleClass.MyProperty" }, { "lang": "vb", - "value": "MyExample.ExampleClass.Myroperty" + "value": "MyExample.ExampleClass.MyProperty" } ], "specName": [ { "lang": "csharp", - "value": "" + "value": "" }, { "lang": "vb", - "value": "" + "value": "" } ], "level": 0.0, @@ -247,7 +247,7 @@ "implements": null, "example": null, "seealso": null, - "id": "MyExample_ExampleClass_Myroperty", + "id": "MyExample_ExampleClass_MyProperty", "hideTitleType": false, "hideSubtitle": false } @@ -433,7 +433,7 @@ }, "id": "ExampleClass", "path": "src/ExampleClass.cs", - "startLine": 2.0, + "startLine": 4.0, "endLine": 0.0, "isExternal": false }, @@ -1000,7 +1000,7 @@ "_shared": {} }, "docurl": "/~https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=MyExample_ExampleClass.md&value=---%0Auid%3A%20MyExample.ExampleClass%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", - "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L3", + "sourceurl": "/~https://github.com/dotnet/docfx/blob/main/samples/extensions/src/ExampleClass.cs/#L5", "summary": "", "remarks": null, "conceptual": "", diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/toc.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/toc.html.view.verified.json index e70c7cd432d..cb8729e3566 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/toc.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/api/toc.html.view.verified.json @@ -65,12 +65,12 @@ "name": "Properties", "items": [ { - "name": "Myroperty", - "href": "MyExample.ExampleClass.Myroperty.html", - "topicHref": "MyExample.ExampleClass.Myroperty.html", - "topicUid": "MyExample.ExampleClass.Myroperty*", - "fullName": "MyExample.ExampleClass.Myroperty", - "nameWithType": "ExampleClass.Myroperty", + "name": "MyProperty", + "href": "MyExample.ExampleClass.MyProperty.html", + "topicHref": "MyExample.ExampleClass.MyProperty.html", + "topicUid": "MyExample.ExampleClass.MyProperty*", + "fullName": "MyExample.ExampleClass.MyProperty", + "nameWithType": "ExampleClass.MyProperty", "type": "Property", "isEii": false, "tocHref": null, diff --git a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/xrefmap.verified.yml b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/xrefmap.verified.yml index bf55d6c92ea..368f008b86a 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.Extensions/xrefmap.verified.yml +++ b/test/docfx.Snapshot.Tests/SamplesTest.Extensions/xrefmap.verified.yml @@ -55,15 +55,15 @@ references: commentId: Overload:MyExample.ExampleClass.MyMethod fullName: MyExample.ExampleClass.MyMethod nameWithType: ExampleClass.MyMethod -- uid: MyExample.ExampleClass.Myroperty - name: Myroperty - href: api/MyExample.ExampleClass.Myroperty.html#MyExample_ExampleClass_Myroperty - commentId: P:MyExample.ExampleClass.Myroperty - fullName: MyExample.ExampleClass.Myroperty - nameWithType: ExampleClass.Myroperty -- uid: MyExample.ExampleClass.Myroperty* - name: Myroperty - href: api/MyExample.ExampleClass.Myroperty.html - commentId: Overload:MyExample.ExampleClass.Myroperty - fullName: MyExample.ExampleClass.Myroperty - nameWithType: ExampleClass.Myroperty +- uid: MyExample.ExampleClass.MyProperty + name: MyProperty + href: api/MyExample.ExampleClass.MyProperty.html#MyExample_ExampleClass_MyProperty + commentId: P:MyExample.ExampleClass.MyProperty + fullName: MyExample.ExampleClass.MyProperty + nameWithType: ExampleClass.MyProperty +- uid: MyExample.ExampleClass.MyProperty* + name: MyProperty + href: api/MyExample.ExampleClass.MyProperty.html + commentId: Overload:MyExample.ExampleClass.MyProperty + fullName: MyExample.ExampleClass.MyProperty + nameWithType: ExampleClass.MyProperty diff --git a/test/docfx.Tests/Assets/multi-frameworks-test.csproj.sample.1 b/test/docfx.Tests/Assets/multi-frameworks-test.csproj.sample.1 index c6d94b5576e..f7aca45d3c0 100644 --- a/test/docfx.Tests/Assets/multi-frameworks-test.csproj.sample.1 +++ b/test/docfx.Tests/Assets/multi-frameworks-test.csproj.sample.1 @@ -1,6 +1,7 @@  net6.0;netstandard2.0 + true diff --git a/test/docfx.Tests/Assets/test.csproj.sample.1 b/test/docfx.Tests/Assets/test.csproj.sample.1 index df837a40e4b..d6ae428726b 100644 --- a/test/docfx.Tests/Assets/test.csproj.sample.1 +++ b/test/docfx.Tests/Assets/test.csproj.sample.1 @@ -1,6 +1,7 @@  net6.0 + true diff --git a/test/docfx.Tests/CompositeCommandTest.cs b/test/docfx.Tests/CompositeCommandTest.cs index 9f812e5e2bb..ae3e5c993fb 100644 --- a/test/docfx.Tests/CompositeCommandTest.cs +++ b/test/docfx.Tests/CompositeCommandTest.cs @@ -35,7 +35,7 @@ public void TestCommandFromCSCodeToHtml() { // Create source file var sourceCode = @" -public namespace Hello{ +namespace Hello{ /// /// The class < > > description goes here... ///