Question How to use /delaysign in VS 2010?

Administrator

VB.NET Forum Admin
Joined
Jun 3, 2004
Messages
1,462
Programming Experience
10+
I need to delay sign my assemblies in prep for obfuscation. In the past I've used the DelaySign attribute in the Assembly.vb file. It has green squiglies and says to use /delaysign instead. Well, how/where do we do this? How can you tell VS 2010 to add attributes to the compiler?

Thx
 
Yeah, I failed to mention that there is a problem, in my scenario with using the project settings UI. I have three build configurations: Debug, Release, Distribution. Distribution is the one that uses DelaySign as it gets obfuscated. The other two release configurations do not get delay signed. Sadly the project settings design time UI does not distinguish from release configurations which I'm going to report to Microsoft Connect (and expect a By Design response). So I just got through going through each .vbproj file and moving the DelaySign attribute to the individual release configuration propertygroup section. What I'm afraid of is if I make a change somewhere that it may get rewritten and removed? But I was curious if there was some place we could add attributes to the compiler via Visual Studio per the recommendation in the Assembly.vb file. I was using a compiler definition #IF DISTRIBUTION wrapping around the Assembly attribute and make go back to that as the problem I'm seeing with my build is still here (different problem) so it may be unrelated. Not sure yet...just asking.

Thx
 
That checkbox is what makes the /delaysign option to be added to compiler. Looks like you're right from VS it is a common setting for all configurations. In VB Express I also can't see any place to add custom compiler settings.

I also did a test with the .vbproj file, moving the DelaySign property item to a release config property group. VS updated and the checkbox disappeared, running the project Debug worked ok and Release complained as expected about 'strong name verification failed'. While the project file is generated, that manual change appears to be persistant even when changing other properties for that group in VS (including removing signing, for measure).
 
Back
Top