I removed a project in my solution and then later re-added it.
Since reading it.. I'm getting an ambiguous reference
error now which I can't remove.
viewing the implementation of the class (which is getting the error) I see it references it twice:
> ClassName (myclass.Class) myclass.Class
> ClassName (myclass.Class) myclass.Class, Version=1.0.0.0
the namespace is only viewed once, but this problem only exists in 1 partial view.
EDIT:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyClass.Class.MyViewModel>" %>
MyViewModel is giving the ambiguous error, if i view all the available classes it shows duplicates like:
MyClass.Class.MyViewModel
MyClass.Class.MyViewModel
MyClass.Class.MyOtherViewModel
MyClass.Class.MyOtherViewModel
but when I open another partial view in the same project, it's fine. It's just the 1 partial that seems to be retaining the duplicate reference.
Any idea how I can resolve this?
This answer is not useful. Show activity on this post. ambiguity error is that you named field and property tha same name "colour". change the property definition f.e. public string Colour { get { return colour;} set { colour = value;} }
Have you tried right-clicking the solution and doing Clean Solution
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With