C
C#16mo ago
dither

❔ Execute a target before resources are embedded using a wildcard

I am trying to create a template for using the gircore bindings to gtk with blueprint-compiler, a tool that makes creating GTK ui files less tedious Instead of manually adding embedded resources by doing this:
<EmbeddedResource Include="SampleTestDialog.4.ui">
<LogicalName>SampleTestDialog.4.ui</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="SampleTestDialog.4.ui">
<LogicalName>SampleTestDialog.4.ui</LogicalName>
</EmbeddedResource>
I am using this mess of wildcards
<ItemGroup>
<None Remove="**\*.ui" />
<EmbeddedResource Include="**\*.ui">
<LogicalName>%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Remove="**\*.ui" />
<EmbeddedResource Include="**\*.ui">
<LogicalName>%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>
</ItemGroup>
However, doing this causes an issue: The before Build/PrepareForBuild target that compiles the blueprints executes after the wildcards are expanded. This means the first build will always fail. Is there a way to make the compilation happen before the wildcards are example The second build works perfectly, but there should be a way to fix the first build
2 Replies
dither
dither16mo ago
NVM, found a solution by myself Adding Restore to BeforeTargets fixes it for some reason
Accord
Accord16mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.