- Description
- Features
- Getting Started
- Usage
- Example of code
- Contributing
- Bug / Issue Reporting
- License
- Contact
- Acknowledgments
This is a template for creating .NET projects. It includes a basic structure and some common files to get started quickly.
- Dotnet 9.0 or later
The TirsvadWeb.Template can be installed in several ways:
-
Clone the repository:
git clone https://github.com/TirsvadWeb/Dotnet.Template.git cd Dotnet.Template
-
Restore dependencies:
dotnet restore
From here it is an example for projects using this template.
-
Update database (if needed):
dotnet ef database update --project src/Template.Infrastructure
-
Build the project:
dotnet build
-
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>
dotnet add package NugetPackageName
See example here
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.
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
If you encounter a bug or have an issue to report, please follow these steps:
-
Go to the Issues Page
Navigate to the GitHub Issues page. -
Click "New Issue"
Click the green "New Issue" button to create a new issue. -
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.
- Submit the Issue
Once all details are filled in, click "Submit new issue" to report it.
Distributed under the AGPL-3.0 License.
Jens Tirsvad Nielsen - LinkedIn