不要发布ASP.NET中的特定文件夹 [英] Don't publish particular folder in ASP.NET

查看:532
本文介绍了不要发布ASP.NET中的特定文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在Web项目中的一个文件夹被排除公布?我们已经有了一些文件和脚本,其中包括在一个特定的项目文件夹,并添加到项目中,但是当我做一个VS公布,我不希望他们去到生产服务器。

Is it possible to exclude a folder in a web project from being published? We've got some documentation and scripts that included in a particular project folder, and are added to the project, but when I do a VS publish, I don't want them to go up to the production server.

我知道他们不应该在这个项目,但我想我会找到一个解决办法之前,我试图说服店主修改他做事的方式。

I know they shouldn't be in the project, but I thought I'd find a workaround before I try to convince the owner to modify the way he's doing things.

推荐答案

这不回答你的问题,正好,但我的感觉是,除非你是一个开发人员发布到服务器时,你会​​更好做构建使用的MSBuild专用工作站或服务器(或其他一些构建和部署溶液)直接(并由此将能够非常精细地控制所发生到生产)。的MSBuild不仅可以建立,但是使用一些扩展(包括开源的类型),也可以部署。微软有一个测试版叫MSDeploy的产品,这可能是一个更好的选择,但与它有没有经验,我不能肯定地说。

This doesn't answer your question, exactly, but my feeling is that unless you are a single developer publishing to a server, you would be better off doing builds on a dedicated workstation or server using MSBuild (or some other building and deploying solution) directly (and thereby would be able to very granularly control what goes up to production). MSBuild can not only build, but using some extensions (including open source types), it can also deploy. Microsoft has a product called MSDeploy in beta, and that might be an even better choice, but having no experience with it, I cannot say for certain.

在我们的情况,我们有一个虚拟工作站作为构建中,而我们所要做的就是在该启动MSBuild项目批处理文件双击。它标记使用VSS的所有code,获取最新版本,构建解决方案,然后将其部署到两台服务器。我们部署正是我们想要部署,仅此而已。我们用它很高兴。

In our situation, we have a virtual workstation as a build box, and all we have to do is double click on the batch file that starts up an MSBuild project. It labels all code using VSS, gets latest version, builds the solution, and then deploys it to both servers. We deploy exactly what we want to deploy and nothing more. We're quite happy with it.

唯一的缺点,如果它可以被认为是一个缺点,就是我们中至少有一个必须学习如何使用的MSBuild。 VS本身使用的MSBuild。

The only downside, if it could be considered a downside, is that at least one of us had to learn how to use MSBuild. VS itself uses MSBuild.

这篇关于不要发布ASP.NET中的特定文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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