将VS 2008 Web部署项目与ASP.NET MVC一起使用 [英] Using VS 2008 Web Deployment Projects with ASP.NET MVC

查看:127
本文介绍了将VS 2008 Web部署项目与ASP.NET MVC一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有一个Web部署项目可以与ASP.NET MVC一起使用?当我打开已部署"项目时,MVC会丢失许多文件,这使得很难将项目中所有缺少的文件发布到服务器上.

Has anyone got a Web Deployment Project to work with ASP.NET MVC? When I open the "deployed" project, a lot of the files are missing that MVC requires and makes it tough to Publish to the server with all the missing files in the project.

或者...是否有比Web部署项目更好的方法来修改MVC应用程序的Web.Config?我有一些差异(SMTP和连接字符串)需要在上传之前进行更新,并且Web部署项目似乎是正确的方法.

Or... Is there a better way than a Web Deployment Project to modify the Web.Config for MVC apps? I have differences (SMTP and connection strings) that need to be updated before uploading and Web Deployment Projects seem to be the right method.

一如既往的感谢!

更新:我至少缺少global.asax,global.asax.cs和default.aspx.cs.

Update: I am missing at least global.asax, global.asax.cs, and default.aspx.cs.

更新2:发布后,出现此错误. Could not load type 'AppNamespace._Default'.

Update 2: Once I Publish, I get this error. Could not load type 'AppNamespace._Default'.

推荐答案

我尚未通过我的mvc应用程序设置部署"项目,但我一直在使用Scott Hanselman概述的这项技术,效果很好.

I haven't set up a Deployment project yet with my mvc app but I've been using this technique outlined by Scott Hanselman and it works great.

管理多个配置文件环境

这篇关于将VS 2008 Web部署项目与ASP.NET MVC一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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