Loading...
Loading...
Creates .NET projects from templates with validated parameters, smart defaults, Central Package Management adaptation, and latest NuGet version resolution. USE FOR: creating new dotnet projects, scaffolding solutions with multiple projects, installing or uninstalling template packages, creating projects that respect Directory.Packages.props (CPM), composing multi-project solutions (API + tests + library), getting latest NuGet package versions in newly created projects. DO NOT USE FOR: finding or comparing templates (use template-discovery), authoring custom templates (use template-authoring), modifying existing projects or adding NuGet packages to existing projects.
npx skill4agent add dotnet/skills template-instantiationdotnet newDirectory.Packages.propstemplate-discoverytemplate-authoringdotnet add package| Input | Required | Description |
|---|---|---|
| Template name or intent | Yes | Template short name (e.g., |
| Project name | Yes | Name for the created project |
| Output path | Recommended | Directory where the project should be created |
| Parameters | No | Template-specific parameters (e.g., |
template-discoverydotnet new <template> --helpDirectory.Packages.props.csprojglobal.jsondotnet new <template> --dry-rundotnet new webapi --name MyApi --framework net10.0 --dry-rundotnet newdotnet new webapi --name MyApi --output ./src/MyApi --framework net10.0 --auth Individual| Template | Parameters | Example |
|---|---|---|
| | |
| | |
| | |
| | |
| | |
dotnet new <template> --help.csproj<PackageReference>Directory.Packages.props<PackageVersion>Version.csprojdotnet new webapi --name MyApi --output ./src/MyApi
dotnet new xunit --name MyApi.Tests --output ./tests/MyApi.Tests
dotnet add ./tests/MyApi.Tests reference ./src/MyApi
dotnet sln add ./src/MyApi ./tests/MyApi.Testsdotnet new install Microsoft.DotNet.Web.ProjectTemplates.10.0
dotnet new uninstall Microsoft.DotNet.Web.ProjectTemplates.10.0dotnet builddotnet buildDirectory.Packages.propsdotnet build.csprojDirectory.Packages.props| Pitfall | Solution |
|---|---|
| Not checking for CPM before creating a project | If |
| Creating projects without specifying the framework | Always specify |
| Not adding the project to the solution | After creation, run |
| Not verifying the project builds | Always run |