Login | Sign Up
ErrorKey - Search engine for Error codes and messages     
  Visual Studio:C# .Net Compiler Errors and Warnings  [ 27 result(s) ]
MICROSOFT 
  Compiler Error CS1548  -  MICROSOFT
Cryptographic failure while signing assembly 'assembly' — 'reason' CS1548 occurs when assembly signing fails. This is usually due to an invalid key file name, an invalid key file path, or a corrupt key file. To fully sign an assembly, you must provide a valid key file that contains information about the public and private keys. To delay sign an assembly, you must select the Delay sign only check box and provide a valid key file that contains information about the public key information. The private key is not necessary when an assembly is delay-signed. For more information, see How to: Sign an Assembly (Visual Studio), /keyfile (Specify Strong Name Key File) (C# Compiler Options) and /delaysign (Delay Sign the Assembly) (C# Compiler Options). When creating an assembly, the C# compiler calls into a utility called al.exe. If there is a failure in the assembly creation, the reason for the failure is reported by al.exe. See Al.exe Tool Errors and Warnings and search that topic for the text reported by the compiler in 'reason'.
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0165 Updated: July 2008  -  MICROSOFT
Use of unassigned local variable 'name' The C# compiler does not allow the use of uninitialized variables. If the compiler detects the use of a variable that might not have been initialized, it generates CS0165. For more information, see Fields (C# Programming Guide). Note that this error is generated when the compiler encounters a construct that might result in the use of an unassigned variable, even if your particular code does not. This avoids the necessity of overly-complex rules for definite assignment. If you encounter this error For more information, see http://blogs.msdn.com/ericlippert/archive/2006/08/18/706398.aspx. Example The following sample generates CS0165: // CS0165.cs using System; class MyClass { public int i; } class MyClass2 { public static void Main(string [] args) { int i, j; if (args[0] == "test") { i = 0; } /* // to resolve, either initialize the variables when declared // or provide for logic to initialize them, as follows: else { i = 1; } */ j = i; // CS0165, i might be uninitialized MyClass myClass; myClass.i = 0; // CS0165 // use new as follows // MyClass myClass = new MyClass(); // myClass.i = 0; } } The following code produces CS0165 in Visual Studio 2008 but not in Visual Studio 2005: //cs0165_2.cs class Program { public static i
int Main() { int i1, i2, i3, i4, i5; // this is an error, because 'as' is an operator // that is not permitted in a constant expression. if (null as object == null) i1 = 1; // this is an error, because 'is' is an operator that // is not permitted in a constant expression. // warning CS0184: The given expression is never of the provided ('object') type if (!(null is object)) i2 = 1; // this is an error, because a variable j3 is not // permitted in a constant expression. int j3 = 0; if ((0 == j3 * 0) && (0 == 0 * j3)) i3 = 1; // this is an error, because a variable j4 is not // permitted in a constant expression. int j4 = 0; if ((0 == (j4 & 0)) && (0 == (0 & j4))) i4 = 1; // this might be an error, because a variable j5 is not // permitted in a constant expression. // warning CS1718: Comparison made to same variable; did you mean to compare something else? int? j5 = 1; if (j5 == j5) i5 = 1; System.Console.WriteLine("{0}{1}{2}{3}{4}{5}", i1, i2, i3, i4, i5); //CS0165 return 1; } } This error occurs in recursive delegate definitions and can be avoided by defining the delegate in two statements: class Program { delegate void Del(); static void Main(string
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0003  -  MICROSOFT
Out of memory The compiler was unable to allocate enough virtual memory to complete compilation. Close all unnecessary applications and compile again. You may also want to increase the pagefile size and make sure that you have free disk space. This error may also appear as the result of having mismatched versions of the Windows Software Development Kit (SDK) and the C# compiler or one or more corrupted files that support the C# compiler; reinstall Visual Studio.
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0151  -  MICROSOFT
A value of an integral type expected A variable was used in a situation where an integral data type was required. For more information, see Types (C# Programming Guide). Example This error can occur when there is no conversion or if the available implicit conversions result in an ambiguous situation. The following sample generates CS0151. // CS0151.cs public class MyClass { public static implicit operator int (MyClass aa) { return 0; } public static implicit operator long (MyClass aa) { return 0; } public static void Main() { MyClass a = new MyClass(); // Compiler cannot choose between int and long switch (a) // CS0151 // try the following line instead // switch ((int)a) { case 1: break; } } } In Visual Studio 2008 and later, a void method invocation generates CS0151. You can fix the error by calling a method that returns an integral type such as int or long. class C { static void Main() { switch (M()) // CS0151 { default: break; } } static void M() { } }
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0227 Updated: August 2008  -  MICROSOFT
Unsafe code may only appear if compiling with /unsafe If source code contains the unsafe keyword, then the /unsafe compiler option must also be used. For more information, see Unsafe Code and Pointers (C# Programming Guide). To set the unsafe option in Visual Studio 2008, click on Project in the main menu, select the Build pane, and check the box that says "allow unsafe code." The following sample, when compiled without /unsafe, will generate CS0227: // CS0227.cs public class MyClass { unsafe public static void Main() // CS0227 { } }
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0518  -  MICROSOFT
Predefined type 'type' is not defined or imported The main cause for this problem is that the project is not importing mscorlib.dll, which defines the entire System namespace. This can be caused by one of the following: The /nostdlib option from the command line compiler has been specified. The /nostdlib option prevents the import of mscorlib.dll. Use this option if you want to define or create a user-specific System namespace. An incorrect mscorlib.dll is referenced. A corrupt Visual Studio .NET or .NET Framework common language runtime installation exists. Residual components from an earlier installation that are incompatible with the latest installation remain. To resolve this problem, take one of the following actions: Do not specify the /nostdlib option from the command line compiler. Make sure that the project refers to the correct mscorlib.dll. Reinstall the .NET Framework common language runtime (if the previous solutions do not solve the problem).
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0106  -  MICROSOFT
The modifier 'modifier' is not valid for this item A class or interface member was marked with an invalid access modifier. The following examples describe some of these invalid modifiers: The static and public modifiers are not permitted on interface methods. The public keyword is not allowed on an explicit interface declaration. In this case, remove the public keyword from the explicit interface declaration. The abstract keyword is not allowed on an explicit interface declaration because an explicit interface implementation can never be overridden. In prior releases of Visual Studio, the static modifier was not permitted on a class, but static classes are allowed starting with Microsoft Visual Studio 2005. For more information, see Interfaces (C# Programming Guide) Example The following sample generates CS0106. // CS0106.cs namespace MyNamespace { interface I { void m(); static public void f(); // CS0106 } public class MyClass { public void I.m() {} // CS0106 public static void Main() {} } }
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0014  -  MICROSOFT
Required file 'file' could not be found A file is needed by the compiler but is not on the system. Make sure that the path is correct. If the file is a Visual Studio system file, then you may need to repair your installation or else remove and reinstall Visual Studio completely.
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0025  -  MICROSOFT
Standard library file 'file' could not be found A file that is needed by the compiler was not found. Check that the path is correct and that the file exists. If the file is a Visual Studio system file, you may need to repair your Visual Studio installation, or reinstall it completely.
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS1600  -  MICROSOFT
Compilation cancelled by user A compilation with the C# compiler was cancelled while using the Visual Studio IDE.
C# .Net Compiler Errors and Warnings
Comments
 
 

 
C# .Net Compiler Errors and Warnings (27)
 
  Prev   1  2  3  Next