When hacking WPF one sometimes get
System.Windows.Markup.XamlParseException was unhandled
Message="Cannot create instance of 'FormMain' defined in assembly 'Kopain2, Version=220.127.116.11, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'Forms/FormMain.xaml' Line 1 Position 9.
which does not give much of a clue.
So copy exception details to your favourite editor (Copy exception detail to the clipboard...) and scroll down. Typically at the second last row you can read something like
at Kopain2.FormMain..ctor() in C:\Data\Projects\Kopain2\Kopain2\Forms\FormMain.xaml.cs:line 101
which is a magnitude more helpful.