在使用vs2022创建 .net framework项目时,编译发生错误CS8630,可手动编辑项目文件,使用高于7.3版本的语言即可解决,在<PropertyGroup>下增加:<LangVersion>8.0</LangVersion>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4068F23D-F596-46C8-AE26-4180592BE8C7}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>WindowsFormsApp1</RootNamespace>
<AssemblyName>WindowsFormsApp1</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<LangVersion>10.0</LangVersion>
</PropertyGroup>