【问题标题】:ASP.NET 5 Error: the verb must be specified by using the -verb argument. Error count=1ASP.NET 5 错误:必须使用 -verb 参数指定动词。错误计数=1
【发布时间】:2016-08-13 05:35:55
【问题描述】:

我对 .net 很陌生,在尝试将我的网站发布到文件系统时出现此错误。

错误:必须使用“同步”动词指定“-dest”参数。当我尝试在默认目的地发布时显示此错误

Copying to output path  C:\Users\Iulica'sPc\AppData\Local\Temp\PublishTemp\GpsTracking103
Multiple commands defined. Defaulting to web.
Using command 'web' as the entry point for web.config.
Time elapsed 00:02:45.9471627
Publishing with publish method [FileSystem]
Publishing files to C:\Users\Iulica'sPc\Documents\Visual Studio 2015\Projects\GpsTracking\artifacts\bin\GpsTracking\Release\PublishOutput
Executing command ["C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:contentPath='C:\Users\Iulica'sPc\AppData\Local\Temp\PublishTemp\GpsTracking103\' -dest:contentPath='C:\Users\Iulica'sPc\Documents\Visual Studio 2015\Projects\GpsTracking\artifacts\bin\GpsTracking\Release\PublishOutput' -verb:sync -enableRule:DoNotDeleteRule -retryAttempts:2 -disablerule:BackupRule]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error : Error: A '-dest' argument must be specified with the 'sync' verb.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error : Error count: 1.

我已经寻找了几个小时的答案,但没有解决我的问题。

请帮忙!

【问题讨论】:

    标签: asp.net asp.net5


    【解决方案1】:

    我认为这是因为您的路径名(或实际上是您的用户名)中有一个 ':

    ["C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:contentPath='C:\Users\Iulica'sPc\AppData\Local\Temp\PublishTemp\GpsTracking103\' -dest:contentPath='C:\Users\Iulica'sPc\Documents\Visual Studio 2015\Projects\GpsTracking\artifacts\bin\GpsTracking\Release\PublishOutput' -verb:sync -enableRule:DoNotDeleteRule -retryAttempts:2 -disablerule:BackupRule]
    

    尝试部署到不同的文件夹,例如 c:\projects\ 广告,源路径也可能是问题所在。

    【讨论】:

    • 我也尝试过 azure 但仍然出现同样的错误,["C:\Pr.... -source:IisApp='C:\Users\Iulica'sPc\AppData\Local\Temp\ PublishTemp\GpsTracking103\wwwroot' -dest:IisApp='gpstracking2016',ComputerName='gpstracking2016.scm.azurewebsites.net/…'{PASSWORD-REMOVED-FROM-LOG}',IncludeAcls='False',AuthType='Basic' -verb:sync -enableLink :contentLibExtension -retryAttempts:2] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5):错误:错误:必须指定动词通过使用 -verb 参数。
    • IisApp='C:\Users\Iulica'sPc\AppData\Local\Temp\PublishTemp\GpsTracking10‌​3\wwwroot' 这永远不会起作用,因为它会像这样读取它:IisApp='C:\Users\Iulica' 尾随的东西会导致错误。你必须改变你的路径。
    【解决方案2】:

    在此处查看要记住的重要事项:https://technet.microsoft.com/en-us/library/dd569005(v=ws.10).aspx

    为了使同步操作正常运行,源计算机和目标计算机上的 Msdeploy.exe.configsettings 文件必须相同。如果您向 Msdeploy.exe.configsettings 文件添加任何规则或自定义提供程序,请确保此配置文件在源计算机和目标计算机上相同,然后再执行同步。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-01-10
      • 1970-01-01
      • 2023-01-10
      • 1970-01-01
      • 2021-11-19
      • 1970-01-01
      • 2012-04-22
      相关资源
      最近更新 更多