首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >重命名ASP.NET MVC项目时出错

重命名ASP.NET MVC项目时出错
EN

Stack Overflow用户
提问于 2014-02-11 20:02:24
回答 6查看 39.1K关注 0票数 79

我复制了以前的一个项目并将其重命名。一旦我成功地重命名了所有的命名空间,它就可以正确构建了。当我运行应用程序时,我得到了以下错误:

代码语言:javascript
复制
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.

我已经知道,如果我注释掉下面的第一行,错误就会消失。

代码语言:javascript
复制
//[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。

我似乎找不到任何有这个旧名字的地方,但是在错误的地方提到了它。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21701297

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档