Skip to content

Commit

Permalink
Allow duplicate items on publish, since depends into image tree has d…
Browse files Browse the repository at this point in the history
…uplicates.

Add CopyToOutput on a number of PublishProjectReferences.
Remove conditional IncludeProjectReferences. Should not be required.
  • Loading branch information
wasabii committed Sep 2, 2023
1 parent 889b861 commit 87b21ed
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/IKVM.MSBuild/IKVM.MSBuild.msbuildproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
<PublishProjectReference Include="..\IKVM.MSBuild.Tasks\IKVM.MSBuild.Tasks.csproj">
<SetTargetFramework>TargetFramework=net472</SetTargetFramework>
<PublishPackagePath>tasks\net472</PublishPackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</PublishProjectReference>
<PublishProjectReference Include="..\IKVM.MSBuild.Tasks\IKVM.MSBuild.Tasks.csproj">
<SetTargetFramework>TargetFramework=net6.0</SetTargetFramework>
<PublishPackagePath>tasks\net6.0</PublishPackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</PublishProjectReference>
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/IKVM.Tests/IKVM.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<_ReferencedClangProjects Include="$(MSBuildThisFileDirectory)..\libikvm-tests\libikvm-tests.clangproj " />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != '' ">
<ItemGroup>
<IncludeProjectReference Include="..\IKVM.Runtime\IKVM.Runtime.csproj">
<SetTargetFramework>TargetFramework=net472</SetTargetFramework>
<IncludeTargetPath>lib\net472\</IncludeTargetPath>
Expand All @@ -67,7 +67,7 @@
</IncludeProjectReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != '' ">
<ItemGroup>

<PublishProjectReference Include="..\ikvmc\ikvmc.csproj" Condition="$(_EnabledToolRuntimes.Contains(';win7-x64;'))">
<SetTargetFramework>TargetFramework=net472</SetTargetFramework>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ProjectReference Include="..\IKVM.Tools.Exporter\IKVM.Tools.Exporter.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != '' ">
<ItemGroup>
<IncludeProjectReference Include="..\IKVM.Runtime\IKVM.Runtime.csproj">
<SetTargetFramework>TargetFramework=net472</SetTargetFramework>
<IncludeTargetPath>lib\net472\</IncludeTargetPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<EmbeddedResource Include="IkvmImporterTests.java" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != '' ">
<ItemGroup>
<IncludeProjectReference Include="..\IKVM.Runtime\IKVM.Runtime.csproj">
<SetTargetFramework>TargetFramework=net472</SetTargetFramework>
<IncludeTargetPath>lib\net472\</IncludeTargetPath>
Expand Down
6 changes: 3 additions & 3 deletions src/IKVM.Tools.Tests/IKVM.Tools.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
</None>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != '' ">
<ItemGroup>
<IncludeProjectReference Include="..\IKVM.Runtime\IKVM.Runtime.csproj">
<SetTargetFramework>TargetFramework=net472</SetTargetFramework>
<IncludeTargetPath>lib\net472\</IncludeTargetPath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</IncludeProjectReference>
<IncludeProjectReference Include="..\IKVM.Java\IKVM.Java.msbuildproj">
<SetTargetFramework>TargetFramework=net472</SetTargetFramework>
Expand All @@ -44,7 +44,7 @@
</IncludeProjectReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != '' ">
<ItemGroup>

<PublishProjectReference Include="..\ikvmc\ikvmc.csproj" Condition="$(_EnabledImageRuntimes.Contains(';win7-x64;'))">
<SetTargetFramework>TargetFramework=net472</SetTargetFramework>
Expand Down
1 change: 1 addition & 0 deletions src/IKVM/IKVM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);GetProjectReferenceBuildOutputInPackage</TargetsForTfmSpecificBuildOutput>
<TargetsForTfmSpecificDebugSymbolsInPackage>$(TargetsForTfmSpecificDebugSymbolsInPackage);GetProjectReferenceDebugSymbolsInPackage</TargetsForTfmSpecificDebugSymbolsInPackage>
<NoWarn>NU5118</NoWarn>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>

<PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion src/javac-ref/javac-ref.msbuildproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

<Import Project="$(MSBuildThisFileDirectory)..\..\IKVM.deps.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\..\IKVM.refs.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\..\IKVM.libs.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\IKVM.NET.Sdk\Sdk\Sdk.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\IKVM\buildTransitive\IKVM.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\IKVM.MSBuild\buildTransitive\netstandard2.0\IKVM.MSBuild.targets" />
Expand Down

0 comments on commit 87b21ed

Please sign in to comment.