从 Visual Studio 2010 将 Web 发布到文件系统除了删除之外什么也不做

发布于 2024-10-11 19:09:46 字数 394 浏览 8 评论 0原文

当我尝试通过文件系统从 Visual Studio 2010 在 Windows 7 中发布时,没有文件添加到我的目标文件夹中。如果我选择“用本地副本替换匹配的文件”,则不会发生任何情况。如果我选择“发布前删除现有文件”,则会删除目标文件夹中的文件,但不会发布新文件。这是我得到的输出:

正在删除现有文件...

发布文件夹/...

========== 构建:3 个成功或最新,0 个失败,0 个跳过 ==========

========== 发布:1 成功,0 失败,0 跳过 ==========

有什么想法吗?

编辑:忘记提及我正在以管理员身份运行 VS。如果我不这样做,发布将明确失败。

When I try to publish in Windows 7 from Visual Studio 2010 via File System, no files are added to my target folder. If I choose "Replace matching files with local copies", nothing happens. If I choose "Delete existing files prior to publish", it deletes the files in the target folder, but no new files are published. This is the output I get:

Deleting existing files...

Publishing folder /...

========== Build: 3 succeeded or up-to-date, 0 failed, 0 skipped ==========

========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

Any thoughts?

EDIT: Forgot to mention that I'm running VS as an Administrator. If I don't, publish will explicitly fail.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

笑着哭最痛 2024-10-18 19:09:46

我遇到了同样的问题,在检查发布输出、事件日志、打开并检查 Visual Studio 日志等之后,我决定删除网络发布(通过添加/删除),我相信它最近已更新到 v1.0.30810.0 。这解决了问题。

I ran into the same problem, after checking publish output, event logs, turning on and checking visual studio logs etc I then decided to remove the web publish (via add/remove) which I believe had been recently updated to v1.0.30810.0. This resolved the problem.

爱本泡沫多脆弱 2024-10-18 19:09:46

我希望这个问题能同时得到解决,但最近我也发生了类似的事情。就我而言,文件的“构建操作”已以某种方式设置为“无”。如果文件的构建操作设置为“无”,Publish Web 将跳过该文件。要检查“生成操作”,请在“解决方案资源管理器”中选择该文件,然后按 F4 转到“属性”窗口。

I hope this issue has been resolved in the meanwhile, but something similar happened to me recently. In my case, the Build Action of the file had somehow been set to None. If the Build Action of a file is set to None, Publish Web will skip the file. To check the Build Action, select the file in the Solution Explorer and press F4 to go to the Properties Window.

信仰 2024-10-18 19:09:46

我在安装最新的 windows azure SDK 后遇到了同样的问题。

解决方案是将构建配置与发布配置相匹配。
就我而言,我正在构建“调试 - 混合平台”并发布“调试 - 任何 CPU”,

信用如下:
http://geekswithblogs .net/ToStringTheory/archive/2012/06/11/lsquopublishhelliprsquo-resulting-in-directory-with-no-files.aspx

I had the same problem just after installing the latest windows azure SDK.

The solution was to match the build configuration with the publish configuration.
In my case i was building for "Debug - Mixed platforms" and publishing for "Debug - Any CPU"

Credit goes to the following:
http://geekswithblogs.net/ToStringTheory/archive/2012/06/11/lsquopublishhelliprsquo-resulting-in-directory-with-no-files.aspx

风筝有风,海豚有海 2024-10-18 19:09:46

这也发生在我身上。要解决此问题:

  • 打开控制面板,单击程序图标并删除 Web 发布
  • 在 VS2010 中单击工具下拉菜单并选择安装 Web 组件

我不确定为什么会发生这种情况,但我怀疑 VS2012 安装可能已经升级了 Web 部署我在 VS2012 中使用 Azure 网站时使用的组件。

更新:第二天就停止工作了!现在我通过VS2012发布应用程序。

This happened to me too. To solve this:

  • Open the control panel, click the programs icon and remove web publish
  • In VS2010 click the tools drop down menu and select Install Web Components

I am not sure why this happened but I suspect that the VS2012 installation could have upgraded the web deploy component when I was working with Azure Web Sites in VS2012.

UPDATE: This stopped working the next day! Now I am publishing the application through VS2012.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文