微软的Visual Studio中:如何排除某些项目文件夹的发布?微软、文件夹、项目、Studio

由网友(浅陌)分享简介:我有我想要保留的项目,但不包括在发布某些文件夹。 I have certain folders which I want to keep in the project but not to include it in publishing. 这可能吗?推荐答案迈克尔是完全正确的,经过编辑的.csproj文件,你...

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

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)

阅读全文

相关推荐

最新文章