可能吗! [英] Is it Possible!

查看:78
本文介绍了可能吗!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

怎么可能

1.我有一个类库项目,该项目再次引用了一些另一个dll".

1. I have a class library project which is again having a reference of some "another dll".

2. 另一个dll"具有读取app.config文件的某些功能.

2. The "another dll" has some functionality of of reading the the app.config file.

但是另一个dll从类库项目中读取app.config文件.

But another dll reads the app.config file from the class library project.

我的问题如何以及为什么会发生这种情况.

My Question How and Why it is happening so.

推荐答案

1)当然.我认为您编写的所有.NET类库都必须引用.NET运行时库.这些库将读取app.config/web.config(如果存在),以查看您是否具有默认行为覆盖(例如,网络设置).

1) Of course. I think all .NET class libraries you write must have reference to the .NET runtime libraries. These libraries will read the app.config/web.config if present to see if you have default behaviour overrides on, say, network settings or else.

2)这也是常见的.假设如果您在单独的类库项目上使用Entity Framework,则将看到实体类设计器为您创建app.config文件(如果尚不存在可存储连接字符串的文件).当您想使用图书馆 在其他项目(无论是Winform还是Web应用程序)中,您都必须记住将连接字符串键放在该项目的app.config/web.config的相应位置,因此EntityFramework类将从该配置中加载值文件.

2) This is also common. Say if you use Entity Framework on a seperate class library project, you'll see the entity class designer creates the app.config file for you if it's not already exist to store the connection string. When you want to use the library in other project (either winform or web applications), you'll have to remember to put the connection string key in corresponding location of app.config/web.config of that project, so EntityFramework classes will load the value from that config file.


这篇关于可能吗!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆