azure - 无法从 Visual Studio for Mac 发布 Azure 函数
问题描述
我正在尝试从 Visual Studio for Mac(8.10.6,内部版本 10)发布我的 Azure Functions,但它不起作用。
运行时一切正常func start
(显然从 Visual Studio 运行无法正常工作,因为我的 Macbook 具有 M1 处理器并且尚不支持)。
更重要的是,当我从模板创建新功能时,我可以正常发布它。我读过这可能是因为防病毒在机器上工作,但我希望如果我可以发布其他功能,那么它应该可以正常工作。
尝试从 Visual Studio 发布时,我得到:
/usr/local/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk.Publish/targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5): error : Web deployment task failed. (Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.)
/usr/local/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk.Publish/targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5): error :
/usr/local/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk.Publish/targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5): error : Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
/usr/local/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk.Publish/targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5): error : Unexpected end of file has occurred. The following elements are not closed: results. Line 1, position 550.
你有什么想法为什么会这样?
解决方案
听起来像是防火墙/访问问题,请检查 VS 是否受信任并有权连接到互联网
推荐阅读
- java - 我如何从其他类中获取方法结果?
- java - 尝试通过改造上传图像时,如何解决 JSON 文档未完全使用
- asp.net - 代表用户在 REST-API 中查询 Azure SQL 数据库
- android - 这句话关于 AoT 是否正确?
- javascript - 如何在 SportBookReview.com 中触发 selenium 中的正确滚动?
- sql-server - 交易未更新余额
- meteor - 如何从内部检索 Blaze 模板名称?
- php - PHPUnit 测试失败,因为文件路径位置不正确
- jquery - Jquery从数据函数中获取父元素
- php - htaccess 接受 localhost/demo/index/