To resolve this problem, modify the compiler definition for the C# compiler to include the /nostdlib option. The /nostdlib option prevents the import of the mscorlib.dll assembly, which defines the entire System namespace. To include the /nostdlib option in the C# compiler definition on a computer, follow these steps:
- Open the Machine.config file, and then locate the section.
- In the definition for C#, add the compilerOptions attribute with a value of /nostdlib.
<compiler language="c#;cs;csharp"
extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider, System,
Version=1.0.3300.0,
Culture=neutral,
PublicKeyToken=b77a5c561934e089"
warningLevel="1"
compilerOptions="/nostdlib" />