Login | Sign Up
ErrorKey - Search engine for Error codes and messages     
  C# .Net  [ 902 result(s) ]
MICROSOFT 
  Compiler Error CS0734  -  MICROSOFT
The /moduleassemblyname option may only be specified when building a target type of 'module' The compiler option /moduleassemblyname should only be used when building a .netmodule. See /moduleassemblyname (Specify Friend Assembly for Module) (C# Compiler Option) for more information. For more information on building a .netmodule, see /target:module (Create Module to Add to Assembly) (C# Compiler Options). Example The following sample generates CS0734. To resolve, add /target:module to the compilation. // CS0734.cs // compile with: /moduleassemblyname:A // CS0734 expected public class Test {}
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0148  -  MICROSOFT
The delegate 'delegate' does not have a valid constructor You imported and used a managed program (one that uses the .NET Framework common language runtime) that was created with another compiler. That compiler allowed an ill-formed delegate constructor. For more information, see Delegates (C# Programming Guide).
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0167  -  MICROSOFT
The delegate 'delegate' is missing the Invoke method You imported and used a managed program (one that uses the .NET Framework common language runtime) that was created with another compiler. That compiler allowed an ill-formed delegate. Therefore, the Invoke method was not available. For more information, see Delegates (C# Programming Guide).
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS1639  -  MICROSOFT
The managed coclass wrapper class signature 'signature' for interface 'interface' is not a valid class name signature This error occurs if the metadata for the interface is invalid. This should never occur if the interface was generated using C# or a supported .NET language. Check with the vendor of the interface or verify that the interface assembly was generated successfully.
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS0178  -  MICROSOFT
Invalid rank specifier: expected ',' or ']' An array initialization was ill-formed. For example, when specifying the array dimensions, you can specify the following: A number in brackets Empty brackets A comma enclosed in brackets For more information, see Arrays (C# Programming Guide) and the C# specification (C# Language Specification) section on array initializers. Example The following sample generates CS0178. // CS0178.cs class MyClass { public static void Main() { int a = new int[5][,][][5; // CS0178 int[,] b = new int[3,2]; // OK int[][] c = new int[10][]; c[0] = new int[5][5]; // CS0178 c[0] = new int[2]; // OK c[1] = new int[2]{1,2}; // OK } }
C# .Net Compiler Errors and Warnings
Comments
 
  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 CS1679  -  MICROSOFT
Invalid extern alias for '/reference'; 'identifier' is not a valid identifier When using the external assembly alias feature of the /reference option, the text that follows /reference: and that precedes the '=' must be a valid C# identifier or keyword according to the C# Language Specification. To correct this error, change text before the "=" to a valid C# identifier or keyword. Example The following example generates CS1679. // CS1679.cs // compile with: /reference:123$BadIdentifier%=System.dll class TestClass { static void Main() { } }
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS1112  -  MICROSOFT
Do not use 'System.Runtime.CompilerServices.ExtensionAttribute'. Use the 'this' keyword instead. This error is generated when the ExtensionAttribute is used on a non-static class that contains extension methods. If this attribute is used on a static class, another error, such as CS0708: "Cannot declare instance members in a static class," might occur. In C#, extension methods must be defined in a static class and the first parameter of the method is modified with the this keyword. Do not use the attribute at all in the source code. For more information, see Extension Methods (C# Programming Guide). To correct this error Remove the attribute and apply the this modifier to the first parameter of the method. Example The following example generates CS1112: // cs1112.cs [System.Runtime.CompilerServices.ExtensionAttribute] // CS1112 public class Extensions { public bool A(bool b) { return b; } } class A { }
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS1546  -  MICROSOFT
Property, indexer, or event 'property' is not supported by the language; try directly calling accessor method 'accessor' Your code is consuming an object that has a default indexed property and tried to use the indexed syntax. To resolve this error, call the property's accessor method. For more information on indexers and properties, see Indexers (C# Programming Guide). The following sample generates CS1546. Example This code sample consists of a .cpp file, which compiles to a .dll, and a .cs file, which uses that .dll. The following code is for the .dll file, and defines a property to be accessed by the code in the .cs file. // CPP1546.cpp // compile with: /clr /LD using namespace System; public ref class MCPP { public: property int Prop [int,int] { int get( int i, int b ) { return i; } } }; This is the C# file. // CS1546.cs // compile with: /r:CPP1546.dll using System; public class Test { public static void Main() { int i = 0; MCPP mcpp = new MCPP(); i = mcpp.Prop(1,1); // CS1546 // Try the following line instead: // i = mcpp.get_Prop(1,1); } }
C# .Net Compiler Errors and Warnings
Comments
 
  Compiler Error CS1608  -  MICROSOFT
The Required attribute is not permitted on C# types RequiredAttributeAttribute is not allowed on types defined in C# code.
C# .Net Compiler Errors and Warnings
Comments
 
 

 
C# .Net Compiler Errors and Warnings (899)
Visual Basic .Net Compiler Messages (3)
 
  Prev   1  2  3  4  5  6  7  8  9  10  Next