The same problem may be caused by a missing or incorrect relative package . If you change the structure of the solution folders, make sure that all importers have the correct path so that they do not skip Roslyn files.
As a rule, suggest replacing the automatically generated rabit hole with the number t20>, which points to the correct Nuget folder.
<Import Project="$(NugetPackagesPath)\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('$(NugetPackagesPath)\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
source share