微软的Visual Studio中:如何排除某些项目文件夹的发布? [英] MS Visual Studio: How to exclude certain Project Folders from publishing?

查看:2373
本文介绍了微软的Visual Studio中:如何排除某些项目文件夹的发布?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我想要保留的项目,但不包括在发布某些文件夹。

I have certain folders which I want to keep in the project but not to include it in publishing.

这可能吗?

推荐答案

迈克尔是完全正确的,经过编辑的.csproj文件,你可以手动从出版排除文件/文件夹。

Michael is totally right, through editing the .csproj file you can manually exclude files/folder from being published.

如果你不想惹的.csproj文件的一种简单的方法是突出显示该文件(S)的VS解决方案资源管理器内。在属性面板,修改建设从内容为无行动。

One easier way if you don't want to mess with the .csproj file is to highlight the file(s) inside the VS solution explorer. Under the properties panel, change build to action from 'content' to 'none'.

此方式,你不必从溶液中取出该项目,加载的.csproj并添加一行为每个新文件添加,这并不需要发布而是用3鼠标点击达到相同的

This way you don't have to unload the project from the solution, load the .csproj and add a line for each new file you add that doesn't need to be published but instead achieve the same with 3 mouse-clicks.

(假设你已经设置发布选项卡下的只发布到运行该应用程序所需的文件')

(assuming you've set the 'Only publish files needed to run this application' under the publishing tab)

这篇关于微软的Visual Studio中:如何排除某些项目文件夹的发布?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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