Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top