朗志工作室(Langzhi Studio)

江浙沪一带找工作中,欢迎联系

  博客园 :: 首页 :: 联系 :: 订阅 订阅 :: 管理
  3486 Posts :: 2 Stories :: 498 Comments :: 7 Trackbacks

公告

本站大量内容为转载,一般都保留原链接,如果侵犯了你的权益,请以各种方式联系我,我会第一时间修正。

将我自己会忘记的内容,觉得好的,想法备在此处, 所以比较凌乱,莫怪
 


QQ:1036130199


msn/GTalk: Frederick.mao@gmail.com
twitter:http://twitter.com/mlzboy



新浪微博 http://weibo.com/mlzboy
profile 2011
移动充话费
我的简历2011.9

我的简历2010.7
项目截图


分享

抓虾
pageflakes
Rojo
google reader
netvibes
my yahoo
newsgator
bloglines
鲜果
哪吒
有道
QQ邮箱
抓虾
pageflakes
Rojo
google reader
netvibes
my yahoo
newsgator
bloglines
鲜果
哪吒
有道
QQ邮箱
分享家:Addthis中文版
昵称:lexus
园龄:4年10个月
粉丝:21
关注:5

搜索

 

常用链接

我的标签

最新评论

阅读排行榜

评论排行榜

推荐排行榜

2008年10月3日 #

We've had some trouble using the latest ASP.NET MVC Preview 5. For reasons unknown any attempt to open a view (e.g. Default.aspx, not the code-behind) in Visual Studio 2008 would cause a fatal .NET runtime error and the Visual Studio process would simply be killed. Dead. Gone.



Annoying.

I spent a good amount of time trying to figure out why this could be, and though there were a few leads on the web none of the proposed solutions out there fixed the problem. So, I asked the senior developer on my team, Steve Friend, to have a look. Sic' em, Steve!

Steve noticed that Scott Guthrie's Preview 5 Example Application wouldn't cause any problems at all. Nor would any MVC project added to the same solution as Guthrie's application. However, all other MVC projects created from scratch with Visual Studio would suffer from the symptom described at the top of this post.

Steve examined the differences between ScottGu's application and a 'fresh' MVC app, and discovered that removing two of the DLLs from the fresh MVC app's /bin folder solved the problem. He documented this on our internal wiki, and I've copied-and-pasted his fix here. Thanks Steve!


-------------
Creating a new project
In Visual Studio create a new MVC project (File > New > Project, then select Visual C# > Web then select ASP.Net MVC Web Application). This will create a fairly large default project containing a number of folders and files relating to the MVC pattern structure (i.e. models, views and controllers).

Once you have done this you will need to build the project and create a new website in IIS (see IISSetup for details of how to do this), but before you do that, run through the instructions below to avoid the bug that seems to ship with default projects.

The bug
If you double click on any view page (i.e. a aspx page) in order to edit it in Visual Studio the application crashes.

The fix
In the solution explorer select "Show all files" to reveal the bin folder. In there you will the following dlls (and possibly more, if you have already built your project/solution):

* Microsoft.Web.Mvc.dll
* System.Web.Abstractions.dll
* System.Web.Mvc.dll
* System.Web.Routing.dll

Delete "System.Web.Abstractions.dll" and "System.Web.Routing.dll".

 

http://www.babel-lutefisk.net/2008/09/fix-for-aspnet-mvc-preview-5-bug-with.html

 

这个问题弄了两天,就是用preview的代价吧,preview是不是就是以前的CTP?

posted @ 2008-10-03 10:42 lexus 阅读(111) 评论(1) 编辑