当我发布Web部署时,为什么我会获得一个空文件夹

发布于 2025-02-12 05:15:58 字数 930 浏览 0 评论 0原文

我最近尝试将我的ASP.NET项目(.NET Framework 4.6.1)发布到具有Web部署的网络位置。该项目按预期构建,但是当它要“发布文件夹 /...”时,它只是没有延迟并成功结束(“ Web App已成功发布”),而实际上并没有发布任何内容。之后,目标文件夹仍然为空。发布到本地文件系统也不起作用。当我检查选项“发布之前删除所有现有文件”时,它将删除文件夹中的文件。这表明目标文件夹可访问。几周前,它与相同的发布概况合作。

发布资料:

  <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <LastUsedBuildConfiguration>Test</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <publishUrl>\\myserver\project\wwwroot</publishUrl>
    <DeleteExistingFiles>False</DeleteExistingFiles>
  </PropertyGroup>
</Project>

I recently tried publishing my asp.net project (.NET Framework 4.6.1) to a network location with web deploy. The project builds as expected, but when it gets to "Publishing folder /..." it just continues without a delay and ends successfully ("Web App was published successfully"), while not actually publishing anything. The target folder is still empty afterwards. Publishing to a local file system didn't work either. When I checked the option "Delete all existing files prior to publish" it deleted the files in the folder. This suggests, that the target folder is accessible. Some weeks ago it have worked with the same publishing profile.

publishing profile:

  <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <LastUsedBuildConfiguration>Test</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <publishUrl>\\myserver\project\wwwroot</publishUrl>
    <DeleteExistingFiles>False</DeleteExistingFiles>
  </PropertyGroup>
</Project>

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文