Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Commit 4c23d94

Browse files
committed
Use an alternate workaround for #5873
- use specific workaround for microsoft/vstest#428 - generating an executable for a test project is a bit too weird - also work around dotnet/sdk#926 - generating an executable covered this as well nit: add and update comments about other workarounds in the functional tests project
1 parent 00c38fc commit 4c23d94

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

test/Microsoft.AspNetCore.Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,31 @@
66
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp1.1</TargetFrameworks>
77
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);portable-net451+win8</PackageTargetFallback>
88

9-
<!--
10-
Generate an EXE to take advantage of Microsoft.NET.RuntimeIdentifierInference.targets special cases. This works
11-
around #5873. Also avoids dotnet/sdk#926 when building with msbuild.exe e.g. in Visual Studio.
12-
-->
13-
<OutputType Condition=" '$(TargetFramework)' != 'netcoreapp1.1' ">EXE</OutputType>
14-
159
<DefineConstants Condition="'$(GenerateBaselines)'=='true'">$(DefineConstants);GENERATE_BASELINES</DefineConstants>
1610
<DefineConstants>$(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES</DefineConstants>
1711
<DefineConstants>$(DefineConstants);FUNCTIONAL_TESTS</DefineConstants>
1812
</PropertyGroup>
1913

14+
<PropertyGroup Condition=" '$(TargetFramework)' != 'netcoreapp1.1' ">
15+
<!-- Work around https://github.com/dotnet/sdk/issues/926. Align with bitness of the web site projects. -->
16+
<PlatformTarget>x86</PlatformTarget>
17+
18+
<!--
19+
Work around https://github.com/Microsoft/vstest/issues/428 aka https://github.com/aspnet/Mvc/issues/5873.
20+
Create the appropriate binding redirects.
21+
-->
22+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
23+
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
24+
</PropertyGroup>
25+
2026
<ItemGroup>
2127
<Compile Include="..\Microsoft.AspNetCore.Mvc.Formatters.Xml.Test\XmlAssert.cs" />
2228
<EmbeddedResource Include="compiler\resources\**\*" />
29+
30+
<!--
31+
Work around https://github.com/Microsoft/vstest/issues/196. Execute tests with assemblies in the bin folder, not
32+
a temporary location. Unable to find the web site project folders otherwise.
33+
-->
2334
<None Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
2435
</ItemGroup>
2536

@@ -62,8 +73,8 @@
6273
</ItemGroup>
6374

6475
<!--
65-
Our functional tests utilize DependencyContext.Load which looks next to a dll for a deps.json. For each of our test
66-
applications they need to have their corresponding deps.json placed next to their .dll in order to work.
76+
Work around https://github.com/NuGet/Home/issues/4412. MVC uses DependencyContext.Load() which looks next to a .dll
77+
for a .deps.json. Information isn't available elsewhere. Need the .deps.json file for all web site applications.
6778
-->
6879
<Target Name="CopyDepsFiles" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
6980
<ItemGroup>

0 commit comments

Comments
 (0)