Error en owin al renombrar proyectos

Si renombramos un proyecto o varios de ellos en una aplicación web y estamos utilizando Owin es posible que aparezca el siguiente error:

The following errors occurred while attempting to load the app.
– The OwinStartup attribute discovered in assembly ‘x’ referencing startup type ‘x.Startup’ conflicts with the attribute in assembly ‘y’ referencing startup type ‘y.Startup’ because they have the same FriendlyName ». Remove or rename one of the attributes, or reference the desired type directly.
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.

Este error se suele producir porque existen dos ensamblados cargados en nuestra carpeta bin de la solución que contiene una clase startup. En la ejecución de la aplicación asp.net no sabe resolver cual de las dos clases debe ejecutar y de ahí el error.

La solución es ir a la carpeta bin y borrar la dll antigua que ya no es necesaria.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *