尝试this但失败了,之前使用Git存储库在Azure上部署Web应用程序但现在想要使用Visual Studio 2015使用.publishSettings文件仅发布dist文件夹以克服gitbash上的git命令执行。项目在.Net Core,Angular 2与webpack。尝试编辑像这样的.publishSettings
<publishData>
<publishProfile profileName="***** - Web Deploy" publishMethod="MSDeploy" publishUrl="****.scm.azurewebsites.net:443" msdeploySite="****" userName="$***" userPWD="****" destinationAppUrl="http://****.azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com" webSystem="WebSites">
<databases />
</publishProfile>
<publishProfile profileName="***** - FTP" publishMethod="FTP" publishUrl="ftp://***-***-***.azurewebsites.windows.net/site/wwwroot" ftpPassiveMode="True" userName="****\$****" userPWD="*******" destinationAppUrl="http://****.azurewebsites.net" SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com" webSystem="WebSites">
<databases />
</publishProfile>
<Target Name="MoveDistToRoot" AfterTargets="CopyAllFilesToSingleFolderForMsdeploy">
<!--1.Deleting Folders except dist-->
<ItemGroup>
<_FolderToDelete Include="$(_PackageTempDir)\src" />
<!--you could add more folder paths as follows:-->
<!--<_FolderToDelete Include="$(_PackageTempDir)\folderName" />-->
<_FolderToDelete Include="$(_PackageTempDir)\refs" />
<_FileToDelete Include="$(_PackageTempDir)\*.dll" />
<_FileToDelete Include="$(_PackageTempDir)\web.config" />
</ItemGroup>
<RemoveDir Directories="@(_FolderToDelete)" />
<!--2.Copying files,folders from dist to root directory-->
<ItemGroup>
<_FileToMove Include="$(_PackageTempDir)\dist\**" />
</ItemGroup>
<Move SourceFiles="%(_FileToMove.Identity)" DestinationFolder="$(_PackageTempDir)\%(RecursiveDir)" />
<!--3.Deleting the empty folder dist-->
<RemoveDir Directories="$(_PackageTempDir)\dist" />
</Target>
</publishData>
和dist文件夹