Skip to content

Commit a847ad5

Browse files
committed
* Added a task to force the test dependency copy
- Apparently the copylocal and none options don't work on the automated build for reasons unknown...
1 parent a1fbffc commit a847ad5

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

src/Ubiquity.NET.CommandLine.SrcGen.UT/Ubiquity.NET.CommandLine.SrcGen.UT.csproj

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,7 @@
2525
Project reference with `ReferenceOutputAssembly="false"` ensures build dependency but doesn't reference the output.
2626
A `None` item is still needed to get a copy of the library in the output folder though...
2727
-->
28-
<ProjectReference Include="..\Ubiquity.NET.CommandLine\Ubiquity.NET.CommandLine.csproj" ReferenceOutputAssembly="false">
29-
<Private>True</Private>
30-
</ProjectReference>
31-
</ItemGroup>
32-
33-
<ItemGroup>
34-
<!-- This ensures the assembly is present even if not directly used by this test (It is referenced by the test compilations) -->
35-
<None Include="$(BaseBuildOutputBinPath)Ubiquity.NET.CommandLine\$(Configuration)\$(TargetFramework)\Ubiquity.NET.CommandLine.*" Pack="false" Visible="false">
36-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
37-
</None>
28+
<ProjectReference Include="..\Ubiquity.NET.CommandLine\Ubiquity.NET.CommandLine.csproj" ReferenceOutputAssembly="false" />
3829
</ItemGroup>
3930

4031
<ItemGroup>
@@ -46,4 +37,12 @@
4637
<EmbeddedResource Include="TestFiles\RootCommandAttributeTests\expected.cs" />
4738
<EmbeddedResource Include="TestFiles\RootCommandAttributeTests\input.cs" />
4839
</ItemGroup>
40+
41+
<Target Name="ForceCopyTestDependency" BeforeTargets="AfterBuild">
42+
<!-- This ensures the assembly is present even if not directly used by this test (It is referenced by the test compilations) -->
43+
<Copy
44+
SourceFiles="$(BaseBuildOutputBinPath)Ubiquity.NET.CommandLine\$(Configuration)\$(TargetFramework)\Ubiquity.NET.CommandLine.dll"
45+
DestinationFolder="$(BaseBuildOutputBinPath)$(AssemblyName)\$(Configuration)\$(TargetFramework)\"
46+
/>
47+
</Target>
4948
</Project>

0 commit comments

Comments
 (0)