OwinStartup red herring


So I tried a build a few days ago and got this message:

The following errors occurred while attempting to load the app.
– The OwinStartup attribute discovered in assembly ‘PCS2’ referencing startup type ‘PCS2.Startup’ conflicts with the attribute in assembly ‘PCS’ referencing startup type ‘PCS.Startup’ because they have the same FriendlyName ”. Remove or rename one of the attributes, or reference the desired type directly.

You can get freaked out about this message and start yanking Owin and trying to debug the FriendlyName error message, or – simply put – understand that this is happening because you’re doing a build to the same destination point on a QA webserver from a project with a different name. (In this case, I’d cut over from an older project PCS2 to a new project, new assembly called PCS). And, WebDeploy’s Publish doesn’t clear out everything in the target folder in IIS – and artifacts there are interfering with your post-publish IIS settings. Just remote desktop onto the server and blow away the contents of that web app and re-publish, and that should do the trick.