[英]Azure Functions .NetCore 3.0 Request.Query throwing “Entry point not found” error
I have an Azure Functions project which builds and runs locally. 我有一个Azure Functions项目,可以在本地构建和运行。 One of my methods tries to access the HttpRequest.Query class to get parameters in the querystring which as of recently has started throwing errors including System.Private.CorLib: "Entry point not found" or
我的一个方法尝试访问HttpRequest.Query类以获取查询字符串中的参数,该查询字符串最近已经开始抛出错误,包括System.Private.CorLib:“未找到入口点”或
System.Private.CoreLib: Exception while executing function: Configurations_Get.
BC.Functions: Method not found: 'Microsoft.Extensions.Primitives.StringValues
Microsoft.AspNetCore.Http.IQueryCollection.get_Item(System.String)'.
The code of the function follows: 该函数的代码如下:
[FunctionName("Configurations_Get")]
public static async Task<IActionResult> GetConfigs(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route=ROUTE)]
HttpRequest req,
[Table("configurations", Connection = "AzureWebJobsStorage")] CloudTable configTable,
ILogger log)
{
log.LogInformation("Getting configuration");
string version = "1.0";
try
{
var query = req.Query;
version = query["version"];
}
catch (Exception e)
{
version = "1.0";
Console.WriteLine(e.Message);
}
....
}
Nuget versions as following Nuget版本如下
Any ideas on why this is happening?
有关为什么会发生这种情况的任何想法? Is it a versioning issue?
这是一个版本问题吗?
solved by removing unneeded references to 通过删除不需要的引用来解决
Microsoft.AspNetCode.Components.Browser
Microsoft.AspNetCode.Identity
Microsoft.NETCore.Platforms
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.