mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-12 10:19:20 +08:00
fixing warnings, per ryan suggestion, suprressing warning now. we'll revisit the if debug blocks later (#6010)
This commit is contained in:
parent
dad8cbecc1
commit
2ff439dc47
@ -46,7 +46,9 @@ namespace Wox.Plugin.SharedCommands
|
||||
Copy(subdir.FullName, temppath);
|
||||
}
|
||||
}
|
||||
#pragma warning disable CS0168 // Variable is declared but never used. Due to #if debug vs release statement
|
||||
catch (Exception e)
|
||||
#pragma warning restore CS0168 // Variable is declared but never used
|
||||
{
|
||||
#if DEBUG
|
||||
throw e;
|
||||
@ -76,7 +78,9 @@ namespace Wox.Plugin.SharedCommands
|
||||
|
||||
return true;
|
||||
}
|
||||
#pragma warning disable CS0168 // Variable is declared but never used. Due to #if debug vs release statement
|
||||
catch (Exception e)
|
||||
#pragma warning restore CS0168 // Variable is declared but never used
|
||||
{
|
||||
#if DEBUG
|
||||
throw e;
|
||||
@ -96,7 +100,9 @@ namespace Wox.Plugin.SharedCommands
|
||||
Directory.Delete(path, true);
|
||||
}
|
||||
}
|
||||
#pragma warning disable CS0168 // Variable is declared but never used. Due to #if debug vs release statement
|
||||
catch (Exception e)
|
||||
#pragma warning restore CS0168 // Variable is declared but never used
|
||||
{
|
||||
#if DEBUG
|
||||
throw e;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Import Project="..\..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
@ -40,6 +40,13 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="README.md" />
|
||||
|
Loading…
Reference in New Issue
Block a user