The release number of this article has been CHS318274
Symptoms When you compile ASP.NET resources using the C # compiler (CSC.exe), you may receive a compiler error message similar to one of the following error messages:
Compiler Error Message: CS1595: 'System.Collections.Arraylist' Is Defined in Multiple Places; Using Definition from 'c: /winnt/microsoft.net/framework/v1.0.3705/mscorlib.dll'
- or -
Compiler Error Message: CS1595: 'System.Runtime.CompilerServices.CompilerGlobalScopeAttribute' is defined in multiple places; using definition from 'c: /windows/microsoft.net/framework/v1.0.3705/mscorlib.dll'
This issue occurs when you try to run the Visual C # .NET web application or run Microsoft Visual Basic .NET or Visual C # .NET Web Service.
This problem occurs because the C # compiler does not have access to folders in the path to the Mscorlib.dll assembly.
Solution To resolve this issue, use one of the following methods (arranged in priority).
Method 1: In the C # compiler definition, include / Nostdlib options To resolve this issue, modify the C # compiler's compiler definition to include / NostDLIB options. The / NostDLIB option disables import MSCORLIB.DLL assembly, and mscorlib.dll is defined throughout
SYSTEM namespace.
To include / NostDLIB options in the C # compiler definition on your computer, follow these steps:
Open the Machine.config file and find the Extension = ". cs" TYPE = "Microsoft.csharp.csharpcodeProvider, System, Version = 1.0.3300.0, Culture = neutral, PublicKeyToken = B77A5C561934E089 WARNINGLEVEL = "1" CompileROptions = "/ Nostdlib" /> Remarks: The CompileROptions property is not incremented. If you need to ignore this option in a web.config file or on a given page, you must also add / NostDLIB options. Remarks: This method cannot be used for use Application of XMLSerializer or web services because The compiler calls used by XMLSerializer do not inherit these options. Method 2: Awarded to the ASPNET account To resolve this issue, you can also grant "List Folder / Read Data" permission to one of the following accounts: ASPNET account. Includes a group of ASPNET accounts. Process identification, an ASP.NET assist process for each folder in the Mscorlib.dll program path (usually% Windir% / Microsoft.Net / Framework / version). This is usually the volume root directory (for example, C: /), and the account is here there is no permission. Note: Do not use this method if the / NostDLib option is used and does not use a web service. This phenomenon is designed to make. More information No matter whether the web service is written in Visual Basic .NET or Visual C # .NET, Web services use C # compiler to compile their agents. Therefore, this error message may also be received even if you are using the Visual Basic .NET project. Please note that if you merge on a page SRC and The codebehind property will also receive similar compiler error messages. However, this will be considered a developer's error. If you encounter a specific problem introduced herein, the error message always specifies the Mscorlib.dll assembly. The default access control list on the volume grants the permissions to read and list the files in the Everyone and the User Group. However, these permissions are sometimes deleted to provide a safer environment. If this happens, Csc.exe cannot all arouse the path name. Since the current ASP.NET does not provide / NostDLIB option to the compiler, the compiler contains multiple routines of the assembly. This issue does not occur when compiling resources using the Visual Basic .NET compiler (VBC.exe). Refer to more information, please visit the Microsoft Web site below: Visual C # .NET article feedback. The information in this article applies to: Microsoft Visual C # .NET (2002) Microsoft ASP .NET (provided with .NET Framework) Recent Updated: 2003-1-13 (1.1) Keyword KBCompiler KBDsupport KBGRPDSASP KBLANGC KBPRB KBSecurity KB318274 KBAUDDEVELOPER