我已经复制了以前的项目并将其重命名。一旦我成功重命名了所有名称空间,它就会正确构建。运行应用程序时出现以下错误:
The following errors occurred while attempting to load the app.
- The OwinStartup attribute discovered in assembly 'User Manager Interface' referencing startup type 'User_Manager_Interface.Startup' conflicts with the attribute in assembly 'Service Monitor Web Interface' referencing startup type 'Service_Monitor_Web_Interface.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.
我已经发现,如果我注释掉下面的第一行,那么错误就会消失。
//[assembly: OwinStartupAttribute(typeof(Service_Monitor_Web_Interface.Startup))]
namespace Service_Monitor_Web_Interface
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
}
}
我将解决方案从User_Manager_Interface重命名为Service_Monitor_Web_Interface。
我似乎找不到任何具有旧名称的地方,但是在提及它的错误中却显得如此。