Skip to content

Commit c820701

Browse files
committed
Directly reference the package in a way to trick Nuget into thinking we're not breaking the law
1 parent 07f770f commit c820701

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Directory.Packages.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
<PackageVersion Include="Xunit.Combinatorial" Version="1.5.25" />
123123
<PackageVersion Include="xunit.extensibility.execution" Version="$(_XunitPackageVersion)" />
124124
<PackageVersion Include="xunit.runner.utility" Version="2.4.1" />
125-
<PackageVersion Include="xunit.runner.visualstudio" Version="$(_XunitPackageVersion)" />
126125
<PackageVersion Include="Xunit.StaFact" Version="1.2.46-alpha" />
127126
</ItemGroup>
128127
</Project>

src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/Microsoft.VisualStudio.Razor.IntegrationTests.csproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,16 @@
3636
<PackageReference Include="Microsoft.Internal.VisualStudio.Shell.Framework" />
3737
<PackageReference Include="xunit" />
3838
<PackageReference Include="xunit.runner.utility" />
39-
<PackageReference Include="xunit.runner.visualstudio" />
39+
40+
<!--
41+
We need to reference XUnit, but Arcade won't import it because the test runner above is MSTest,
42+
and we can't just reference the package we need because they are implicit references in Arcade
43+
for other projects, and CPM doesn't play nicely with those. We could try to manually import
44+
the Arcade XUnit.targets file, but finding that file is a pain, so instead we can just manually
45+
import the package ourselves, but as an implicit definition to stop Nuget complaining.
46+
TL;DR: MSBuild was designed to cause pain.
47+
-->
48+
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitRunnerVisualStudioVersion)" IsImplicitlyDefined="true" PrivateAssets="all" Publish="true"/>
4049
</ItemGroup>
4150

4251
<ItemGroup>

0 commit comments

Comments
 (0)