forked from kzu/InjectModuleInitializer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInjectModuleInitializer.targets
23 lines (17 loc) · 999 Bytes
/
InjectModuleInitializer.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="InjectModuleInitializer"
Inputs="@(IntermediateAssembly)"
Outputs="$(IntermediateOutputPath)$(MSBuildProjectName).moduleinitializer.tmp"
BeforeTargets="CopyFilesToOutputDirectory">
<PropertyGroup>
<InjectExtraArgs Condition="'$(AssemblyOriginatorKeyFile)' != '' and '$(SignAssembly)' == 'true'">/k:"$(AssemblyOriginatorKeyFile)"</InjectExtraArgs>
</PropertyGroup>
<Exec Command='"$(InjectModuleInitializerTool)" $(InjectExtraArgs) "@(IntermediateAssembly)"' />
<!-- Make sure the incremental build doesn't run this target again -->
<Touch Files="$(IntermediateOutputPath)$(MSBuildProjectName).moduleinitializer.tmp" AlwaysCreate="true" ForceTouch="true" />
<!-- Registers file for Clean -->
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)$(MSBuildProjectName).moduleinitializer.tmp" />
</ItemGroup>
</Target>
</Project>