Skip to content

Commit a6da55f

Browse files
committed
Add xmldocs to generated code
1 parent 6db352f commit a6da55f

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/Aspire.Hosting.AppHost/build/Aspire.Hosting.AppHost.in.targets

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,18 @@
4747
namespace Projects%3B
4848
4949
#pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
50+
/// <summary>
51+
/// Metadata for the ]]>%(ClassName)<![CDATA[ project.
52+
/// </summary>
5053
[global::System.CodeDom.Compiler.GeneratedCode("Aspire.Hosting", null)]
5154
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage(Justification = "Generated code.")]
5255
[global::System.Diagnostics.DebuggerDisplay("Type = {GetType().Name,nq}, ProjectPath = {ProjectPath}")]
5356
]]>$(AspireGeneratedClassesVisibility)<![CDATA[ class ]]>%(ClassName)<![CDATA[ : global::Aspire.Hosting.IProjectMetadata
5457
#pragma warning restore CS8981
5558
{
59+
/// <summary>
60+
/// The path to the ]]>%(ClassName)<![CDATA[ project.
61+
/// </summary>
5662
public string ProjectPath => """]]>%(ProjectPath)<![CDATA["""%3B
5763
}]]>
5864
</Source>
@@ -89,13 +95,20 @@ namespace Projects%3B
8995
namespace Projects%3B
9096
9197
#pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
98+
/// <summary>
99+
/// Metadata for the Aspire Host project.
100+
/// </summary>
92101
[global::System.CodeDom.Compiler.GeneratedCode("Aspire.Hosting", null)]
93102
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage(Justification = "Generated code.")]
94103
[global::System.Diagnostics.DebuggerDisplay("Type = {GetType().Name,nq}, ProjectPath = {ProjectPath}")]
95104
]]>$(AspireGeneratedClassesVisibility)<![CDATA[ class ]]>%(ClassName)<![CDATA[
96105
#pragma warning restore CS8981
97106
{
98107
private ]]>%(ClassName)<![CDATA[() { }
108+
109+
/// <summary>
110+
/// The path to the Aspire Host project.
111+
/// </summary>
99112
public static string ProjectPath => """]]>%(ProjectPath)<![CDATA["""%3B
100113
}]]>
101114
</Source>

tests/Aspire.Hosting.Tests/MSBuildTests.ValidateMetadataSources.verified.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44

55
namespace Projects;
66

7+
/// <summary>
8+
/// Metadata for the Aspire Host project.
9+
/// </summary>
710
[global::System.CodeDom.Compiler.GeneratedCode("Aspire.Hosting", null)]
811
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage(Justification = "Generated code.")]
912
[global::System.Diagnostics.DebuggerDisplay("Type = {GetType().Name,nq}, ProjectPath = {ProjectPath}")]
1013
public class AppHost
1114
{
1215
private AppHost() { }
16+
17+
/// <summary>
18+
/// The path to the Aspire Host project.
19+
/// </summary>
1320
public static string ProjectPath => """{AspirePath}\AppHost""";
1421
}
1522
,
@@ -18,11 +25,17 @@ public class AppHost
1825

1926
namespace Projects;
2027

28+
/// <summary>
29+
/// Metadata for the App project.
30+
/// </summary>
2131
[global::System.CodeDom.Compiler.GeneratedCode("Aspire.Hosting", null)]
2232
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage(Justification = "Generated code.")]
2333
[global::System.Diagnostics.DebuggerDisplay("Type = {GetType().Name,nq}, ProjectPath = {ProjectPath}")]
2434
public class App : global::Aspire.Hosting.IProjectMetadata
2535
{
36+
/// <summary>
37+
/// The path to the App project.
38+
/// </summary>
2639
public string ProjectPath => """{AspirePath}\App\App.csproj""";
2740
}
2841

0 commit comments

Comments
 (0)