Skip to content

Commit 4bff0d2

Browse files
committed
Fix packaging path and address feedback
1 parent 6c667cb commit 4bff0d2

File tree

4 files changed

+7
-21
lines changed

4 files changed

+7
-21
lines changed

src/OpenApi/gen/XmlComments/XmlComment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ private static TNode Copy<TNode>(TNode node, bool copyAttributeAnnotations)
474474
// Documents can't be added to containers, so our usual copy trick won't work.
475475
if (node.NodeType == XmlNodeType.Document)
476476
{
477-
copy = new XDocument(((XDocument)(object)node));
477+
copy = new XDocument((XDocument)(object)node);
478478
}
479479
else
480480
{

src/OpenApi/sample/Endpoints/MapXmlEndpoints.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,12 @@ public class TodoWithDescription : ITodo
9999
/// The identifier of the todo, overridden.
100100
/// </summary>
101101
public int Id { get; set; }
102+
102103
/// <value>
103104
/// The name of the todo, overridden.
104105
/// </value>
105106
public required string Name { get; set; }
107+
106108
/// <summary>
107109
/// A description of the the todo.
108110
/// </summary>

src/OpenApi/src/Microsoft.AspNetCore.OpenApi.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@
4949
<!-- Required to bundle source generator related assets into build. -->
5050
<ItemGroup>
5151
<ProjectReference Include="$(RepoRoot)/src/OpenApi/gen/Microsoft.AspNetCore.OpenApi.SourceGenerators.csproj" ReferenceOutputAssembly="false" />
52-
<None Include="$(OutputPath)\Microsoft.AspNetCore.OpenApi.SourceGenerators.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
52+
<None Include="$(ArtifactsBinDir)\Microsoft.AspNetCore.OpenApi.SourceGenerators\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.OpenApi.SourceGenerators.dll"
53+
Pack="true"
54+
PackagePath="analyzers/dotnet/cs"
55+
Visible="false" />
5356
<None Include="..\build\Microsoft.AspNetCore.OpenApi.targets" Pack="true" PackagePath="build" Visible="false" />
5457
</ItemGroup>
5558

src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/Helpers/HostFactoryResolver.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,6 @@ public static Func<string[], object> ResolveHostFactory(Assembly assembly,
6565
return null;
6666
}
6767

68-
try
69-
{
70-
// Attempt to load hosting and check the version to make sure the events
71-
// even have a chance of firing (they were added in .NET >= 6)
72-
var hostingAssembly = Assembly.Load("Microsoft.Extensions.Hosting");
73-
if (hostingAssembly.GetName().Version is Version version && version.Major < 6)
74-
{
75-
return null;
76-
}
77-
78-
// We're using a version >= 6 so the events can fire. If they don't fire
79-
// then it's because the application isn't using the hosting APIs
80-
}
81-
catch
82-
{
83-
// There was an error loading the extensions assembly, return null.
84-
return null;
85-
}
86-
8768
return args => new HostingListener(args, assembly.EntryPoint, waitTimeout == default ? s_defaultWaitTimeout : waitTimeout, stopApplication, configureHostBuilder, entrypointCompleted).CreateHost();
8869
}
8970

0 commit comments

Comments
 (0)