Skip to content

Commit

Permalink
Use target for GenerateBindingRedirectsOutputType per dotnet/msbuild#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Aug 28, 2017
1 parent bbcb06a commit a09f589
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/xunit.core/build/xunit.core.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Support for importing props via the runner -->
<Import Condition=" '$(_Xunit_ImportPropsFile)' != '' " Project="$(_Xunit_ImportPropsFile)" />

<PropertyGroup>
<!-- All referenced DLLs need to be in the bin folder -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Expand All @@ -14,7 +11,6 @@
<DebugType>Full</DebugType>
<!-- Need binding redirects -->
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' ">
Expand All @@ -33,4 +29,7 @@
<Visible>False</Visible>
</None>
</ItemGroup>

<!-- Support for importing props via the runner -->
<Import Condition=" '$(_Xunit_ImportPropsFile)' != '' " Project="$(_Xunit_ImportPropsFile)" />
</Project>
10 changes: 10 additions & 0 deletions src/xunit.core/build/xunit.core.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- GenerateBindingRedirectsOutputType needs to be set in a target, see https://github.com/Microsoft/msbuild/issues/1310#issuecomment-309596435 -->
<Target Name="_Xunit_ForceGenerationOfBindingRedirects"
AfterTargets="ResolveAssemblyReferences"
BeforeTargets="GenerateBindingRedirects"
Condition="'$(AutoGenerateBindingRedirects)' == 'true'">
<PropertyGroup>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
</Target>

<!-- Support for importing targets via the runner -->
<Import Condition=" '$(_Xunit_ImportTargetsFile)' != '' " Project="$(_Xunit_ImportTargetsFile)" />
</Project>

0 comments on commit a09f589

Please sign in to comment.