Create EmbeddedResource before build. RRS feed

  • Question

  • 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"/>    
          <EmbeddedResource Include="@( ReferencePath->WithMetadataValue( 'CopyLocal', 'true' )->Metadata( 'FullPath' ) )"/>
        <Message Text="Embed local references complete for $(OutputPath)$(TargetFileName)." Importance="high" />

    @(EmbeddedResource) at this moment contains valid list of paths.

    • Edited by Roman Sav Tuesday, July 31, 2018 9:43 AM
    Tuesday, July 31, 2018 8:45 AM

All replies

  • This is happening to me as well and I think it has to do with "CoreCompile". Did you manage to solve it?
    Thursday, October 3, 2019 11:25 AM