[英]Trying to publish an azure function via dotnet publish command
We are facing an issue while trying to deploy a function app via the dotnet publish command line.我们在尝试通过 dotnet publish 命令行部署函数应用时遇到问题。 All other apps publish successfully.所有其他应用程序发布成功。 The only difference is that this is a function app while the others are app services.唯一的区别是这是一个功能应用程序,而其他是应用程序服务。
This is the pubxml:这是 pubxml:
This is the command:这是命令:
and this is the outcome:这是结果:
It seems it builds the project but never uploads it.它似乎构建了项目,但从未上传过它。
Any help please?请问有什么帮助吗?
Thank you Andy posting your suggestion as an answer to help other community members.感谢安迪发布您的建议作为帮助其他社区成员的答案。
"I have an MSBuild command line that is working to deploy my .NET Core 2.1 Function project: “我有一个 MSBuild 命令行,用于部署我的 .NET Core 2.1 Function 项目:
msbuild /p:DeployOnBuild=True /p:PublishProfile=somename.pubxml /p:Configuration=Release
It is, however, worth noting the following:但是,值得注意的是以下几点:
General .NET Core publishing notes一般 .NET Core 发布说明
Differences between ASP. ASP 之间的差异。 NET Core and .NET Core Functions deployment NET Core 和 .NET Core Functions 部署
If you use 'dotnet publish', it will always skip deployment.如果您使用“dotnet 发布”,它将始终跳过部署。
If you don't specify /p:DeployOnBuild=True, it'll skip deployment."如果您不指定 /p:DeployOnBuild=True,它将跳过部署。”
Please refer the below link for more information: MS DOC: Create a C# function in Azure from the command line有关详细信息,请参阅以下链接:MS DOC: 从命令行在 Azure 中创建 C# 函数
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.