惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 面朝大海

MOSS微软教程 活动目录微软教程 Petshop教程、接口编程教程 asp.net 使用json 深入理解abstract class和interface 快速挤梦幻新区的技巧 - 面朝大海 - 博客园 解决blogspot.com博客不能访问的自动代理方法 全面剖析C#接口编程 CommunityServer 学习资源 Web 2.0 网站成功的关键 美化你的博客-推荐多个博客图标下载网站 动态创建DataGrid的模版列 强烈推荐:240多个jQuery插件 破解Office 2007激活? NUnit详细使用方法 NBear查找指定的列 MonoRail学习笔记系列文章 Enterprise Library教程 asp.net 获得ip和mac地址
在非ASP.NET Web Project中创建和使用MonoRail
面朝大海 · 2007-12-05 · via 博客园 - 面朝大海

关注过MonoRail的朋友们应该知道,建立MonoRail项目需要Web Application Project支持.而VS2005默认是不支持Web Application Project的.需要安装SP1补丁...安装过SP1的朋友应该明白那种滋味了吧....
好了言归正传.下面是我自己总结的方法.

解决方案结构

解决方案中包括1个网站和1个类库项目.注意红线部分,这些是需要引用到的类库.没有红线的部分是默认或者隐含引用的类库,不用管它.

  1. 新建一个空白解决方案
  2. 添加一个新类库项目Test.Controllers到解决方案,并引用Castle.MonoRail.Framework.
  3. 添 加一个新网站到解决方案.并引用Castle.MonoRail.Framework,Castle.MonoRail.Framework和 Castle.MonoRail.Framework.Views.NVelocity以及刚才建立的Test.Comtrollers项目.
  4. 设置Web.Config内容,在monorail配置节中设置controllers里的assembly为控制器程序集名称,在这个项目里为Test.Controllers
        

    <controllers>

    <!--

              指定控制器所在程序集名称

    -->

    <assembly>Test.Controllers</assembly>

    </controllers>


OK,这样我们就完成了在没有Web Application Project支持的情况下建立MonoRail项目了.

点击下载完整案例代码

PS:之前在网上看到不少朋友抱怨没有Web Project支持而无法使用MonoRail,希望此文能给予一些帮助和启示.其实官网也有给出类似的解决办法,但不是很详细.另外很多人也不愿意去细 看.细想一下,为什么没有Web Application Project就无法使用MonoRail?还不就因为网站无法编译成独立的程序集么?