title: C# 8 project generate .g.cs in c# 9?
body: <p>This morning I had an issue with my VS 2019 so I did update to to latest version and it fixed the issue. As the installer also proposed to install VS 2022 preview I also did it.
  Since I did it (is it related I don't know) I have 29 errors &quot;Feature 'target-typed object creation' is not available in C# 8.0. Please use language version 9.0 or greater.&quot; in my project.
  The code who cause the error is:
  <code>Dictionary&lt;string, object&gt; args = new();</code>
  but this happen in the .g.cs ie: in _layout.cshtml.g.cs but of course it is a generated file and I didn't have write this line.</p>
  <p>I am stuck in .net core 3.1 so I cannot really activate c# 9. It is as if the precompilation is done in c# 9 but after that the compilation is done in c# 8... really weird...</p>
  <p>If it can help I have uploaded the build output in diagnostic mode here: <a href="https://spaces.hightail.com/space/XOQxYSGqnS" rel="nofollow noreferrer">https://spaces.hightail.com/space/XOQxYSGqnS</a></p>