Hi,
In version 4.5.0 of PowerTools alle templates are updatet implementing the feature 'file-scoped namespace' in all C# files created, this is all good and well, but not for template code generated for projects still not upgraded from target framework netstandard2.0
Error (active) CS8370 Feature 'file-scoped namespace' is not available in C# 7.3. Please use language version 10.0 or greater.
Such as projects
- .Core.Shared
- .Application.Shared
I hesitated to upgrade the projects, so as a workaround, I created "a lot" of MainTemplate.custom.txt files avoiding the issue. Yep I know, only a temporary workaround.
2 Answer(s)
-
0
Hi @MainTechAS,
Add the tag below to your common.props file, otherwise, you will get an error when building the solution after code generation.
<LangVersion>latest</LangVersion>
-
0
Ah, sweet, thanks