c# - 无法发布 Azure 函数

标签 c# azure azure-functions

我创建了一个新的 Azure 函数,它引用了我的解决方案中的一些其他项目。然后我尝试使用 Visual Studio 将函数发布到 Azure,但出现以下错误:

 Publish Started
  Backend.Core -> C:\Projects\Backend.Core\bin\Release\Backend.Core.dll
  Backend.EntityFramework -> C:\Projects\Backend.EntityFramework\bin\Backend.EntityFramework.dll
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(4368,5): error : The value for PublishProfile is set to 'State-Persistance-Handler - Web Deploy', expected to find the file at 'C:\Projects\Backend.EntityFramework\Properties\PublishProfiles\State-Persistance-Handler - Web Deploy.pubxml' but it could not be found. [C:\Projects\Backend.EntityFramework\Backend.EntityFramework.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(4375,4): error : PublishProfile(State-Persistance-Handler - Web Deploy) is set. But the $(WebPublishMethod) does not have a valid value.  Current Value is "". [C:\Projects\Backend.EntityFramework\Backend.EntityFramework.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(4382,5): error : Target ValidatePublishProfileSettings Failed [C:\Projects\Backend.EntityFramework\Backend.EntityFramework.csproj]

由于某种原因,它会在其他地方寻找发布配置文件。我不知道这是怎么回事。不幸的是我真的没有更多的信息.​​.....

感谢任何帮助!

我正在使用 Visual Studio Community 2017,版本 15.5.6

最佳答案

网络发布配置文件的文件似乎丢失,请尝试从头开始运行发布设置,看看是否可以解决您的问题。

关于c# - 无法发布 Azure 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49540814/

相关文章:

azure - 在azure虚拟机中配置多个https网站

node.js - 如何使用绑定(bind)更新 Azure 函数中的 Azure 表行?

c# - 我可以为 Azure Functions 绑定(bind)表达式配置默认值吗?

c# - 获取 HMAC 的当前 MachineKey 或等效项(在 web-farm 中)

c# - EF CodeFirst 引用 DbContext 类

c# - 对象没有得到垃圾收集

Azure Functions 实验模板

c# - 从 visual studio 命令提示符运行 nuget 包管理器控制台

linux - Azcopy 无法使用 sas token 从 azure 文件存储下载文件?

azure - 如何使用 azure 数据工厂将本地文件移动到不同的目录