Results 1 to 4 of 4

Thread: How to use /delaysign in VS 2010?

  1. #1
    Neal's Avatar
    Neal is offline VB.NET Forum Admin
    .NET Framework
    .NET 4.5
    Join Date
    Jul 2004
    Location
    Richmond, VA
    Posts
    1,263
    Reputation
    266

    Question How to use /delaysign in VS 2010?

    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
    Neal
    VB.NET Forums Admin

  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    15,069
    Reputation
    2801

  3. #3
    Neal's Avatar
    Neal is offline VB.NET Forum Admin
    .NET Framework
    .NET 4.5
    Join Date
    Jul 2004
    Location
    Richmond, VA
    Posts
    1,263
    Reputation
    266
    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
    Neal
    VB.NET Forums Admin

  4. #4
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    15,069
    Reputation
    2801
    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).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •