[英]Can't publish Azure Function
我创建了一个新的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]
出于某种原因,它看起来在其他地方的发布配置文件。 我不知道这是怎么回事。 不幸的是,我真的没有更多的信息呢......
任何帮助表示赞赏!
我正在使用2017年Visual Studio社区版本15.5.6
看起来缺少Web发布配置文件的文件,尝试从一开始就运行发布设置,看看是否能解决您的问题。
解决方法:
A.如果错误中指定的位置已存在PublishProfiles
文件夹,请删除或重命名此文件夹。
B.将Azure作业.pubxml
和.pubxml.user
文件移动到错误中指定的文件夹。
从Visual Studio发布Azure功能似乎非常不一致。 一些可能有用的东西包括:
目前在Visual Studio Professional 2017上。。Net Core 2.1功能正在使用Http Trigger。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.