'没有连接字符串名为' iicmdataentities'可以在应用程序配置文件中找到。' EF6-修订加载项
AM构建文件.dll revit Addin具有实体框架6,而我的错误输入图像说明在这里帮我
am build file .dll Revit Add-in has Entity Framework 6 and my errors enter image description here Help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

首先,您需要让命令知道
app.config
在哪里。由于某种原因,我们有Revitapi的问题。好,但是...我们怎么做?
首先,您需要将引用添加到
system.configuration.dll
。如果您右键单击“参考” 在您的解决方案资源管理器中,然后在“ assemblies” tab下单击,搜索配置:
i.sstatic.net/to9ag.png“ rel =“ nofollow noreferrer” > ,您需要创建
配置
对象,给出Addin Dll的确切位置。以下代码确实确切地说:
使用连接字符串值,您可以将其传递给
dbContext
内部的execute> rececute
方法:Done!
Firstly, you need to let your command know where your
app.config
is. For some reason, we have this issue with RevitAPI.Ok, but... How we do that?
To begin with, you need to add a reference to
System.Configuration.dll
.It's easily found if you right click "References" in your solution explorer, and then under "Assemblies" tab, search for configuration:
Then, you need to create a
Configuration
object, giving the exact location of your addin dll.The following piece of code does exact that:
With the connection string value in hand, you can simply pass it to the constructor of your
DbContext
inside yourExecute
method:Done!