C# compiler hangs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I've a strange and annoying problem with the C# compiler (7.00.9644). When I compile a project with the AssemblyKeyFileAttribute the compiler hangs for a few seconds. This happens only if the assembly is to be strong-named. And it happens only from time to time. The problem is present for a few weeks then it vanishes and after a few weeks it comes back again. I did no changes to my machine when the problem occurs

What's going on

Rober
 
Try issuing the command
sn -m n
at a .net command prompt before you build.


I had this exact same problem, and this fixed it (the command only needs to
be run once, not every time you build, but I put "sn -q -m n" in the first
line of my build batch file). While I have no idea what caused the problem,
it seemed to start after the network was reconfigured by the IT dept. I
also have no idea why this fixes it, but when you stumble on a solution,
you're happy.

[they added roaming profiles right before this happened, which is what made
me try this command. [


Robert Sander said:
Hi,

I've a strange and annoying problem with the C# compiler (7.00.9644). When
I compile a project with the AssemblyKeyFileAttribute the compiler hangs for
a few seconds. This happens only if the assembly is to be strong-named. And
it happens only from time to time. The problem is present for a few weeks
then it vanishes and after a few weeks it comes back again. I did no changes
to my machine when the problem occurs.
 
There are lots of possible explanations. Some of them even involve strange
network issues (something about running XP on a NT4 domain), some of them
are pretty straight-forward. If you aren't using delay signing, then I
would recommend installing your key onto your machine permanently using
sn -i, and then use the AssemblyKeyNameAttribute instead. Almost all of the
problems are traced back to some slowness in temporarily installing the key
to do the signing and then uninstalling it when done.

Let me know if that doesn't work for you or isn't an option.

--
--Grant
This posting is provided "AS IS" with no warranties, and confers no rights.


Robert Sander said:
Hi,

I've a strange and annoying problem with the C# compiler (7.00.9644). When
I compile a project with the AssemblyKeyFileAttribute the compiler hangs for
a few seconds. This happens only if the assembly is to be strong-named. And
it happens only from time to time. The problem is present for a few weeks
then it vanishes and after a few weeks it comes back again. I did no changes
to my machine when the problem occurs.
 
Back
Top