I need to compile my C# application with high entropy VA turned off due to a vendor library incompatibility. The only way I've found to do it so far is a post-build step with editbin, but that's quite clunky. Is there a better way?
Asked
Active
Viewed 1,813 times
3
-
Here's the start of a solution. Use a response file that has this option set. Modify the csproj file to define a `
` property which will tell the Csc task to use that file. – Mike Zboray Dec 19 '14 at 17:26
1 Answers
14
The IDE is missing support for this option in the Build property sheet. But that's easy to work around, you can simply add the property to the .csproj file by hand. Open it in a text editor, Notepad is fine. Locate the <FileAlignment>
property and add after it:
<HighEntropyVA>False</HighEntropyVA>
And rebuild the project. You can verify by running dumpbin.exe /headers
on the generated executable file:
...
8540 DLL characteristics
Dynamic base
NX compatible
No structured exception handler
Terminal Server Aware
And note the missing "High Entropy Virtual Addresses" characteristic.

Hans Passant
- 922,412
- 146
- 1,693
- 2,536
-
Confirmed working in my case by my program not crashing! Thanks! – Matt Chambers Dec 19 '14 at 18:07
-
Can you please be more specific as to where this needs to be placed at? I do not have a
property in my project. – BeanFlicker Feb 19 '16 at 21:54 -
2Well, that's not healthy. Pick the first `
` you see, add it anywhere inside that group. – Hans Passant Feb 19 '16 at 22:02