Live Chat Icon For mobile
Live Chat Icon

Why do I get the error message ‘Compiler Error Message: CS1595’

Platform: ASP.NET| Category: Error Handling

This problem occurs because the C# compiler does not have permission to access the folders in the path to the mscorlib.dll assembly

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:

  1. Open the Machine.config file, and then locate the section.
  2. In the definition for C#, add the compilerOptions attribute with a value of /nostdlib.
    For example:

    
    <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' />
    

    For more details refer PRB: ‘Compiler Error Message: CS1595’ Error Message When You Use the C# Compiler to Compile an ASP.NET Resource

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.