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 0c29aa4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/NerdBank.GitVersioning.Tests/BuildIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,8 @@ private void MakeItAVBProject()
{
var csharpImport = this.testProject.Imports.Single(i => i.Project.Contains("CSharp"));
csharpImport.Project = @"$(MSBuildToolsPath)\Microsoft.VisualBasic.targets";
var isVbProperty = this.testProject.Properties.Single(p => p.Name == "IsVB");
isVbProperty.Value = "true";
}

private struct RestoreEnvironmentVariables : IDisposable
Expand Down
3 changes: 3 additions & 0 deletions src/NerdBank.GitVersioning.Tests/test.prj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsVB>false</IsVB>
<RootNamespace>TestNamespace</RootNamespace>
<AssemblyName>TestAssembly</AssemblyName>
<AssemblyTitle>TestAssembly</AssemblyTitle>
Expand All @@ -11,6 +12,8 @@
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<OutputType>Library</OutputType>
<OutputPath>bin\</OutputPath>
<NoWarn Condition=" '$(IsVB)' == 'false' ">$(NoWarn);1607</NoWarn>
<NoWarn Condition=" '$(IsVB)' == 'true' ">$(NoWarn);40010</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down

0 comments on commit 0c29aa4

Please sign in to comment.