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

Commit

Permalink
Use an alternate workaround for #5873
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
dougbu committed Mar 6, 2017
1 parent 3fe0b56 commit 5c96a7c
Showing 1 changed file with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,31 @@
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp1.1</TargetFrameworks>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);portable-net451+win8</PackageTargetFallback>

<!--
Generate an EXE to take advantage of Microsoft.NET.RuntimeIdentifierInference.targets special cases. This works
around #5873. Also avoids dotnet/sdk#926 when building with msbuild.exe e.g. in Visual Studio.
-->
<OutputType Condition=" '$(TargetFramework)' != 'netcoreapp1.1' ">EXE</OutputType>

<DefineConstants Condition="'$(GenerateBaselines)'=='true'">$(DefineConstants);GENERATE_BASELINES</DefineConstants>
<DefineConstants>$(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES</DefineConstants>
<DefineConstants>$(DefineConstants);FUNCTIONAL_TESTS</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' != 'netcoreapp1.1' ">
<!-- Work around https://github.com/dotnet/sdk/issues/926. Align with bitness of the web site projects. -->
<PlatformTarget>x86</PlatformTarget>

<!--
Work around https://github.com/Microsoft/vstest/issues/428 aka https://github.com/aspnet/Mvc/issues/5873.
Create the appropriate binding redirects.
-->
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Microsoft.AspNetCore.Mvc.Formatters.Xml.Test\XmlAssert.cs" />
<EmbeddedResource Include="compiler\resources\**\*" />

<!--
Work around https://github.com/Microsoft/vstest/issues/196. Execute tests with assemblies in the bin folder, not
a temporary location. Unable to find the web site project folders otherwise.
-->
<None Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

Expand Down Expand Up @@ -62,8 +73,8 @@
</ItemGroup>

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

0 comments on commit 5c96a7c

Please sign in to comment.