Re: Adding key makes solution compile very slow

From: Nicole Calinoiu (calinoiu)
Date: 11/25/04


Date: Thu, 25 Nov 2004 13:24:33 -0500

Is your key being used from a key container, a local file, or a file
residing elsewhere on a network? How deep do your inter-project references
run? What is the maximum number of other assemblies referenced by any given
project?

"Mark" <Mark@discussions.microsoft.com> wrote in message
news:F8A75217-CDF4-4DD0-8911-8C7BF639C742@microsoft.com...
>> 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
>> >>
>> >>
>> >>
>>
>>
>>



Relevant Pages

  • Re: Adding key makes solution compile very slow
    ... Thanks for the article reference. ... "Robert Hurlbut" wrote: ... > key in each project's AssemblyInfo file. ... > I have never seen a marked difference in compile times using this method. ...
    (microsoft.public.dotnet.security)
  • Re: Ladies in waiting ---genealogy
    ... So "if" I can pinpoint the person, ... reference to look at. ... class household in the country would have hired a lady in ...
    (soc.genealogy.medieval)
  • Re: Ladies in waiting ---genealogy
    ... indeed any in existance. ... reference to look at. ... and there was no regulation, taxation, organization or other such ...
    (soc.genealogy.medieval)
  • Re: Latex error messages
    ... I haven't been able to pinpoint the argument reference - so any help ... Maybe something's odd about the bouding box in ss96_3.eps. ...
    (comp.text.tex)
  • Re: Latex error messages
    ... ghs writes: ... I haven't been able to pinpoint the argument reference - so any help would ... Robin Fairbairns, Cambridge ...
    (comp.text.tex)