Problem point:
Add the Main method in App.xaml.cs, the following error will appear in compiling:
Error CS0111 Type "APP" has defined a member with the same parameter type named "Main"
Error Type ' App ' already defines a member called ' Main ' with the same parameter types
The error CS0017 program defines multiple entry points. compile with/main (specifying the type that contains the entry point).
Reason:
When you create a new WPF project by default, the main method is automatically generated at compile time (in App.g.i.cs).
How to resolve:
In the App.xaml property, modify the Build Action ApplicationDefinition to page. It's OK to compile again.
"The WPF project was compiled at compile time, and the Microsoft Msbuild:compile build tool did different processing depending on the configuration (ApplicationDefinition or Page). 】
MSBuild Related references: https://msdn.microsoft.com/zh-cn/library/dd393574.aspx
Msbuid Extension: Https://github.com/mikefourie/MSBuildExtensionPack
WPF learning-Create a new project after customizing Main () [Type ' App ' already defines a member called ' Main ' with the same parameter types]