Html助手项目由另一个项目可见 [英] Html helpers project visible by another project
本文介绍了Html助手项目由另一个项目可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将我的html助手创建在一个单独的项目中,我希望这些助手在 另一个项目中可见并可用。我们怎么做到这一点。是否可能?
I need to put my html helpers created in a separate project and I want those Helpers to be visible and usable in another project. How we can do this .is it possible?
推荐答案
添加它们所包含的程序集作为目标项目的参考,并确保帮助程序方法所在的名称空间位于web.config文件的名称空间部分。
http://stackoverflow.com/questions/3875207/how-to-add-extra-namespaces-to-razor-pages-instead-使用声明 [ ^ ]
Add the assembly they are contained in as a reference on the target project and ensure the namespaces the helper methods are in are in the namespaces section of the web.config file.
http://stackoverflow.com/questions/3875207/how-to-add-extra-namespaces-to-razor-pages-instead-of-using-declaration[^]
这篇关于Html助手项目由另一个项目可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文