C# Error CS0739 – ‘{0}’ duplicate TypeForwardedToAttribute

C# Error

CS0739 – ‘{0}’ duplicate TypeForwardedToAttribute

Reason for the Error & Solution

‘type name’ duplicate TypeForwardedToAttribute.

An assembly can have no more than one to an external type.

To correct this error

  1. Locate and remove the duplicate .

Example

The following code generates CS0739:

// CS0739.cs  
// CS0739  
// Assume that a class Test is declared in a separate dll  
// with a namespace that is named cs739dll.  
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(cs739dll.Test))]  
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(cs739dll.Test))]  
namespace cs0739  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
        }  
    }  
}  

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

C# Compiler Error CS0442 – ‘Property’: abstract properties cannot have private accessors Reason for the Error You’ll get this error...
This is a really simple one . Below is a simple example of an enum called “Designation” defined with the...
This blog post explain the usage of the Checked Block in .NET and how you can use them in Visual...