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

Add Project Template for an API application with minimal dependencies #45526

Closed
eerhardt opened this issue Dec 9, 2022 · 3 comments
Closed
Assignees
Labels
area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Milestone

Comments

@eerhardt
Copy link
Member

eerhardt commented Dec 9, 2022

Related to #32485

We should have a template that produces an API application, but is very bare-bones, can be published using PublishAot=true with no warnings, and produces a minimally sized executable.

This template would:

cc @DamianEdwards

@DamianEdwards DamianEdwards self-assigned this Dec 10, 2022
@DamianEdwards DamianEdwards changed the title Add Project Template for a Web API application with minimal dependencies Add Project Template for an API application with minimal dependencies Dec 10, 2022
@DamianEdwards
Copy link
Member

More strawman details. These will likely evolve during .NET 8:

> dotnet new api -aot
  • Has a template option --publish-aot with alias -aot that writes the property <PublishAOT>true</PublishAOT> to the .csproj file
  • Has no template option to control use of HTTPS and does not have HTTPS configured (in code or launchSettings.json launch profiles)
  • Is configured to use workstation GC via property <ServerGarbageCollection>false</ServerGarbageCollection> in the .csproj file
  • Does not have appsettings.json file (the empty/slim host does not have the settings files config provider added)
  • Has single MapGet call that declares a JSON-returning endpoint
  • No option for using ApiControllers (can change in the future as NativeAOT support expands)

@javiercn javiercn added the area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Dec 12, 2022
@captainsafia captainsafia added this to the .NET 8 Planning milestone Dec 13, 2022
@ghost
Copy link

ghost commented Dec 13, 2022

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@DamianEdwards
Copy link
Member

Completed in #43756

@ghost ghost locked as resolved and limited conversation to collaborators Feb 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Projects
None yet
Development

No branches or pull requests

4 participants