File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/ThisAssembly.Resources Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 2828 </EmbeddedResource >
2929 </ItemDefinitionGroup >
3030
31+ <Target Name =" PrepareEmbeddedResources" DependsOnTargets =" PrepareResourceNames" />
32+
3133 <Target Name =" _InjectResourcesAdditionalFiles"
3234 BeforeTargets =" GenerateMSBuildEditorConfigFileShouldRun"
33- DependsOnTargets =" PrepareResourceNames " >
35+ DependsOnTargets =" PrepareEmbeddedResources " >
3436 <ItemGroup >
3537 <EmbeddedResource Condition =" !$([System.IO.Path]::IsPathRooted('%(RelativeDir)')) OR '%(Link)' != ''" >
3638 <AreaPath Condition =" !$([System.IO.Path]::IsPathRooted('%(RelativeDir)'))" >%(RelativeDir)%(Filename)</AreaPath >
Original file line number Diff line number Diff line change @@ -52,6 +52,19 @@ The following MSBuild properties can be used to customize the generated code:
5252| ThisAssemblyNamespace | Sets the namespace of the generated ` ThisAssembly ` root class. If not set, it will be in the global namespace. |
5353| ThisAssemblyVisibility | Sets the visibility modifier of the generated ` ThisAssembly ` root class. If not set, it will be internal. |
5454
55+ ## Adding dynamic resources
56+
57+ You can also provide additional embedded resources dynamically, by running a target before
58+ ` PrepareEmbeddedResources ` :
59+
60+ ``` xml
61+ <Target Name =" AddDynamicResources" BeforeTargets =" PrepareEmbeddedResources" >
62+ <ItemGroup >
63+ <EmbeddedResource Include =" Content/Docs/$(Configuration).md" />
64+ </ItemGroup >
65+ </Target >
66+ ```
67+
5568<!-- #resources -->
5669<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
5770<!-- exclude -->
You can’t perform that action at this time.
0 commit comments