Skip to content

Commit

Permalink
Do not emit CS1607 warnings for test builds
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Dec 10, 2018
1 parent 37508bf commit 851e212
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NerdBank.GitVersioning.Tests/BuildIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,10 @@ private void MakeItAVBProject()
{
var csharpImport = this.testProject.Imports.Single(i => i.Project.Contains("CSharp"));
csharpImport.Project = @"$(MSBuildToolsPath)\Microsoft.VisualBasic.targets";

// The NoWarn property we have is unique to C#.
var noWarnProperty = this.testProject.Properties.Single(p => p.Name == "NoWarn");
noWarnProperty.Parent.RemoveChild(noWarnProperty);
}

private struct RestoreEnvironmentVariables : IDisposable
Expand Down
1 change: 1 addition & 0 deletions src/NerdBank.GitVersioning.Tests/test.prj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<OutputType>Library</OutputType>
<OutputPath>bin\</OutputPath>
<NoWarn>$(NoWarn);1607</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down

0 comments on commit 851e212

Please sign in to comment.