简体   繁体   English

在 Visual Studio 2015 中部署到 FTP/Web 部署

[英]Deploying to FTP/Web Deploy In Visual Studio 2015

I cannot figure out a way to publish a web project in Visual Studio 2015 CTP using web deploy or FTP.我想不出使用 Web 部署或 FTP 在 Visual Studio 2015 CTP 中发布 Web 项目的方法。 In the Publish wizard, there are only options for Azure, Import and File System.在发布向导中,只有 Azure、导入和文件系统选项。 In Visual Studio 2013, there is a Custom option where you can specify the connection settings and choose between Web Deploy, Web Deploy Package, FTP and Filesystem.在 Visual Studio 2013 中,有一个自定义选项,您可以在其中指定连接设置并在 Web 部署、Web 部署包、FTP 和文件系统之间进行选择。

I tried moving over the publish profile from my Visual Studio 2013 project by putting it in the Properties-->PublishProfiles folder, and then it behaved like Visual Studio 2013, but would not publish (failed to connect to remote host) with the same settings that publish fine in 2013.我尝试通过将 Visual Studio 2013 项目中的发布配置文件放在 Properties-->PublishProfiles 文件夹中来移动它,然后它的行为类似于 Visual Studio 2013,但不会使用相同的设置发布(无法连接到远程主机) 2013年发布罚款。

Any ideas?有任何想法吗?

It sounds like Web Deploy 3.6 beta supports the new content models in ASP.NET 5 (ASP.NET vNext) and I guess that the VS 2015 Web-Deploy client doesn't support it yet.听起来 Web Deploy 3.6 beta 支持 ASP.NET 5 (ASP.NET vNext) 中的新内容模型,我猜 VS 2015 Web-Deploy 客户端还不支持它。 (28 April 2015) (2015 年 4 月 28 日)

This blog post gives some command-line options for using a publish profile. 这篇博文提供了一些使用发布配置文件的命令行选项。 I'm in a new environment that isn't set up for web-deploy yet, so I haven't tried it myself.我在一个尚未为 web-deploy 设置的新环境中,所以我自己还没有尝试过。 (I did a file-system publish to test against my local IIS.) (我做了一个文件系统发布来测试我的本地 IIS。)

I also experienced the same issue.我也遇到了同样的问题。 It seems that, at the time of writing, the FTP publish target isn't available yet: I guess that's most likely because the Web Development Tools are still in release candidate / preview phase, so the GUI still has some missing features.似乎,在撰写本文时,FTP 发布目标还不可用:我想这很可能是因为 Web 开发工具仍处于候选发布/预览阶段,因此 GUI 仍然缺少一些功能。

Luckily enough the issue can be easily solved with the following workaround.幸运的是,可以通过以下解决方法轻松解决该问题。

If you don't see the FTP option, choose File System instead and go ahead.如果您没有看到 FTP 选项,请选择文件系统并继续。 When prompted for a Target Location , insert the FTP Server URL and go ahead.当提示输入目标位置时,插入 FTP 服务器 URL 并继续。

The remaining steps won't change, so you can complete the wizard that will be saved into a ProfileName.pubxml file.其余步骤不会更改,因此您可以完成将保存到 ProfileName.pubxml 文件中的向导。

Once done, open that file and apply the following changes:完成后,打开该文件并应用以下更改:

  1. Locate the <WebPublishMethod> element and change its value from FileSystem to FTP .找到<WebPublishMethod>元素并将其值从FileSystem更改为FTP
  2. Locate the <UsePowerShell> element and entirely remove it.找到<UsePowerShell>元素并将其完全删除。

Right after doing that, right-click to the project's root node, select Publish and re-open your Publish Profile via the Publish Profile Wizard in edit mode: all the FTP options ( Server , Site Path , Passive Mode , Username , Password ) will now be available.之后,右键单击项目的根节点,选择发布并在编辑模式下通过发布配置文件向导重新打开您的发布配置文件:所有 FTP 选项(服务器站点路径被动模式用户名密码)将现在可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM