EF Migrations vs. Swashbuckle (#6380)
* Update Startup.cs This sample causes a FileNotFoundException with Entity Framework Core Migrations - i.e. when executing "dotnet ef migrations add new", the GetEntryAssembly call returns "ef", and "ef.xml" does not exist in the build folder. * Update Startup.cs This sample causes a FileNotFoundException with Entity Framework Core Migrations - i.e. when executing "dotnet ef migrations add new", the GetEntryAssembly call returns "ef", and "ef.xml" does not exist in the build folder.pull/6388/head
parent
2d616b9bd3
commit
a32fbb4351
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue