错误:
System.EntryPointNotFoundException:“The following errors occurred while attempting to load the app.
- No assembly found containing an OwinStartupAttribute.
- No assembly found containing a Startup or [AssemblyName].Startup class.”
解决方案:
// 方法1
[assembly: OwinStartup(typeof(Startup))]
// 方法2
修改 Startup 的命名空间和程序集的名称一致
//方法3
WebApp.Start(url) 改写为WebApp.Start<Startup>(url)
参考:
官方文档:https://docs.microsoft.com/zh-cn/aspnet/aspnet/overview/owin-and-katana/owin-startup-class-detection