diff --git a/SwaggerStudy/.config/dotnet-tools.json b/SwaggerStudy/.config/dotnet-tools.json new file mode 100644 index 0000000..c735fef --- /dev/null +++ b/SwaggerStudy/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "5.0.0", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/SwaggerStudy/StartupTest.cs b/SwaggerStudy/StartupTest.cs index 4e7ed33..e362068 100644 --- a/SwaggerStudy/StartupTest.cs +++ b/SwaggerStudy/StartupTest.cs @@ -75,12 +75,12 @@ namespace SwaggerStudy }); //包含xml注释 - //var xmlCommentFiles = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, $"SwaggerStudy.*.xml", System.IO.SearchOption.TopDirectoryOnly); - //foreach (var xmlFile in xmlCommentFiles) - //{ - // setup.IncludeXmlComments(xmlFile, true); - //} - + var xmlCommentFiles = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, $"SwaggerStudy.*.xml", System.IO.SearchOption.TopDirectoryOnly); + foreach (var xmlFile in xmlCommentFiles) + { + setup.IncludeXmlComments(xmlFile, true); + } + }); //配置SwaggerGen diff --git a/SwaggerStudy/SwaggerStudy.csproj b/SwaggerStudy/SwaggerStudy.csproj index b2ceaae..819ef67 100644 --- a/SwaggerStudy/SwaggerStudy.csproj +++ b/SwaggerStudy/SwaggerStudy.csproj @@ -4,6 +4,7 @@ net5.0 true $(NoWarn);1591 + 2f9ec575-5227-4ce1-b564-47ea6459c71b