简体   繁体   English

Azure函数.NetCore 3.0 Request.Query抛出“未找到入口点”错误

[英]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.

相关问题 Azure 函数(.net core 3+) - 尝试访问 HttpRequest.Query 时出现“找不到入口点”错误 - Azure Functions(.net core 3+) - Getting “Entry point was not found” error when trying to access HttpRequest.Query Azure 函数突然获取入口点未找到错误 - Azure Functions suddenly getting Entry Point was not found error Azure中“找不到入口点”错误LightGBM R程序包 - “Entry Point Not Found” Error LightGBM R package in Azure Azure Functions NodeJS Express 应用程序抛出无法确定函数入口点错误 - Azure Functions NodeJS Express app throws Unable to determine function entry point error 使用Netcore的Azure函数中的外部依赖关系 - External dependencies in Azure functions with netcore 找不到Azure函数方法错误 - Azure Functions Method not found error Azure移动服务:{System.TypeLoadException} = {“找不到入口点。”:“”} - Azure Mobile Services: {System.TypeLoadException} = {“Entry point was not found.”:“”} netCore 3.0 将管道部署到 Azure 错误 500 AspNetCoreModule(V2) 处理程序:aspNetCore 错误代码:0x00000000 - netCore 3.0 Deploy Pipeline to Azure Error 500 AspNetCoreModule(V2) Handler: aspNetCore Error Cod: 0x00000000 如何构建 netcore 3.0 Webapi 并部署到 Azure Linux 应用服务 - How to build a netcore 3.0 Webapi and deploy to an Azure Linux app service .netcore Azure 函数启动 class 未被调用 - .netcore Azure functions startup class is not called
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM