Skip to content

TirsvadCLI/Dotnet.Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

NuGet DownloadsContributorsForksStargazersIssuesLicenseLinkedIn

Logo Template

Table of Contents

Description

This is a template for creating .NET projects. It includes a basic structure and some common files to get started quickly.

Features

Getting Started

Prerequisites

  • Dotnet 9.0 or later

Installation

The TirsvadWeb.Template can be installed in several ways:

Clone the repo

Repo size

  1. Clone the repository:

    git clone https://github.com/TirsvadWeb/Dotnet.Template.git 
    cd Dotnet.Template
  2. Restore dependencies:

    dotnet restore

From here it is an example for projects using this template.

  1. Update database (if needed):

    dotnet ef database update --project src/Template.Infrastructure
  2. Build the project:

    dotnet build
  3. Run the API:

    dotnet run --project src/Template

Change TirsvadCLI/Dotnet.Template with the name of your project. Change NugetPackageName with the name of your nuget package.

Add Doxygen to the project and add a script to generate the documentation.

In project file for library, add the following lines:

  <PropertyGroup>
    <VersionPrefix>0.1.0</VersionPrefix>
    <PackageId>$(AssemblyName)</PackageId>
    <Title></Title>
    <Authors>Jens Tirsvad Nielsen</Authors>
    <Company>TirsvadCLI</Company>
    <PackageIcon>logo.png</PackageIcon>
    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
    <RepositoryUrl>https://github.com/TirsvadCLI/Dotnet.Template</RepositoryUrl>
    <PackageTags>Console</PackageTags>
    <PackageReadmeFile>README.md</PackageReadmeFile>
    <PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
    <Description></Description>
  </PropertyGroup>
  <PropertyGroup>
    <IncludeSymbols>true</IncludeSymbols>
    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
  </PropertyGroup>
  <ItemGroup>
    <None Include="..\..\image\logo\64x64\logo.png">
      <Pack>True</Pack>
      <PackagePath>\</PackagePath>
    </None>
    <None Include="..\..\README.md">
      <Pack>True</Pack>
      <PackagePath>\</PackagePath>
    </None>
    <None Include="..\..\LICENSE">
      <Pack>True</Pack>
      <PackagePath>\</PackagePath>
    </None>
  </ItemGroup>

NuGet Package

dotnet add package NugetPackageName

Usage

Notes

Example of code

See example here

πŸ“‚ Folder Structure

Dotnet.Template/
β”œβ”€β”€ πŸ“„ docs/                         # Documentation files
β”‚   └── πŸ“„ doxygen/                  # Doxygen output
β”œβ”€β”€ πŸ–ΌοΈ images/                       # Images used in documentation
β”œβ”€β”€ πŸ“‚ src/                          # Source code for the library
β”‚   β”œβ”€β”€ πŸ“¦ Template/                 # Main project
β”‚   β”œβ”€β”€ πŸ“¦ Template.Application/     # Application layer
β”‚   β”‚   β”œβ”€β”€ πŸ“¦ Models/               # Data transfer objects (DTOs)
β”‚   β”‚   └── πŸ“¦ Services/             # Application services
β”‚   β”œβ”€β”€ πŸ“¦ Template.Infrastructure/  # Infrastructure project
β”‚   β”‚   β”œβ”€β”€ πŸ“¦ Data/                 # Data access layer
β”‚   β”‚   └── πŸ“¦ Services/             # Infrastructure services
β”‚   └── πŸ“¦ Template.Domain/          # Domain project
β”‚       └── πŸ“¦Entities/              # Domain entities
└── πŸ“‚ tests/                        # Test projects
    β”œβ”€β”€ πŸ“¦ Template.Tests/           # Unit tests for the main project
    └── πŸ“¦ Template.IntegrationTests/ # Integration tests

Under folder src/** and tests/** is an example of how you can structure your project. This is just an example and you can change it as you like. Folders do not exist, but is just an example of how you can structure your project.

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

See CONTRIBUTING.md

Bug / Issue Reporting

If you encounter a bug or have an issue to report, please follow these steps:

  1. Go to the Issues Page
    Navigate to the GitHub Issues page.

  2. Click "New Issue"
    Click the green "New Issue" button to create a new issue.

  3. Provide Details

  • Title: Write a concise and descriptive title for the issue.
  • Description: Include the following details:
    • Steps to reproduce the issue.
    • Expected behavior.
    • Actual behavior.
    • Environment details (e.g., OS, .NET version, etc.).
  • Attachments: Add screenshots, logs, or any other relevant files if applicable.
  1. Submit the Issue
    Once all details are filled in, click "Submit new issue" to report it.

License

Distributed under the AGPL-3.0 License.

Contact

Jens Tirsvad Nielsen - LinkedIn

Acknowledgments

About

Template

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published