Login | Sign Up
ErrorKey - Search engine for Error codes and messages       Comment an error
Return to search results
  Compiler Error CS0731  -  MICROSOFT
The type forwarder for type 'type' in assembly 'assembly' causes a cycle This error can only occur with improperly formed imported metadata. It cannot occur with only C# source. Example The following sample generates CS0731. The example consists of three files: 1. Circular.IL 2. Circular2.IL 3. CS0731.cs First compile the .IL files as libraries, and then compile the .cs code referencing the two files. // Circular.il // compile with: /DLL /out=Circular.dll .assembly extern circular2 { .ver 0:0:0:0 } .assembly extern circular3 { .ver 0:0:0:0 } .assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 2:0:0:0 } .assembly Circular { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .class extern forwarder Circular.Referenced.TypeForwarder { .assembly extern circular2 } .module Circular.dll // MVID: {880C2329-C915-42A0-83E9-9D10C3E6DBD0} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY // Image base: 0x04E40000 // ======== CLASS MEMBERS DECLARATION ========= .class public abstract auto ansi sealed beforefieldinit User extends [mscorlib]System.Object { .method public hidebysig static class [circular2]Circular.Referenced.TypeForwa
arder F() cil managed { .maxstack ...  Login to see more
C# .Net Compiler Errors and Warnings
 

You must login to post a comment.
Comment