I want to embed local references in the assembly before compiling the main unit. But the written target does not work.
<Target Name="EmbedLocal" BeforeTargets="CoreCompile"><Message Text="Run EmbedLocal for $(MSBuildProjectFullPath)..." Importance="high"/> <ItemGroup><EmbeddedResource Include="@( ReferencePath->WithMetadataValue( 'CopyLocal', 'true' )->Metadata( 'FullPath' ) )"/></ItemGroup><Message Text="Embed local references complete for $(OutputPath)$(TargetFileName)." Importance="high" /></Target>
@(EmbeddedResource) at this moment contains valid list of paths.