.NET CORE学习和采坑笔记
asp.net mvc到apsp.net core方法的替换:
获取请求的文件流:HttpContext.Current.Request.Files转换成HttpContext.Request.Form.Files
获取web根目录:httpRequest.MapPath("~/")转换成:
IWebHostEnvironment env
env.ContentRootPath
使用类库中的 ASP.NET Core API:
https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/target-aspnetcore?view=aspnetcore-5.0&tabs=visual-studio
NET5发布后,不会将xml文件发布出去,如果使用了swagger中间件,则swagger看不到,并且接口访问报错