Skip to content
Permalink
Browse files

[Build] Force references to be added only for direct and explicit pac…

…kage references
  • Loading branch information
xen2 committed Jan 8, 2019
1 parent 8e38e7f commit be7dcfb571439940cabf8c60fc1590a1bc29b05f
Showing with 7 additions and 1 deletion.
  1. +7 −1 sources/core/Xenko.Core/build/Xenko.Core.targets
@@ -69,7 +69,13 @@
<Target Name="XenkoRunAssemblyProcessor" DependsOnTargets="ResolveAssemblyReferences">
<WriteLinesToFile File="$(IntermediateOutputPath)XenkoReferences.cache" Lines="@(ReferencePath)" Overwrite="true" />
<ItemGroup>
<XenkoAddReference Include="@(ReferencePath)" Condition="'%(ReferencePath.ExternallyResolved)' == 'true' Or '%(ReferencePath.BuildReference)' == 'true'" />
<!-- We want list of references coming from direct and explicit PackageReference. We are using metadata to combine ReferencePath and PackageReference items https://stackoverflow.com/a/18032552 -->
<XenkoAddReference Include="@(ReferencePath)" Condition="'%(PackageReference.IsImplicitlyDefined)' != 'true'">
<NuGetPackageReference>%(PackageReference.Identity)</NuGetPackageReference>
</XenkoAddReference>
<XenkoAddReference Remove="@(XenkoAddReference)" Condition="'%(XenkoAddReference.NuGetPackageId)' != '%(XenkoAddReference.NuGetPackageReference)' Or ('%(XenkoAddReference.ExternallyResolved)' != 'true' And '%(XenkoAddReference.BuildReference)' != 'true')"/>
<!-- Also include non-nuget references (Reference and ProjectReference) -->
<XenkoAddReference Include="@(ReferencePath)" Condition="'%(ReferencePath.NuGetPackageId)' == ''"/>
</ItemGroup>
<PropertyGroup>
<XenkoAssemblyProcessorOptions Condition="'$(XenkoAssemblyProcessorOptions)' == ''">--auto-notify-property --parameter-key --auto-module-initializer --serialization</XenkoAssemblyProcessorOptions>

0 comments on commit be7dcfb

Please sign in to comment.
You can’t perform that action at this time.