我在试图用来部署到远程服务器的 MSBuild 脚本中有一个 MSDEPLOY 任务。
<Target Name="Deploy_v2">
<ItemGroup>
<DeploySource Include="package">
<Path>$(PackagePath)</Path>
</DeploySource>
<DeployDestination Include="auto">
<ComputerName>https://C3PO:8172/msdeploy.axd</ComputerName>
<UserName>C3PO\developer</UserName>
<Password>Password123</Password>
<AuthType>Basic</AuthType>
</DeployDestination>
</ItemGroup>
<Message Text="About to deploy!!" />
<MSDeploy
Verb="sync"
Source="@(DeploySource)"
Destination="@(DeployDestination)"
AllowUntrusted="true"
/>
</Target>
当我尝试运行它时,我收到一条非常奇怪的消息,如下所示:
MSDEPLOY : error : Unable to cast object of type 'Microsoft.Web.Deployment.DeploymentProviderOptions' to type 'Microsoft.Web.Deployment.Deployme
ntProviderOptions'.