Option 1:
- Open a Visual Studio command-prompt as an administrator
- Navigate to the Microsoft SDKs\Windows\v7.0A\bin directory.
- ***SAVE A COPY*** of your original resgen.exe file. This is very important if you want to be able to replace our tweak with the original file without having to repair your installation.
copy resgen.exe regen.exe.old - Set the 32-bit flag to true using corflags.exe
corflags.exe resgen.exe /32BIT+ /Force - Note the warning about strong name issues. On my machine the build now succeeds, without needing to do any additional work due to strong name issues. IF you have problems after trying this method, you can try the following to skip string name verification for that assembly-
- Register resgen.exe for strong name verification skipping using sn.exe
sn.exe –Vr resgen.exe
WARNING! This is a security risk. You are bypassing strongname verification for this assembly, making it possible for malicious code posing as resgen.exe to execute. To turn verification back on, use sn.exe –Vu resgen.exe
Option 2:
Add the following line to your csproj file ...
Option 3:
Try using the 64-bit version of tracker.exe, even for 32-bit builds, when targeting .NET 3.5 and lower. Indicate you want to run ResGen as a tool, and that it is ManagedIL (Managed32Bit doesn't work because of this flagging issue):
a. Add this to your MSBUILD command-line:
b. Or add this to your project:
This comment has been removed by a blog administrator.
ReplyDelete