Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / November 2006

CSharp compiler error CS2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pat - 11 Nov 2006 06:11 GMT
I am intermittently getting the following compiler error:

CSC : fatal error CS2000: Compiler initialization failed unexpectedly --
'Cannot change thread mode after it is set. '

I was not able to find any posting on the internet related to this error.  I
am not sure when it manifests.  It goes away after rebooting.  I couldn' find
anything in the event log that would trigger this error.  Not sure where else
to look for.

Any help is appreciated.

Thanks
Pat Malay
Peter Duniho - 11 Nov 2006 06:58 GMT
>I am intermittently getting the following compiler error:
>
[quoted text clipped - 8 lines]
> else
> to look for.

I don't know.  I'm glad *I'm* not seeing that error...sounds like a doozy to
figure out.  :)

Seriously though, is there something unusual about your computer, like
overclocking or multiple CPUs or something like that?  It might be related
to something the compiler does only in certain situations (ie odd hardware
configuration), which might explain why the error isn't more commonly known.

As far as what's specifically going wrong, Google suggests that the "Cannot
change thread mode after it is set" is something that happens when some COM
code misbehaves.  Microsoft's KB article 824480 indicates that one might get
the error when COM hasn't been initialized yet when the CRT startup code is
called.  They have a fix, but of course since the error seems to be
happening within the compiler itself, you don't have any way to apply the
fix.

As a last-ditch attempt to fix it, you might try reinstalling Visual Studio.
That's what the docs say you should do for error CS2000.  Of course, I'm
sure they say that only because CS2000 is a generic "something failed" error
and that's the best advice they can offer.  But you never know...could be
worth a try.  :)

Sorry...I wrote a whole post and really all I can say is "I have no idea".
I admit, that's not very useful.  My bad.  :)

Pete
Jani Järvinen [MVP] - 11 Nov 2006 07:04 GMT
Pat,

>I am intermittently getting the following compiler error:
> CSC : fatal error CS2000: Compiler initialization failed unexpectedly --
> 'Cannot change thread mode after it is set. '

Seems like you've hit an uncommon error message with the C# compiler. For us
to better help you in solving the issue, we'd need information at least
about the following:

- Are you using Visual Studio to compiler or the command-line C# compiler
directly?
- If Visual Studio, which version and which service pack, if any?
- If csc.exe, which version? Is it 1.1 or 2.0?
- Which operating system are you using? If Vista, which beta/build?
- Can you compile any applications, or is the one you are referring to the
only one to cause trouble?
- Have you tried to compile the simplest possible Hello World application?

By answering these questions we would get a better picture of your
situation.

Thanks!

Signature

Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
janij@removethis.dystopia.fi
http://www.saunalahti.fi/janij/

Pat - 15 Nov 2006 06:43 GMT
I am using

Visual Studio 2005
.NET 2.0 (same for csc.exe)
OS: Win XP Professional SP2

Error usually manifests first when accessing web service.  After that it
occurs when try to compile any other project via command and some times using
IDE.

I am able to compile and run all the programs.  This error happens
intermittently and usually happens when accessing web service (which does JIT
compiling).

I have two web applications using different versions of .NET.  I had my
suspicions on this but we have several machines with these webapps running
without any problems.

Thanks for your response.

Pat

> Pat,
>
[quoted text clipped - 19 lines]
>
> Thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.