从MVC项目访问类库? [英] Access Class library from MVC project?
问题描述
在一个解决方案中,我有一个类库项目和MVC项目.
I have a Class Library project and MVC project in the one solution.
我的类库具有MyStuff.Classes名称空间
My class library has the namespace MyStuff.Classes
我的MVC项目具有命名空间MyStuff.Web
My MVC project has the namespace MyStuff.Web
我似乎无法直接从mvc项目访问我的类库,反之亦然,也不能使用using指令访问我的类库?
I can't seem to access my class library from the mvc project or vice versa directly or with a using directive??
在这种情况下使用名称空间的最佳方法是什么?一般而言?任何提示都欢迎.
Whats the best way to use namespaces in this instances? and in general? any hints tips welcome.
谢谢
推荐答案
您需要添加对您的Class项目的引用
You need to add a reference to your Class project
如果右键单击MVC项目中的引用,请单击Projects
选项卡,以轻松地为您的Class项目添加引用.
If you right click on references in your MVC project hit the Projects
tab to easily add a reference to your Class project.
这篇关于从MVC项目访问类库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!