C# Error CS0433 – The type TypeName1 exists in both TypeName2 and TypeName3

C# Compiler Error

CS0433 – The type TypeName1 exists in both TypeName2 and TypeName3

Reason for the Error

You’ll get this error in your C# code when you are referencing two or more assemblies in your .NET application and both contains the same namespace and type resulting in the ambiguity.

Solution

You can fix this error in your C# program by one of the below options

  • Don’t reference one of the assemblies.
  • If you have to reference both of the assemblies, use the alias feature in your C# code.

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...