2dog.Templates 4.7.0.29

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet new install 2dog.Templates@4.7.0.29
                    
This package contains a .NET Template Package you can call from the shell/command line.

2dog Templates

This directory contains the dotnet new templates for creating 2dog projects.

Template Overview

The twodog template creates a complete 2dog application with:

  • Program.cs - Minimal working 2dog application
  • Sample Godot project - Basic project.godot with a simple scene
  • .editorconfig - Standard .NET coding conventions
  • .gitignore - Ignores for .NET and Godot artifacts
  • Optional test project - xUnit (v3) tests with 2dog.xunit collection fixtures (use --tests flag)

Local Development

Installing the Template Locally

# From the repository root
dotnet new install ./templates/twodog

Creating Projects

# Basic project
dotnet new 2dog -n MyGame

# With tests (requires 2dog.xunit package)
dotnet new 2dog -n MyGame --tests

Uninstalling the Template

dotnet new uninstall ./templates/twodog

Template Structure

templates/
└── twodog/                        # Template content
    ├── .template.config/
    │   └── template.json          # Template configuration
    ├── Company.Product1.sln
    ├── Company.Product1/          # Application project
    │   ├── Company.Product1.csproj
    │   └── Program.cs
    ├── Company.Product1.Godot/    # Sample Godot project
    │   ├── project.godot
    │   └── main.tscn
    ├── Company.Product1.Tests/    # Optional test project
    │   ├── Company.Product1.Tests.csproj
    │   └── BasicTests.cs
    ├── .editorconfig
    └── .gitignore

Template Parameters

Parameter Type Default Description
--tests bool false Include a test project with xUnit (v3) and 2dog.xunit collection fixtures
--skip-restore bool false Skip automatic NuGet restore after creation

Symbol Replacements

The template uses Company.Product1 as the source name, which gets replaced with your project name:

  • Company.Product1 → Your project name (e.g., LetsCook)
  • Applied to: .csproj files, Program.cs, project.godot, namespaces

Packaging

The template content is bundled directly into the main 2dog NuGet package (from twodog/twodog.csproj). There is no separate template package.

When the 2dog package is packed, the template files are included under content/twodog/ in the .nupkg, and the version placeholder in template.json is substituted automatically.

Installing from NuGet

dotnet new install 2dog

Known Limitations

--tests Requires 2dog.xunit Package

The --tests option creates a test project that references 2dog.xunit, which needs to be packaged and published separately.

To enable the test option:

  1. Package 2dog.xunit as a NuGet package (it depends on 2dog, which carries the fixtures)
  2. Publish it to NuGet or a local feed
  3. Ensure it's available when creating projects with --tests

Alternatively, for local development:

  • Create the project without --tests
  • Manually add a test project with project references to local 2dog projects

Template Configuration

The template is defined in .template.config/template.json:

{
  "identity": "outfox.2dog.Template",
  "name": "2dog Application",
  "shortName": "2dog",
  "sourceName": "Company.Product1",
  "symbols": {
    "tests": {
      "type": "parameter",
      "datatype": "bool",
      "description": "Include a test project",
      "defaultValue": "false"
    }
  }
}

Testing Changes

After modifying the template:

  1. Uninstall the old version:

    dotnet new uninstall ./templates/twodog
    
  2. Reinstall:

    dotnet new install ./templates/twodog
    
  3. Test project creation:

    mkdir test_project
    cd test_project
    dotnet new 2dog -n TestApp
    dotnet build
    dotnet run --project TestApp
    

Future Enhancements

Potential improvements for the template:

  • Add --empty option for projects without sample Godot content
  • Add --minimal option for absolute bare minimum
  • Add solution file generation when --tests is used
  • Support for multiple build configurations (Debug/Release/Editor)
  • Optional CI/CD workflow files (GitHub Actions, etc.)
  • Optional Docker support
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
Loading failed