I am creating an API and need to have versioning done in it. I am using package Microsoft.AspNetCore.Mvc.Versioning 3.1.3

My StartUp.cs is as follows

In ConfigureServices

```
services.AddApiVersioning(o => {
            o.ReportApiVersions = true;
            o.AssumeDefaultVersionWhenUnspecified = true;
            o.DefaultApiVersion = new ApiVersion(1, 0);
        });

        services.AddMvc(options => options.EnableEndpointRouting = false).SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

```

My 2 controllers on which I want to have versioning done are as below

```
namespace JWTWithRefresh.Areas.V1.CMS
{
    [AllowAnonymous]
    [ApiVersion("1.0")]
    [Route("api/[controller]/[action]")]
    public class AppController : Controller
    {
        public IActionResult GetApp()
        {
            return Ok("This is from API V1");
        }
    }
}

```

and another controller is as below

```
namespace JWTWithRefresh.Areas.V2.CMS
{
    [AllowAnonymous]
    [ApiVersion("2.0")]
    [Route("api/[controller]/[action]")]
    public class AppController : Controller
    {
        public IActionResult GetApp()
        {
        return Ok("This is from API V2");
        }
    }
}

```

The response I get when I make a call is as below

Endpoint = <https://localhost:5001/api/App/GetApp?api-version=1.0>

Response = 

```
{
    "error": {
             "code": "UnsupportedApiVersion",
             "message": "The HTTP resource that matches the request URI 'https://localhost:5001/api/App/GetApp' is not supported.",
             "innerError": null
    }
}

```

Please guide me in fixing this issue if anyone has gone through the same. 

Thanks