Skip to content

Fix DebuggableAttribute in InjectModuleInitializer post-build targets #1745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions eng/WpfArcadeSdk/tools/InjectModuleInitializer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,12 @@
<ILFile>$([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)$(AssemblyName).il'))</ILFile>
</PropertyGroup>

<!-- Ensures the DebuggableAttribute has the appropriate optimizations enabled. -->
<PropertyGroup>
<DebugEnableJitOptimization>false</DebugEnableJitOptimization>
<DebugEnableJitOptimization Condition="'$(Configuration)' == 'Release'">true</DebugEnableJitOptimization>
</PropertyGroup>

<!--
Make a backup before overwriting $(TargetFile)
-->
Expand All @@ -417,6 +423,7 @@
Out="$(TargetFile)"
Dll="true"
Debug="true"
DebugEnableJitOptimization="$(DebugEnableJitOptimization)"
Quiet="true" />

<ILAsmTask ILAsm="$(ILAsm)"
Expand All @@ -426,6 +433,7 @@
Out="$(TargetFile)"
Dll="true"
Debug="true"
DebugEnableJitOptimization="$(DebugEnableJitOptimization)"
Quiet="true" />
</Target>

Expand Down