当我发布Web部署时,为什么我会获得一个空文件夹
我最近尝试将我的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论