문제

I have a rather large solution for a Prism MVVM composite application. When I add a new WPF Application project, in App.xaml.cs, on the line:

public partial class App : Application

added automatically by the project template, Application is underlined in red, and on hover, the error message is:

Type name expected, but namespace name found.

If I create a new WPF Application project alone in a new solution, this does not occur, and Application is recognised as a type. If I then add that new project, without modification, to my real, working solution, the same error occurs in the new project.

This really has me stumped. What could possible cause this?

도움이 되었습니까?

해결책

Turns out the class App was contained in a namespace that ended in .Application, so the compiler was confusing that namespace with the type Application.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top