csharp-project-init

Initialize a C# ASP.NET Core Web API project with Entity Framework Core, EditorConfig, gitignore, and gitattributes. Use when the user wants to create a new C# project, scaffold a .NET Web API, or set up a C# development environment with EF Core tools.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "csharp-project-init" with this command: npx skills add jim60105/copilot-prompt/jim60105-copilot-prompt-csharp-project-init

C# Project Init

Set up a C# ASP.NET Core Web API project with proper tooling and configuration.

Git commit after each step that modifies or creates files. Skip commit if nothing to commit.

Steps

  1. Ensure the Git working tree is clean:

    git status
    

    If the working directory is not clean, stop execution.

  2. Check .NET SDK version (must be >= 10.0.103):

    dotnet --version
    
  3. Create the project using the webapi template without -n argument:

    dotnet new webapi -controllers
    
  4. Add Entity Framework Core 10 and related SQL Server NuGet packages. Don't use prerelease versions.

  5. Check for EF Core Power Tools CLI:

    efcpt --version
    

    If not installed or version is lower than 10, reinstall:

    dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 10.*
    
  6. Set up C# Global Usings in GlobalUsings.cs with common namespaces.

  7. Add .gitignore file — refer to the gitignore-generator skill.

  8. Add .gitattributes file:

    # Set default behavior to automatically normalize line endings.
    * text=auto
    
    # Force batch scripts to always use CRLF line endings.
    *.{cmd,[cC][mM][dD]} text eol=crlf
    *.{bat,[bB][aA][tT]} text eol=crlf
    
    # Force bash scripts to always use LF line endings.
    *.sh text eol=lf
    
    .env text eol=lf
    Dockerfile text eol=lf
    
    # Denote all files that are truly binary and should not be modified.
    *.mp3 binary
    *.wav binary
    *.bmp binary
    *.png binary
    *.jpg binary
    *.gif binary
    
  9. Download the .editorconfig:

    curl -sL https://gist.github.com/jim60105/ae6ba63978a2dc3ffb3ebb77344cc7f7/raw/47f342c4b793a32697af6d62022692c26f849c07/.editorconfig > .editorconfig
    

Let's do this step by step.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

update-github-actions-version

No summary provided by upstream source.

Repository SourceNeeds Review
General

create-blog-post

No summary provided by upstream source.

Repository SourceNeeds Review
General

docx

No summary provided by upstream source.

Repository SourceNeeds Review