By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,992 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,992 IT Pros & Developers. It's quick & easy.

Compiler Error Message: CS0006

P: n/a

We suddenly got a mysterious error message on our Windows Server 2003 (SP1)
after rolling out a bug fix on a web services application this morning. The
application compiles and runs fine on the development workstation (from vs
2005 on Windows XP Pro), but when I run "Copy Web Site..." to move the app
out from VS to the server, then all accesses to the web service via a
browser show this error message: "Compiler Error Message: CS0006: Metadata
file" .... "System.EnterpriseServices.dll' could not be found". (Full
error is pasted below.)

I cannot find any references to this error on MS websites or knowledgebase.
I have found several newsgroup references elsewhere stating that you need to
place the DLL into the GAC. But from what I can tell, this
EnterpriseServices DLL is a .NET assembly that is inherently already in the
GAC. (And I looked on the server, and it is present in /windows/assembly.)
Also, several posting say to remove "<identity impersonate="true" />" from
web.config, but we have no such line in ours.

Any recommendations? It's urgent for us.




Server Error in '/ws0200' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: CS0006: Metadata file
'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServi ces\\System.EnterpriseSer vices.dll'
could not be found

Source Error:

[No relevant source lines]

Source File: Line: 0

Show Detailed Compiler Output:

"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc .exe" /t:library
/R:"C:\WINDOWS\assembly\GAC_32\System.Data\ _b77a5c561934e089\System.Data.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0 .0.0__b03f5f7f11d50a3a\System.Drawing.dll"
/R:"C:\WINDOWS\assembly\GAC_32\System.Web\ b03f5f7f11d50a3a\System.Web.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System\ 7a5c561934e089\System.dll"
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\m scorlib.dll"
/R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseSer vices\\System.EnterpriseS ervices.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configurati on\\System.Configuration. dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Service s\\System.Web.Services.dl l"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\ __b77a5c561934e089\System.Xml.dll"
/out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 \Temporary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.d ll" /D:DEBUG /debug+
/optimize- /w:4 /nowarn:1659;1699
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.1 0.cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.3 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.2 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.1 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.0 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.7 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.6 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.9 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.5 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.8 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.4 .cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.1 1.cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\ws0200\ea7bc2bc\ba7084cf\App_Code.kdys5pgv.1 2.cs"

Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

error CS0006: Metadata file
'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServi ces\\System.EnterpriseSer vices.dll'
could not be found

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Aug 4 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Hello Bruce,

Nice to see you again and how are you doing?

Regarding on the error message you mentioned, it seems the ASP.NET runtime
failed to locate the System.EnterpriseServices.dll metadata assembly from
the following loatino:

"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServi ces\

Based on my experience, this is likely a machine specific issue. Have you
tried deploying the web application on other webserver machine to see
whether it also suffers this issue?

I've done some research in our internal database and found some former
cases that have the similar symptom as yours. In those cases, the problem
machine's GAC_32 seems has been corrupted(or not installed well) and the
System.EnterpriseServices.dll assembly is not in the expected location(as

To verify this, you can start the commandline prompt(cmd.exe) on the
problem server machine and navigate to the following directory:

C:\WINDOWS\assembly\GAC_32\System.EnterpriseServic es\

After that use "dir" command to see whether the
System.EnterpriseServices.dll assembly is in it. If the assembly does be
missing, you can manually copy a valid copy into it. You can find a copy of
the "System.EnterpriseServices.dll" in the following location:

After you have copied the assembly, you can test the web application again
to see whether it works.

Hope this helps.


Steven Cheng

Microsoft MSDN Online Support Lead


Get notification to my posts through email? Please refer to

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial

response from the community or a Microsoft Support Engineer within 1
business day is

acceptable. Please note that each follow up response may take approximately
2 business days

as the support professional working with you may need further investigation
to reach the

most efficient resolution. The offering is not appropriate for situations
that require

urgent, real-time or phone-based interactions or complex project analysis
and dump analysis

issues. Issues of this nature are best handled working with a dedicated
Microsoft Support

Engineer by contacting Microsoft Customer Support Services (CSS) at


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

Aug 7 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.