无法在VSTS中构建编译的Azure函数(错误MSB4019) [英] Unable to build Compiled Azure Function in VSTS (Error MSB4019)
问题描述
我已经使用Visual Studio 2017的最新版本(15.3.1)创建了Azure功能.
I have created an Azure Function using the latest build of visual studio 2017 (15.3.1).
此版本允许我执行以下操作:
This build allows me to do the:
新项目> Azure Function App方法
New Project > Azure Function App approach
这将生成一个.csproj(不是.funproj文件),并且它不与网站或任何其他内容捆绑在一起.我已经尝试将.Net 4.6和4.6.1作为目标框架,但都没有用.
This produces a .csproj (not a .funproj file) and it's doesn't come bundled with a website or anything. I've tried .Net 4.6 and 4.6.1 as the target framework and neither have worked.
我在VSTS中收到以下错误:
I get the following error in VSTS:
C:\ Users \ Builder.nuget \ packages \ microsoft.net.sdk.functions \ 1.0.2 \ build \ netstandard1.0 \ Microsoft.NET.Sdk.Functions.Publish.props (13,3) C:\ Users \ Builder.nuget \ packages \ microsoft.net.sdk.functions \ 1.0.2 \ build \ netstandard1.0 \ Microsoft.NET.Sdk.Functions.Publish.props(13,3): 错误MSB4019:导入的项目"C:\ Program Files(x86)\ Microsoft 视觉的 Studio \ 2017 \ Enterprise \ MSBuild \ Sdks \ Microsoft.NET.Sdk.Publish \ Sdk \ Sdk.Props" 没找到.确认声明中的路径是 正确,并且文件存在于磁盘上.
C:\Users\Builder.nuget\packages\microsoft.net.sdk.functions\1.0.2\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Publish.props (13, 3) C:\Users\Builder.nuget\packages\microsoft.net.sdk.functions\1.0.2\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Publish.props(13,3): Error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\Sdk\Sdk.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
我的.csproj文件中没有节点,所以我不确定它是从哪里获得的.
There is no node in my .csproj file so I am not sure where it is getting that from.
我在VSTS中使用了最新的NuGet选项,我也在使用了最新VS版本"选项.
I'm using the latest NuGet option in VSTS, I'm using the Latest VS Version option as well.
构建步骤为:
- 获取资源
- NuGet Restore
- 构建解决方案(每次以代码"1"退出MSBuild.exe)
有什么方法可以立即在VSTS中构建(然后发布)已编译的.Net函数吗?
Is there any way to build (and then release) compiled .Net functions in VSTS at the minute?
推荐答案
好像机器缺少最新的dotnet cli.我对VSTS构建机器不太熟悉,但是您需要以某种方式 https://www.microsoft.com/net/download/core
Looks like the machine is missing the latest dotnet cli. I'm not too familiar with VSTS build machines, but you'd need to get that on there somehow https://www.microsoft.com/net/download/core
这篇关于无法在VSTS中构建编译的Azure函数(错误MSB4019)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!