title: Microsoft.AspNetCore.Mvc.Versioning, Version=3.1.0.0 not working in .net core 2.2
body: <p>I am trying to use Microsoft.AspNetCore.Mvc.Versioning, Version=3.1.0.0 in my core api project.</p>
  
  <p>Downloaded the nuget package and below are my code </p>
  
  <p><strong>statup.cs file</strong></p>
  
  <pre><code>public class Startup
  {
      public Startup(IConfiguration configuration)
      {
          Configuration = configuration;
      }
  
      public IConfiguration Configuration { get; }
  
      // This method gets called by the runtime. Use this method to add services to the container.
      public void ConfigureServices(IServiceCollection services)
      {
          services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
          //services.AddApiVersioning();
          services.AddApiVersioning
              (o =&gt;
                  {
                      //o.AssumeDefaultVersionWhenUnspecified = true ;
                      //o.DefaultApiVersion = new ApiVersion(new DateTime(2016, 7, 1));
                      o.ReportApiVersions = true;
                      o.AssumeDefaultVersionWhenUnspecified = true;
                      o.DefaultApiVersion = new ApiVersion(1, 0);
                      o.ApiVersionReader = new HeaderApiVersionReader("api-version");
                      o.ApiVersionSelector = new CurrentImplementationApiVersionSelector(o);
                  }
              );
      }
  
      // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
      public void Configure(IApplicationBuilder app, IHostingEnvironment env)
      {
          if (env.IsDevelopment())
          {
              app.UseDeveloperExceptionPage();
          }
          app.UseApiVersioning();
          app.UseMvc();
  
      }
  }
  </code></pre>
  
  <p><strong>and values controller like below</strong></p>
  
  <pre><code>[ApiVersion( "2.0" )]
  [Route("api/[controller]")]
  [ApiController]
  public class ValuesController : ControllerBase
  {
      // GET api/values
      [HttpGet]
      public ActionResult&lt;IEnumerable&lt;string&gt;&gt; Get()
      {
          return new string[] { "value1", "value2" };
      }
   }
  </code></pre>
  
  <p>Now when I am trying a get request from Postman I am getting the values.<br/>
  As per my understanding it should not provide response as I am not proving any header value for this.</p>
  
  <p>Kindly suggest were I am doing wrong.</p>
  
  <h2>update 1</h2>
  
  <p>When I remove this line </p>
  
  <pre><code> o.ApiVersionSelector = new CurrentImplementationApiVersionSelector(o);
  </code></pre>
  
  <p>it is working fine.</p>