Skip to content

Commit

Permalink
Update the workaround for xunit/xunit#1651
Browse files Browse the repository at this point in the history
* Works with the current xunit release
* Works with fast up-to-date check in Visual Studio
  • Loading branch information
sharwell committed Feb 25, 2018
1 parent 49fc65c commit c47198a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 40 deletions.
18 changes: 0 additions & 18 deletions sdks/RepoToolset/tools/Workarounds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,6 @@
</PropertyGroup>
</Target>

<!--
Workaround: In order to leverage LUT testing we need to have both of the following packages:
- xunit.runner.desktop
- xunit
Both of these include xunit.abstractions.dll in different forms: content and reference
respectively. This creates a double write violation in our build. The content item
is unnecessary for us since we reference the xunit package hence remove it here.
https://github.com/dotnet/roslyn/issues/18753
-->
<Target Name="RemoveDuplicateXUnitContent">
<ItemGroup>
<Content Remove="@(Content)" Condition="'%(Filename)%(Extension)' == 'xunit.abstractions.dll'" />
</ItemGroup>
</Target>

<!--
Work around bug in Microsoft.NET.Sdk < v2.0 where satellites were deployed on top of each other in root.
https://github.com/dotnet/sdk/issues/1360
Expand Down
26 changes: 4 additions & 22 deletions sdks/RepoToolset/tools/XUnit.targets
Original file line number Diff line number Diff line change
Expand Up @@ -97,27 +97,9 @@
<Error Text="Tests failed on platforms: @(_FailedTestRuns, ', ')" Condition="'@(_FailedTestRuns)' != ''" File="XUnit" />
</Target>

<!--
In order to leverage LUT testing we need to have both of the following packages in
our build.
- xunit.runner.console
- xunit.runner.visualstudio
Both of these include xunit.abstractions.dll in different forms: reference and "none"
respectively. This creates a double write violation in our build. The content item
is unnecessary for us since we reference the xunit package hence remove it here.
https://github.com/dotnet/roslyn/issues/18753
-->
<Target Name="RemoveDuplicateXUnitContent">
<ItemGroup>
<None Remove="@(None)" Condition="'%(Filename)%(Extension)' == 'xunit.abstractions.dll'" />
</ItemGroup>
</Target>

<PropertyGroup>
<PrepareForBuildDependsOn>RemoveDuplicateXUnitContent;$(PrepareForBuildDependsOn)</PrepareForBuildDependsOn>
</PropertyGroup>
<!-- Workaround for https://github.com/xunit/xunit/issues/1651 -->
<ItemGroup>
<None Remove="$(NuGetPackageRoot)xunit.runner.visualstudio\$(XUnitRunnerVisualStudioVersion)\build\net20\..\_common\xunit.abstractions.dll" />
</ItemGroup>

</Project>

0 comments on commit c47198a

Please sign in to comment.