VS2005 ASP.NET 2.0 “Ambiguous Match Found”

Sounds like some dating gameshow, where you are of the winner..and the date you get is someone you just aren’t sure of. Anyways, if you see this error in VS2005 (asp.net), what I have seen it means is: you have some control variables decalred in your codebehind file, and they are also declared in the designer.cs file. To fix, just remove them from the codebehind file and it should build. If you are using Web Application Projects, I have also seen that using “CodeFile=” instead of “CodeBehind=” doesn’t work when you goto deploy. It seems that CodeFile wants the .cs file to be present, and I am guessing most people dont want to deploy their source code along with their aspx files. Happy Coding :)

Advertisements

18 thoughts on “VS2005 ASP.NET 2.0 “Ambiguous Match Found””

  1. Thanks for this post. We had issues with the “Ambiguous Match Found” error when first deploying our application after upgrading to 2.0 from 1.1. There were lots of references on the web to this issue with case-sensitive naming discrepancies, but that was not the case with us, nor did it seem to solve the problems of other desparate coders seeking help.

    I almost didn’t find this post, but it cleared the issue right up. It seems that the conversion wizard chose to leave some of the declarations in our .cs file on the problematic page.

    Thanks again!

    Like

  2. Hi Stevie,

    I was wondering could you help me further on this. I have been paining over this for the last 3 days. I changed a version of a dll in my project and ever since I did, I have gotten this error. Its driving me mad. It seems to occur on the compliation of the markup. I have removed control variables from the designer.vb but it still errors out on me. Do you have any further insight into this. I can provide a code sample if you need it!! Any help would be marvellous. Thanks !!!

    Like

  3. :) Oh best of luck with that. Thanks anyhow though. I was so excited when I read your blog entry as there seems to be a vagueness on the net about this. Shame it didn’t work out for me, but fair play for sharing your knowledge. Best of luck with the move Steve :)

    Like

  4. I too am getting the EXISTS IN BOTH places error. I can’t get rid of it. I had this site running fine in VS2003 ASP.NET v1.1 but needed to update it to VS2005 ASP.NET 2.x so I could use a new control. I cannot get it to work now. This EXISTS IN BOTH paces thing is maddening. I removed all references to the control in question and then referenced them from scratch for the Toolbox but it still SEES the old version of the dll some how and puts it in the Temporary ASP.NET dir. If you have solved this could you please email me and enlighten me? Refards! howzilla at everestkc dot net

    Like

  5. I had this problem in a file .aspx which was because I had .aspx.cs but not .aspx.designer.cs. Right click .aspx in the Solution Explorer and click “Convert to Web Application”. A .aspx.designer.cs file will be created. This fixed the problem for me.

    Like

  6. I faced the same problem
    The reason was that I have a TextBox with ID= ‘find’
    and a string called ‘Find’
    although C# is case senstive but when I changed the string to be ‘_Find’ it solved the problem

    Like

  7. I also had similar issue, parser error “Ambiguous match found”

    the solution to the problem was that in the file where parser error(Ambiguous match) was occurring.. I expanded the drop down for controls/methods in the page.. I found two controls with similar names only their cases were different. One was RegularExpressionValidator1 and other was RegularexpressionValidator1, I rename one to be different from the other and the problem was solved.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s