The name ViewModel does not exist in the namespace “clr-namespace:Project.ViewModels”

前端 未结 18 1860
旧时难觅i
旧时难觅i 2020-12-04 23:55

Now that\'s a real strange error. I am working on a WPF application and following MVVM. In my MainWindow I am setting views and view models and I get this strange error. Alt

18条回答
  •  爱一瞬间的悲伤
    2020-12-05 00:31

    I ran into this and had trouble working through it based on the answers posted in this forum. I had renamed my project at some point and had introduced a typo into the auto-generated AssemblyInfo.cs file (in the assembly: AssemblyTitle and assembly: AssemblyProduct fields). Surprisingly, this was the only compilation error that I got as a result. Just something a bit non-obvious to double-check if you're getting this error and the previous suggestions don't work.

提交回复
热议问题