我创建了一个新的 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/