【问题标题】:Azure functions QrCodeGenerator ProblemsAzure 函数 QrCodeGenerator 问题
【发布时间】:2023-01-04 07:15:41
【问题描述】:

我试着遵循这个指南: https://www.allhandsontech.com/programming/dotnet/how-to-qr-code-generator-azure-functions/

但是,我遇到了这个问题:

C:\Users\SEB>cd System.Private.CoreLib: Exception while executing function: GenerateQRCode. QrCodeGenerator: Value cannot be null.
The filename, directory name, or volume label syntax is incorrect.

C:\Users\SEB>cd C:\Users\SEB\repos\QrCodeGen

C:\Users\SEB\repos\QrCodeGen>func start
Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
C:\Users\SEB\repos\QrCodeGen\QRCodeGen.cs(22,21): error CS0103: The name 'QrCode' does not exist in the current context [C:\Users\SEB\repos\QrCodeGen\QRCodeGen.csproj]
C:\Users\SEB\repos\QrCodeGen\QRCodeGen.cs(22,47): error CS0103: The name 'QrCode' does not exist in the current context [C:\Users\SEB\repos\QrCodeGen\QRCodeGen.csproj]
C:\Users\SEB\repos\QrCodeGen\QRCodeGen.cs(16,49): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [C:\Users\SEB\repos\QrCodeGen\QRCodeGen.csproj]

构建失败。

C:\Users\SEB\repos\QrCodeGen\QRCodeGen.cs(16,49): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [C:\Users\SEB\repos\QrCodeGen\QRCodeGen.csproj]
C:\Users\SEB\repos\QrCodeGen\QRCodeGen.cs(22,21): error CS0103: The name 'QrCode' does not exist in the current context [C:\Users\SEB\repos\QrCodeGen\QRCodeGen.csproj]
C:\Users\SEB\repos\QrCodeGen\QRCodeGen.cs(22,47): error CS0103: The name 'QrCode' does not exist in the current context [C:\Users\SEB\repos\QrCodeGen\QRCodeGen.csproj]
    1 Warning(s)
    2 Error(s)

很抱歉这个菜鸟问题,如果有人能指出我正确的方向,那就太好了。谢谢!

【问题讨论】:

标签: c# azure function async-await


【解决方案1】:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-11-18
    • 1970-01-01
    • 1970-01-01
    • 2020-12-12
    • 1970-01-01
    • 2018-06-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多