Search code examples
c#asp.net-mvcasp.net-mvc-5

Ambiguous reference to ViewModel in MVC project


I have a MVC project .NET 4.5, using VS 2013

When I start debugging the project, I get the following error on my Viewmodel:

Ambiguous reference:
  Vin.Model.ViewModel.Bottle.BottleDetailsViewmodel
  Vin.Model.ViewModel.Bottle.BottleDetailsViewmodel
match

If I stop debugging and clean the solution everything is OK, but as soon as I start debugging the error is back.

Perhaps I also should point out that this is only occurs in the views, not in the controller class or anywhere else in the solution.


Solution

  • You could try:

    • Cleaning the solution and rebuilding
    • Ensure the version of the .Net framework your projects are pointing at are the same
    • Clear your Bin & Obj folders