After switching to Visual Studio 2017, one of the projects we were working on started to fail with the following error message:
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.
To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.config.
To specify the OWIN startup Assembly, Class, or Method, add the appSetting owin:AppStartup with the fully qualified startup class or configuration method name in your web.config.
In our case we don’t need the OWIN startup detection, so we followed the suggestion as mentioned in the error message and updated our config to:
<appSettings>
<add key="owin:AutomaticAppStartup" value="false" />
</appSettings>
Strange that we didn’t had this problem before VS 2017…
More information:
- Owin Startup Class Detection: https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/owin-startup-class-detection