Visual Studio 2010“发布"不复制Razor视图文件 [英] Visual Studio 2010 "Publish" does not copy Razor view files

查看:87
本文介绍了Visual Studio 2010“发布"不复制Razor视图文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在包含Razor视图(.cshtml或.vbhtml)的Web应用程序中使用Visual Studio 2010的内置发布功能时,发布服务不会复制Razor视图文件.

When using the built-in Publish feature of Visual Studio 2010 with a web application that includes Razor views (.cshtml or .vbhtml), the publish service does not copy the Razor view files.

使用有任何已知的解决方法吗?

Are there any known workarounds?

推荐答案

您需要在属性下将构建操作设置为内容".

You need to set the build action to "Content" under properties.

您必须对未复制的每个文件执行此操作.

You have to do this on each of the files that aren't being copied over.

我在四处闲逛,发现在msdn上张贴了一个论坛,听起来像您可以编辑注册表,或创建pkdef文件.

Edit 2: I did some poking around, and found a forum posting over at msdn, sounds like you can edit the registry, or create a pkdef file.

http://social. msdn.microsoft.com/Forums/zh-CN/vsxprerelease/thread/c0212d15-96c4-455d-b7e1-d299c5ef384a

这篇关于Visual Studio 2010“发布"不复制Razor视图文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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