Visual Studio 2010中的Web发布缺少一个文件 [英] Visual Studio 2010 Web Publish missing a file

查看:156
本文介绍了Visual Studio 2010中的Web发布缺少一个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现,从Visual Studio中发布一个网站时,它不是上传我的文件之一。它以.cshtml扩展名的文件剃刀(它做别人!)和项目及其组成部分。

I'm finding that when publishing a website from Visual Studio its not uploading one of my files. Its a Razor file with a '.cshtml' extension (its doing the others!) and its part of the project.

任何想法,为什么会排斥吗?

Any ideas why it would exclude it?

推荐答案

在Visual Studio中,在文件上单击鼠标右键,去的属性

In Visual Studio, right-click on the file and go to Properties.

根据该文件的属性,确保的生成操作的设置为内容即可。否则将无法通过网络部署予以公布。

Under the file's properties, make sure that Build Action is set to Content. Otherwise it won't be published via web deploy.

这篇关于Visual Studio 2010中的Web发布缺少一个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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