Fix build warning and treat msbuild warnings as errors

This commit is contained in:
Nick Guerrera 2018-08-05 15:29:14 -07:00
parent 91b1c13032
commit d63625c02b
2 changed files with 4 additions and 1 deletions

View file

@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project>
<!-- This test asset needs to import the general dir.props in order to get the SdkNugetVersion property. <!-- This test asset needs to import the general dir.props in order to get the SdkNugetVersion property.
This is why it also needs to explicitly set DisableImplicitFrameworkReferences to false. --> This is why it also needs to explicitly set DisableImplicitFrameworkReferences to false. -->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
<PropertyGroup> <PropertyGroup>
<VersionPrefix>1.0.0-rc</VersionPrefix> <VersionPrefix>1.0.0-rc</VersionPrefix>
@ -23,4 +24,5 @@
<PackageReference Include="System.Linq" Version="4.3.0" /> <PackageReference Include="System.Linq" Version="4.3.0" />
</ItemGroup> </ItemGroup>
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
</Project> </Project>

View file

@ -33,5 +33,6 @@
<NoWarn>NU1701;NU5104</NoWarn> <NoWarn>NU1701;NU5104</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
</Project> </Project>