Scott Stewart

Scott Stewart

  • 1.5k
  • 189
  • 17.9k

Startup=<%viewName%> is not valid

Mar 7 2022 1:49 PM

The category is actually Visual Studio 2019 but that option did not exist and I was required to select one. The app is written in C#, WPF, MVVM.

I broke my program when I tried to migrate from .Net 4.5 Framework to .Net Core. After really trashing everything, I reverted to the previous commit and have been trying to work my way through hundreds of strange errors even so. My csproj file got trashed and the getting the previous commit didn't help that.  I was able to edit it and get everything back. But the last error (showing right now) is;

"Startup="./Views/MainWindowView.xaml" is not valid. './Views/MainWindowView.xaml' is not a valid event handler method name. Only instance methods on the generated or code-behind class are valid. Line 4 Position 14."

This has always been the start up. And it works in all of my programs. It is my template. Like I said, it always works. The file is there. The code behind has nopthing in it. It never has had anything in it. 

namespace PH_Rig
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
    }
}

Where can I look for the solution to this error. So far, my searches haven't turned up the answer.

Thanks,

Scott