出现此错误 - 在应用程序配置文件中找不到名为“kiculoserverentities”的连接字符串。 [英] Got this error - no connection string named 'kiculoserverentities' could be found in the application config file.
问题描述
我使用实体框架为我的实时图表,我设法通过删除和创建另一个实体修复它一次但是然后在我重新打开VS之后这个错误再次显示。
我的EntityFramework版本是6.2.0
这是我的app.config下面
< b>我尝试过:
< connectionstrings>
< add name =KiculoServerEntitiesconnectionString = metadata = res://*/KiculoCraftModel.csdl |
res://*/KiculoCraftModel.ssdl |
res://*/KiculoCraftModel.msl;
provider = System.Data.SqlClient; provider connection string =data source = DESKTOP-1281SGB; initial catalog = KiculoServer; persist security info = True; user id = KicuCrafts; password = admin; MultipleActiveResultSets = True; App = EntityFrameworkproviderName =System.Data.EntityClient/>
Im using entity framework for my live charts, i managed to fix it once by deleting and creating another entity but then after i re-open VS this error is showing again.
my EntityFramework version is 6.2.0
here's my app.config below
What I have tried:
<connectionstrings>
<add name="KiculoServerEntities" connectionString="metadata=res://*/KiculoCraftModel.csdl|
res://*/KiculoCraftModel.ssdl|
res://*/KiculoCraftModel.msl;
provider=System.Data.SqlClient;provider connection string="data source=DESKTOP-1281SGB;initial catalog=KiculoServer;persist security info=True;user id=KicuCrafts;password=admin;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
推荐答案
主app配置需要连接字符串; 准备好了吗?;否则它将无法找到。
或
1)使用SqlConnectionStringBuilder创建连接字符串
2)将字符串传递给dbContext构造函数。
The "main" app config needs the connection string; SPELLED PROPERLY ?; otherwise it won't be found.
or
1) Use SqlConnectionStringBuilder to create a connection string
2) Pass the string to the dbContext constructor.
这篇关于出现此错误 - 在应用程序配置文件中找不到名为“kiculoserverentities”的连接字符串。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!