“发布失败"但构建成功吗? [英] 'Publish failed' but build succeeded?

查看:87
本文介绍了“发布失败"但构建成功吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio 2008时,当我发布网站"时,应用程序正确构建,但是随后出现发布失败"消息:

When using Visual Studio 2008, when I "Publish Web Site", the application builds correctly, but then I get a "Publish failed" message:

有什么可能的原因,我该如何预防?

What possible reasons are there for this, and how can I prevent it?

推荐答案

您可以尝试以下操作:

  1. 针对Web应用程序执行预编译.

  1. Perform precompilation against the web application.

清除目标目录(IIS中的虚拟目录或物理文件 文件夹)并将所有文件(Web应用程序的文件)部署到目标中 目录.

Clear the target directory(virtual directory in IIS or physical file folder) and deploy all the files (of the web application) into the target directory.

在输出窗口中,您可以检查发布网站的哪个阶段 操作失败.例如,在第一阶段,如果有一些错误 这只会在预编译时发生,这将导致阶段1失败. 或者有时,如果目标目录的配置不正确. 例如IIS虚拟目录未设置为正确的ASP.NET版本或 一些旧文件被锁定并阻止将其清除.大多, 发布失败将由IIS端配置问题引起,例如 身份验证设置....

In the output window you can check at which stage does the publish website operation fail. For example, at the first stage, if there are some error which will only occur at precompilation, that will cause the stage 1 fail. Or some times if the target directory has something configured incorrectly. Such as the IIS virtual dir is not set to the correct ASP.NET version or some old files are locked and prevent them from being cleared. Mostly, publish failed will be caused by IIS side configuration issue such as authentication setting....

源链接

您可以通过按 Ctrl + W O 打开输出窗口.

You can open the output window by pressing Ctrl+W, O.

这篇关于“发布失败"但构建成功吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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