WebAPI纯净版的基础上
- 添加nuget包 a). Swashbuckle b). Swagger.Net.UI


- 取消文件SwaggerConfig.cs中 c.IncludeXmlComments(GetXmlCommentsPath());的注释
- 并在此类中添加方法:GetXmlCommentsPath()
1 private static string GetXmlCommentsPath()
2 {
3 return string.Format(@"{0}\bin\WebApi.XML", AppDomain.CurrentDomain.BaseDirectory);
4 }


- 注释掉SwaggerNet.cs文件中的部分代码,见下图


