I'm using SharpDevelop
and had by my bad moved the App.xaml
to an Subdirectory.
When i try to start/debug the Application, C# says, that my Application has no entry points or a static main method (CS5001).
An Edit < Undo
or an movint to the default main folder will be not working.
Whats wrong?
Edit On Project-Settings, no Classes/Methods are listened:
App.xaml
<Application x:Class="SongManager.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Startup="Boot">
</Application>
App.xaml.cs
using System;
using System.Windows;
using SmuleTools;
namespace SongManager {
public partial class App : Application {
private Account user;
public App() {
}
public Account getAccount() {
return this.user;
}
[STAThread]
private void Boot(object sender, StartupEventArgs e) {
Login login = new Login();
login.AuthSuccess((Object result) => {
this.user = (Account) result;
Manager window = new Manager(this);
window.Show();
login.Close();
});
login.Show();
}
}
}
The Solution is a little bit tricky, but easy.
After moving the main .xaml
file, the Build action will be lost - These are not in the Project/Compiler settings!
Step-by-Step:
.xaml
file (for sample, App.xaml
)Other > Build action
to ApplicationDefinition
Screenshot
That is it!