Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong startup project #27

Open
sinatrocious opened this issue Nov 29, 2023 · 1 comment
Open

Wrong startup project #27

sinatrocious opened this issue Nov 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sinatrocious
Copy link

sinatrocious commented Nov 29, 2023

Describe the bug

After creating a new "Avalonia C# Project" and hitting F5 there is always an error:

A project with an Output Type of Class Library cannot be started directly.

because "StartupProject" of solution is set to a AvaloniaApplicationX project, which is wrong. It should be set to AvaloniaApplicationX.Desktop project.

To Reproduce

  1. In Visual Studio startup window choose "Create a new project".
  2. In "Create a new project" window select "Avalonia C# Project" (C# - All platforms - Avalonia)
  3. Click next, click create.
  4. In "New Avalonia app (AvaloniaApplicationX)" select only platform "Desktop" and hit create (Design pattern = Reactive UI, Features = none).
  5. Hit F5, you should see the message box with error.

Additional context

It'a very minor issue, but would be nice to have a fix if it's easy to do. I create new projects quite often just to test something isolated from main projects and I need every time to select some file in solution explorer, click Alt+Enter, select solution, then in Properties change "Startup project", which is quite annoying to do several times a day.

About your setup

  • Visual Studio Version: 17.7.7
  • Template Studio Wizard Version: 1.3
  • Windows Build: 10.0.22621 Build 22621, Microsoft Windows 11 Pro
@sinatrocious sinatrocious added the bug Something isn't working label Nov 29, 2023
@Wezz19
Copy link

Wezz19 commented Oct 4, 2024

Yes the "*.Desktop" project should be set as "Startup Project" by default, if it's possible. The program should compile and run without any modifications when the user press the "Start Debugging" button or F5. I thought something was wrong with the installation the first few times this happened XD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants