Repository navigation
Description
Description
There is no dotnet new template for nanoFramework SDK-style projects. The tooling spec lists templates as a Phase 1 (minimum viable SDK) component (C7): a nanoapp template for applications and a nanolib template for libraries, so a developer can scaffold a working SDK-style project from the command line (and from the IDE template pickers that surface dotnet new templates). Today there is no first-class way to create a new SDK-style project; the only paths are hand-writing the .csproj or migrating an existing legacy project.
How to solve the problem
Ship a nanoFramework.Templates package with two templates, per the tooling spec:
nanoapp— an application:<Project Sdk="nanoFramework.NET.Sdk">,netnano1.0,OutputType=Exe, aProgram.cswith a minimal sample, and the template metadata (shortName: nanoapp,sourceName).nanolib— a library variant:OutputType=Library, packing metadata stubbed, noProgram.cs.
Both should produce a project that restores and builds against the published SDK, and pin the SDK via global.json where appropriate.
Acceptance: dotnet new nanoapp -n X && cd X && dotnet build succeeds end-to-end against the published SDK; dotnet new nanolib -n Y produces a library that builds and packs.
Describe alternatives you've considered
- Rely on migrating an existing project or copying a sample. Rejected: there is no supported "new project" experience, which is a basic expectation and is needed by both the CLI and the IDE template pickers.
- Bundle templates inside the SDK package. Possible, but the spec calls for a separate template package (C7); a dedicated package is the conventional
dotnet newdistribution and keeps SDK and templates versioned independently.
Additional context
- Specification: 10 — tooling specs §10.4 (component C7) and the minimal SDK-style project shape in 03 — project-file migration.
- Coverage and status: EXECUTION-PLAN.md — spec coverage matrix.
- Parent epic: SDK-style MSBuild project system for .NET nanoFramework #1784.
- Scope: self-contained; can proceed now. Phase 1 (the spec lists C7 in the minimum viable SDK). Building against the published SDK is the only external dependency.
Activity