We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1838e08 commit 063a2f0Copy full SHA for 063a2f0
2 files changed
Directory.Build.props
@@ -0,0 +1,13 @@
1
+<Project>
2
+ <PropertyGroup>
3
+ <Nullable>enable</Nullable>
4
+ <ImplicitUsings>enable</ImplicitUsings>
5
+ <LangVersion>latest</LangVersion>
6
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
7
+ <!--
8
+ Disabled CS8509 to allow switch expressions without a default case,
9
+ assuming exhaustiveness is guaranteed by controlled types
10
+ -->
11
+ <NoWarn>$(NoWarn);CS8509</NoWarn>
12
+ </PropertyGroup>
13
+</Project>
Directory.Build.targets
@@ -0,0 +1,6 @@
+ <Target Name="ValidateAppSettings" BeforeTargets="Build">
+ <Error Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true' AND !Exists('$(ProjectDir)appsettings.json')"
+ Text="appsettings.json is required for web projects." />
+ </Target>
0 commit comments