0

In Visual Studio 2019, if I create a new ASP.NET MVC project targeting 4.8 framework, the project is created with a reference to Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props and the project file references

The project file also contains a conditional import

 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />

What is this doing, and why does a 4.8 website project need it?

Paul George
  • 1,788
  • 16
  • 33
  • It's so that the views (that are compiled dynamically on the server) could use the modern C# features. You can remove that package if you restrict yourself to C# 5.0 in your views. – GSerg May 17 '21 at 15:34
  • Does this answer your question? [How to make razor view engine to use c# 6.0](https://stackoverflow.com/questions/31689374/how-to-make-razor-view-engine-to-use-c-sharp-6-0) – GSerg May 17 '21 at 15:37

0 Answers0