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
.
Base class `Application` not recognised as type in one solution
-
31-05-2023 - |
Domanda
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?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow