diff --git a/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/2.0/TodoApi.Swashbuckle/Startup.cs b/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/2.0/TodoApi.Swashbuckle/Startup.cs index 5efc33faa0..88017d87bf 100644 --- a/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/2.0/TodoApi.Swashbuckle/Startup.cs +++ b/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/2.0/TodoApi.Swashbuckle/Startup.cs @@ -41,7 +41,7 @@ namespace TodoApi }); // Set the comments path for the Swagger JSON and UI. - var xmlFile = $"{Assembly.GetEntryAssembly().GetName().Name}.xml"; + var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile); c.IncludeXmlComments(xmlPath); }); @@ -67,4 +67,4 @@ namespace TodoApi } #endregion } -} \ No newline at end of file +} diff --git a/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/2.1/TodoApi.Swashbuckle/Startup.cs b/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/2.1/TodoApi.Swashbuckle/Startup.cs index 3b9ca88e4f..cf3e75ee95 100644 --- a/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/2.1/TodoApi.Swashbuckle/Startup.cs +++ b/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/2.1/TodoApi.Swashbuckle/Startup.cs @@ -43,7 +43,7 @@ namespace TodoApi }); // Set the comments path for the Swagger JSON and UI. - var xmlFile = $"{Assembly.GetEntryAssembly().GetName().Name}.xml"; + var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile); c.IncludeXmlComments(xmlPath); }); @@ -69,4 +69,4 @@ namespace TodoApi } #endregion } -} \ No newline at end of file +}