由网友(站在巴黎铁塔上等日出)分享简介:移动到EF 4.3 AutomaticMigrationsEnabled = true;在的web.config 具有以下设置:移动到EF 4.3
AutomaticMigrationsEnabled = true;
在的web.config
具有以下设置:
<appSettings configSource="appSettings.config" />
<connectionStrings configSource="connectionStrings.config" />
在包管理器控制台执行
update-database -verbose
和得到了以下错误:
System.Configuration.ConfigurationErrorsException: Unable to open configSource file 'connectionStrings.config'
该错误是可以理解的:它试图从工作目录是不是根项目目录,其中 connectionStrings.config打开
文件存在。 connectionStrings.config
文件
The error is understandable: it tries to open connectionStrings.config
file from the working directory which is not the root project directory where connectionStrings.config
file exists.
如果connectionStrings.config和appSettings.config内容被移动到web.config像一个魅力的所有作品。
If connectionStrings.config and appSettings.config content to be moved to the web.config all works like a charm.
时的一个bug一个可以在某种程度上解决了吗?
Is it a bug a it can be solved somehow?
推荐答案
好像这个错误是固定4.3.1 。
有关configsource在配置文件中启用的支持时使用 code首先迁移。
Enabled support for configsource in configuration files when using Code First Migrations.
相关推荐
最新文章