Re: Adding key makes solution compile very slow

From: Mark (Mark_at_discussions.microsoft.com)
Date: 11/23/04

  • Next message: charismatic_evangelist_at_yahoo.com: "Reverse usage of public/private RSA encryption keys for licensing?"
    Date: Mon, 22 Nov 2004 20:47:05 -0800
    
    

    > How did you add the key to the solution? The best way is to reference the
    key in each project's AssemblyInfo file.

    This is what I did.

    >Could you give a little more information about your changes to try to
    pinpoint the differences in compile times?

    I'm not sure what else I can say - the only difference was that I added the
    strong name key.

    Thanks for the article reference. I think it's best for me to read that,
    maybe there's something else I am unaware of.

    Thanks!
    Mark

    "Robert Hurlbut" wrote:

    > Just adding the key shouldn't increase the time, as far as I can tell, by
    > that much.
    >
    > How did you add the key to the solution? The best way is to reference the
    > key in each project's AssemblyInfo file.
    >
    > (This assumes the location of the key is in the folder directly above the
    > project file)
    > For C#:
    > [assembly: AssemblyKeyFile(@"..\..\..\WhateverName.snk")]
    >
    > For VB:
    > <Assembly: AssemblyKeyFile("..\..\..\WhateverName.snk")>
    >
    > I have never seen a marked difference in compile times using this method.
    > Ideally, you want to use something like delay signing instead of using the
    > private/public key directly, though. For more information, check out this
    > article:
    > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/strongNames.asp.
    >
    > Could you give a little more information about your changes to try to
    > pinpoint the differences in compile times?
    >
    > Robert Hurlbut
    > http://www.securedevelop.net
    > http://weblogs.asp.net/rhurlbut
    >
    > "Mark" <Mark@discussions.microsoft.com> wrote in message
    > news:95900129-85A0-4805-9AFF-C03C537E9787@microsoft.com...
    > >I add the keys, and just click "Build" in VS.Net 2003.
    > >
    > > I'm not using any build scripts yet; I'm not using any pre or post build
    > > events (at least none that I'm aware of given that I'm only using VS.Net's
    > > build); I'm not registering anything new with the GAC.
    > >
    > > I simply add a single key for the solution, have all 10 projects reference
    > > that key, and now the Rebuilds in VS go from 15 seconds to 3 minutes.
    > >
    > > Thanks for any insight,
    > > Mark
    > >
    > > -----
    > >
    > > "Robert Hurlbut" wrote:
    > >
    > >> I am assuming that you mean you are now using pre- and post-build events
    > >> to
    > >> unregister and remove the components from the GAC and add them back to
    > >> the
    > >> GAC and reregister? If you are doing that, unfortunately, there is no way
    > >> around the timing issues as it does take time for each component to go
    > >> through those steps. Can you give a little more information about the
    > >> steps
    > >> you are taking?
    > >>
    > >> Robert Hurlbut
    > >> http://www.securedevelop.net
    > >> http://weblogs.asp.net/rhurlbut
    > >>
    > >> "Mark" <Mark@discussions.microsoft.com> wrote in message
    > >> news:81F6C5EF-B09D-48E9-ABE0-06F7E235ABB3@microsoft.com...
    > >> > Hello,
    > >> > I am adding a strong name to my assemblies in order to work with
    > >> > Enterprise
    > >> > Services' Transactions.
    > >> > When I add the strong name (with sn.exe -k), my compile time for a
    > >> > Rebuild
    > >> > goes from 15 seconds to 3 minutes. This is for 1 solution with 11
    > >> > projects.
    > >> >
    > >> > Does anyone know if this is normal, or if there's an option to make it
    > >> > go
    > >> > quicker?
    > >> >
    > >> > Thanks,
    > >> > Mark
    > >>
    > >>
    > >>
    >
    >
    >


  • Next message: charismatic_evangelist_at_yahoo.com: "Reverse usage of public/private RSA encryption keys for licensing?"