Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Allow copy-local ReferenceFromRuntime
Browse files Browse the repository at this point in the history
Tests may want to copy a ReferenceFromRuntime to the test output directory.

To do this, a test can set Private=true (same as you would for a Reference).

By default we don't do this, because anything in the runtime folder will be
part of the shared framework that the test runs on.

In the case of Microsoft.XmlSerializer.Generator it's reference is an
application and the project expects this to be next to the test assembly.
  • Loading branch information
ericstj authored and shmao committed Jan 2, 2018
1 parent d675870 commit d980557
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions referenceFromRuntime.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<ItemGroup>
<!-- tests can use anything from the RuntimePath -->
<ReferencePath Include="@(ReferenceFromRuntime->'$(RuntimePath)%(Identity).dll')" />
<ReferenceCopyLocalPaths Condition="'%(ReferenceFromRuntime.Private)' == 'true'" Include="@(ReferenceFromRuntime->'$(RuntimePath)%(Identity).dll')" />
</ItemGroup>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
</Content>
</ItemGroup>
<ItemGroup>
<ReferenceFromRuntime Include="dotnet-Microsoft.XmlSerializer.Generator" />
<ReferenceFromRuntime Include="dotnet-Microsoft.XmlSerializer.Generator">
<Private>true</Private>
</ReferenceFromRuntime>
</ItemGroup>
<Target Name="GenerateSerializationAssembly" AfterTargets="Build" Condition=" '$(SkipTestsOnPlatform)' != 'true' " >
<PropertyGroup>
Expand Down

0 comments on commit d980557

Please sign in to comment.