【问题标题】:Visual Studio 2012 Add controller with Context fails when connectionstring configSource in place当连接字符串 configSource 到位时,Visual Studio 2012 添加控制器与上下文失败
【发布时间】:2013-03-12 15:24:05
【问题描述】:

使用 VS 2012 + MVC4 + EF5 尝试使用上下文添加控制器失败,当连接字符串 configSource 到位并出现错误时:

“无法检索 MvcTestApp.Models.DummyClass 的元数据。无法打开 configSource 文件 'connections.config'。

顺便说一句:路径正确,应用程序实际运行正确。

Visual Studio 2012 EF5 是否支持在设计时将 connectionStrings configSource 放在单独的文件中?或者在开发过程中没有办法!!!

感谢您的反馈。

【问题讨论】:

    标签: asp.net-mvc-4 frameworks entity configsource


    【解决方案1】:

    我也有同样的问题。我解决了它在

    中放置“connections.config”的副本
    C:\Users\[CurrentUser]\AppData\Local\Temp.
    

    希望对您有所帮助。

    【讨论】:

    • +1,但我不知道我应该为这是解决方案感到难过还是高兴。 Visual Studio 的费用是多少?但它甚至找不到配置中定义的 configSource。啧啧啧。
    • @NeilThompson 谢谢你的意见。我搜索“问题”的解决方案只是因为......事实上,我认为在开发过程中没有理由使用这种方法 - 外部configSource。
    猜你喜欢
    • 2016-02-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-19
    相关资源
    最近更新 更多