Skip to content

Instantly share code, notes, and snippets.

@mirmostafa
Created March 19, 2022 21:03
Show Gist options
  • Select an option

  • Save mirmostafa/92c7be186ee096f2fbe1bcbc11a0847f to your computer and use it in GitHub Desktop.

Select an option

Save mirmostafa/92c7be186ee096f2fbe1bcbc11a0847f to your computer and use it in GitHub Desktop.
Common .csproj file enabled all the features by now. Also cane be used in `Directory.Packages.props` file to be apply to all the projects
<Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>preview</LangVersion>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<GenerateRequiresPreviewFeaturesAttribute>true</GenerateRequiresPreviewFeaturesAttribute>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>
<AnalysisLevel>Preview</AnalysisLevel>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<!--<WarningsAsErrors>nullable</WarningsAsErrors>-->
<WarningsAsErrors></WarningsAsErrors>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
</PropertyGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment