2017-07-11 25 views
0

Azure预编译的C#函数如何在本地编译,但不在VSTS中?Azure预编译的C#函数如何在VS2017中本地构建,而不是在VSTS MSBuild中构建?

我已经使用了Visual Studio 2017 Azure函数工具的最新预览版,以及VS 2017预览版3创建了一个简单的HttpTrigger函数。 VS sln可以在本地编译。

我也可以成功发布到Azure从VS ... 最终!!

第一次失败,但shell在Azure中创建。第二次发布实际上让json和dll达到Azure。

想到我会在VSTS中设置一个快速CI构建,并在Donna Malayeri后发表了详细的内容。

但是,VSTS在构建解决方案任务中显示了大量错误,例如,

2017-07-11T13:51:59.3254765Z ##[error]SmcPrecompileFunctionApp\TriggerByHttp.cs(14,10): Error CS0246: The type or namespace name 'FunctionNameAttribute' could not be found (are you missing a using directive or an assembly reference?) 
2017-07-11T13:51:59.3254765Z TriggerByHttp.cs(14,10): error CS0246: The type or namespace name 'FunctionNameAttribute' could not be found (are you missing a using directive or an assembly reference?) [d:\a\1\s\SmcPrecompileFunctionApp\SmcPrecompileFunctionApp.csproj] 

双重检查和代理设置为托管VS2017

+0

类似NuGet包的声音未能安装?在VSTS中恢复NuGet包期间的任何警告? – juunas

+0

@juunas恢复任务步骤在使用预发布位时出现了很多错误,例如,无法为'.NETFramework,Version = v4.6.1'解析'Microsoft.Azure.WebJobs(> = 2.1.0-beta1)'。 – SteveC

回答

2

确保您使用最新版本的NuGet中的NuGet建设任务。由于某些原因,较低版本不能正确恢复所有软件包。

+0

感谢您的回复......奇怪的是,如果我设置为v1。*,则NuGet恢复工作,但v2失败。*?主VSTS构建面板显示...未找到包含在NuGet.config文件中的未定义的 错误:d:\ a \ _tool \ NuGet \ 4.0.0 \ x64 \ nuget.exe失败,返回代码:1 包未能恢复 – SteveC

相关问题