代码之家  ›  专栏  ›  技术社区  ›  SteveC

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

  •  1
  • SteveC  · 技术社区  · 7 年前

    Azure预编译C#函数如何在本地编译,而不是在VST中编译?

    我使用了Visual Studio 2017 Tools for Azure Functions的最新预览版,以及VS 2017 preview 3来创建一个简单的HttpTrigger函数。VS sln在本地编译良好。

    我还可以从VS成功发布到Azure。。。

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

    我想我已经在VST中建立了一个快速的CI构建,并在 Donna Malayeri 邮递

    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]
    

    1 回复  |  直到 7 年前
        1
  •  2
  •   lindydonna    7 年前

    确保在NuGet构建任务中使用的是最新版本的NuGet。由于某些原因,较低版本无法正确还原所有包。