Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

Create EmbeddedResource before build.

$
0
0

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.



Viewing all articles
Browse latest Browse all 2763

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>