0
votes

I try to set up an project with MVVM Cross in Windows Phone 8.1 Universal App. I used this tutorial: https://github.com/MvvmCross/MvvmCross/wiki/Tip-Calc-A-Universal-Windows-App-UI-Project

Now I always get the following exception: Program does not contain a static 'Main' method suitable for an entry point [Project].WindowsPhone

In the App Project is the entry point defined as App.cs In this class I only changed this:

            var setup = new Setup(rootFrame);
            setup.Initialize();

            var start = Mvx.Resolve<IMvxAppStart>();
            start.Start();

And this setup class:

public class Setup : MvxWindowsSetup
{
    public Setup(Frame rootFrame) : base(rootFrame)
    {
    }

    protected override IMvxApplication CreateApp()
    {
        return new Core.App();
    }
}

Does anyone have an idea what's the reason for that? o.O

Thanks NPadrutt

EDIT: I could solve it with creating a new project and add the hot tuna starter package. From there I added the Android and ios files from the other project one by one again.

1
Have you looked through other questions with similar errors - stackoverflow.com/…Stuart
yeah, but this didn't work out for me.. In the end I just recreated the project from scratch and added the other files again.NPadrutt

1 Answers

2
votes

The solution is to set the "Build Action" of your App.xaml file to "ApplicationDefinition".

If you did what I did, you at some point added an App.xaml file from scratch and this sets the build definition incorrectly.

enter image description here